fidl_fidl_serversuite/
fidl_fidl_serversuite.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::client::QueryResponseFut;
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9use fidl::endpoints::{ControlHandle as _, Responder as _};
10use futures::future::{self, MaybeDone, TryFutureExt};
11use zx_status;
12
13pub const SERVER_SUITE_VERSION: u64 = 1;
14
15bitflags! {
16    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
17    pub struct TeardownReason: u32 {
18        const PEER_CLOSED = 1;
19        const VOLUNTARY_SHUTDOWN = 2;
20        const INCOMPATIBLE_FORMAT = 4;
21        const UNEXPECTED_MESSAGE = 8;
22        const ENCODE_FAILURE = 16;
23        const DECODE_FAILURE = 32;
24        const WRITE_FAILURE = 64;
25    }
26}
27
28impl TeardownReason {
29    #[deprecated = "Strict bits should not use `has_unknown_bits`"]
30    #[inline(always)]
31    pub fn has_unknown_bits(&self) -> bool {
32        false
33    }
34
35    #[deprecated = "Strict bits should not use `get_unknown_bits`"]
36    #[inline(always)]
37    pub fn get_unknown_bits(&self) -> u32 {
38        0
39    }
40}
41
42#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
43#[repr(u32)]
44pub enum StartError {
45    TestDisabled = 1,
46}
47
48impl StartError {
49    #[inline]
50    pub fn from_primitive(prim: u32) -> Option<Self> {
51        match prim {
52            1 => Some(Self::TestDisabled),
53            _ => None,
54        }
55    }
56
57    #[inline]
58    pub const fn into_primitive(self) -> u32 {
59        self as u32
60    }
61
62    #[deprecated = "Strict enums should not use `is_unknown`"]
63    #[inline]
64    pub fn is_unknown(&self) -> bool {
65        false
66    }
67}
68
69#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
70pub enum Test {
71    Setup,
72    IgnoreDisabled,
73    OneWayNoPayload,
74    TwoWayNoPayload,
75    TwoWayResultWithPayload,
76    TwoWayResultWithError,
77    TwoWayStructPayload,
78    TwoWayTablePayload,
79    TwoWayUnionPayload,
80    OneWayWithNonZeroTxid,
81    TwoWayNoPayloadWithZeroTxid,
82    UnknownOrdinalCausesClose,
83    BadMagicNumberCausesClose,
84    IgnoresUnrecognizedAtRestFlags,
85    IgnoresUnrecognizedDynamicFlags,
86    BadPayloadEncoding,
87    V1TwoWayNoPayload,
88    V1TwoWayStructPayload,
89    EventSendingDoNotReportPeerClosed,
90    ReplySendingDoNotReportPeerClosed,
91    ReceiveOneWayNoPayloadFromPeerClosedChannel,
92    ServerTearsDownWhenPeerClosed,
93    ClientSendsTooFewHandles,
94    ClientSendsWrongHandleType,
95    ClientSendsTooManyRights,
96    ClientSendsTooFewRights,
97    ClientSendsObjectOverPlainHandle,
98    ServerSendsWrongHandleType,
99    ServerSendsTooManyRights,
100    ServerSendsTooFewRights,
101    ServerSendsEpitaph,
102    ServerReceivesEpitaphInvalid,
103    RequestMatchesByteLimit,
104    RequestMatchesHandleLimit,
105    ResponseMatchesByteLimit,
106    ResponseMatchesHandleLimit,
107    ResponseExceedsByteLimit,
108    ResponseExceedsHandleLimit,
109    SendStrictEvent,
110    SendFlexibleEvent,
111    ReceiveStrictOneWay,
112    ReceiveStrictOneWayMismatchedStrictness,
113    ReceiveFlexibleOneWay,
114    ReceiveFlexibleOneWayMismatchedStrictness,
115    StrictTwoWayResponse,
116    StrictTwoWayResponseMismatchedStrictness,
117    StrictTwoWayNonEmptyResponse,
118    StrictTwoWayErrorSyntaxResponse,
119    StrictTwoWayErrorSyntaxResponseMismatchedStrictness,
120    StrictTwoWayErrorSyntaxNonEmptyResponse,
121    FlexibleTwoWayResponse,
122    FlexibleTwoWayResponseMismatchedStrictness,
123    FlexibleTwoWayNonEmptyResponse,
124    FlexibleTwoWayErrorSyntaxResponseSuccessResult,
125    FlexibleTwoWayErrorSyntaxResponseErrorResult,
126    FlexibleTwoWayErrorSyntaxNonEmptyResponseSuccessResult,
127    FlexibleTwoWayErrorSyntaxNonEmptyResponseErrorResult,
128    UnknownStrictOneWayOpenProtocol,
129    UnknownFlexibleOneWayOpenProtocol,
130    UnknownFlexibleOneWayHandleOpenProtocol,
131    UnknownStrictTwoWayOpenProtocol,
132    UnknownFlexibleTwoWayOpenProtocol,
133    UnknownFlexibleTwoWayHandleOpenProtocol,
134    UnknownStrictOneWayAjarProtocol,
135    UnknownFlexibleOneWayAjarProtocol,
136    UnknownStrictTwoWayAjarProtocol,
137    UnknownFlexibleTwoWayAjarProtocol,
138    UnknownStrictOneWayClosedProtocol,
139    UnknownFlexibleOneWayClosedProtocol,
140    UnknownStrictTwoWayClosedProtocol,
141    UnknownFlexibleTwoWayClosedProtocol,
142    #[doc(hidden)]
143    __SourceBreaking {
144        unknown_ordinal: u32,
145    },
146}
147
148/// Pattern that matches an unknown `Test` member.
149#[macro_export]
150macro_rules! TestUnknown {
151    () => {
152        _
153    };
154}
155
156impl Test {
157    #[inline]
158    pub fn from_primitive(prim: u32) -> Option<Self> {
159        match prim {
160            1 => Some(Self::Setup),
161            107 => Some(Self::IgnoreDisabled),
162            2 => Some(Self::OneWayNoPayload),
163            3 => Some(Self::TwoWayNoPayload),
164            4 => Some(Self::TwoWayResultWithPayload),
165            5 => Some(Self::TwoWayResultWithError),
166            6 => Some(Self::TwoWayStructPayload),
167            7 => Some(Self::TwoWayTablePayload),
168            8 => Some(Self::TwoWayUnionPayload),
169            9 => Some(Self::OneWayWithNonZeroTxid),
170            10 => Some(Self::TwoWayNoPayloadWithZeroTxid),
171            11 => Some(Self::UnknownOrdinalCausesClose),
172            12 => Some(Self::BadMagicNumberCausesClose),
173            13 => Some(Self::IgnoresUnrecognizedAtRestFlags),
174            14 => Some(Self::IgnoresUnrecognizedDynamicFlags),
175            15 => Some(Self::BadPayloadEncoding),
176            105 => Some(Self::V1TwoWayNoPayload),
177            106 => Some(Self::V1TwoWayStructPayload),
178            109 => Some(Self::EventSendingDoNotReportPeerClosed),
179            110 => Some(Self::ReplySendingDoNotReportPeerClosed),
180            111 => Some(Self::ReceiveOneWayNoPayloadFromPeerClosedChannel),
181            113 => Some(Self::ServerTearsDownWhenPeerClosed),
182            16 => Some(Self::ClientSendsTooFewHandles),
183            17 => Some(Self::ClientSendsWrongHandleType),
184            18 => Some(Self::ClientSendsTooManyRights),
185            19 => Some(Self::ClientSendsTooFewRights),
186            20 => Some(Self::ClientSendsObjectOverPlainHandle),
187            21 => Some(Self::ServerSendsWrongHandleType),
188            22 => Some(Self::ServerSendsTooManyRights),
189            23 => Some(Self::ServerSendsTooFewRights),
190            24 => Some(Self::ServerSendsEpitaph),
191            25 => Some(Self::ServerReceivesEpitaphInvalid),
192            26 => Some(Self::RequestMatchesByteLimit),
193            27 => Some(Self::RequestMatchesHandleLimit),
194            28 => Some(Self::ResponseMatchesByteLimit),
195            29 => Some(Self::ResponseMatchesHandleLimit),
196            30 => Some(Self::ResponseExceedsByteLimit),
197            31 => Some(Self::ResponseExceedsHandleLimit),
198            32 => Some(Self::SendStrictEvent),
199            33 => Some(Self::SendFlexibleEvent),
200            34 => Some(Self::ReceiveStrictOneWay),
201            35 => Some(Self::ReceiveStrictOneWayMismatchedStrictness),
202            36 => Some(Self::ReceiveFlexibleOneWay),
203            37 => Some(Self::ReceiveFlexibleOneWayMismatchedStrictness),
204            38 => Some(Self::StrictTwoWayResponse),
205            39 => Some(Self::StrictTwoWayResponseMismatchedStrictness),
206            63 => Some(Self::StrictTwoWayNonEmptyResponse),
207            40 => Some(Self::StrictTwoWayErrorSyntaxResponse),
208            41 => Some(Self::StrictTwoWayErrorSyntaxResponseMismatchedStrictness),
209            64 => Some(Self::StrictTwoWayErrorSyntaxNonEmptyResponse),
210            42 => Some(Self::FlexibleTwoWayResponse),
211            43 => Some(Self::FlexibleTwoWayResponseMismatchedStrictness),
212            44 => Some(Self::FlexibleTwoWayNonEmptyResponse),
213            45 => Some(Self::FlexibleTwoWayErrorSyntaxResponseSuccessResult),
214            46 => Some(Self::FlexibleTwoWayErrorSyntaxResponseErrorResult),
215            47 => Some(Self::FlexibleTwoWayErrorSyntaxNonEmptyResponseSuccessResult),
216            48 => Some(Self::FlexibleTwoWayErrorSyntaxNonEmptyResponseErrorResult),
217            49 => Some(Self::UnknownStrictOneWayOpenProtocol),
218            50 => Some(Self::UnknownFlexibleOneWayOpenProtocol),
219            51 => Some(Self::UnknownFlexibleOneWayHandleOpenProtocol),
220            52 => Some(Self::UnknownStrictTwoWayOpenProtocol),
221            53 => Some(Self::UnknownFlexibleTwoWayOpenProtocol),
222            54 => Some(Self::UnknownFlexibleTwoWayHandleOpenProtocol),
223            55 => Some(Self::UnknownStrictOneWayAjarProtocol),
224            56 => Some(Self::UnknownFlexibleOneWayAjarProtocol),
225            57 => Some(Self::UnknownStrictTwoWayAjarProtocol),
226            58 => Some(Self::UnknownFlexibleTwoWayAjarProtocol),
227            59 => Some(Self::UnknownStrictOneWayClosedProtocol),
228            60 => Some(Self::UnknownFlexibleOneWayClosedProtocol),
229            61 => Some(Self::UnknownStrictTwoWayClosedProtocol),
230            62 => Some(Self::UnknownFlexibleTwoWayClosedProtocol),
231            _ => None,
232        }
233    }
234
235    #[inline]
236    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
237        match prim {
238            1 => Self::Setup,
239            107 => Self::IgnoreDisabled,
240            2 => Self::OneWayNoPayload,
241            3 => Self::TwoWayNoPayload,
242            4 => Self::TwoWayResultWithPayload,
243            5 => Self::TwoWayResultWithError,
244            6 => Self::TwoWayStructPayload,
245            7 => Self::TwoWayTablePayload,
246            8 => Self::TwoWayUnionPayload,
247            9 => Self::OneWayWithNonZeroTxid,
248            10 => Self::TwoWayNoPayloadWithZeroTxid,
249            11 => Self::UnknownOrdinalCausesClose,
250            12 => Self::BadMagicNumberCausesClose,
251            13 => Self::IgnoresUnrecognizedAtRestFlags,
252            14 => Self::IgnoresUnrecognizedDynamicFlags,
253            15 => Self::BadPayloadEncoding,
254            105 => Self::V1TwoWayNoPayload,
255            106 => Self::V1TwoWayStructPayload,
256            109 => Self::EventSendingDoNotReportPeerClosed,
257            110 => Self::ReplySendingDoNotReportPeerClosed,
258            111 => Self::ReceiveOneWayNoPayloadFromPeerClosedChannel,
259            113 => Self::ServerTearsDownWhenPeerClosed,
260            16 => Self::ClientSendsTooFewHandles,
261            17 => Self::ClientSendsWrongHandleType,
262            18 => Self::ClientSendsTooManyRights,
263            19 => Self::ClientSendsTooFewRights,
264            20 => Self::ClientSendsObjectOverPlainHandle,
265            21 => Self::ServerSendsWrongHandleType,
266            22 => Self::ServerSendsTooManyRights,
267            23 => Self::ServerSendsTooFewRights,
268            24 => Self::ServerSendsEpitaph,
269            25 => Self::ServerReceivesEpitaphInvalid,
270            26 => Self::RequestMatchesByteLimit,
271            27 => Self::RequestMatchesHandleLimit,
272            28 => Self::ResponseMatchesByteLimit,
273            29 => Self::ResponseMatchesHandleLimit,
274            30 => Self::ResponseExceedsByteLimit,
275            31 => Self::ResponseExceedsHandleLimit,
276            32 => Self::SendStrictEvent,
277            33 => Self::SendFlexibleEvent,
278            34 => Self::ReceiveStrictOneWay,
279            35 => Self::ReceiveStrictOneWayMismatchedStrictness,
280            36 => Self::ReceiveFlexibleOneWay,
281            37 => Self::ReceiveFlexibleOneWayMismatchedStrictness,
282            38 => Self::StrictTwoWayResponse,
283            39 => Self::StrictTwoWayResponseMismatchedStrictness,
284            63 => Self::StrictTwoWayNonEmptyResponse,
285            40 => Self::StrictTwoWayErrorSyntaxResponse,
286            41 => Self::StrictTwoWayErrorSyntaxResponseMismatchedStrictness,
287            64 => Self::StrictTwoWayErrorSyntaxNonEmptyResponse,
288            42 => Self::FlexibleTwoWayResponse,
289            43 => Self::FlexibleTwoWayResponseMismatchedStrictness,
290            44 => Self::FlexibleTwoWayNonEmptyResponse,
291            45 => Self::FlexibleTwoWayErrorSyntaxResponseSuccessResult,
292            46 => Self::FlexibleTwoWayErrorSyntaxResponseErrorResult,
293            47 => Self::FlexibleTwoWayErrorSyntaxNonEmptyResponseSuccessResult,
294            48 => Self::FlexibleTwoWayErrorSyntaxNonEmptyResponseErrorResult,
295            49 => Self::UnknownStrictOneWayOpenProtocol,
296            50 => Self::UnknownFlexibleOneWayOpenProtocol,
297            51 => Self::UnknownFlexibleOneWayHandleOpenProtocol,
298            52 => Self::UnknownStrictTwoWayOpenProtocol,
299            53 => Self::UnknownFlexibleTwoWayOpenProtocol,
300            54 => Self::UnknownFlexibleTwoWayHandleOpenProtocol,
301            55 => Self::UnknownStrictOneWayAjarProtocol,
302            56 => Self::UnknownFlexibleOneWayAjarProtocol,
303            57 => Self::UnknownStrictTwoWayAjarProtocol,
304            58 => Self::UnknownFlexibleTwoWayAjarProtocol,
305            59 => Self::UnknownStrictOneWayClosedProtocol,
306            60 => Self::UnknownFlexibleOneWayClosedProtocol,
307            61 => Self::UnknownStrictTwoWayClosedProtocol,
308            62 => Self::UnknownFlexibleTwoWayClosedProtocol,
309            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
310        }
311    }
312
313    #[inline]
314    pub fn unknown() -> Self {
315        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
316    }
317
318    #[inline]
319    pub const fn into_primitive(self) -> u32 {
320        match self {
321            Self::Setup => 1,
322            Self::IgnoreDisabled => 107,
323            Self::OneWayNoPayload => 2,
324            Self::TwoWayNoPayload => 3,
325            Self::TwoWayResultWithPayload => 4,
326            Self::TwoWayResultWithError => 5,
327            Self::TwoWayStructPayload => 6,
328            Self::TwoWayTablePayload => 7,
329            Self::TwoWayUnionPayload => 8,
330            Self::OneWayWithNonZeroTxid => 9,
331            Self::TwoWayNoPayloadWithZeroTxid => 10,
332            Self::UnknownOrdinalCausesClose => 11,
333            Self::BadMagicNumberCausesClose => 12,
334            Self::IgnoresUnrecognizedAtRestFlags => 13,
335            Self::IgnoresUnrecognizedDynamicFlags => 14,
336            Self::BadPayloadEncoding => 15,
337            Self::V1TwoWayNoPayload => 105,
338            Self::V1TwoWayStructPayload => 106,
339            Self::EventSendingDoNotReportPeerClosed => 109,
340            Self::ReplySendingDoNotReportPeerClosed => 110,
341            Self::ReceiveOneWayNoPayloadFromPeerClosedChannel => 111,
342            Self::ServerTearsDownWhenPeerClosed => 113,
343            Self::ClientSendsTooFewHandles => 16,
344            Self::ClientSendsWrongHandleType => 17,
345            Self::ClientSendsTooManyRights => 18,
346            Self::ClientSendsTooFewRights => 19,
347            Self::ClientSendsObjectOverPlainHandle => 20,
348            Self::ServerSendsWrongHandleType => 21,
349            Self::ServerSendsTooManyRights => 22,
350            Self::ServerSendsTooFewRights => 23,
351            Self::ServerSendsEpitaph => 24,
352            Self::ServerReceivesEpitaphInvalid => 25,
353            Self::RequestMatchesByteLimit => 26,
354            Self::RequestMatchesHandleLimit => 27,
355            Self::ResponseMatchesByteLimit => 28,
356            Self::ResponseMatchesHandleLimit => 29,
357            Self::ResponseExceedsByteLimit => 30,
358            Self::ResponseExceedsHandleLimit => 31,
359            Self::SendStrictEvent => 32,
360            Self::SendFlexibleEvent => 33,
361            Self::ReceiveStrictOneWay => 34,
362            Self::ReceiveStrictOneWayMismatchedStrictness => 35,
363            Self::ReceiveFlexibleOneWay => 36,
364            Self::ReceiveFlexibleOneWayMismatchedStrictness => 37,
365            Self::StrictTwoWayResponse => 38,
366            Self::StrictTwoWayResponseMismatchedStrictness => 39,
367            Self::StrictTwoWayNonEmptyResponse => 63,
368            Self::StrictTwoWayErrorSyntaxResponse => 40,
369            Self::StrictTwoWayErrorSyntaxResponseMismatchedStrictness => 41,
370            Self::StrictTwoWayErrorSyntaxNonEmptyResponse => 64,
371            Self::FlexibleTwoWayResponse => 42,
372            Self::FlexibleTwoWayResponseMismatchedStrictness => 43,
373            Self::FlexibleTwoWayNonEmptyResponse => 44,
374            Self::FlexibleTwoWayErrorSyntaxResponseSuccessResult => 45,
375            Self::FlexibleTwoWayErrorSyntaxResponseErrorResult => 46,
376            Self::FlexibleTwoWayErrorSyntaxNonEmptyResponseSuccessResult => 47,
377            Self::FlexibleTwoWayErrorSyntaxNonEmptyResponseErrorResult => 48,
378            Self::UnknownStrictOneWayOpenProtocol => 49,
379            Self::UnknownFlexibleOneWayOpenProtocol => 50,
380            Self::UnknownFlexibleOneWayHandleOpenProtocol => 51,
381            Self::UnknownStrictTwoWayOpenProtocol => 52,
382            Self::UnknownFlexibleTwoWayOpenProtocol => 53,
383            Self::UnknownFlexibleTwoWayHandleOpenProtocol => 54,
384            Self::UnknownStrictOneWayAjarProtocol => 55,
385            Self::UnknownFlexibleOneWayAjarProtocol => 56,
386            Self::UnknownStrictTwoWayAjarProtocol => 57,
387            Self::UnknownFlexibleTwoWayAjarProtocol => 58,
388            Self::UnknownStrictOneWayClosedProtocol => 59,
389            Self::UnknownFlexibleOneWayClosedProtocol => 60,
390            Self::UnknownStrictTwoWayClosedProtocol => 61,
391            Self::UnknownFlexibleTwoWayClosedProtocol => 62,
392            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
393        }
394    }
395
396    #[inline]
397    pub fn is_unknown(&self) -> bool {
398        match self {
399            Self::__SourceBreaking { unknown_ordinal: _ } => true,
400            _ => false,
401        }
402    }
403}
404
405#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
406#[repr(u32)]
407pub enum UnknownMethodType {
408    OneWay = 1,
409    TwoWay = 2,
410}
411
412impl UnknownMethodType {
413    #[inline]
414    pub fn from_primitive(prim: u32) -> Option<Self> {
415        match prim {
416            1 => Some(Self::OneWay),
417            2 => Some(Self::TwoWay),
418            _ => None,
419        }
420    }
421
422    #[inline]
423    pub const fn into_primitive(self) -> u32 {
424        self as u32
425    }
426
427    #[deprecated = "Strict enums should not use `is_unknown`"]
428    #[inline]
429    pub fn is_unknown(&self) -> bool {
430        false
431    }
432}
433
434#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
435pub struct ClosedTargetByteVectorSizeRequest {
436    pub vec: Vec<u8>,
437}
438
439impl fidl::Persistable for ClosedTargetByteVectorSizeRequest {}
440
441#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
442#[repr(C)]
443pub struct ClosedTargetByteVectorSizeResponse {
444    pub n: u32,
445}
446
447impl fidl::Persistable for ClosedTargetByteVectorSizeResponse {}
448
449#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
450#[repr(C)]
451pub struct ClosedTargetCreateNByteVectorRequest {
452    pub n: u32,
453}
454
455impl fidl::Persistable for ClosedTargetCreateNByteVectorRequest {}
456
457#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
458pub struct ClosedTargetCreateNByteVectorResponse {
459    pub vec: Vec<u8>,
460}
461
462impl fidl::Persistable for ClosedTargetCreateNByteVectorResponse {}
463
464#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
465#[repr(C)]
466pub struct ClosedTargetCreateNHandleVectorRequest {
467    pub n: u32,
468}
469
470impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
471    for ClosedTargetCreateNHandleVectorRequest
472{
473}
474
475#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
476pub struct ClosedTargetCreateNHandleVectorResponse {
477    pub vec: Vec<fidl::Event>,
478}
479
480impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
481    for ClosedTargetCreateNHandleVectorResponse
482{
483}
484
485#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
486pub struct ClosedTargetEchoAsTransferableSignalableEventRequest {
487    pub handle: fidl::Handle,
488}
489
490impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
491    for ClosedTargetEchoAsTransferableSignalableEventRequest
492{
493}
494
495#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
496pub struct ClosedTargetEchoAsTransferableSignalableEventResponse {
497    pub handle: fidl::Event,
498}
499
500impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
501    for ClosedTargetEchoAsTransferableSignalableEventResponse
502{
503}
504
505#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
506pub struct ClosedTargetGetHandleRightsRequest {
507    pub handle: fidl::Handle,
508}
509
510impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
511    for ClosedTargetGetHandleRightsRequest
512{
513}
514
515#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
516pub struct ClosedTargetGetHandleRightsResponse {
517    pub rights: fidl::Rights,
518}
519
520impl fidl::Persistable for ClosedTargetGetHandleRightsResponse {}
521
522#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
523pub struct ClosedTargetGetSignalableEventRightsRequest {
524    pub handle: fidl::Event,
525}
526
527impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
528    for ClosedTargetGetSignalableEventRightsRequest
529{
530}
531
532#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
533pub struct ClosedTargetGetSignalableEventRightsResponse {
534    pub rights: fidl::Rights,
535}
536
537impl fidl::Persistable for ClosedTargetGetSignalableEventRightsResponse {}
538
539#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
540pub struct ClosedTargetHandleVectorSizeRequest {
541    pub vec: Vec<fidl::Event>,
542}
543
544impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
545    for ClosedTargetHandleVectorSizeRequest
546{
547}
548
549#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
550#[repr(C)]
551pub struct ClosedTargetHandleVectorSizeResponse {
552    pub n: u32,
553}
554
555impl fidl::Persistable for ClosedTargetHandleVectorSizeResponse {}
556
557#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
558#[repr(C)]
559pub struct ClosedTargetTwoWayStructPayloadRequest {
560    pub v: i8,
561}
562
563impl fidl::Persistable for ClosedTargetTwoWayStructPayloadRequest {}
564
565#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
566#[repr(C)]
567pub struct ClosedTargetTwoWayStructPayloadResponse {
568    pub v: i8,
569}
570
571impl fidl::Persistable for ClosedTargetTwoWayStructPayloadResponse {}
572
573#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
574pub struct ClosedTargetTwoWayResultResponse {
575    pub payload: String,
576}
577
578impl fidl::Persistable for ClosedTargetTwoWayResultResponse {}
579
580#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
581pub struct Empty;
582
583impl fidl::Persistable for Empty {}
584
585#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
586#[repr(C)]
587pub struct OpenTargetFlexibleTwoWayFieldsRequest {
588    pub reply_with: i32,
589}
590
591impl fidl::Persistable for OpenTargetFlexibleTwoWayFieldsRequest {}
592
593#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
594#[repr(C)]
595pub struct OpenTargetStrictTwoWayFieldsRequest {
596    pub reply_with: i32,
597}
598
599impl fidl::Persistable for OpenTargetStrictTwoWayFieldsRequest {}
600
601#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
602#[repr(C)]
603pub struct OpenTargetStrictTwoWayFieldsResponse {
604    pub some_field: i32,
605}
606
607impl fidl::Persistable for OpenTargetStrictTwoWayFieldsResponse {}
608
609#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
610#[repr(C)]
611pub struct OpenTargetFlexibleTwoWayFieldsErrResponse {
612    pub some_field: i32,
613}
614
615impl fidl::Persistable for OpenTargetFlexibleTwoWayFieldsErrResponse {}
616
617#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
618#[repr(C)]
619pub struct OpenTargetFlexibleTwoWayFieldsResponse {
620    pub some_field: i32,
621}
622
623impl fidl::Persistable for OpenTargetFlexibleTwoWayFieldsResponse {}
624
625#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
626#[repr(C)]
627pub struct OpenTargetStrictTwoWayFieldsErrResponse {
628    pub some_field: i32,
629}
630
631impl fidl::Persistable for OpenTargetStrictTwoWayFieldsErrResponse {}
632
633#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
634#[repr(C)]
635pub struct RunnerGetVersionResponse {
636    pub version: u64,
637}
638
639impl fidl::Persistable for RunnerGetVersionResponse {}
640
641#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
642pub struct RunnerOnTeardownRequest {
643    pub reason: TeardownReason,
644}
645
646impl fidl::Persistable for RunnerOnTeardownRequest {}
647
648#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
649#[repr(C)]
650pub struct RunnerShutdownWithEpitaphRequest {
651    pub epitaph_status: i32,
652}
653
654impl fidl::Persistable for RunnerShutdownWithEpitaphRequest {}
655
656#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
657pub struct RunnerStartRequest {
658    pub test: Test,
659    pub any_target: AnyTarget,
660}
661
662impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for RunnerStartRequest {}
663
664#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
665pub struct UnknownMethodInfo {
666    pub ordinal: u64,
667    pub unknown_method_type: UnknownMethodType,
668}
669
670impl fidl::Persistable for UnknownMethodInfo {}
671
672#[derive(Clone, Debug, Default, PartialEq)]
673pub struct ClosedTargetTwoWayTablePayloadRequest {
674    pub v: Option<i8>,
675    #[doc(hidden)]
676    pub __source_breaking: fidl::marker::SourceBreaking,
677}
678
679impl fidl::Persistable for ClosedTargetTwoWayTablePayloadRequest {}
680
681#[derive(Clone, Debug, Default, PartialEq)]
682pub struct ClosedTargetTwoWayTablePayloadResponse {
683    pub v: Option<i8>,
684    #[doc(hidden)]
685    pub __source_breaking: fidl::marker::SourceBreaking,
686}
687
688impl fidl::Persistable for ClosedTargetTwoWayTablePayloadResponse {}
689
690#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
691pub enum AnyTarget {
692    Closed(fidl::endpoints::ServerEnd<ClosedTargetMarker>),
693    Ajar(fidl::endpoints::ServerEnd<AjarTargetMarker>),
694    Open(fidl::endpoints::ServerEnd<OpenTargetMarker>),
695}
696
697impl AnyTarget {
698    #[inline]
699    pub fn ordinal(&self) -> u64 {
700        match *self {
701            Self::Closed(_) => 1,
702            Self::Ajar(_) => 2,
703            Self::Open(_) => 3,
704        }
705    }
706
707    #[deprecated = "Strict unions should not use `is_unknown`"]
708    #[inline]
709    pub fn is_unknown(&self) -> bool {
710        false
711    }
712}
713
714impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for AnyTarget {}
715
716#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
717pub enum ClosedTargetTwoWayResultRequest {
718    Payload(String),
719    Error(u32),
720}
721
722impl ClosedTargetTwoWayResultRequest {
723    #[inline]
724    pub fn ordinal(&self) -> u64 {
725        match *self {
726            Self::Payload(_) => 1,
727            Self::Error(_) => 2,
728        }
729    }
730
731    #[deprecated = "Strict unions should not use `is_unknown`"]
732    #[inline]
733    pub fn is_unknown(&self) -> bool {
734        false
735    }
736}
737
738impl fidl::Persistable for ClosedTargetTwoWayResultRequest {}
739
740#[derive(Clone, Debug)]
741pub enum ClosedTargetTwoWayUnionPayloadRequest {
742    V(i8),
743    #[doc(hidden)]
744    __SourceBreaking {
745        unknown_ordinal: u64,
746    },
747}
748
749/// Pattern that matches an unknown `ClosedTargetTwoWayUnionPayloadRequest` member.
750#[macro_export]
751macro_rules! ClosedTargetTwoWayUnionPayloadRequestUnknown {
752    () => {
753        _
754    };
755}
756
757// Custom PartialEq so that unknown variants are not equal to themselves.
758impl PartialEq for ClosedTargetTwoWayUnionPayloadRequest {
759    fn eq(&self, other: &Self) -> bool {
760        match (self, other) {
761            (Self::V(x), Self::V(y)) => *x == *y,
762            _ => false,
763        }
764    }
765}
766
767impl ClosedTargetTwoWayUnionPayloadRequest {
768    #[inline]
769    pub fn ordinal(&self) -> u64 {
770        match *self {
771            Self::V(_) => 1,
772            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
773        }
774    }
775
776    #[inline]
777    pub fn unknown_variant_for_testing() -> Self {
778        Self::__SourceBreaking { unknown_ordinal: 0 }
779    }
780
781    #[inline]
782    pub fn is_unknown(&self) -> bool {
783        match self {
784            Self::__SourceBreaking { .. } => true,
785            _ => false,
786        }
787    }
788}
789
790impl fidl::Persistable for ClosedTargetTwoWayUnionPayloadRequest {}
791
792#[derive(Clone, Debug)]
793pub enum ClosedTargetTwoWayUnionPayloadResponse {
794    V(i8),
795    #[doc(hidden)]
796    __SourceBreaking {
797        unknown_ordinal: u64,
798    },
799}
800
801/// Pattern that matches an unknown `ClosedTargetTwoWayUnionPayloadResponse` member.
802#[macro_export]
803macro_rules! ClosedTargetTwoWayUnionPayloadResponseUnknown {
804    () => {
805        _
806    };
807}
808
809// Custom PartialEq so that unknown variants are not equal to themselves.
810impl PartialEq for ClosedTargetTwoWayUnionPayloadResponse {
811    fn eq(&self, other: &Self) -> bool {
812        match (self, other) {
813            (Self::V(x), Self::V(y)) => *x == *y,
814            _ => false,
815        }
816    }
817}
818
819impl ClosedTargetTwoWayUnionPayloadResponse {
820    #[inline]
821    pub fn ordinal(&self) -> u64 {
822        match *self {
823            Self::V(_) => 1,
824            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
825        }
826    }
827
828    #[inline]
829    pub fn unknown_variant_for_testing() -> Self {
830        Self::__SourceBreaking { unknown_ordinal: 0 }
831    }
832
833    #[inline]
834    pub fn is_unknown(&self) -> bool {
835        match self {
836            Self::__SourceBreaking { .. } => true,
837            _ => false,
838        }
839    }
840}
841
842impl fidl::Persistable for ClosedTargetTwoWayUnionPayloadResponse {}
843
844#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
845pub enum OpenTargetFlexibleTwoWayErrRequest {
846    ReplySuccess(Empty),
847    ReplyError(i32),
848}
849
850impl OpenTargetFlexibleTwoWayErrRequest {
851    #[inline]
852    pub fn ordinal(&self) -> u64 {
853        match *self {
854            Self::ReplySuccess(_) => 1,
855            Self::ReplyError(_) => 2,
856        }
857    }
858
859    #[deprecated = "Strict unions should not use `is_unknown`"]
860    #[inline]
861    pub fn is_unknown(&self) -> bool {
862        false
863    }
864}
865
866impl fidl::Persistable for OpenTargetFlexibleTwoWayErrRequest {}
867
868#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
869pub enum OpenTargetFlexibleTwoWayFieldsErrRequest {
870    ReplySuccess(i32),
871    ReplyError(i32),
872}
873
874impl OpenTargetFlexibleTwoWayFieldsErrRequest {
875    #[inline]
876    pub fn ordinal(&self) -> u64 {
877        match *self {
878            Self::ReplySuccess(_) => 1,
879            Self::ReplyError(_) => 2,
880        }
881    }
882
883    #[deprecated = "Strict unions should not use `is_unknown`"]
884    #[inline]
885    pub fn is_unknown(&self) -> bool {
886        false
887    }
888}
889
890impl fidl::Persistable for OpenTargetFlexibleTwoWayFieldsErrRequest {}
891
892#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
893pub enum OpenTargetStrictTwoWayErrRequest {
894    ReplySuccess(Empty),
895    ReplyError(i32),
896}
897
898impl OpenTargetStrictTwoWayErrRequest {
899    #[inline]
900    pub fn ordinal(&self) -> u64 {
901        match *self {
902            Self::ReplySuccess(_) => 1,
903            Self::ReplyError(_) => 2,
904        }
905    }
906
907    #[deprecated = "Strict unions should not use `is_unknown`"]
908    #[inline]
909    pub fn is_unknown(&self) -> bool {
910        false
911    }
912}
913
914impl fidl::Persistable for OpenTargetStrictTwoWayErrRequest {}
915
916#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
917pub enum OpenTargetStrictTwoWayFieldsErrRequest {
918    ReplySuccess(i32),
919    ReplyError(i32),
920}
921
922impl OpenTargetStrictTwoWayFieldsErrRequest {
923    #[inline]
924    pub fn ordinal(&self) -> u64 {
925        match *self {
926            Self::ReplySuccess(_) => 1,
927            Self::ReplyError(_) => 2,
928        }
929    }
930
931    #[deprecated = "Strict unions should not use `is_unknown`"]
932    #[inline]
933    pub fn is_unknown(&self) -> bool {
934        false
935    }
936}
937
938impl fidl::Persistable for OpenTargetStrictTwoWayFieldsErrRequest {}
939
940#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
941pub struct AjarTargetMarker;
942
943impl fidl::endpoints::ProtocolMarker for AjarTargetMarker {
944    type Proxy = AjarTargetProxy;
945    type RequestStream = AjarTargetRequestStream;
946    #[cfg(target_os = "fuchsia")]
947    type SynchronousProxy = AjarTargetSynchronousProxy;
948
949    const DEBUG_NAME: &'static str = "(anonymous) AjarTarget";
950}
951
952pub trait AjarTargetProxyInterface: Send + Sync {}
953#[derive(Debug)]
954#[cfg(target_os = "fuchsia")]
955pub struct AjarTargetSynchronousProxy {
956    client: fidl::client::sync::Client,
957}
958
959#[cfg(target_os = "fuchsia")]
960impl fidl::endpoints::SynchronousProxy for AjarTargetSynchronousProxy {
961    type Proxy = AjarTargetProxy;
962    type Protocol = AjarTargetMarker;
963
964    fn from_channel(inner: fidl::Channel) -> Self {
965        Self::new(inner)
966    }
967
968    fn into_channel(self) -> fidl::Channel {
969        self.client.into_channel()
970    }
971
972    fn as_channel(&self) -> &fidl::Channel {
973        self.client.as_channel()
974    }
975}
976
977#[cfg(target_os = "fuchsia")]
978impl AjarTargetSynchronousProxy {
979    pub fn new(channel: fidl::Channel) -> Self {
980        let protocol_name = <AjarTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
981        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
982    }
983
984    pub fn into_channel(self) -> fidl::Channel {
985        self.client.into_channel()
986    }
987
988    /// Waits until an event arrives and returns it. It is safe for other
989    /// threads to make concurrent requests while waiting for an event.
990    pub fn wait_for_event(
991        &self,
992        deadline: zx::MonotonicInstant,
993    ) -> Result<AjarTargetEvent, fidl::Error> {
994        AjarTargetEvent::decode(self.client.wait_for_event(deadline)?)
995    }
996}
997
998#[derive(Debug, Clone)]
999pub struct AjarTargetProxy {
1000    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1001}
1002
1003impl fidl::endpoints::Proxy for AjarTargetProxy {
1004    type Protocol = AjarTargetMarker;
1005
1006    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1007        Self::new(inner)
1008    }
1009
1010    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1011        self.client.into_channel().map_err(|client| Self { client })
1012    }
1013
1014    fn as_channel(&self) -> &::fidl::AsyncChannel {
1015        self.client.as_channel()
1016    }
1017}
1018
1019impl AjarTargetProxy {
1020    /// Create a new Proxy for fidl.serversuite/AjarTarget.
1021    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1022        let protocol_name = <AjarTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1023        Self { client: fidl::client::Client::new(channel, protocol_name) }
1024    }
1025
1026    /// Get a Stream of events from the remote end of the protocol.
1027    ///
1028    /// # Panics
1029    ///
1030    /// Panics if the event stream was already taken.
1031    pub fn take_event_stream(&self) -> AjarTargetEventStream {
1032        AjarTargetEventStream { event_receiver: self.client.take_event_receiver() }
1033    }
1034}
1035
1036impl AjarTargetProxyInterface for AjarTargetProxy {}
1037
1038pub struct AjarTargetEventStream {
1039    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1040}
1041
1042impl std::marker::Unpin for AjarTargetEventStream {}
1043
1044impl futures::stream::FusedStream for AjarTargetEventStream {
1045    fn is_terminated(&self) -> bool {
1046        self.event_receiver.is_terminated()
1047    }
1048}
1049
1050impl futures::Stream for AjarTargetEventStream {
1051    type Item = Result<AjarTargetEvent, fidl::Error>;
1052
1053    fn poll_next(
1054        mut self: std::pin::Pin<&mut Self>,
1055        cx: &mut std::task::Context<'_>,
1056    ) -> std::task::Poll<Option<Self::Item>> {
1057        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1058            &mut self.event_receiver,
1059            cx
1060        )?) {
1061            Some(buf) => std::task::Poll::Ready(Some(AjarTargetEvent::decode(buf))),
1062            None => std::task::Poll::Ready(None),
1063        }
1064    }
1065}
1066
1067#[derive(Debug)]
1068pub enum AjarTargetEvent {
1069    #[non_exhaustive]
1070    _UnknownEvent {
1071        /// Ordinal of the event that was sent.
1072        ordinal: u64,
1073    },
1074}
1075
1076impl AjarTargetEvent {
1077    /// Decodes a message buffer as a [`AjarTargetEvent`].
1078    fn decode(
1079        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1080    ) -> Result<AjarTargetEvent, fidl::Error> {
1081        let (bytes, _handles) = buf.split_mut();
1082        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1083        debug_assert_eq!(tx_header.tx_id, 0);
1084        match tx_header.ordinal {
1085            _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
1086                Ok(AjarTargetEvent::_UnknownEvent { ordinal: tx_header.ordinal })
1087            }
1088            _ => Err(fidl::Error::UnknownOrdinal {
1089                ordinal: tx_header.ordinal,
1090                protocol_name: <AjarTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1091            }),
1092        }
1093    }
1094}
1095
1096/// A Stream of incoming requests for fidl.serversuite/AjarTarget.
1097pub struct AjarTargetRequestStream {
1098    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1099    is_terminated: bool,
1100}
1101
1102impl std::marker::Unpin for AjarTargetRequestStream {}
1103
1104impl futures::stream::FusedStream for AjarTargetRequestStream {
1105    fn is_terminated(&self) -> bool {
1106        self.is_terminated
1107    }
1108}
1109
1110impl fidl::endpoints::RequestStream for AjarTargetRequestStream {
1111    type Protocol = AjarTargetMarker;
1112    type ControlHandle = AjarTargetControlHandle;
1113
1114    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1115        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1116    }
1117
1118    fn control_handle(&self) -> Self::ControlHandle {
1119        AjarTargetControlHandle { inner: self.inner.clone() }
1120    }
1121
1122    fn into_inner(
1123        self,
1124    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1125    {
1126        (self.inner, self.is_terminated)
1127    }
1128
1129    fn from_inner(
1130        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1131        is_terminated: bool,
1132    ) -> Self {
1133        Self { inner, is_terminated }
1134    }
1135}
1136
1137impl futures::Stream for AjarTargetRequestStream {
1138    type Item = Result<AjarTargetRequest, fidl::Error>;
1139
1140    fn poll_next(
1141        mut self: std::pin::Pin<&mut Self>,
1142        cx: &mut std::task::Context<'_>,
1143    ) -> std::task::Poll<Option<Self::Item>> {
1144        let this = &mut *self;
1145        if this.inner.check_shutdown(cx) {
1146            this.is_terminated = true;
1147            return std::task::Poll::Ready(None);
1148        }
1149        if this.is_terminated {
1150            panic!("polled AjarTargetRequestStream after completion");
1151        }
1152        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1153            |bytes, handles| {
1154                match this.inner.channel().read_etc(cx, bytes, handles) {
1155                    std::task::Poll::Ready(Ok(())) => {}
1156                    std::task::Poll::Pending => return std::task::Poll::Pending,
1157                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1158                        this.is_terminated = true;
1159                        return std::task::Poll::Ready(None);
1160                    }
1161                    std::task::Poll::Ready(Err(e)) => {
1162                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1163                            e.into(),
1164                        ))))
1165                    }
1166                }
1167
1168                // A message has been received from the channel
1169                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1170
1171                std::task::Poll::Ready(Some(match header.ordinal {
1172                    _ if header.tx_id == 0
1173                        && header
1174                            .dynamic_flags()
1175                            .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
1176                    {
1177                        Ok(AjarTargetRequest::_UnknownMethod {
1178                            ordinal: header.ordinal,
1179                            control_handle: AjarTargetControlHandle { inner: this.inner.clone() },
1180                        })
1181                    }
1182                    _ => Err(fidl::Error::UnknownOrdinal {
1183                        ordinal: header.ordinal,
1184                        protocol_name:
1185                            <AjarTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1186                    }),
1187                }))
1188            },
1189        )
1190    }
1191}
1192
1193#[derive(Debug)]
1194pub enum AjarTargetRequest {
1195    /// An interaction was received which does not match any known method.
1196    #[non_exhaustive]
1197    _UnknownMethod {
1198        /// Ordinal of the method that was called.
1199        ordinal: u64,
1200        control_handle: AjarTargetControlHandle,
1201    },
1202}
1203
1204impl AjarTargetRequest {
1205    /// Name of the method defined in FIDL
1206    pub fn method_name(&self) -> &'static str {
1207        match *self {
1208            AjarTargetRequest::_UnknownMethod { .. } => "unknown one-way method",
1209        }
1210    }
1211}
1212
1213#[derive(Debug, Clone)]
1214pub struct AjarTargetControlHandle {
1215    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1216}
1217
1218impl fidl::endpoints::ControlHandle for AjarTargetControlHandle {
1219    fn shutdown(&self) {
1220        self.inner.shutdown()
1221    }
1222    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1223        self.inner.shutdown_with_epitaph(status)
1224    }
1225
1226    fn is_closed(&self) -> bool {
1227        self.inner.channel().is_closed()
1228    }
1229    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1230        self.inner.channel().on_closed()
1231    }
1232
1233    #[cfg(target_os = "fuchsia")]
1234    fn signal_peer(
1235        &self,
1236        clear_mask: zx::Signals,
1237        set_mask: zx::Signals,
1238    ) -> Result<(), zx_status::Status> {
1239        use fidl::Peered;
1240        self.inner.channel().signal_peer(clear_mask, set_mask)
1241    }
1242}
1243
1244impl AjarTargetControlHandle {}
1245
1246#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1247pub struct ClosedTargetMarker;
1248
1249impl fidl::endpoints::ProtocolMarker for ClosedTargetMarker {
1250    type Proxy = ClosedTargetProxy;
1251    type RequestStream = ClosedTargetRequestStream;
1252    #[cfg(target_os = "fuchsia")]
1253    type SynchronousProxy = ClosedTargetSynchronousProxy;
1254
1255    const DEBUG_NAME: &'static str = "(anonymous) ClosedTarget";
1256}
1257pub type ClosedTargetTwoWayResultResult = Result<String, u32>;
1258
1259pub trait ClosedTargetProxyInterface: Send + Sync {
1260    fn r#one_way_no_payload(&self) -> Result<(), fidl::Error>;
1261    type TwoWayNoPayloadResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
1262    fn r#two_way_no_payload(&self) -> Self::TwoWayNoPayloadResponseFut;
1263    type TwoWayStructPayloadResponseFut: std::future::Future<Output = Result<i8, fidl::Error>>
1264        + Send;
1265    fn r#two_way_struct_payload(&self, v: i8) -> Self::TwoWayStructPayloadResponseFut;
1266    type TwoWayTablePayloadResponseFut: std::future::Future<Output = Result<ClosedTargetTwoWayTablePayloadResponse, fidl::Error>>
1267        + Send;
1268    fn r#two_way_table_payload(
1269        &self,
1270        payload: &ClosedTargetTwoWayTablePayloadRequest,
1271    ) -> Self::TwoWayTablePayloadResponseFut;
1272    type TwoWayUnionPayloadResponseFut: std::future::Future<Output = Result<ClosedTargetTwoWayUnionPayloadResponse, fidl::Error>>
1273        + Send;
1274    fn r#two_way_union_payload(
1275        &self,
1276        payload: &ClosedTargetTwoWayUnionPayloadRequest,
1277    ) -> Self::TwoWayUnionPayloadResponseFut;
1278    type TwoWayResultResponseFut: std::future::Future<Output = Result<ClosedTargetTwoWayResultResult, fidl::Error>>
1279        + Send;
1280    fn r#two_way_result(
1281        &self,
1282        payload: &ClosedTargetTwoWayResultRequest,
1283    ) -> Self::TwoWayResultResponseFut;
1284    type GetHandleRightsResponseFut: std::future::Future<Output = Result<fidl::Rights, fidl::Error>>
1285        + Send;
1286    fn r#get_handle_rights(&self, handle: fidl::Handle) -> Self::GetHandleRightsResponseFut;
1287    type GetSignalableEventRightsResponseFut: std::future::Future<Output = Result<fidl::Rights, fidl::Error>>
1288        + Send;
1289    fn r#get_signalable_event_rights(
1290        &self,
1291        handle: fidl::Event,
1292    ) -> Self::GetSignalableEventRightsResponseFut;
1293    type EchoAsTransferableSignalableEventResponseFut: std::future::Future<Output = Result<fidl::Event, fidl::Error>>
1294        + Send;
1295    fn r#echo_as_transferable_signalable_event(
1296        &self,
1297        handle: fidl::Handle,
1298    ) -> Self::EchoAsTransferableSignalableEventResponseFut;
1299    type ByteVectorSizeResponseFut: std::future::Future<Output = Result<u32, fidl::Error>> + Send;
1300    fn r#byte_vector_size(&self, vec: &[u8]) -> Self::ByteVectorSizeResponseFut;
1301    type HandleVectorSizeResponseFut: std::future::Future<Output = Result<u32, fidl::Error>> + Send;
1302    fn r#handle_vector_size(&self, vec: Vec<fidl::Event>) -> Self::HandleVectorSizeResponseFut;
1303    type CreateNByteVectorResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>>
1304        + Send;
1305    fn r#create_n_byte_vector(&self, n: u32) -> Self::CreateNByteVectorResponseFut;
1306    type CreateNHandleVectorResponseFut: std::future::Future<Output = Result<Vec<fidl::Event>, fidl::Error>>
1307        + Send;
1308    fn r#create_n_handle_vector(&self, n: u32) -> Self::CreateNHandleVectorResponseFut;
1309}
1310#[derive(Debug)]
1311#[cfg(target_os = "fuchsia")]
1312pub struct ClosedTargetSynchronousProxy {
1313    client: fidl::client::sync::Client,
1314}
1315
1316#[cfg(target_os = "fuchsia")]
1317impl fidl::endpoints::SynchronousProxy for ClosedTargetSynchronousProxy {
1318    type Proxy = ClosedTargetProxy;
1319    type Protocol = ClosedTargetMarker;
1320
1321    fn from_channel(inner: fidl::Channel) -> Self {
1322        Self::new(inner)
1323    }
1324
1325    fn into_channel(self) -> fidl::Channel {
1326        self.client.into_channel()
1327    }
1328
1329    fn as_channel(&self) -> &fidl::Channel {
1330        self.client.as_channel()
1331    }
1332}
1333
1334#[cfg(target_os = "fuchsia")]
1335impl ClosedTargetSynchronousProxy {
1336    pub fn new(channel: fidl::Channel) -> Self {
1337        let protocol_name = <ClosedTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1338        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1339    }
1340
1341    pub fn into_channel(self) -> fidl::Channel {
1342        self.client.into_channel()
1343    }
1344
1345    /// Waits until an event arrives and returns it. It is safe for other
1346    /// threads to make concurrent requests while waiting for an event.
1347    pub fn wait_for_event(
1348        &self,
1349        deadline: zx::MonotonicInstant,
1350    ) -> Result<ClosedTargetEvent, fidl::Error> {
1351        ClosedTargetEvent::decode(self.client.wait_for_event(deadline)?)
1352    }
1353
1354    pub fn r#one_way_no_payload(&self) -> Result<(), fidl::Error> {
1355        self.client.send::<fidl::encoding::EmptyPayload>(
1356            (),
1357            0x66bd5fe1d4c019e,
1358            fidl::encoding::DynamicFlags::empty(),
1359        )
1360    }
1361
1362    pub fn r#two_way_no_payload(
1363        &self,
1364        ___deadline: zx::MonotonicInstant,
1365    ) -> Result<(), fidl::Error> {
1366        let _response =
1367            self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
1368                (),
1369                0x5bda1d1c46a5ae5f,
1370                fidl::encoding::DynamicFlags::empty(),
1371                ___deadline,
1372            )?;
1373        Ok(_response)
1374    }
1375
1376    pub fn r#two_way_struct_payload(
1377        &self,
1378        mut v: i8,
1379        ___deadline: zx::MonotonicInstant,
1380    ) -> Result<i8, fidl::Error> {
1381        let _response = self.client.send_query::<
1382            ClosedTargetTwoWayStructPayloadRequest,
1383            ClosedTargetTwoWayStructPayloadResponse,
1384        >(
1385            (v,),
1386            0x313769ab1b770c90,
1387            fidl::encoding::DynamicFlags::empty(),
1388            ___deadline,
1389        )?;
1390        Ok(_response.v)
1391    }
1392
1393    pub fn r#two_way_table_payload(
1394        &self,
1395        mut payload: &ClosedTargetTwoWayTablePayloadRequest,
1396        ___deadline: zx::MonotonicInstant,
1397    ) -> Result<ClosedTargetTwoWayTablePayloadResponse, fidl::Error> {
1398        let _response = self.client.send_query::<
1399            ClosedTargetTwoWayTablePayloadRequest,
1400            ClosedTargetTwoWayTablePayloadResponse,
1401        >(
1402            payload,
1403            0x631f7f27b6872baa,
1404            fidl::encoding::DynamicFlags::empty(),
1405            ___deadline,
1406        )?;
1407        Ok(_response)
1408    }
1409
1410    pub fn r#two_way_union_payload(
1411        &self,
1412        mut payload: &ClosedTargetTwoWayUnionPayloadRequest,
1413        ___deadline: zx::MonotonicInstant,
1414    ) -> Result<ClosedTargetTwoWayUnionPayloadResponse, fidl::Error> {
1415        let _response = self.client.send_query::<
1416            ClosedTargetTwoWayUnionPayloadRequest,
1417            ClosedTargetTwoWayUnionPayloadResponse,
1418        >(
1419            payload,
1420            0x77d0365370536dba,
1421            fidl::encoding::DynamicFlags::empty(),
1422            ___deadline,
1423        )?;
1424        Ok(_response)
1425    }
1426
1427    pub fn r#two_way_result(
1428        &self,
1429        mut payload: &ClosedTargetTwoWayResultRequest,
1430        ___deadline: zx::MonotonicInstant,
1431    ) -> Result<ClosedTargetTwoWayResultResult, fidl::Error> {
1432        let _response = self.client.send_query::<
1433            ClosedTargetTwoWayResultRequest,
1434            fidl::encoding::ResultType<ClosedTargetTwoWayResultResponse, u32>,
1435        >(
1436            payload,
1437            0xb32549e6f50894c,
1438            fidl::encoding::DynamicFlags::empty(),
1439            ___deadline,
1440        )?;
1441        Ok(_response.map(|x| x.payload))
1442    }
1443
1444    pub fn r#get_handle_rights(
1445        &self,
1446        mut handle: fidl::Handle,
1447        ___deadline: zx::MonotonicInstant,
1448    ) -> Result<fidl::Rights, fidl::Error> {
1449        let _response = self
1450            .client
1451            .send_query::<ClosedTargetGetHandleRightsRequest, ClosedTargetGetHandleRightsResponse>(
1452                (handle,),
1453                0x1098d82f79effbe8,
1454                fidl::encoding::DynamicFlags::empty(),
1455                ___deadline,
1456            )?;
1457        Ok(_response.rights)
1458    }
1459
1460    pub fn r#get_signalable_event_rights(
1461        &self,
1462        mut handle: fidl::Event,
1463        ___deadline: zx::MonotonicInstant,
1464    ) -> Result<fidl::Rights, fidl::Error> {
1465        let _response = self.client.send_query::<
1466            ClosedTargetGetSignalableEventRightsRequest,
1467            ClosedTargetGetSignalableEventRightsResponse,
1468        >(
1469            (handle,),
1470            0x698c31448fd5daf,
1471            fidl::encoding::DynamicFlags::empty(),
1472            ___deadline,
1473        )?;
1474        Ok(_response.rights)
1475    }
1476
1477    pub fn r#echo_as_transferable_signalable_event(
1478        &self,
1479        mut handle: fidl::Handle,
1480        ___deadline: zx::MonotonicInstant,
1481    ) -> Result<fidl::Event, fidl::Error> {
1482        let _response = self.client.send_query::<
1483            ClosedTargetEchoAsTransferableSignalableEventRequest,
1484            ClosedTargetEchoAsTransferableSignalableEventResponse,
1485        >(
1486            (handle,),
1487            0x5ec627bdc2e02ca0,
1488            fidl::encoding::DynamicFlags::empty(),
1489            ___deadline,
1490        )?;
1491        Ok(_response.handle)
1492    }
1493
1494    pub fn r#byte_vector_size(
1495        &self,
1496        mut vec: &[u8],
1497        ___deadline: zx::MonotonicInstant,
1498    ) -> Result<u32, fidl::Error> {
1499        let _response = self
1500            .client
1501            .send_query::<ClosedTargetByteVectorSizeRequest, ClosedTargetByteVectorSizeResponse>(
1502                (vec,),
1503                0x104b2f9aa8b7fe25,
1504                fidl::encoding::DynamicFlags::empty(),
1505                ___deadline,
1506            )?;
1507        Ok(_response.n)
1508    }
1509
1510    pub fn r#handle_vector_size(
1511        &self,
1512        mut vec: Vec<fidl::Event>,
1513        ___deadline: zx::MonotonicInstant,
1514    ) -> Result<u32, fidl::Error> {
1515        let _response = self.client.send_query::<
1516            ClosedTargetHandleVectorSizeRequest,
1517            ClosedTargetHandleVectorSizeResponse,
1518        >(
1519            (vec.as_mut(),),
1520            0x4c1ac83570a98537,
1521            fidl::encoding::DynamicFlags::empty(),
1522            ___deadline,
1523        )?;
1524        Ok(_response.n)
1525    }
1526
1527    pub fn r#create_n_byte_vector(
1528        &self,
1529        mut n: u32,
1530        ___deadline: zx::MonotonicInstant,
1531    ) -> Result<Vec<u8>, fidl::Error> {
1532        let _response = self.client.send_query::<
1533            ClosedTargetCreateNByteVectorRequest,
1534            ClosedTargetCreateNByteVectorResponse,
1535        >(
1536            (n,),
1537            0x1ecd88ef664e9c61,
1538            fidl::encoding::DynamicFlags::empty(),
1539            ___deadline,
1540        )?;
1541        Ok(_response.vec)
1542    }
1543
1544    pub fn r#create_n_handle_vector(
1545        &self,
1546        mut n: u32,
1547        ___deadline: zx::MonotonicInstant,
1548    ) -> Result<Vec<fidl::Event>, fidl::Error> {
1549        let _response = self.client.send_query::<
1550            ClosedTargetCreateNHandleVectorRequest,
1551            ClosedTargetCreateNHandleVectorResponse,
1552        >(
1553            (n,),
1554            0x26341ba1fa66813d,
1555            fidl::encoding::DynamicFlags::empty(),
1556            ___deadline,
1557        )?;
1558        Ok(_response.vec)
1559    }
1560}
1561
1562#[derive(Debug, Clone)]
1563pub struct ClosedTargetProxy {
1564    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1565}
1566
1567impl fidl::endpoints::Proxy for ClosedTargetProxy {
1568    type Protocol = ClosedTargetMarker;
1569
1570    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1571        Self::new(inner)
1572    }
1573
1574    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1575        self.client.into_channel().map_err(|client| Self { client })
1576    }
1577
1578    fn as_channel(&self) -> &::fidl::AsyncChannel {
1579        self.client.as_channel()
1580    }
1581}
1582
1583impl ClosedTargetProxy {
1584    /// Create a new Proxy for fidl.serversuite/ClosedTarget.
1585    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1586        let protocol_name = <ClosedTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1587        Self { client: fidl::client::Client::new(channel, protocol_name) }
1588    }
1589
1590    /// Get a Stream of events from the remote end of the protocol.
1591    ///
1592    /// # Panics
1593    ///
1594    /// Panics if the event stream was already taken.
1595    pub fn take_event_stream(&self) -> ClosedTargetEventStream {
1596        ClosedTargetEventStream { event_receiver: self.client.take_event_receiver() }
1597    }
1598
1599    pub fn r#one_way_no_payload(&self) -> Result<(), fidl::Error> {
1600        ClosedTargetProxyInterface::r#one_way_no_payload(self)
1601    }
1602
1603    pub fn r#two_way_no_payload(
1604        &self,
1605    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
1606        ClosedTargetProxyInterface::r#two_way_no_payload(self)
1607    }
1608
1609    pub fn r#two_way_struct_payload(
1610        &self,
1611        mut v: i8,
1612    ) -> fidl::client::QueryResponseFut<i8, fidl::encoding::DefaultFuchsiaResourceDialect> {
1613        ClosedTargetProxyInterface::r#two_way_struct_payload(self, v)
1614    }
1615
1616    pub fn r#two_way_table_payload(
1617        &self,
1618        mut payload: &ClosedTargetTwoWayTablePayloadRequest,
1619    ) -> fidl::client::QueryResponseFut<
1620        ClosedTargetTwoWayTablePayloadResponse,
1621        fidl::encoding::DefaultFuchsiaResourceDialect,
1622    > {
1623        ClosedTargetProxyInterface::r#two_way_table_payload(self, payload)
1624    }
1625
1626    pub fn r#two_way_union_payload(
1627        &self,
1628        mut payload: &ClosedTargetTwoWayUnionPayloadRequest,
1629    ) -> fidl::client::QueryResponseFut<
1630        ClosedTargetTwoWayUnionPayloadResponse,
1631        fidl::encoding::DefaultFuchsiaResourceDialect,
1632    > {
1633        ClosedTargetProxyInterface::r#two_way_union_payload(self, payload)
1634    }
1635
1636    pub fn r#two_way_result(
1637        &self,
1638        mut payload: &ClosedTargetTwoWayResultRequest,
1639    ) -> fidl::client::QueryResponseFut<
1640        ClosedTargetTwoWayResultResult,
1641        fidl::encoding::DefaultFuchsiaResourceDialect,
1642    > {
1643        ClosedTargetProxyInterface::r#two_way_result(self, payload)
1644    }
1645
1646    pub fn r#get_handle_rights(
1647        &self,
1648        mut handle: fidl::Handle,
1649    ) -> fidl::client::QueryResponseFut<fidl::Rights, fidl::encoding::DefaultFuchsiaResourceDialect>
1650    {
1651        ClosedTargetProxyInterface::r#get_handle_rights(self, handle)
1652    }
1653
1654    pub fn r#get_signalable_event_rights(
1655        &self,
1656        mut handle: fidl::Event,
1657    ) -> fidl::client::QueryResponseFut<fidl::Rights, fidl::encoding::DefaultFuchsiaResourceDialect>
1658    {
1659        ClosedTargetProxyInterface::r#get_signalable_event_rights(self, handle)
1660    }
1661
1662    pub fn r#echo_as_transferable_signalable_event(
1663        &self,
1664        mut handle: fidl::Handle,
1665    ) -> fidl::client::QueryResponseFut<fidl::Event, fidl::encoding::DefaultFuchsiaResourceDialect>
1666    {
1667        ClosedTargetProxyInterface::r#echo_as_transferable_signalable_event(self, handle)
1668    }
1669
1670    pub fn r#byte_vector_size(
1671        &self,
1672        mut vec: &[u8],
1673    ) -> fidl::client::QueryResponseFut<u32, fidl::encoding::DefaultFuchsiaResourceDialect> {
1674        ClosedTargetProxyInterface::r#byte_vector_size(self, vec)
1675    }
1676
1677    pub fn r#handle_vector_size(
1678        &self,
1679        mut vec: Vec<fidl::Event>,
1680    ) -> fidl::client::QueryResponseFut<u32, fidl::encoding::DefaultFuchsiaResourceDialect> {
1681        ClosedTargetProxyInterface::r#handle_vector_size(self, vec)
1682    }
1683
1684    pub fn r#create_n_byte_vector(
1685        &self,
1686        mut n: u32,
1687    ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
1688    {
1689        ClosedTargetProxyInterface::r#create_n_byte_vector(self, n)
1690    }
1691
1692    pub fn r#create_n_handle_vector(
1693        &self,
1694        mut n: u32,
1695    ) -> fidl::client::QueryResponseFut<
1696        Vec<fidl::Event>,
1697        fidl::encoding::DefaultFuchsiaResourceDialect,
1698    > {
1699        ClosedTargetProxyInterface::r#create_n_handle_vector(self, n)
1700    }
1701}
1702
1703impl ClosedTargetProxyInterface for ClosedTargetProxy {
1704    fn r#one_way_no_payload(&self) -> Result<(), fidl::Error> {
1705        self.client.send::<fidl::encoding::EmptyPayload>(
1706            (),
1707            0x66bd5fe1d4c019e,
1708            fidl::encoding::DynamicFlags::empty(),
1709        )
1710    }
1711
1712    type TwoWayNoPayloadResponseFut =
1713        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
1714    fn r#two_way_no_payload(&self) -> Self::TwoWayNoPayloadResponseFut {
1715        fn _decode(
1716            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1717        ) -> Result<(), fidl::Error> {
1718            let _response = fidl::client::decode_transaction_body::<
1719                fidl::encoding::EmptyPayload,
1720                fidl::encoding::DefaultFuchsiaResourceDialect,
1721                0x5bda1d1c46a5ae5f,
1722            >(_buf?)?;
1723            Ok(_response)
1724        }
1725        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
1726            (),
1727            0x5bda1d1c46a5ae5f,
1728            fidl::encoding::DynamicFlags::empty(),
1729            _decode,
1730        )
1731    }
1732
1733    type TwoWayStructPayloadResponseFut =
1734        fidl::client::QueryResponseFut<i8, fidl::encoding::DefaultFuchsiaResourceDialect>;
1735    fn r#two_way_struct_payload(&self, mut v: i8) -> Self::TwoWayStructPayloadResponseFut {
1736        fn _decode(
1737            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1738        ) -> Result<i8, fidl::Error> {
1739            let _response = fidl::client::decode_transaction_body::<
1740                ClosedTargetTwoWayStructPayloadResponse,
1741                fidl::encoding::DefaultFuchsiaResourceDialect,
1742                0x313769ab1b770c90,
1743            >(_buf?)?;
1744            Ok(_response.v)
1745        }
1746        self.client.send_query_and_decode::<ClosedTargetTwoWayStructPayloadRequest, i8>(
1747            (v,),
1748            0x313769ab1b770c90,
1749            fidl::encoding::DynamicFlags::empty(),
1750            _decode,
1751        )
1752    }
1753
1754    type TwoWayTablePayloadResponseFut = fidl::client::QueryResponseFut<
1755        ClosedTargetTwoWayTablePayloadResponse,
1756        fidl::encoding::DefaultFuchsiaResourceDialect,
1757    >;
1758    fn r#two_way_table_payload(
1759        &self,
1760        mut payload: &ClosedTargetTwoWayTablePayloadRequest,
1761    ) -> Self::TwoWayTablePayloadResponseFut {
1762        fn _decode(
1763            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1764        ) -> Result<ClosedTargetTwoWayTablePayloadResponse, fidl::Error> {
1765            let _response = fidl::client::decode_transaction_body::<
1766                ClosedTargetTwoWayTablePayloadResponse,
1767                fidl::encoding::DefaultFuchsiaResourceDialect,
1768                0x631f7f27b6872baa,
1769            >(_buf?)?;
1770            Ok(_response)
1771        }
1772        self.client.send_query_and_decode::<
1773            ClosedTargetTwoWayTablePayloadRequest,
1774            ClosedTargetTwoWayTablePayloadResponse,
1775        >(
1776            payload,
1777            0x631f7f27b6872baa,
1778            fidl::encoding::DynamicFlags::empty(),
1779            _decode,
1780        )
1781    }
1782
1783    type TwoWayUnionPayloadResponseFut = fidl::client::QueryResponseFut<
1784        ClosedTargetTwoWayUnionPayloadResponse,
1785        fidl::encoding::DefaultFuchsiaResourceDialect,
1786    >;
1787    fn r#two_way_union_payload(
1788        &self,
1789        mut payload: &ClosedTargetTwoWayUnionPayloadRequest,
1790    ) -> Self::TwoWayUnionPayloadResponseFut {
1791        fn _decode(
1792            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1793        ) -> Result<ClosedTargetTwoWayUnionPayloadResponse, fidl::Error> {
1794            let _response = fidl::client::decode_transaction_body::<
1795                ClosedTargetTwoWayUnionPayloadResponse,
1796                fidl::encoding::DefaultFuchsiaResourceDialect,
1797                0x77d0365370536dba,
1798            >(_buf?)?;
1799            Ok(_response)
1800        }
1801        self.client.send_query_and_decode::<
1802            ClosedTargetTwoWayUnionPayloadRequest,
1803            ClosedTargetTwoWayUnionPayloadResponse,
1804        >(
1805            payload,
1806            0x77d0365370536dba,
1807            fidl::encoding::DynamicFlags::empty(),
1808            _decode,
1809        )
1810    }
1811
1812    type TwoWayResultResponseFut = fidl::client::QueryResponseFut<
1813        ClosedTargetTwoWayResultResult,
1814        fidl::encoding::DefaultFuchsiaResourceDialect,
1815    >;
1816    fn r#two_way_result(
1817        &self,
1818        mut payload: &ClosedTargetTwoWayResultRequest,
1819    ) -> Self::TwoWayResultResponseFut {
1820        fn _decode(
1821            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1822        ) -> Result<ClosedTargetTwoWayResultResult, fidl::Error> {
1823            let _response = fidl::client::decode_transaction_body::<
1824                fidl::encoding::ResultType<ClosedTargetTwoWayResultResponse, u32>,
1825                fidl::encoding::DefaultFuchsiaResourceDialect,
1826                0xb32549e6f50894c,
1827            >(_buf?)?;
1828            Ok(_response.map(|x| x.payload))
1829        }
1830        self.client.send_query_and_decode::<
1831            ClosedTargetTwoWayResultRequest,
1832            ClosedTargetTwoWayResultResult,
1833        >(
1834            payload,
1835            0xb32549e6f50894c,
1836            fidl::encoding::DynamicFlags::empty(),
1837            _decode,
1838        )
1839    }
1840
1841    type GetHandleRightsResponseFut =
1842        fidl::client::QueryResponseFut<fidl::Rights, fidl::encoding::DefaultFuchsiaResourceDialect>;
1843    fn r#get_handle_rights(&self, mut handle: fidl::Handle) -> Self::GetHandleRightsResponseFut {
1844        fn _decode(
1845            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1846        ) -> Result<fidl::Rights, fidl::Error> {
1847            let _response = fidl::client::decode_transaction_body::<
1848                ClosedTargetGetHandleRightsResponse,
1849                fidl::encoding::DefaultFuchsiaResourceDialect,
1850                0x1098d82f79effbe8,
1851            >(_buf?)?;
1852            Ok(_response.rights)
1853        }
1854        self.client.send_query_and_decode::<ClosedTargetGetHandleRightsRequest, fidl::Rights>(
1855            (handle,),
1856            0x1098d82f79effbe8,
1857            fidl::encoding::DynamicFlags::empty(),
1858            _decode,
1859        )
1860    }
1861
1862    type GetSignalableEventRightsResponseFut =
1863        fidl::client::QueryResponseFut<fidl::Rights, fidl::encoding::DefaultFuchsiaResourceDialect>;
1864    fn r#get_signalable_event_rights(
1865        &self,
1866        mut handle: fidl::Event,
1867    ) -> Self::GetSignalableEventRightsResponseFut {
1868        fn _decode(
1869            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1870        ) -> Result<fidl::Rights, fidl::Error> {
1871            let _response = fidl::client::decode_transaction_body::<
1872                ClosedTargetGetSignalableEventRightsResponse,
1873                fidl::encoding::DefaultFuchsiaResourceDialect,
1874                0x698c31448fd5daf,
1875            >(_buf?)?;
1876            Ok(_response.rights)
1877        }
1878        self.client
1879            .send_query_and_decode::<ClosedTargetGetSignalableEventRightsRequest, fidl::Rights>(
1880                (handle,),
1881                0x698c31448fd5daf,
1882                fidl::encoding::DynamicFlags::empty(),
1883                _decode,
1884            )
1885    }
1886
1887    type EchoAsTransferableSignalableEventResponseFut =
1888        fidl::client::QueryResponseFut<fidl::Event, fidl::encoding::DefaultFuchsiaResourceDialect>;
1889    fn r#echo_as_transferable_signalable_event(
1890        &self,
1891        mut handle: fidl::Handle,
1892    ) -> Self::EchoAsTransferableSignalableEventResponseFut {
1893        fn _decode(
1894            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1895        ) -> Result<fidl::Event, fidl::Error> {
1896            let _response = fidl::client::decode_transaction_body::<
1897                ClosedTargetEchoAsTransferableSignalableEventResponse,
1898                fidl::encoding::DefaultFuchsiaResourceDialect,
1899                0x5ec627bdc2e02ca0,
1900            >(_buf?)?;
1901            Ok(_response.handle)
1902        }
1903        self.client.send_query_and_decode::<
1904            ClosedTargetEchoAsTransferableSignalableEventRequest,
1905            fidl::Event,
1906        >(
1907            (handle,),
1908            0x5ec627bdc2e02ca0,
1909            fidl::encoding::DynamicFlags::empty(),
1910            _decode,
1911        )
1912    }
1913
1914    type ByteVectorSizeResponseFut =
1915        fidl::client::QueryResponseFut<u32, fidl::encoding::DefaultFuchsiaResourceDialect>;
1916    fn r#byte_vector_size(&self, mut vec: &[u8]) -> Self::ByteVectorSizeResponseFut {
1917        fn _decode(
1918            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1919        ) -> Result<u32, fidl::Error> {
1920            let _response = fidl::client::decode_transaction_body::<
1921                ClosedTargetByteVectorSizeResponse,
1922                fidl::encoding::DefaultFuchsiaResourceDialect,
1923                0x104b2f9aa8b7fe25,
1924            >(_buf?)?;
1925            Ok(_response.n)
1926        }
1927        self.client.send_query_and_decode::<ClosedTargetByteVectorSizeRequest, u32>(
1928            (vec,),
1929            0x104b2f9aa8b7fe25,
1930            fidl::encoding::DynamicFlags::empty(),
1931            _decode,
1932        )
1933    }
1934
1935    type HandleVectorSizeResponseFut =
1936        fidl::client::QueryResponseFut<u32, fidl::encoding::DefaultFuchsiaResourceDialect>;
1937    fn r#handle_vector_size(&self, mut vec: Vec<fidl::Event>) -> Self::HandleVectorSizeResponseFut {
1938        fn _decode(
1939            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1940        ) -> Result<u32, fidl::Error> {
1941            let _response = fidl::client::decode_transaction_body::<
1942                ClosedTargetHandleVectorSizeResponse,
1943                fidl::encoding::DefaultFuchsiaResourceDialect,
1944                0x4c1ac83570a98537,
1945            >(_buf?)?;
1946            Ok(_response.n)
1947        }
1948        self.client.send_query_and_decode::<ClosedTargetHandleVectorSizeRequest, u32>(
1949            (vec.as_mut(),),
1950            0x4c1ac83570a98537,
1951            fidl::encoding::DynamicFlags::empty(),
1952            _decode,
1953        )
1954    }
1955
1956    type CreateNByteVectorResponseFut =
1957        fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
1958    fn r#create_n_byte_vector(&self, mut n: u32) -> Self::CreateNByteVectorResponseFut {
1959        fn _decode(
1960            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1961        ) -> Result<Vec<u8>, fidl::Error> {
1962            let _response = fidl::client::decode_transaction_body::<
1963                ClosedTargetCreateNByteVectorResponse,
1964                fidl::encoding::DefaultFuchsiaResourceDialect,
1965                0x1ecd88ef664e9c61,
1966            >(_buf?)?;
1967            Ok(_response.vec)
1968        }
1969        self.client.send_query_and_decode::<ClosedTargetCreateNByteVectorRequest, Vec<u8>>(
1970            (n,),
1971            0x1ecd88ef664e9c61,
1972            fidl::encoding::DynamicFlags::empty(),
1973            _decode,
1974        )
1975    }
1976
1977    type CreateNHandleVectorResponseFut = fidl::client::QueryResponseFut<
1978        Vec<fidl::Event>,
1979        fidl::encoding::DefaultFuchsiaResourceDialect,
1980    >;
1981    fn r#create_n_handle_vector(&self, mut n: u32) -> Self::CreateNHandleVectorResponseFut {
1982        fn _decode(
1983            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1984        ) -> Result<Vec<fidl::Event>, fidl::Error> {
1985            let _response = fidl::client::decode_transaction_body::<
1986                ClosedTargetCreateNHandleVectorResponse,
1987                fidl::encoding::DefaultFuchsiaResourceDialect,
1988                0x26341ba1fa66813d,
1989            >(_buf?)?;
1990            Ok(_response.vec)
1991        }
1992        self.client
1993            .send_query_and_decode::<ClosedTargetCreateNHandleVectorRequest, Vec<fidl::Event>>(
1994                (n,),
1995                0x26341ba1fa66813d,
1996                fidl::encoding::DynamicFlags::empty(),
1997                _decode,
1998            )
1999    }
2000}
2001
2002pub struct ClosedTargetEventStream {
2003    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2004}
2005
2006impl std::marker::Unpin for ClosedTargetEventStream {}
2007
2008impl futures::stream::FusedStream for ClosedTargetEventStream {
2009    fn is_terminated(&self) -> bool {
2010        self.event_receiver.is_terminated()
2011    }
2012}
2013
2014impl futures::Stream for ClosedTargetEventStream {
2015    type Item = Result<ClosedTargetEvent, fidl::Error>;
2016
2017    fn poll_next(
2018        mut self: std::pin::Pin<&mut Self>,
2019        cx: &mut std::task::Context<'_>,
2020    ) -> std::task::Poll<Option<Self::Item>> {
2021        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2022            &mut self.event_receiver,
2023            cx
2024        )?) {
2025            Some(buf) => std::task::Poll::Ready(Some(ClosedTargetEvent::decode(buf))),
2026            None => std::task::Poll::Ready(None),
2027        }
2028    }
2029}
2030
2031#[derive(Debug)]
2032pub enum ClosedTargetEvent {}
2033
2034impl ClosedTargetEvent {
2035    /// Decodes a message buffer as a [`ClosedTargetEvent`].
2036    fn decode(
2037        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2038    ) -> Result<ClosedTargetEvent, fidl::Error> {
2039        let (bytes, _handles) = buf.split_mut();
2040        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2041        debug_assert_eq!(tx_header.tx_id, 0);
2042        match tx_header.ordinal {
2043            _ => Err(fidl::Error::UnknownOrdinal {
2044                ordinal: tx_header.ordinal,
2045                protocol_name: <ClosedTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2046            }),
2047        }
2048    }
2049}
2050
2051/// A Stream of incoming requests for fidl.serversuite/ClosedTarget.
2052pub struct ClosedTargetRequestStream {
2053    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2054    is_terminated: bool,
2055}
2056
2057impl std::marker::Unpin for ClosedTargetRequestStream {}
2058
2059impl futures::stream::FusedStream for ClosedTargetRequestStream {
2060    fn is_terminated(&self) -> bool {
2061        self.is_terminated
2062    }
2063}
2064
2065impl fidl::endpoints::RequestStream for ClosedTargetRequestStream {
2066    type Protocol = ClosedTargetMarker;
2067    type ControlHandle = ClosedTargetControlHandle;
2068
2069    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2070        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2071    }
2072
2073    fn control_handle(&self) -> Self::ControlHandle {
2074        ClosedTargetControlHandle { inner: self.inner.clone() }
2075    }
2076
2077    fn into_inner(
2078        self,
2079    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2080    {
2081        (self.inner, self.is_terminated)
2082    }
2083
2084    fn from_inner(
2085        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2086        is_terminated: bool,
2087    ) -> Self {
2088        Self { inner, is_terminated }
2089    }
2090}
2091
2092impl futures::Stream for ClosedTargetRequestStream {
2093    type Item = Result<ClosedTargetRequest, fidl::Error>;
2094
2095    fn poll_next(
2096        mut self: std::pin::Pin<&mut Self>,
2097        cx: &mut std::task::Context<'_>,
2098    ) -> std::task::Poll<Option<Self::Item>> {
2099        let this = &mut *self;
2100        if this.inner.check_shutdown(cx) {
2101            this.is_terminated = true;
2102            return std::task::Poll::Ready(None);
2103        }
2104        if this.is_terminated {
2105            panic!("polled ClosedTargetRequestStream after completion");
2106        }
2107        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
2108            |bytes, handles| {
2109                match this.inner.channel().read_etc(cx, bytes, handles) {
2110                    std::task::Poll::Ready(Ok(())) => {}
2111                    std::task::Poll::Pending => return std::task::Poll::Pending,
2112                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
2113                        this.is_terminated = true;
2114                        return std::task::Poll::Ready(None);
2115                    }
2116                    std::task::Poll::Ready(Err(e)) => {
2117                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2118                            e.into(),
2119                        ))))
2120                    }
2121                }
2122
2123                // A message has been received from the channel
2124                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2125
2126                std::task::Poll::Ready(Some(match header.ordinal {
2127                    0x66bd5fe1d4c019e => {
2128                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2129                        let mut req = fidl::new_empty!(
2130                            fidl::encoding::EmptyPayload,
2131                            fidl::encoding::DefaultFuchsiaResourceDialect
2132                        );
2133                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2134                        let control_handle =
2135                            ClosedTargetControlHandle { inner: this.inner.clone() };
2136                        Ok(ClosedTargetRequest::OneWayNoPayload { control_handle })
2137                    }
2138                    0x5bda1d1c46a5ae5f => {
2139                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2140                        let mut req = fidl::new_empty!(
2141                            fidl::encoding::EmptyPayload,
2142                            fidl::encoding::DefaultFuchsiaResourceDialect
2143                        );
2144                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2145                        let control_handle =
2146                            ClosedTargetControlHandle { inner: this.inner.clone() };
2147                        Ok(ClosedTargetRequest::TwoWayNoPayload {
2148                            responder: ClosedTargetTwoWayNoPayloadResponder {
2149                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2150                                tx_id: header.tx_id,
2151                            },
2152                        })
2153                    }
2154                    0x313769ab1b770c90 => {
2155                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2156                        let mut req = fidl::new_empty!(
2157                            ClosedTargetTwoWayStructPayloadRequest,
2158                            fidl::encoding::DefaultFuchsiaResourceDialect
2159                        );
2160                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetTwoWayStructPayloadRequest>(&header, _body_bytes, handles, &mut req)?;
2161                        let control_handle =
2162                            ClosedTargetControlHandle { inner: this.inner.clone() };
2163                        Ok(ClosedTargetRequest::TwoWayStructPayload {
2164                            v: req.v,
2165
2166                            responder: ClosedTargetTwoWayStructPayloadResponder {
2167                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2168                                tx_id: header.tx_id,
2169                            },
2170                        })
2171                    }
2172                    0x631f7f27b6872baa => {
2173                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2174                        let mut req = fidl::new_empty!(
2175                            ClosedTargetTwoWayTablePayloadRequest,
2176                            fidl::encoding::DefaultFuchsiaResourceDialect
2177                        );
2178                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetTwoWayTablePayloadRequest>(&header, _body_bytes, handles, &mut req)?;
2179                        let control_handle =
2180                            ClosedTargetControlHandle { inner: this.inner.clone() };
2181                        Ok(ClosedTargetRequest::TwoWayTablePayload {
2182                            payload: req,
2183                            responder: ClosedTargetTwoWayTablePayloadResponder {
2184                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2185                                tx_id: header.tx_id,
2186                            },
2187                        })
2188                    }
2189                    0x77d0365370536dba => {
2190                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2191                        let mut req = fidl::new_empty!(
2192                            ClosedTargetTwoWayUnionPayloadRequest,
2193                            fidl::encoding::DefaultFuchsiaResourceDialect
2194                        );
2195                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetTwoWayUnionPayloadRequest>(&header, _body_bytes, handles, &mut req)?;
2196                        let control_handle =
2197                            ClosedTargetControlHandle { inner: this.inner.clone() };
2198                        Ok(ClosedTargetRequest::TwoWayUnionPayload {
2199                            payload: req,
2200                            responder: ClosedTargetTwoWayUnionPayloadResponder {
2201                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2202                                tx_id: header.tx_id,
2203                            },
2204                        })
2205                    }
2206                    0xb32549e6f50894c => {
2207                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2208                        let mut req = fidl::new_empty!(
2209                            ClosedTargetTwoWayResultRequest,
2210                            fidl::encoding::DefaultFuchsiaResourceDialect
2211                        );
2212                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetTwoWayResultRequest>(&header, _body_bytes, handles, &mut req)?;
2213                        let control_handle =
2214                            ClosedTargetControlHandle { inner: this.inner.clone() };
2215                        Ok(ClosedTargetRequest::TwoWayResult {
2216                            payload: req,
2217                            responder: ClosedTargetTwoWayResultResponder {
2218                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2219                                tx_id: header.tx_id,
2220                            },
2221                        })
2222                    }
2223                    0x1098d82f79effbe8 => {
2224                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2225                        let mut req = fidl::new_empty!(
2226                            ClosedTargetGetHandleRightsRequest,
2227                            fidl::encoding::DefaultFuchsiaResourceDialect
2228                        );
2229                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetGetHandleRightsRequest>(&header, _body_bytes, handles, &mut req)?;
2230                        let control_handle =
2231                            ClosedTargetControlHandle { inner: this.inner.clone() };
2232                        Ok(ClosedTargetRequest::GetHandleRights {
2233                            handle: req.handle,
2234
2235                            responder: ClosedTargetGetHandleRightsResponder {
2236                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2237                                tx_id: header.tx_id,
2238                            },
2239                        })
2240                    }
2241                    0x698c31448fd5daf => {
2242                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2243                        let mut req = fidl::new_empty!(
2244                            ClosedTargetGetSignalableEventRightsRequest,
2245                            fidl::encoding::DefaultFuchsiaResourceDialect
2246                        );
2247                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetGetSignalableEventRightsRequest>(&header, _body_bytes, handles, &mut req)?;
2248                        let control_handle =
2249                            ClosedTargetControlHandle { inner: this.inner.clone() };
2250                        Ok(ClosedTargetRequest::GetSignalableEventRights {
2251                            handle: req.handle,
2252
2253                            responder: ClosedTargetGetSignalableEventRightsResponder {
2254                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2255                                tx_id: header.tx_id,
2256                            },
2257                        })
2258                    }
2259                    0x5ec627bdc2e02ca0 => {
2260                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2261                        let mut req = fidl::new_empty!(
2262                            ClosedTargetEchoAsTransferableSignalableEventRequest,
2263                            fidl::encoding::DefaultFuchsiaResourceDialect
2264                        );
2265                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetEchoAsTransferableSignalableEventRequest>(&header, _body_bytes, handles, &mut req)?;
2266                        let control_handle =
2267                            ClosedTargetControlHandle { inner: this.inner.clone() };
2268                        Ok(ClosedTargetRequest::EchoAsTransferableSignalableEvent {
2269                            handle: req.handle,
2270
2271                            responder: ClosedTargetEchoAsTransferableSignalableEventResponder {
2272                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2273                                tx_id: header.tx_id,
2274                            },
2275                        })
2276                    }
2277                    0x104b2f9aa8b7fe25 => {
2278                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2279                        let mut req = fidl::new_empty!(
2280                            ClosedTargetByteVectorSizeRequest,
2281                            fidl::encoding::DefaultFuchsiaResourceDialect
2282                        );
2283                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetByteVectorSizeRequest>(&header, _body_bytes, handles, &mut req)?;
2284                        let control_handle =
2285                            ClosedTargetControlHandle { inner: this.inner.clone() };
2286                        Ok(ClosedTargetRequest::ByteVectorSize {
2287                            vec: req.vec,
2288
2289                            responder: ClosedTargetByteVectorSizeResponder {
2290                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2291                                tx_id: header.tx_id,
2292                            },
2293                        })
2294                    }
2295                    0x4c1ac83570a98537 => {
2296                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2297                        let mut req = fidl::new_empty!(
2298                            ClosedTargetHandleVectorSizeRequest,
2299                            fidl::encoding::DefaultFuchsiaResourceDialect
2300                        );
2301                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetHandleVectorSizeRequest>(&header, _body_bytes, handles, &mut req)?;
2302                        let control_handle =
2303                            ClosedTargetControlHandle { inner: this.inner.clone() };
2304                        Ok(ClosedTargetRequest::HandleVectorSize {
2305                            vec: req.vec,
2306
2307                            responder: ClosedTargetHandleVectorSizeResponder {
2308                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2309                                tx_id: header.tx_id,
2310                            },
2311                        })
2312                    }
2313                    0x1ecd88ef664e9c61 => {
2314                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2315                        let mut req = fidl::new_empty!(
2316                            ClosedTargetCreateNByteVectorRequest,
2317                            fidl::encoding::DefaultFuchsiaResourceDialect
2318                        );
2319                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetCreateNByteVectorRequest>(&header, _body_bytes, handles, &mut req)?;
2320                        let control_handle =
2321                            ClosedTargetControlHandle { inner: this.inner.clone() };
2322                        Ok(ClosedTargetRequest::CreateNByteVector {
2323                            n: req.n,
2324
2325                            responder: ClosedTargetCreateNByteVectorResponder {
2326                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2327                                tx_id: header.tx_id,
2328                            },
2329                        })
2330                    }
2331                    0x26341ba1fa66813d => {
2332                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2333                        let mut req = fidl::new_empty!(
2334                            ClosedTargetCreateNHandleVectorRequest,
2335                            fidl::encoding::DefaultFuchsiaResourceDialect
2336                        );
2337                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetCreateNHandleVectorRequest>(&header, _body_bytes, handles, &mut req)?;
2338                        let control_handle =
2339                            ClosedTargetControlHandle { inner: this.inner.clone() };
2340                        Ok(ClosedTargetRequest::CreateNHandleVector {
2341                            n: req.n,
2342
2343                            responder: ClosedTargetCreateNHandleVectorResponder {
2344                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2345                                tx_id: header.tx_id,
2346                            },
2347                        })
2348                    }
2349                    _ => Err(fidl::Error::UnknownOrdinal {
2350                        ordinal: header.ordinal,
2351                        protocol_name:
2352                            <ClosedTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2353                    }),
2354                }))
2355            },
2356        )
2357    }
2358}
2359
2360#[derive(Debug)]
2361pub enum ClosedTargetRequest {
2362    OneWayNoPayload {
2363        control_handle: ClosedTargetControlHandle,
2364    },
2365    TwoWayNoPayload {
2366        responder: ClosedTargetTwoWayNoPayloadResponder,
2367    },
2368    TwoWayStructPayload {
2369        v: i8,
2370        responder: ClosedTargetTwoWayStructPayloadResponder,
2371    },
2372    TwoWayTablePayload {
2373        payload: ClosedTargetTwoWayTablePayloadRequest,
2374        responder: ClosedTargetTwoWayTablePayloadResponder,
2375    },
2376    TwoWayUnionPayload {
2377        payload: ClosedTargetTwoWayUnionPayloadRequest,
2378        responder: ClosedTargetTwoWayUnionPayloadResponder,
2379    },
2380    TwoWayResult {
2381        payload: ClosedTargetTwoWayResultRequest,
2382        responder: ClosedTargetTwoWayResultResponder,
2383    },
2384    GetHandleRights {
2385        handle: fidl::Handle,
2386        responder: ClosedTargetGetHandleRightsResponder,
2387    },
2388    GetSignalableEventRights {
2389        handle: fidl::Event,
2390        responder: ClosedTargetGetSignalableEventRightsResponder,
2391    },
2392    EchoAsTransferableSignalableEvent {
2393        handle: fidl::Handle,
2394        responder: ClosedTargetEchoAsTransferableSignalableEventResponder,
2395    },
2396    ByteVectorSize {
2397        vec: Vec<u8>,
2398        responder: ClosedTargetByteVectorSizeResponder,
2399    },
2400    HandleVectorSize {
2401        vec: Vec<fidl::Event>,
2402        responder: ClosedTargetHandleVectorSizeResponder,
2403    },
2404    CreateNByteVector {
2405        n: u32,
2406        responder: ClosedTargetCreateNByteVectorResponder,
2407    },
2408    CreateNHandleVector {
2409        n: u32,
2410        responder: ClosedTargetCreateNHandleVectorResponder,
2411    },
2412}
2413
2414impl ClosedTargetRequest {
2415    #[allow(irrefutable_let_patterns)]
2416    pub fn into_one_way_no_payload(self) -> Option<(ClosedTargetControlHandle)> {
2417        if let ClosedTargetRequest::OneWayNoPayload { control_handle } = self {
2418            Some((control_handle))
2419        } else {
2420            None
2421        }
2422    }
2423
2424    #[allow(irrefutable_let_patterns)]
2425    pub fn into_two_way_no_payload(self) -> Option<(ClosedTargetTwoWayNoPayloadResponder)> {
2426        if let ClosedTargetRequest::TwoWayNoPayload { responder } = self {
2427            Some((responder))
2428        } else {
2429            None
2430        }
2431    }
2432
2433    #[allow(irrefutable_let_patterns)]
2434    pub fn into_two_way_struct_payload(
2435        self,
2436    ) -> Option<(i8, ClosedTargetTwoWayStructPayloadResponder)> {
2437        if let ClosedTargetRequest::TwoWayStructPayload { v, responder } = self {
2438            Some((v, responder))
2439        } else {
2440            None
2441        }
2442    }
2443
2444    #[allow(irrefutable_let_patterns)]
2445    pub fn into_two_way_table_payload(
2446        self,
2447    ) -> Option<(ClosedTargetTwoWayTablePayloadRequest, ClosedTargetTwoWayTablePayloadResponder)>
2448    {
2449        if let ClosedTargetRequest::TwoWayTablePayload { payload, responder } = self {
2450            Some((payload, responder))
2451        } else {
2452            None
2453        }
2454    }
2455
2456    #[allow(irrefutable_let_patterns)]
2457    pub fn into_two_way_union_payload(
2458        self,
2459    ) -> Option<(ClosedTargetTwoWayUnionPayloadRequest, ClosedTargetTwoWayUnionPayloadResponder)>
2460    {
2461        if let ClosedTargetRequest::TwoWayUnionPayload { payload, responder } = self {
2462            Some((payload, responder))
2463        } else {
2464            None
2465        }
2466    }
2467
2468    #[allow(irrefutable_let_patterns)]
2469    pub fn into_two_way_result(
2470        self,
2471    ) -> Option<(ClosedTargetTwoWayResultRequest, ClosedTargetTwoWayResultResponder)> {
2472        if let ClosedTargetRequest::TwoWayResult { payload, responder } = self {
2473            Some((payload, responder))
2474        } else {
2475            None
2476        }
2477    }
2478
2479    #[allow(irrefutable_let_patterns)]
2480    pub fn into_get_handle_rights(
2481        self,
2482    ) -> Option<(fidl::Handle, ClosedTargetGetHandleRightsResponder)> {
2483        if let ClosedTargetRequest::GetHandleRights { handle, responder } = self {
2484            Some((handle, responder))
2485        } else {
2486            None
2487        }
2488    }
2489
2490    #[allow(irrefutable_let_patterns)]
2491    pub fn into_get_signalable_event_rights(
2492        self,
2493    ) -> Option<(fidl::Event, ClosedTargetGetSignalableEventRightsResponder)> {
2494        if let ClosedTargetRequest::GetSignalableEventRights { handle, responder } = self {
2495            Some((handle, responder))
2496        } else {
2497            None
2498        }
2499    }
2500
2501    #[allow(irrefutable_let_patterns)]
2502    pub fn into_echo_as_transferable_signalable_event(
2503        self,
2504    ) -> Option<(fidl::Handle, ClosedTargetEchoAsTransferableSignalableEventResponder)> {
2505        if let ClosedTargetRequest::EchoAsTransferableSignalableEvent { handle, responder } = self {
2506            Some((handle, responder))
2507        } else {
2508            None
2509        }
2510    }
2511
2512    #[allow(irrefutable_let_patterns)]
2513    pub fn into_byte_vector_size(self) -> Option<(Vec<u8>, ClosedTargetByteVectorSizeResponder)> {
2514        if let ClosedTargetRequest::ByteVectorSize { vec, responder } = self {
2515            Some((vec, responder))
2516        } else {
2517            None
2518        }
2519    }
2520
2521    #[allow(irrefutable_let_patterns)]
2522    pub fn into_handle_vector_size(
2523        self,
2524    ) -> Option<(Vec<fidl::Event>, ClosedTargetHandleVectorSizeResponder)> {
2525        if let ClosedTargetRequest::HandleVectorSize { vec, responder } = self {
2526            Some((vec, responder))
2527        } else {
2528            None
2529        }
2530    }
2531
2532    #[allow(irrefutable_let_patterns)]
2533    pub fn into_create_n_byte_vector(
2534        self,
2535    ) -> Option<(u32, ClosedTargetCreateNByteVectorResponder)> {
2536        if let ClosedTargetRequest::CreateNByteVector { n, responder } = self {
2537            Some((n, responder))
2538        } else {
2539            None
2540        }
2541    }
2542
2543    #[allow(irrefutable_let_patterns)]
2544    pub fn into_create_n_handle_vector(
2545        self,
2546    ) -> Option<(u32, ClosedTargetCreateNHandleVectorResponder)> {
2547        if let ClosedTargetRequest::CreateNHandleVector { n, responder } = self {
2548            Some((n, responder))
2549        } else {
2550            None
2551        }
2552    }
2553
2554    /// Name of the method defined in FIDL
2555    pub fn method_name(&self) -> &'static str {
2556        match *self {
2557            ClosedTargetRequest::OneWayNoPayload { .. } => "one_way_no_payload",
2558            ClosedTargetRequest::TwoWayNoPayload { .. } => "two_way_no_payload",
2559            ClosedTargetRequest::TwoWayStructPayload { .. } => "two_way_struct_payload",
2560            ClosedTargetRequest::TwoWayTablePayload { .. } => "two_way_table_payload",
2561            ClosedTargetRequest::TwoWayUnionPayload { .. } => "two_way_union_payload",
2562            ClosedTargetRequest::TwoWayResult { .. } => "two_way_result",
2563            ClosedTargetRequest::GetHandleRights { .. } => "get_handle_rights",
2564            ClosedTargetRequest::GetSignalableEventRights { .. } => "get_signalable_event_rights",
2565            ClosedTargetRequest::EchoAsTransferableSignalableEvent { .. } => {
2566                "echo_as_transferable_signalable_event"
2567            }
2568            ClosedTargetRequest::ByteVectorSize { .. } => "byte_vector_size",
2569            ClosedTargetRequest::HandleVectorSize { .. } => "handle_vector_size",
2570            ClosedTargetRequest::CreateNByteVector { .. } => "create_n_byte_vector",
2571            ClosedTargetRequest::CreateNHandleVector { .. } => "create_n_handle_vector",
2572        }
2573    }
2574}
2575
2576#[derive(Debug, Clone)]
2577pub struct ClosedTargetControlHandle {
2578    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2579}
2580
2581impl fidl::endpoints::ControlHandle for ClosedTargetControlHandle {
2582    fn shutdown(&self) {
2583        self.inner.shutdown()
2584    }
2585    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2586        self.inner.shutdown_with_epitaph(status)
2587    }
2588
2589    fn is_closed(&self) -> bool {
2590        self.inner.channel().is_closed()
2591    }
2592    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2593        self.inner.channel().on_closed()
2594    }
2595
2596    #[cfg(target_os = "fuchsia")]
2597    fn signal_peer(
2598        &self,
2599        clear_mask: zx::Signals,
2600        set_mask: zx::Signals,
2601    ) -> Result<(), zx_status::Status> {
2602        use fidl::Peered;
2603        self.inner.channel().signal_peer(clear_mask, set_mask)
2604    }
2605}
2606
2607impl ClosedTargetControlHandle {}
2608
2609#[must_use = "FIDL methods require a response to be sent"]
2610#[derive(Debug)]
2611pub struct ClosedTargetTwoWayNoPayloadResponder {
2612    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2613    tx_id: u32,
2614}
2615
2616/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
2617/// if the responder is dropped without sending a response, so that the client
2618/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2619impl std::ops::Drop for ClosedTargetTwoWayNoPayloadResponder {
2620    fn drop(&mut self) {
2621        self.control_handle.shutdown();
2622        // Safety: drops once, never accessed again
2623        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2624    }
2625}
2626
2627impl fidl::endpoints::Responder for ClosedTargetTwoWayNoPayloadResponder {
2628    type ControlHandle = ClosedTargetControlHandle;
2629
2630    fn control_handle(&self) -> &ClosedTargetControlHandle {
2631        &self.control_handle
2632    }
2633
2634    fn drop_without_shutdown(mut self) {
2635        // Safety: drops once, never accessed again due to mem::forget
2636        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2637        // Prevent Drop from running (which would shut down the channel)
2638        std::mem::forget(self);
2639    }
2640}
2641
2642impl ClosedTargetTwoWayNoPayloadResponder {
2643    /// Sends a response to the FIDL transaction.
2644    ///
2645    /// Sets the channel to shutdown if an error occurs.
2646    pub fn send(self) -> Result<(), fidl::Error> {
2647        let _result = self.send_raw();
2648        if _result.is_err() {
2649            self.control_handle.shutdown();
2650        }
2651        self.drop_without_shutdown();
2652        _result
2653    }
2654
2655    /// Similar to "send" but does not shutdown the channel if an error occurs.
2656    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
2657        let _result = self.send_raw();
2658        self.drop_without_shutdown();
2659        _result
2660    }
2661
2662    fn send_raw(&self) -> Result<(), fidl::Error> {
2663        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
2664            (),
2665            self.tx_id,
2666            0x5bda1d1c46a5ae5f,
2667            fidl::encoding::DynamicFlags::empty(),
2668        )
2669    }
2670}
2671
2672#[must_use = "FIDL methods require a response to be sent"]
2673#[derive(Debug)]
2674pub struct ClosedTargetTwoWayStructPayloadResponder {
2675    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2676    tx_id: u32,
2677}
2678
2679/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
2680/// if the responder is dropped without sending a response, so that the client
2681/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2682impl std::ops::Drop for ClosedTargetTwoWayStructPayloadResponder {
2683    fn drop(&mut self) {
2684        self.control_handle.shutdown();
2685        // Safety: drops once, never accessed again
2686        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2687    }
2688}
2689
2690impl fidl::endpoints::Responder for ClosedTargetTwoWayStructPayloadResponder {
2691    type ControlHandle = ClosedTargetControlHandle;
2692
2693    fn control_handle(&self) -> &ClosedTargetControlHandle {
2694        &self.control_handle
2695    }
2696
2697    fn drop_without_shutdown(mut self) {
2698        // Safety: drops once, never accessed again due to mem::forget
2699        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2700        // Prevent Drop from running (which would shut down the channel)
2701        std::mem::forget(self);
2702    }
2703}
2704
2705impl ClosedTargetTwoWayStructPayloadResponder {
2706    /// Sends a response to the FIDL transaction.
2707    ///
2708    /// Sets the channel to shutdown if an error occurs.
2709    pub fn send(self, mut v: i8) -> Result<(), fidl::Error> {
2710        let _result = self.send_raw(v);
2711        if _result.is_err() {
2712            self.control_handle.shutdown();
2713        }
2714        self.drop_without_shutdown();
2715        _result
2716    }
2717
2718    /// Similar to "send" but does not shutdown the channel if an error occurs.
2719    pub fn send_no_shutdown_on_err(self, mut v: i8) -> Result<(), fidl::Error> {
2720        let _result = self.send_raw(v);
2721        self.drop_without_shutdown();
2722        _result
2723    }
2724
2725    fn send_raw(&self, mut v: i8) -> Result<(), fidl::Error> {
2726        self.control_handle.inner.send::<ClosedTargetTwoWayStructPayloadResponse>(
2727            (v,),
2728            self.tx_id,
2729            0x313769ab1b770c90,
2730            fidl::encoding::DynamicFlags::empty(),
2731        )
2732    }
2733}
2734
2735#[must_use = "FIDL methods require a response to be sent"]
2736#[derive(Debug)]
2737pub struct ClosedTargetTwoWayTablePayloadResponder {
2738    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2739    tx_id: u32,
2740}
2741
2742/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
2743/// if the responder is dropped without sending a response, so that the client
2744/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2745impl std::ops::Drop for ClosedTargetTwoWayTablePayloadResponder {
2746    fn drop(&mut self) {
2747        self.control_handle.shutdown();
2748        // Safety: drops once, never accessed again
2749        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2750    }
2751}
2752
2753impl fidl::endpoints::Responder for ClosedTargetTwoWayTablePayloadResponder {
2754    type ControlHandle = ClosedTargetControlHandle;
2755
2756    fn control_handle(&self) -> &ClosedTargetControlHandle {
2757        &self.control_handle
2758    }
2759
2760    fn drop_without_shutdown(mut self) {
2761        // Safety: drops once, never accessed again due to mem::forget
2762        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2763        // Prevent Drop from running (which would shut down the channel)
2764        std::mem::forget(self);
2765    }
2766}
2767
2768impl ClosedTargetTwoWayTablePayloadResponder {
2769    /// Sends a response to the FIDL transaction.
2770    ///
2771    /// Sets the channel to shutdown if an error occurs.
2772    pub fn send(
2773        self,
2774        mut payload: &ClosedTargetTwoWayTablePayloadResponse,
2775    ) -> Result<(), fidl::Error> {
2776        let _result = self.send_raw(payload);
2777        if _result.is_err() {
2778            self.control_handle.shutdown();
2779        }
2780        self.drop_without_shutdown();
2781        _result
2782    }
2783
2784    /// Similar to "send" but does not shutdown the channel if an error occurs.
2785    pub fn send_no_shutdown_on_err(
2786        self,
2787        mut payload: &ClosedTargetTwoWayTablePayloadResponse,
2788    ) -> Result<(), fidl::Error> {
2789        let _result = self.send_raw(payload);
2790        self.drop_without_shutdown();
2791        _result
2792    }
2793
2794    fn send_raw(
2795        &self,
2796        mut payload: &ClosedTargetTwoWayTablePayloadResponse,
2797    ) -> Result<(), fidl::Error> {
2798        self.control_handle.inner.send::<ClosedTargetTwoWayTablePayloadResponse>(
2799            payload,
2800            self.tx_id,
2801            0x631f7f27b6872baa,
2802            fidl::encoding::DynamicFlags::empty(),
2803        )
2804    }
2805}
2806
2807#[must_use = "FIDL methods require a response to be sent"]
2808#[derive(Debug)]
2809pub struct ClosedTargetTwoWayUnionPayloadResponder {
2810    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2811    tx_id: u32,
2812}
2813
2814/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
2815/// if the responder is dropped without sending a response, so that the client
2816/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2817impl std::ops::Drop for ClosedTargetTwoWayUnionPayloadResponder {
2818    fn drop(&mut self) {
2819        self.control_handle.shutdown();
2820        // Safety: drops once, never accessed again
2821        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2822    }
2823}
2824
2825impl fidl::endpoints::Responder for ClosedTargetTwoWayUnionPayloadResponder {
2826    type ControlHandle = ClosedTargetControlHandle;
2827
2828    fn control_handle(&self) -> &ClosedTargetControlHandle {
2829        &self.control_handle
2830    }
2831
2832    fn drop_without_shutdown(mut self) {
2833        // Safety: drops once, never accessed again due to mem::forget
2834        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2835        // Prevent Drop from running (which would shut down the channel)
2836        std::mem::forget(self);
2837    }
2838}
2839
2840impl ClosedTargetTwoWayUnionPayloadResponder {
2841    /// Sends a response to the FIDL transaction.
2842    ///
2843    /// Sets the channel to shutdown if an error occurs.
2844    pub fn send(
2845        self,
2846        mut payload: &ClosedTargetTwoWayUnionPayloadResponse,
2847    ) -> Result<(), fidl::Error> {
2848        let _result = self.send_raw(payload);
2849        if _result.is_err() {
2850            self.control_handle.shutdown();
2851        }
2852        self.drop_without_shutdown();
2853        _result
2854    }
2855
2856    /// Similar to "send" but does not shutdown the channel if an error occurs.
2857    pub fn send_no_shutdown_on_err(
2858        self,
2859        mut payload: &ClosedTargetTwoWayUnionPayloadResponse,
2860    ) -> Result<(), fidl::Error> {
2861        let _result = self.send_raw(payload);
2862        self.drop_without_shutdown();
2863        _result
2864    }
2865
2866    fn send_raw(
2867        &self,
2868        mut payload: &ClosedTargetTwoWayUnionPayloadResponse,
2869    ) -> Result<(), fidl::Error> {
2870        self.control_handle.inner.send::<ClosedTargetTwoWayUnionPayloadResponse>(
2871            payload,
2872            self.tx_id,
2873            0x77d0365370536dba,
2874            fidl::encoding::DynamicFlags::empty(),
2875        )
2876    }
2877}
2878
2879#[must_use = "FIDL methods require a response to be sent"]
2880#[derive(Debug)]
2881pub struct ClosedTargetTwoWayResultResponder {
2882    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2883    tx_id: u32,
2884}
2885
2886/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
2887/// if the responder is dropped without sending a response, so that the client
2888/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2889impl std::ops::Drop for ClosedTargetTwoWayResultResponder {
2890    fn drop(&mut self) {
2891        self.control_handle.shutdown();
2892        // Safety: drops once, never accessed again
2893        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2894    }
2895}
2896
2897impl fidl::endpoints::Responder for ClosedTargetTwoWayResultResponder {
2898    type ControlHandle = ClosedTargetControlHandle;
2899
2900    fn control_handle(&self) -> &ClosedTargetControlHandle {
2901        &self.control_handle
2902    }
2903
2904    fn drop_without_shutdown(mut self) {
2905        // Safety: drops once, never accessed again due to mem::forget
2906        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2907        // Prevent Drop from running (which would shut down the channel)
2908        std::mem::forget(self);
2909    }
2910}
2911
2912impl ClosedTargetTwoWayResultResponder {
2913    /// Sends a response to the FIDL transaction.
2914    ///
2915    /// Sets the channel to shutdown if an error occurs.
2916    pub fn send(self, mut result: Result<&str, u32>) -> Result<(), fidl::Error> {
2917        let _result = self.send_raw(result);
2918        if _result.is_err() {
2919            self.control_handle.shutdown();
2920        }
2921        self.drop_without_shutdown();
2922        _result
2923    }
2924
2925    /// Similar to "send" but does not shutdown the channel if an error occurs.
2926    pub fn send_no_shutdown_on_err(self, mut result: Result<&str, u32>) -> Result<(), fidl::Error> {
2927        let _result = self.send_raw(result);
2928        self.drop_without_shutdown();
2929        _result
2930    }
2931
2932    fn send_raw(&self, mut result: Result<&str, u32>) -> Result<(), fidl::Error> {
2933        self.control_handle
2934            .inner
2935            .send::<fidl::encoding::ResultType<ClosedTargetTwoWayResultResponse, u32>>(
2936                result.map(|payload| (payload,)),
2937                self.tx_id,
2938                0xb32549e6f50894c,
2939                fidl::encoding::DynamicFlags::empty(),
2940            )
2941    }
2942}
2943
2944#[must_use = "FIDL methods require a response to be sent"]
2945#[derive(Debug)]
2946pub struct ClosedTargetGetHandleRightsResponder {
2947    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2948    tx_id: u32,
2949}
2950
2951/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
2952/// if the responder is dropped without sending a response, so that the client
2953/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2954impl std::ops::Drop for ClosedTargetGetHandleRightsResponder {
2955    fn drop(&mut self) {
2956        self.control_handle.shutdown();
2957        // Safety: drops once, never accessed again
2958        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2959    }
2960}
2961
2962impl fidl::endpoints::Responder for ClosedTargetGetHandleRightsResponder {
2963    type ControlHandle = ClosedTargetControlHandle;
2964
2965    fn control_handle(&self) -> &ClosedTargetControlHandle {
2966        &self.control_handle
2967    }
2968
2969    fn drop_without_shutdown(mut self) {
2970        // Safety: drops once, never accessed again due to mem::forget
2971        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2972        // Prevent Drop from running (which would shut down the channel)
2973        std::mem::forget(self);
2974    }
2975}
2976
2977impl ClosedTargetGetHandleRightsResponder {
2978    /// Sends a response to the FIDL transaction.
2979    ///
2980    /// Sets the channel to shutdown if an error occurs.
2981    pub fn send(self, mut rights: fidl::Rights) -> Result<(), fidl::Error> {
2982        let _result = self.send_raw(rights);
2983        if _result.is_err() {
2984            self.control_handle.shutdown();
2985        }
2986        self.drop_without_shutdown();
2987        _result
2988    }
2989
2990    /// Similar to "send" but does not shutdown the channel if an error occurs.
2991    pub fn send_no_shutdown_on_err(self, mut rights: fidl::Rights) -> Result<(), fidl::Error> {
2992        let _result = self.send_raw(rights);
2993        self.drop_without_shutdown();
2994        _result
2995    }
2996
2997    fn send_raw(&self, mut rights: fidl::Rights) -> Result<(), fidl::Error> {
2998        self.control_handle.inner.send::<ClosedTargetGetHandleRightsResponse>(
2999            (rights,),
3000            self.tx_id,
3001            0x1098d82f79effbe8,
3002            fidl::encoding::DynamicFlags::empty(),
3003        )
3004    }
3005}
3006
3007#[must_use = "FIDL methods require a response to be sent"]
3008#[derive(Debug)]
3009pub struct ClosedTargetGetSignalableEventRightsResponder {
3010    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
3011    tx_id: u32,
3012}
3013
3014/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
3015/// if the responder is dropped without sending a response, so that the client
3016/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3017impl std::ops::Drop for ClosedTargetGetSignalableEventRightsResponder {
3018    fn drop(&mut self) {
3019        self.control_handle.shutdown();
3020        // Safety: drops once, never accessed again
3021        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3022    }
3023}
3024
3025impl fidl::endpoints::Responder for ClosedTargetGetSignalableEventRightsResponder {
3026    type ControlHandle = ClosedTargetControlHandle;
3027
3028    fn control_handle(&self) -> &ClosedTargetControlHandle {
3029        &self.control_handle
3030    }
3031
3032    fn drop_without_shutdown(mut self) {
3033        // Safety: drops once, never accessed again due to mem::forget
3034        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3035        // Prevent Drop from running (which would shut down the channel)
3036        std::mem::forget(self);
3037    }
3038}
3039
3040impl ClosedTargetGetSignalableEventRightsResponder {
3041    /// Sends a response to the FIDL transaction.
3042    ///
3043    /// Sets the channel to shutdown if an error occurs.
3044    pub fn send(self, mut rights: fidl::Rights) -> Result<(), fidl::Error> {
3045        let _result = self.send_raw(rights);
3046        if _result.is_err() {
3047            self.control_handle.shutdown();
3048        }
3049        self.drop_without_shutdown();
3050        _result
3051    }
3052
3053    /// Similar to "send" but does not shutdown the channel if an error occurs.
3054    pub fn send_no_shutdown_on_err(self, mut rights: fidl::Rights) -> Result<(), fidl::Error> {
3055        let _result = self.send_raw(rights);
3056        self.drop_without_shutdown();
3057        _result
3058    }
3059
3060    fn send_raw(&self, mut rights: fidl::Rights) -> Result<(), fidl::Error> {
3061        self.control_handle.inner.send::<ClosedTargetGetSignalableEventRightsResponse>(
3062            (rights,),
3063            self.tx_id,
3064            0x698c31448fd5daf,
3065            fidl::encoding::DynamicFlags::empty(),
3066        )
3067    }
3068}
3069
3070#[must_use = "FIDL methods require a response to be sent"]
3071#[derive(Debug)]
3072pub struct ClosedTargetEchoAsTransferableSignalableEventResponder {
3073    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
3074    tx_id: u32,
3075}
3076
3077/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
3078/// if the responder is dropped without sending a response, so that the client
3079/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3080impl std::ops::Drop for ClosedTargetEchoAsTransferableSignalableEventResponder {
3081    fn drop(&mut self) {
3082        self.control_handle.shutdown();
3083        // Safety: drops once, never accessed again
3084        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3085    }
3086}
3087
3088impl fidl::endpoints::Responder for ClosedTargetEchoAsTransferableSignalableEventResponder {
3089    type ControlHandle = ClosedTargetControlHandle;
3090
3091    fn control_handle(&self) -> &ClosedTargetControlHandle {
3092        &self.control_handle
3093    }
3094
3095    fn drop_without_shutdown(mut self) {
3096        // Safety: drops once, never accessed again due to mem::forget
3097        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3098        // Prevent Drop from running (which would shut down the channel)
3099        std::mem::forget(self);
3100    }
3101}
3102
3103impl ClosedTargetEchoAsTransferableSignalableEventResponder {
3104    /// Sends a response to the FIDL transaction.
3105    ///
3106    /// Sets the channel to shutdown if an error occurs.
3107    pub fn send(self, mut handle: fidl::Event) -> Result<(), fidl::Error> {
3108        let _result = self.send_raw(handle);
3109        if _result.is_err() {
3110            self.control_handle.shutdown();
3111        }
3112        self.drop_without_shutdown();
3113        _result
3114    }
3115
3116    /// Similar to "send" but does not shutdown the channel if an error occurs.
3117    pub fn send_no_shutdown_on_err(self, mut handle: fidl::Event) -> Result<(), fidl::Error> {
3118        let _result = self.send_raw(handle);
3119        self.drop_without_shutdown();
3120        _result
3121    }
3122
3123    fn send_raw(&self, mut handle: fidl::Event) -> Result<(), fidl::Error> {
3124        self.control_handle.inner.send::<ClosedTargetEchoAsTransferableSignalableEventResponse>(
3125            (handle,),
3126            self.tx_id,
3127            0x5ec627bdc2e02ca0,
3128            fidl::encoding::DynamicFlags::empty(),
3129        )
3130    }
3131}
3132
3133#[must_use = "FIDL methods require a response to be sent"]
3134#[derive(Debug)]
3135pub struct ClosedTargetByteVectorSizeResponder {
3136    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
3137    tx_id: u32,
3138}
3139
3140/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
3141/// if the responder is dropped without sending a response, so that the client
3142/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3143impl std::ops::Drop for ClosedTargetByteVectorSizeResponder {
3144    fn drop(&mut self) {
3145        self.control_handle.shutdown();
3146        // Safety: drops once, never accessed again
3147        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3148    }
3149}
3150
3151impl fidl::endpoints::Responder for ClosedTargetByteVectorSizeResponder {
3152    type ControlHandle = ClosedTargetControlHandle;
3153
3154    fn control_handle(&self) -> &ClosedTargetControlHandle {
3155        &self.control_handle
3156    }
3157
3158    fn drop_without_shutdown(mut self) {
3159        // Safety: drops once, never accessed again due to mem::forget
3160        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3161        // Prevent Drop from running (which would shut down the channel)
3162        std::mem::forget(self);
3163    }
3164}
3165
3166impl ClosedTargetByteVectorSizeResponder {
3167    /// Sends a response to the FIDL transaction.
3168    ///
3169    /// Sets the channel to shutdown if an error occurs.
3170    pub fn send(self, mut n: u32) -> Result<(), fidl::Error> {
3171        let _result = self.send_raw(n);
3172        if _result.is_err() {
3173            self.control_handle.shutdown();
3174        }
3175        self.drop_without_shutdown();
3176        _result
3177    }
3178
3179    /// Similar to "send" but does not shutdown the channel if an error occurs.
3180    pub fn send_no_shutdown_on_err(self, mut n: u32) -> Result<(), fidl::Error> {
3181        let _result = self.send_raw(n);
3182        self.drop_without_shutdown();
3183        _result
3184    }
3185
3186    fn send_raw(&self, mut n: u32) -> Result<(), fidl::Error> {
3187        self.control_handle.inner.send::<ClosedTargetByteVectorSizeResponse>(
3188            (n,),
3189            self.tx_id,
3190            0x104b2f9aa8b7fe25,
3191            fidl::encoding::DynamicFlags::empty(),
3192        )
3193    }
3194}
3195
3196#[must_use = "FIDL methods require a response to be sent"]
3197#[derive(Debug)]
3198pub struct ClosedTargetHandleVectorSizeResponder {
3199    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
3200    tx_id: u32,
3201}
3202
3203/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
3204/// if the responder is dropped without sending a response, so that the client
3205/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3206impl std::ops::Drop for ClosedTargetHandleVectorSizeResponder {
3207    fn drop(&mut self) {
3208        self.control_handle.shutdown();
3209        // Safety: drops once, never accessed again
3210        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3211    }
3212}
3213
3214impl fidl::endpoints::Responder for ClosedTargetHandleVectorSizeResponder {
3215    type ControlHandle = ClosedTargetControlHandle;
3216
3217    fn control_handle(&self) -> &ClosedTargetControlHandle {
3218        &self.control_handle
3219    }
3220
3221    fn drop_without_shutdown(mut self) {
3222        // Safety: drops once, never accessed again due to mem::forget
3223        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3224        // Prevent Drop from running (which would shut down the channel)
3225        std::mem::forget(self);
3226    }
3227}
3228
3229impl ClosedTargetHandleVectorSizeResponder {
3230    /// Sends a response to the FIDL transaction.
3231    ///
3232    /// Sets the channel to shutdown if an error occurs.
3233    pub fn send(self, mut n: u32) -> Result<(), fidl::Error> {
3234        let _result = self.send_raw(n);
3235        if _result.is_err() {
3236            self.control_handle.shutdown();
3237        }
3238        self.drop_without_shutdown();
3239        _result
3240    }
3241
3242    /// Similar to "send" but does not shutdown the channel if an error occurs.
3243    pub fn send_no_shutdown_on_err(self, mut n: u32) -> Result<(), fidl::Error> {
3244        let _result = self.send_raw(n);
3245        self.drop_without_shutdown();
3246        _result
3247    }
3248
3249    fn send_raw(&self, mut n: u32) -> Result<(), fidl::Error> {
3250        self.control_handle.inner.send::<ClosedTargetHandleVectorSizeResponse>(
3251            (n,),
3252            self.tx_id,
3253            0x4c1ac83570a98537,
3254            fidl::encoding::DynamicFlags::empty(),
3255        )
3256    }
3257}
3258
3259#[must_use = "FIDL methods require a response to be sent"]
3260#[derive(Debug)]
3261pub struct ClosedTargetCreateNByteVectorResponder {
3262    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
3263    tx_id: u32,
3264}
3265
3266/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
3267/// if the responder is dropped without sending a response, so that the client
3268/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3269impl std::ops::Drop for ClosedTargetCreateNByteVectorResponder {
3270    fn drop(&mut self) {
3271        self.control_handle.shutdown();
3272        // Safety: drops once, never accessed again
3273        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3274    }
3275}
3276
3277impl fidl::endpoints::Responder for ClosedTargetCreateNByteVectorResponder {
3278    type ControlHandle = ClosedTargetControlHandle;
3279
3280    fn control_handle(&self) -> &ClosedTargetControlHandle {
3281        &self.control_handle
3282    }
3283
3284    fn drop_without_shutdown(mut self) {
3285        // Safety: drops once, never accessed again due to mem::forget
3286        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3287        // Prevent Drop from running (which would shut down the channel)
3288        std::mem::forget(self);
3289    }
3290}
3291
3292impl ClosedTargetCreateNByteVectorResponder {
3293    /// Sends a response to the FIDL transaction.
3294    ///
3295    /// Sets the channel to shutdown if an error occurs.
3296    pub fn send(self, mut vec: &[u8]) -> Result<(), fidl::Error> {
3297        let _result = self.send_raw(vec);
3298        if _result.is_err() {
3299            self.control_handle.shutdown();
3300        }
3301        self.drop_without_shutdown();
3302        _result
3303    }
3304
3305    /// Similar to "send" but does not shutdown the channel if an error occurs.
3306    pub fn send_no_shutdown_on_err(self, mut vec: &[u8]) -> Result<(), fidl::Error> {
3307        let _result = self.send_raw(vec);
3308        self.drop_without_shutdown();
3309        _result
3310    }
3311
3312    fn send_raw(&self, mut vec: &[u8]) -> Result<(), fidl::Error> {
3313        self.control_handle.inner.send::<ClosedTargetCreateNByteVectorResponse>(
3314            (vec,),
3315            self.tx_id,
3316            0x1ecd88ef664e9c61,
3317            fidl::encoding::DynamicFlags::empty(),
3318        )
3319    }
3320}
3321
3322#[must_use = "FIDL methods require a response to be sent"]
3323#[derive(Debug)]
3324pub struct ClosedTargetCreateNHandleVectorResponder {
3325    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
3326    tx_id: u32,
3327}
3328
3329/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
3330/// if the responder is dropped without sending a response, so that the client
3331/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3332impl std::ops::Drop for ClosedTargetCreateNHandleVectorResponder {
3333    fn drop(&mut self) {
3334        self.control_handle.shutdown();
3335        // Safety: drops once, never accessed again
3336        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3337    }
3338}
3339
3340impl fidl::endpoints::Responder for ClosedTargetCreateNHandleVectorResponder {
3341    type ControlHandle = ClosedTargetControlHandle;
3342
3343    fn control_handle(&self) -> &ClosedTargetControlHandle {
3344        &self.control_handle
3345    }
3346
3347    fn drop_without_shutdown(mut self) {
3348        // Safety: drops once, never accessed again due to mem::forget
3349        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3350        // Prevent Drop from running (which would shut down the channel)
3351        std::mem::forget(self);
3352    }
3353}
3354
3355impl ClosedTargetCreateNHandleVectorResponder {
3356    /// Sends a response to the FIDL transaction.
3357    ///
3358    /// Sets the channel to shutdown if an error occurs.
3359    pub fn send(self, mut vec: Vec<fidl::Event>) -> Result<(), fidl::Error> {
3360        let _result = self.send_raw(vec);
3361        if _result.is_err() {
3362            self.control_handle.shutdown();
3363        }
3364        self.drop_without_shutdown();
3365        _result
3366    }
3367
3368    /// Similar to "send" but does not shutdown the channel if an error occurs.
3369    pub fn send_no_shutdown_on_err(self, mut vec: Vec<fidl::Event>) -> Result<(), fidl::Error> {
3370        let _result = self.send_raw(vec);
3371        self.drop_without_shutdown();
3372        _result
3373    }
3374
3375    fn send_raw(&self, mut vec: Vec<fidl::Event>) -> Result<(), fidl::Error> {
3376        self.control_handle.inner.send::<ClosedTargetCreateNHandleVectorResponse>(
3377            (vec.as_mut(),),
3378            self.tx_id,
3379            0x26341ba1fa66813d,
3380            fidl::encoding::DynamicFlags::empty(),
3381        )
3382    }
3383}
3384
3385#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3386pub struct OpenTargetMarker;
3387
3388impl fidl::endpoints::ProtocolMarker for OpenTargetMarker {
3389    type Proxy = OpenTargetProxy;
3390    type RequestStream = OpenTargetRequestStream;
3391    #[cfg(target_os = "fuchsia")]
3392    type SynchronousProxy = OpenTargetSynchronousProxy;
3393
3394    const DEBUG_NAME: &'static str = "(anonymous) OpenTarget";
3395}
3396pub type OpenTargetStrictTwoWayErrResult = Result<(), i32>;
3397pub type OpenTargetStrictTwoWayFieldsErrResult = Result<i32, i32>;
3398pub type OpenTargetFlexibleTwoWayErrResult = Result<(), i32>;
3399pub type OpenTargetFlexibleTwoWayFieldsErrResult = Result<i32, i32>;
3400
3401pub trait OpenTargetProxyInterface: Send + Sync {
3402    fn r#strict_one_way(&self) -> Result<(), fidl::Error>;
3403    fn r#flexible_one_way(&self) -> Result<(), fidl::Error>;
3404    type StrictTwoWayResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
3405    fn r#strict_two_way(&self) -> Self::StrictTwoWayResponseFut;
3406    type StrictTwoWayFieldsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
3407        + Send;
3408    fn r#strict_two_way_fields(&self, reply_with: i32) -> Self::StrictTwoWayFieldsResponseFut;
3409    type StrictTwoWayErrResponseFut: std::future::Future<Output = Result<OpenTargetStrictTwoWayErrResult, fidl::Error>>
3410        + Send;
3411    fn r#strict_two_way_err(
3412        &self,
3413        payload: &OpenTargetStrictTwoWayErrRequest,
3414    ) -> Self::StrictTwoWayErrResponseFut;
3415    type StrictTwoWayFieldsErrResponseFut: std::future::Future<Output = Result<OpenTargetStrictTwoWayFieldsErrResult, fidl::Error>>
3416        + Send;
3417    fn r#strict_two_way_fields_err(
3418        &self,
3419        payload: &OpenTargetStrictTwoWayFieldsErrRequest,
3420    ) -> Self::StrictTwoWayFieldsErrResponseFut;
3421    type FlexibleTwoWayResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
3422    fn r#flexible_two_way(&self) -> Self::FlexibleTwoWayResponseFut;
3423    type FlexibleTwoWayFieldsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
3424        + Send;
3425    fn r#flexible_two_way_fields(&self, reply_with: i32) -> Self::FlexibleTwoWayFieldsResponseFut;
3426    type FlexibleTwoWayErrResponseFut: std::future::Future<Output = Result<OpenTargetFlexibleTwoWayErrResult, fidl::Error>>
3427        + Send;
3428    fn r#flexible_two_way_err(
3429        &self,
3430        payload: &OpenTargetFlexibleTwoWayErrRequest,
3431    ) -> Self::FlexibleTwoWayErrResponseFut;
3432    type FlexibleTwoWayFieldsErrResponseFut: std::future::Future<Output = Result<OpenTargetFlexibleTwoWayFieldsErrResult, fidl::Error>>
3433        + Send;
3434    fn r#flexible_two_way_fields_err(
3435        &self,
3436        payload: &OpenTargetFlexibleTwoWayFieldsErrRequest,
3437    ) -> Self::FlexibleTwoWayFieldsErrResponseFut;
3438}
3439#[derive(Debug)]
3440#[cfg(target_os = "fuchsia")]
3441pub struct OpenTargetSynchronousProxy {
3442    client: fidl::client::sync::Client,
3443}
3444
3445#[cfg(target_os = "fuchsia")]
3446impl fidl::endpoints::SynchronousProxy for OpenTargetSynchronousProxy {
3447    type Proxy = OpenTargetProxy;
3448    type Protocol = OpenTargetMarker;
3449
3450    fn from_channel(inner: fidl::Channel) -> Self {
3451        Self::new(inner)
3452    }
3453
3454    fn into_channel(self) -> fidl::Channel {
3455        self.client.into_channel()
3456    }
3457
3458    fn as_channel(&self) -> &fidl::Channel {
3459        self.client.as_channel()
3460    }
3461}
3462
3463#[cfg(target_os = "fuchsia")]
3464impl OpenTargetSynchronousProxy {
3465    pub fn new(channel: fidl::Channel) -> Self {
3466        let protocol_name = <OpenTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3467        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
3468    }
3469
3470    pub fn into_channel(self) -> fidl::Channel {
3471        self.client.into_channel()
3472    }
3473
3474    /// Waits until an event arrives and returns it. It is safe for other
3475    /// threads to make concurrent requests while waiting for an event.
3476    pub fn wait_for_event(
3477        &self,
3478        deadline: zx::MonotonicInstant,
3479    ) -> Result<OpenTargetEvent, fidl::Error> {
3480        OpenTargetEvent::decode(self.client.wait_for_event(deadline)?)
3481    }
3482
3483    pub fn r#strict_one_way(&self) -> Result<(), fidl::Error> {
3484        self.client.send::<fidl::encoding::EmptyPayload>(
3485            (),
3486            0x24dd8be3750aba9b,
3487            fidl::encoding::DynamicFlags::empty(),
3488        )
3489    }
3490
3491    pub fn r#flexible_one_way(&self) -> Result<(), fidl::Error> {
3492        self.client.send::<fidl::encoding::EmptyPayload>(
3493            (),
3494            0x421bbeb2bbc84a58,
3495            fidl::encoding::DynamicFlags::FLEXIBLE,
3496        )
3497    }
3498
3499    pub fn r#strict_two_way(&self, ___deadline: zx::MonotonicInstant) -> Result<(), fidl::Error> {
3500        let _response =
3501            self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
3502                (),
3503                0x70020c582a57ef03,
3504                fidl::encoding::DynamicFlags::empty(),
3505                ___deadline,
3506            )?;
3507        Ok(_response)
3508    }
3509
3510    pub fn r#strict_two_way_fields(
3511        &self,
3512        mut reply_with: i32,
3513        ___deadline: zx::MonotonicInstant,
3514    ) -> Result<i32, fidl::Error> {
3515        let _response = self.client.send_query::<
3516            OpenTargetStrictTwoWayFieldsRequest,
3517            OpenTargetStrictTwoWayFieldsResponse,
3518        >(
3519            (reply_with,),
3520            0x2be6e1cc40008010,
3521            fidl::encoding::DynamicFlags::empty(),
3522            ___deadline,
3523        )?;
3524        Ok(_response.some_field)
3525    }
3526
3527    pub fn r#strict_two_way_err(
3528        &self,
3529        mut payload: &OpenTargetStrictTwoWayErrRequest,
3530        ___deadline: zx::MonotonicInstant,
3531    ) -> Result<OpenTargetStrictTwoWayErrResult, fidl::Error> {
3532        let _response = self.client.send_query::<
3533            OpenTargetStrictTwoWayErrRequest,
3534            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3535        >(
3536            payload,
3537            0x6efc16069ebd0b2c,
3538            fidl::encoding::DynamicFlags::empty(),
3539            ___deadline,
3540        )?;
3541        Ok(_response.map(|x| x))
3542    }
3543
3544    pub fn r#strict_two_way_fields_err(
3545        &self,
3546        mut payload: &OpenTargetStrictTwoWayFieldsErrRequest,
3547        ___deadline: zx::MonotonicInstant,
3548    ) -> Result<OpenTargetStrictTwoWayFieldsErrResult, fidl::Error> {
3549        let _response = self.client.send_query::<
3550            OpenTargetStrictTwoWayFieldsErrRequest,
3551            fidl::encoding::ResultType<OpenTargetStrictTwoWayFieldsErrResponse, i32>,
3552        >(
3553            payload,
3554            0x309c8adda770fcf0,
3555            fidl::encoding::DynamicFlags::empty(),
3556            ___deadline,
3557        )?;
3558        Ok(_response.map(|x| x.some_field))
3559    }
3560
3561    pub fn r#flexible_two_way(&self, ___deadline: zx::MonotonicInstant) -> Result<(), fidl::Error> {
3562        let _response = self.client.send_query::<
3563            fidl::encoding::EmptyPayload,
3564            fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
3565        >(
3566            (),
3567            0x19f932dac7810c71,
3568            fidl::encoding::DynamicFlags::FLEXIBLE,
3569            ___deadline,
3570        )?
3571        .into_result::<OpenTargetMarker>("flexible_two_way")?;
3572        Ok(_response)
3573    }
3574
3575    pub fn r#flexible_two_way_fields(
3576        &self,
3577        mut reply_with: i32,
3578        ___deadline: zx::MonotonicInstant,
3579    ) -> Result<i32, fidl::Error> {
3580        let _response = self.client.send_query::<
3581            OpenTargetFlexibleTwoWayFieldsRequest,
3582            fidl::encoding::FlexibleType<OpenTargetFlexibleTwoWayFieldsResponse>,
3583        >(
3584            (reply_with,),
3585            0x47cca5ddb4207774,
3586            fidl::encoding::DynamicFlags::FLEXIBLE,
3587            ___deadline,
3588        )?
3589        .into_result::<OpenTargetMarker>("flexible_two_way_fields")?;
3590        Ok(_response.some_field)
3591    }
3592
3593    pub fn r#flexible_two_way_err(
3594        &self,
3595        mut payload: &OpenTargetFlexibleTwoWayErrRequest,
3596        ___deadline: zx::MonotonicInstant,
3597    ) -> Result<OpenTargetFlexibleTwoWayErrResult, fidl::Error> {
3598        let _response = self.client.send_query::<
3599            OpenTargetFlexibleTwoWayErrRequest,
3600            fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
3601        >(
3602            payload,
3603            0x52aa19681fea3a0,
3604            fidl::encoding::DynamicFlags::FLEXIBLE,
3605            ___deadline,
3606        )?
3607        .into_result::<OpenTargetMarker>("flexible_two_way_err")?;
3608        Ok(_response.map(|x| x))
3609    }
3610
3611    pub fn r#flexible_two_way_fields_err(
3612        &self,
3613        mut payload: &OpenTargetFlexibleTwoWayFieldsErrRequest,
3614        ___deadline: zx::MonotonicInstant,
3615    ) -> Result<OpenTargetFlexibleTwoWayFieldsErrResult, fidl::Error> {
3616        let _response = self.client.send_query::<
3617            OpenTargetFlexibleTwoWayFieldsErrRequest,
3618            fidl::encoding::FlexibleResultType<OpenTargetFlexibleTwoWayFieldsErrResponse, i32>,
3619        >(
3620            payload,
3621            0x1ab7dd4c6a3650b6,
3622            fidl::encoding::DynamicFlags::FLEXIBLE,
3623            ___deadline,
3624        )?
3625        .into_result::<OpenTargetMarker>("flexible_two_way_fields_err")?;
3626        Ok(_response.map(|x| x.some_field))
3627    }
3628}
3629
3630#[derive(Debug, Clone)]
3631pub struct OpenTargetProxy {
3632    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
3633}
3634
3635impl fidl::endpoints::Proxy for OpenTargetProxy {
3636    type Protocol = OpenTargetMarker;
3637
3638    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
3639        Self::new(inner)
3640    }
3641
3642    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
3643        self.client.into_channel().map_err(|client| Self { client })
3644    }
3645
3646    fn as_channel(&self) -> &::fidl::AsyncChannel {
3647        self.client.as_channel()
3648    }
3649}
3650
3651impl OpenTargetProxy {
3652    /// Create a new Proxy for fidl.serversuite/OpenTarget.
3653    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
3654        let protocol_name = <OpenTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3655        Self { client: fidl::client::Client::new(channel, protocol_name) }
3656    }
3657
3658    /// Get a Stream of events from the remote end of the protocol.
3659    ///
3660    /// # Panics
3661    ///
3662    /// Panics if the event stream was already taken.
3663    pub fn take_event_stream(&self) -> OpenTargetEventStream {
3664        OpenTargetEventStream { event_receiver: self.client.take_event_receiver() }
3665    }
3666
3667    pub fn r#strict_one_way(&self) -> Result<(), fidl::Error> {
3668        OpenTargetProxyInterface::r#strict_one_way(self)
3669    }
3670
3671    pub fn r#flexible_one_way(&self) -> Result<(), fidl::Error> {
3672        OpenTargetProxyInterface::r#flexible_one_way(self)
3673    }
3674
3675    pub fn r#strict_two_way(
3676        &self,
3677    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
3678        OpenTargetProxyInterface::r#strict_two_way(self)
3679    }
3680
3681    pub fn r#strict_two_way_fields(
3682        &self,
3683        mut reply_with: i32,
3684    ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
3685        OpenTargetProxyInterface::r#strict_two_way_fields(self, reply_with)
3686    }
3687
3688    pub fn r#strict_two_way_err(
3689        &self,
3690        mut payload: &OpenTargetStrictTwoWayErrRequest,
3691    ) -> fidl::client::QueryResponseFut<
3692        OpenTargetStrictTwoWayErrResult,
3693        fidl::encoding::DefaultFuchsiaResourceDialect,
3694    > {
3695        OpenTargetProxyInterface::r#strict_two_way_err(self, payload)
3696    }
3697
3698    pub fn r#strict_two_way_fields_err(
3699        &self,
3700        mut payload: &OpenTargetStrictTwoWayFieldsErrRequest,
3701    ) -> fidl::client::QueryResponseFut<
3702        OpenTargetStrictTwoWayFieldsErrResult,
3703        fidl::encoding::DefaultFuchsiaResourceDialect,
3704    > {
3705        OpenTargetProxyInterface::r#strict_two_way_fields_err(self, payload)
3706    }
3707
3708    pub fn r#flexible_two_way(
3709        &self,
3710    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
3711        OpenTargetProxyInterface::r#flexible_two_way(self)
3712    }
3713
3714    pub fn r#flexible_two_way_fields(
3715        &self,
3716        mut reply_with: i32,
3717    ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
3718        OpenTargetProxyInterface::r#flexible_two_way_fields(self, reply_with)
3719    }
3720
3721    pub fn r#flexible_two_way_err(
3722        &self,
3723        mut payload: &OpenTargetFlexibleTwoWayErrRequest,
3724    ) -> fidl::client::QueryResponseFut<
3725        OpenTargetFlexibleTwoWayErrResult,
3726        fidl::encoding::DefaultFuchsiaResourceDialect,
3727    > {
3728        OpenTargetProxyInterface::r#flexible_two_way_err(self, payload)
3729    }
3730
3731    pub fn r#flexible_two_way_fields_err(
3732        &self,
3733        mut payload: &OpenTargetFlexibleTwoWayFieldsErrRequest,
3734    ) -> fidl::client::QueryResponseFut<
3735        OpenTargetFlexibleTwoWayFieldsErrResult,
3736        fidl::encoding::DefaultFuchsiaResourceDialect,
3737    > {
3738        OpenTargetProxyInterface::r#flexible_two_way_fields_err(self, payload)
3739    }
3740}
3741
3742impl OpenTargetProxyInterface for OpenTargetProxy {
3743    fn r#strict_one_way(&self) -> Result<(), fidl::Error> {
3744        self.client.send::<fidl::encoding::EmptyPayload>(
3745            (),
3746            0x24dd8be3750aba9b,
3747            fidl::encoding::DynamicFlags::empty(),
3748        )
3749    }
3750
3751    fn r#flexible_one_way(&self) -> Result<(), fidl::Error> {
3752        self.client.send::<fidl::encoding::EmptyPayload>(
3753            (),
3754            0x421bbeb2bbc84a58,
3755            fidl::encoding::DynamicFlags::FLEXIBLE,
3756        )
3757    }
3758
3759    type StrictTwoWayResponseFut =
3760        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
3761    fn r#strict_two_way(&self) -> Self::StrictTwoWayResponseFut {
3762        fn _decode(
3763            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3764        ) -> Result<(), fidl::Error> {
3765            let _response = fidl::client::decode_transaction_body::<
3766                fidl::encoding::EmptyPayload,
3767                fidl::encoding::DefaultFuchsiaResourceDialect,
3768                0x70020c582a57ef03,
3769            >(_buf?)?;
3770            Ok(_response)
3771        }
3772        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
3773            (),
3774            0x70020c582a57ef03,
3775            fidl::encoding::DynamicFlags::empty(),
3776            _decode,
3777        )
3778    }
3779
3780    type StrictTwoWayFieldsResponseFut =
3781        fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
3782    fn r#strict_two_way_fields(&self, mut reply_with: i32) -> Self::StrictTwoWayFieldsResponseFut {
3783        fn _decode(
3784            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3785        ) -> Result<i32, fidl::Error> {
3786            let _response = fidl::client::decode_transaction_body::<
3787                OpenTargetStrictTwoWayFieldsResponse,
3788                fidl::encoding::DefaultFuchsiaResourceDialect,
3789                0x2be6e1cc40008010,
3790            >(_buf?)?;
3791            Ok(_response.some_field)
3792        }
3793        self.client.send_query_and_decode::<OpenTargetStrictTwoWayFieldsRequest, i32>(
3794            (reply_with,),
3795            0x2be6e1cc40008010,
3796            fidl::encoding::DynamicFlags::empty(),
3797            _decode,
3798        )
3799    }
3800
3801    type StrictTwoWayErrResponseFut = fidl::client::QueryResponseFut<
3802        OpenTargetStrictTwoWayErrResult,
3803        fidl::encoding::DefaultFuchsiaResourceDialect,
3804    >;
3805    fn r#strict_two_way_err(
3806        &self,
3807        mut payload: &OpenTargetStrictTwoWayErrRequest,
3808    ) -> Self::StrictTwoWayErrResponseFut {
3809        fn _decode(
3810            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3811        ) -> Result<OpenTargetStrictTwoWayErrResult, fidl::Error> {
3812            let _response = fidl::client::decode_transaction_body::<
3813                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3814                fidl::encoding::DefaultFuchsiaResourceDialect,
3815                0x6efc16069ebd0b2c,
3816            >(_buf?)?;
3817            Ok(_response.map(|x| x))
3818        }
3819        self.client.send_query_and_decode::<
3820            OpenTargetStrictTwoWayErrRequest,
3821            OpenTargetStrictTwoWayErrResult,
3822        >(
3823            payload,
3824            0x6efc16069ebd0b2c,
3825            fidl::encoding::DynamicFlags::empty(),
3826            _decode,
3827        )
3828    }
3829
3830    type StrictTwoWayFieldsErrResponseFut = fidl::client::QueryResponseFut<
3831        OpenTargetStrictTwoWayFieldsErrResult,
3832        fidl::encoding::DefaultFuchsiaResourceDialect,
3833    >;
3834    fn r#strict_two_way_fields_err(
3835        &self,
3836        mut payload: &OpenTargetStrictTwoWayFieldsErrRequest,
3837    ) -> Self::StrictTwoWayFieldsErrResponseFut {
3838        fn _decode(
3839            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3840        ) -> Result<OpenTargetStrictTwoWayFieldsErrResult, fidl::Error> {
3841            let _response = fidl::client::decode_transaction_body::<
3842                fidl::encoding::ResultType<OpenTargetStrictTwoWayFieldsErrResponse, i32>,
3843                fidl::encoding::DefaultFuchsiaResourceDialect,
3844                0x309c8adda770fcf0,
3845            >(_buf?)?;
3846            Ok(_response.map(|x| x.some_field))
3847        }
3848        self.client.send_query_and_decode::<
3849            OpenTargetStrictTwoWayFieldsErrRequest,
3850            OpenTargetStrictTwoWayFieldsErrResult,
3851        >(
3852            payload,
3853            0x309c8adda770fcf0,
3854            fidl::encoding::DynamicFlags::empty(),
3855            _decode,
3856        )
3857    }
3858
3859    type FlexibleTwoWayResponseFut =
3860        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
3861    fn r#flexible_two_way(&self) -> Self::FlexibleTwoWayResponseFut {
3862        fn _decode(
3863            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3864        ) -> Result<(), fidl::Error> {
3865            let _response = fidl::client::decode_transaction_body::<
3866                fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
3867                fidl::encoding::DefaultFuchsiaResourceDialect,
3868                0x19f932dac7810c71,
3869            >(_buf?)?
3870            .into_result::<OpenTargetMarker>("flexible_two_way")?;
3871            Ok(_response)
3872        }
3873        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
3874            (),
3875            0x19f932dac7810c71,
3876            fidl::encoding::DynamicFlags::FLEXIBLE,
3877            _decode,
3878        )
3879    }
3880
3881    type FlexibleTwoWayFieldsResponseFut =
3882        fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
3883    fn r#flexible_two_way_fields(
3884        &self,
3885        mut reply_with: i32,
3886    ) -> Self::FlexibleTwoWayFieldsResponseFut {
3887        fn _decode(
3888            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3889        ) -> Result<i32, fidl::Error> {
3890            let _response = fidl::client::decode_transaction_body::<
3891                fidl::encoding::FlexibleType<OpenTargetFlexibleTwoWayFieldsResponse>,
3892                fidl::encoding::DefaultFuchsiaResourceDialect,
3893                0x47cca5ddb4207774,
3894            >(_buf?)?
3895            .into_result::<OpenTargetMarker>("flexible_two_way_fields")?;
3896            Ok(_response.some_field)
3897        }
3898        self.client.send_query_and_decode::<OpenTargetFlexibleTwoWayFieldsRequest, i32>(
3899            (reply_with,),
3900            0x47cca5ddb4207774,
3901            fidl::encoding::DynamicFlags::FLEXIBLE,
3902            _decode,
3903        )
3904    }
3905
3906    type FlexibleTwoWayErrResponseFut = fidl::client::QueryResponseFut<
3907        OpenTargetFlexibleTwoWayErrResult,
3908        fidl::encoding::DefaultFuchsiaResourceDialect,
3909    >;
3910    fn r#flexible_two_way_err(
3911        &self,
3912        mut payload: &OpenTargetFlexibleTwoWayErrRequest,
3913    ) -> Self::FlexibleTwoWayErrResponseFut {
3914        fn _decode(
3915            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3916        ) -> Result<OpenTargetFlexibleTwoWayErrResult, fidl::Error> {
3917            let _response = fidl::client::decode_transaction_body::<
3918                fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
3919                fidl::encoding::DefaultFuchsiaResourceDialect,
3920                0x52aa19681fea3a0,
3921            >(_buf?)?
3922            .into_result::<OpenTargetMarker>("flexible_two_way_err")?;
3923            Ok(_response.map(|x| x))
3924        }
3925        self.client.send_query_and_decode::<
3926            OpenTargetFlexibleTwoWayErrRequest,
3927            OpenTargetFlexibleTwoWayErrResult,
3928        >(
3929            payload,
3930            0x52aa19681fea3a0,
3931            fidl::encoding::DynamicFlags::FLEXIBLE,
3932            _decode,
3933        )
3934    }
3935
3936    type FlexibleTwoWayFieldsErrResponseFut = fidl::client::QueryResponseFut<
3937        OpenTargetFlexibleTwoWayFieldsErrResult,
3938        fidl::encoding::DefaultFuchsiaResourceDialect,
3939    >;
3940    fn r#flexible_two_way_fields_err(
3941        &self,
3942        mut payload: &OpenTargetFlexibleTwoWayFieldsErrRequest,
3943    ) -> Self::FlexibleTwoWayFieldsErrResponseFut {
3944        fn _decode(
3945            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3946        ) -> Result<OpenTargetFlexibleTwoWayFieldsErrResult, fidl::Error> {
3947            let _response = fidl::client::decode_transaction_body::<
3948                fidl::encoding::FlexibleResultType<OpenTargetFlexibleTwoWayFieldsErrResponse, i32>,
3949                fidl::encoding::DefaultFuchsiaResourceDialect,
3950                0x1ab7dd4c6a3650b6,
3951            >(_buf?)?
3952            .into_result::<OpenTargetMarker>("flexible_two_way_fields_err")?;
3953            Ok(_response.map(|x| x.some_field))
3954        }
3955        self.client.send_query_and_decode::<
3956            OpenTargetFlexibleTwoWayFieldsErrRequest,
3957            OpenTargetFlexibleTwoWayFieldsErrResult,
3958        >(
3959            payload,
3960            0x1ab7dd4c6a3650b6,
3961            fidl::encoding::DynamicFlags::FLEXIBLE,
3962            _decode,
3963        )
3964    }
3965}
3966
3967pub struct OpenTargetEventStream {
3968    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3969}
3970
3971impl std::marker::Unpin for OpenTargetEventStream {}
3972
3973impl futures::stream::FusedStream for OpenTargetEventStream {
3974    fn is_terminated(&self) -> bool {
3975        self.event_receiver.is_terminated()
3976    }
3977}
3978
3979impl futures::Stream for OpenTargetEventStream {
3980    type Item = Result<OpenTargetEvent, fidl::Error>;
3981
3982    fn poll_next(
3983        mut self: std::pin::Pin<&mut Self>,
3984        cx: &mut std::task::Context<'_>,
3985    ) -> std::task::Poll<Option<Self::Item>> {
3986        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3987            &mut self.event_receiver,
3988            cx
3989        )?) {
3990            Some(buf) => std::task::Poll::Ready(Some(OpenTargetEvent::decode(buf))),
3991            None => std::task::Poll::Ready(None),
3992        }
3993    }
3994}
3995
3996#[derive(Debug)]
3997pub enum OpenTargetEvent {
3998    StrictEvent {},
3999    FlexibleEvent {},
4000    #[non_exhaustive]
4001    _UnknownEvent {
4002        /// Ordinal of the event that was sent.
4003        ordinal: u64,
4004    },
4005}
4006
4007impl OpenTargetEvent {
4008    #[allow(irrefutable_let_patterns)]
4009    pub fn into_strict_event(self) -> Option<()> {
4010        if let OpenTargetEvent::StrictEvent {} = self {
4011            Some(())
4012        } else {
4013            None
4014        }
4015    }
4016    #[allow(irrefutable_let_patterns)]
4017    pub fn into_flexible_event(self) -> Option<()> {
4018        if let OpenTargetEvent::FlexibleEvent {} = self {
4019            Some(())
4020        } else {
4021            None
4022        }
4023    }
4024
4025    /// Decodes a message buffer as a [`OpenTargetEvent`].
4026    fn decode(
4027        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4028    ) -> Result<OpenTargetEvent, fidl::Error> {
4029        let (bytes, _handles) = buf.split_mut();
4030        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4031        debug_assert_eq!(tx_header.tx_id, 0);
4032        match tx_header.ordinal {
4033            0x778f95d421c0685 => {
4034                let mut out = fidl::new_empty!(
4035                    fidl::encoding::EmptyPayload,
4036                    fidl::encoding::DefaultFuchsiaResourceDialect
4037                );
4038                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
4039                Ok((OpenTargetEvent::StrictEvent {}))
4040            }
4041            0x43d9ee0dca2bb33e => {
4042                let mut out = fidl::new_empty!(
4043                    fidl::encoding::EmptyPayload,
4044                    fidl::encoding::DefaultFuchsiaResourceDialect
4045                );
4046                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
4047                Ok((OpenTargetEvent::FlexibleEvent {}))
4048            }
4049            _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
4050                Ok(OpenTargetEvent::_UnknownEvent { ordinal: tx_header.ordinal })
4051            }
4052            _ => Err(fidl::Error::UnknownOrdinal {
4053                ordinal: tx_header.ordinal,
4054                protocol_name: <OpenTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4055            }),
4056        }
4057    }
4058}
4059
4060/// A Stream of incoming requests for fidl.serversuite/OpenTarget.
4061pub struct OpenTargetRequestStream {
4062    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4063    is_terminated: bool,
4064}
4065
4066impl std::marker::Unpin for OpenTargetRequestStream {}
4067
4068impl futures::stream::FusedStream for OpenTargetRequestStream {
4069    fn is_terminated(&self) -> bool {
4070        self.is_terminated
4071    }
4072}
4073
4074impl fidl::endpoints::RequestStream for OpenTargetRequestStream {
4075    type Protocol = OpenTargetMarker;
4076    type ControlHandle = OpenTargetControlHandle;
4077
4078    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4079        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4080    }
4081
4082    fn control_handle(&self) -> Self::ControlHandle {
4083        OpenTargetControlHandle { inner: self.inner.clone() }
4084    }
4085
4086    fn into_inner(
4087        self,
4088    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4089    {
4090        (self.inner, self.is_terminated)
4091    }
4092
4093    fn from_inner(
4094        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4095        is_terminated: bool,
4096    ) -> Self {
4097        Self { inner, is_terminated }
4098    }
4099}
4100
4101impl futures::Stream for OpenTargetRequestStream {
4102    type Item = Result<OpenTargetRequest, fidl::Error>;
4103
4104    fn poll_next(
4105        mut self: std::pin::Pin<&mut Self>,
4106        cx: &mut std::task::Context<'_>,
4107    ) -> std::task::Poll<Option<Self::Item>> {
4108        let this = &mut *self;
4109        if this.inner.check_shutdown(cx) {
4110            this.is_terminated = true;
4111            return std::task::Poll::Ready(None);
4112        }
4113        if this.is_terminated {
4114            panic!("polled OpenTargetRequestStream after completion");
4115        }
4116        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4117            |bytes, handles| {
4118                match this.inner.channel().read_etc(cx, bytes, handles) {
4119                    std::task::Poll::Ready(Ok(())) => {}
4120                    std::task::Poll::Pending => return std::task::Poll::Pending,
4121                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4122                        this.is_terminated = true;
4123                        return std::task::Poll::Ready(None);
4124                    }
4125                    std::task::Poll::Ready(Err(e)) => {
4126                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4127                            e.into(),
4128                        ))))
4129                    }
4130                }
4131
4132                // A message has been received from the channel
4133                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4134
4135                std::task::Poll::Ready(Some(match header.ordinal {
4136                    0x24dd8be3750aba9b => {
4137                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
4138                        let mut req = fidl::new_empty!(
4139                            fidl::encoding::EmptyPayload,
4140                            fidl::encoding::DefaultFuchsiaResourceDialect
4141                        );
4142                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4143                        let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
4144                        Ok(OpenTargetRequest::StrictOneWay { control_handle })
4145                    }
4146                    0x421bbeb2bbc84a58 => {
4147                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
4148                        let mut req = fidl::new_empty!(
4149                            fidl::encoding::EmptyPayload,
4150                            fidl::encoding::DefaultFuchsiaResourceDialect
4151                        );
4152                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4153                        let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
4154                        Ok(OpenTargetRequest::FlexibleOneWay { control_handle })
4155                    }
4156                    0x70020c582a57ef03 => {
4157                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4158                        let mut req = fidl::new_empty!(
4159                            fidl::encoding::EmptyPayload,
4160                            fidl::encoding::DefaultFuchsiaResourceDialect
4161                        );
4162                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4163                        let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
4164                        Ok(OpenTargetRequest::StrictTwoWay {
4165                            responder: OpenTargetStrictTwoWayResponder {
4166                                control_handle: std::mem::ManuallyDrop::new(control_handle),
4167                                tx_id: header.tx_id,
4168                            },
4169                        })
4170                    }
4171                    0x2be6e1cc40008010 => {
4172                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4173                        let mut req = fidl::new_empty!(
4174                            OpenTargetStrictTwoWayFieldsRequest,
4175                            fidl::encoding::DefaultFuchsiaResourceDialect
4176                        );
4177                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenTargetStrictTwoWayFieldsRequest>(&header, _body_bytes, handles, &mut req)?;
4178                        let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
4179                        Ok(OpenTargetRequest::StrictTwoWayFields {
4180                            reply_with: req.reply_with,
4181
4182                            responder: OpenTargetStrictTwoWayFieldsResponder {
4183                                control_handle: std::mem::ManuallyDrop::new(control_handle),
4184                                tx_id: header.tx_id,
4185                            },
4186                        })
4187                    }
4188                    0x6efc16069ebd0b2c => {
4189                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4190                        let mut req = fidl::new_empty!(
4191                            OpenTargetStrictTwoWayErrRequest,
4192                            fidl::encoding::DefaultFuchsiaResourceDialect
4193                        );
4194                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenTargetStrictTwoWayErrRequest>(&header, _body_bytes, handles, &mut req)?;
4195                        let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
4196                        Ok(OpenTargetRequest::StrictTwoWayErr {
4197                            payload: req,
4198                            responder: OpenTargetStrictTwoWayErrResponder {
4199                                control_handle: std::mem::ManuallyDrop::new(control_handle),
4200                                tx_id: header.tx_id,
4201                            },
4202                        })
4203                    }
4204                    0x309c8adda770fcf0 => {
4205                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4206                        let mut req = fidl::new_empty!(
4207                            OpenTargetStrictTwoWayFieldsErrRequest,
4208                            fidl::encoding::DefaultFuchsiaResourceDialect
4209                        );
4210                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenTargetStrictTwoWayFieldsErrRequest>(&header, _body_bytes, handles, &mut req)?;
4211                        let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
4212                        Ok(OpenTargetRequest::StrictTwoWayFieldsErr {
4213                            payload: req,
4214                            responder: OpenTargetStrictTwoWayFieldsErrResponder {
4215                                control_handle: std::mem::ManuallyDrop::new(control_handle),
4216                                tx_id: header.tx_id,
4217                            },
4218                        })
4219                    }
4220                    0x19f932dac7810c71 => {
4221                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4222                        let mut req = fidl::new_empty!(
4223                            fidl::encoding::EmptyPayload,
4224                            fidl::encoding::DefaultFuchsiaResourceDialect
4225                        );
4226                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4227                        let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
4228                        Ok(OpenTargetRequest::FlexibleTwoWay {
4229                            responder: OpenTargetFlexibleTwoWayResponder {
4230                                control_handle: std::mem::ManuallyDrop::new(control_handle),
4231                                tx_id: header.tx_id,
4232                            },
4233                        })
4234                    }
4235                    0x47cca5ddb4207774 => {
4236                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4237                        let mut req = fidl::new_empty!(
4238                            OpenTargetFlexibleTwoWayFieldsRequest,
4239                            fidl::encoding::DefaultFuchsiaResourceDialect
4240                        );
4241                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenTargetFlexibleTwoWayFieldsRequest>(&header, _body_bytes, handles, &mut req)?;
4242                        let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
4243                        Ok(OpenTargetRequest::FlexibleTwoWayFields {
4244                            reply_with: req.reply_with,
4245
4246                            responder: OpenTargetFlexibleTwoWayFieldsResponder {
4247                                control_handle: std::mem::ManuallyDrop::new(control_handle),
4248                                tx_id: header.tx_id,
4249                            },
4250                        })
4251                    }
4252                    0x52aa19681fea3a0 => {
4253                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4254                        let mut req = fidl::new_empty!(
4255                            OpenTargetFlexibleTwoWayErrRequest,
4256                            fidl::encoding::DefaultFuchsiaResourceDialect
4257                        );
4258                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenTargetFlexibleTwoWayErrRequest>(&header, _body_bytes, handles, &mut req)?;
4259                        let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
4260                        Ok(OpenTargetRequest::FlexibleTwoWayErr {
4261                            payload: req,
4262                            responder: OpenTargetFlexibleTwoWayErrResponder {
4263                                control_handle: std::mem::ManuallyDrop::new(control_handle),
4264                                tx_id: header.tx_id,
4265                            },
4266                        })
4267                    }
4268                    0x1ab7dd4c6a3650b6 => {
4269                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4270                        let mut req = fidl::new_empty!(
4271                            OpenTargetFlexibleTwoWayFieldsErrRequest,
4272                            fidl::encoding::DefaultFuchsiaResourceDialect
4273                        );
4274                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenTargetFlexibleTwoWayFieldsErrRequest>(&header, _body_bytes, handles, &mut req)?;
4275                        let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
4276                        Ok(OpenTargetRequest::FlexibleTwoWayFieldsErr {
4277                            payload: req,
4278                            responder: OpenTargetFlexibleTwoWayFieldsErrResponder {
4279                                control_handle: std::mem::ManuallyDrop::new(control_handle),
4280                                tx_id: header.tx_id,
4281                            },
4282                        })
4283                    }
4284                    _ if header.tx_id == 0
4285                        && header
4286                            .dynamic_flags()
4287                            .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
4288                    {
4289                        Ok(OpenTargetRequest::_UnknownMethod {
4290                            ordinal: header.ordinal,
4291                            control_handle: OpenTargetControlHandle { inner: this.inner.clone() },
4292                            method_type: fidl::MethodType::OneWay,
4293                        })
4294                    }
4295                    _ if header
4296                        .dynamic_flags()
4297                        .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
4298                    {
4299                        this.inner.send_framework_err(
4300                            fidl::encoding::FrameworkErr::UnknownMethod,
4301                            header.tx_id,
4302                            header.ordinal,
4303                            header.dynamic_flags(),
4304                            (bytes, handles),
4305                        )?;
4306                        Ok(OpenTargetRequest::_UnknownMethod {
4307                            ordinal: header.ordinal,
4308                            control_handle: OpenTargetControlHandle { inner: this.inner.clone() },
4309                            method_type: fidl::MethodType::TwoWay,
4310                        })
4311                    }
4312                    _ => Err(fidl::Error::UnknownOrdinal {
4313                        ordinal: header.ordinal,
4314                        protocol_name:
4315                            <OpenTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4316                    }),
4317                }))
4318            },
4319        )
4320    }
4321}
4322
4323#[derive(Debug)]
4324pub enum OpenTargetRequest {
4325    StrictOneWay {
4326        control_handle: OpenTargetControlHandle,
4327    },
4328    FlexibleOneWay {
4329        control_handle: OpenTargetControlHandle,
4330    },
4331    StrictTwoWay {
4332        responder: OpenTargetStrictTwoWayResponder,
4333    },
4334    StrictTwoWayFields {
4335        reply_with: i32,
4336        responder: OpenTargetStrictTwoWayFieldsResponder,
4337    },
4338    StrictTwoWayErr {
4339        payload: OpenTargetStrictTwoWayErrRequest,
4340        responder: OpenTargetStrictTwoWayErrResponder,
4341    },
4342    StrictTwoWayFieldsErr {
4343        payload: OpenTargetStrictTwoWayFieldsErrRequest,
4344        responder: OpenTargetStrictTwoWayFieldsErrResponder,
4345    },
4346    FlexibleTwoWay {
4347        responder: OpenTargetFlexibleTwoWayResponder,
4348    },
4349    FlexibleTwoWayFields {
4350        reply_with: i32,
4351        responder: OpenTargetFlexibleTwoWayFieldsResponder,
4352    },
4353    FlexibleTwoWayErr {
4354        payload: OpenTargetFlexibleTwoWayErrRequest,
4355        responder: OpenTargetFlexibleTwoWayErrResponder,
4356    },
4357    FlexibleTwoWayFieldsErr {
4358        payload: OpenTargetFlexibleTwoWayFieldsErrRequest,
4359        responder: OpenTargetFlexibleTwoWayFieldsErrResponder,
4360    },
4361    /// An interaction was received which does not match any known method.
4362    #[non_exhaustive]
4363    _UnknownMethod {
4364        /// Ordinal of the method that was called.
4365        ordinal: u64,
4366        control_handle: OpenTargetControlHandle,
4367        method_type: fidl::MethodType,
4368    },
4369}
4370
4371impl OpenTargetRequest {
4372    #[allow(irrefutable_let_patterns)]
4373    pub fn into_strict_one_way(self) -> Option<(OpenTargetControlHandle)> {
4374        if let OpenTargetRequest::StrictOneWay { control_handle } = self {
4375            Some((control_handle))
4376        } else {
4377            None
4378        }
4379    }
4380
4381    #[allow(irrefutable_let_patterns)]
4382    pub fn into_flexible_one_way(self) -> Option<(OpenTargetControlHandle)> {
4383        if let OpenTargetRequest::FlexibleOneWay { control_handle } = self {
4384            Some((control_handle))
4385        } else {
4386            None
4387        }
4388    }
4389
4390    #[allow(irrefutable_let_patterns)]
4391    pub fn into_strict_two_way(self) -> Option<(OpenTargetStrictTwoWayResponder)> {
4392        if let OpenTargetRequest::StrictTwoWay { responder } = self {
4393            Some((responder))
4394        } else {
4395            None
4396        }
4397    }
4398
4399    #[allow(irrefutable_let_patterns)]
4400    pub fn into_strict_two_way_fields(
4401        self,
4402    ) -> Option<(i32, OpenTargetStrictTwoWayFieldsResponder)> {
4403        if let OpenTargetRequest::StrictTwoWayFields { reply_with, responder } = self {
4404            Some((reply_with, responder))
4405        } else {
4406            None
4407        }
4408    }
4409
4410    #[allow(irrefutable_let_patterns)]
4411    pub fn into_strict_two_way_err(
4412        self,
4413    ) -> Option<(OpenTargetStrictTwoWayErrRequest, OpenTargetStrictTwoWayErrResponder)> {
4414        if let OpenTargetRequest::StrictTwoWayErr { payload, responder } = self {
4415            Some((payload, responder))
4416        } else {
4417            None
4418        }
4419    }
4420
4421    #[allow(irrefutable_let_patterns)]
4422    pub fn into_strict_two_way_fields_err(
4423        self,
4424    ) -> Option<(OpenTargetStrictTwoWayFieldsErrRequest, OpenTargetStrictTwoWayFieldsErrResponder)>
4425    {
4426        if let OpenTargetRequest::StrictTwoWayFieldsErr { payload, responder } = self {
4427            Some((payload, responder))
4428        } else {
4429            None
4430        }
4431    }
4432
4433    #[allow(irrefutable_let_patterns)]
4434    pub fn into_flexible_two_way(self) -> Option<(OpenTargetFlexibleTwoWayResponder)> {
4435        if let OpenTargetRequest::FlexibleTwoWay { responder } = self {
4436            Some((responder))
4437        } else {
4438            None
4439        }
4440    }
4441
4442    #[allow(irrefutable_let_patterns)]
4443    pub fn into_flexible_two_way_fields(
4444        self,
4445    ) -> Option<(i32, OpenTargetFlexibleTwoWayFieldsResponder)> {
4446        if let OpenTargetRequest::FlexibleTwoWayFields { reply_with, responder } = self {
4447            Some((reply_with, responder))
4448        } else {
4449            None
4450        }
4451    }
4452
4453    #[allow(irrefutable_let_patterns)]
4454    pub fn into_flexible_two_way_err(
4455        self,
4456    ) -> Option<(OpenTargetFlexibleTwoWayErrRequest, OpenTargetFlexibleTwoWayErrResponder)> {
4457        if let OpenTargetRequest::FlexibleTwoWayErr { payload, responder } = self {
4458            Some((payload, responder))
4459        } else {
4460            None
4461        }
4462    }
4463
4464    #[allow(irrefutable_let_patterns)]
4465    pub fn into_flexible_two_way_fields_err(
4466        self,
4467    ) -> Option<(
4468        OpenTargetFlexibleTwoWayFieldsErrRequest,
4469        OpenTargetFlexibleTwoWayFieldsErrResponder,
4470    )> {
4471        if let OpenTargetRequest::FlexibleTwoWayFieldsErr { payload, responder } = self {
4472            Some((payload, responder))
4473        } else {
4474            None
4475        }
4476    }
4477
4478    /// Name of the method defined in FIDL
4479    pub fn method_name(&self) -> &'static str {
4480        match *self {
4481            OpenTargetRequest::StrictOneWay { .. } => "strict_one_way",
4482            OpenTargetRequest::FlexibleOneWay { .. } => "flexible_one_way",
4483            OpenTargetRequest::StrictTwoWay { .. } => "strict_two_way",
4484            OpenTargetRequest::StrictTwoWayFields { .. } => "strict_two_way_fields",
4485            OpenTargetRequest::StrictTwoWayErr { .. } => "strict_two_way_err",
4486            OpenTargetRequest::StrictTwoWayFieldsErr { .. } => "strict_two_way_fields_err",
4487            OpenTargetRequest::FlexibleTwoWay { .. } => "flexible_two_way",
4488            OpenTargetRequest::FlexibleTwoWayFields { .. } => "flexible_two_way_fields",
4489            OpenTargetRequest::FlexibleTwoWayErr { .. } => "flexible_two_way_err",
4490            OpenTargetRequest::FlexibleTwoWayFieldsErr { .. } => "flexible_two_way_fields_err",
4491            OpenTargetRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
4492                "unknown one-way method"
4493            }
4494            OpenTargetRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
4495                "unknown two-way method"
4496            }
4497        }
4498    }
4499}
4500
4501#[derive(Debug, Clone)]
4502pub struct OpenTargetControlHandle {
4503    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4504}
4505
4506impl fidl::endpoints::ControlHandle for OpenTargetControlHandle {
4507    fn shutdown(&self) {
4508        self.inner.shutdown()
4509    }
4510    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4511        self.inner.shutdown_with_epitaph(status)
4512    }
4513
4514    fn is_closed(&self) -> bool {
4515        self.inner.channel().is_closed()
4516    }
4517    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4518        self.inner.channel().on_closed()
4519    }
4520
4521    #[cfg(target_os = "fuchsia")]
4522    fn signal_peer(
4523        &self,
4524        clear_mask: zx::Signals,
4525        set_mask: zx::Signals,
4526    ) -> Result<(), zx_status::Status> {
4527        use fidl::Peered;
4528        self.inner.channel().signal_peer(clear_mask, set_mask)
4529    }
4530}
4531
4532impl OpenTargetControlHandle {
4533    pub fn send_strict_event(&self) -> Result<(), fidl::Error> {
4534        self.inner.send::<fidl::encoding::EmptyPayload>(
4535            (),
4536            0,
4537            0x778f95d421c0685,
4538            fidl::encoding::DynamicFlags::empty(),
4539        )
4540    }
4541
4542    pub fn send_flexible_event(&self) -> Result<(), fidl::Error> {
4543        self.inner.send::<fidl::encoding::EmptyPayload>(
4544            (),
4545            0,
4546            0x43d9ee0dca2bb33e,
4547            fidl::encoding::DynamicFlags::FLEXIBLE,
4548        )
4549    }
4550}
4551
4552#[must_use = "FIDL methods require a response to be sent"]
4553#[derive(Debug)]
4554pub struct OpenTargetStrictTwoWayResponder {
4555    control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
4556    tx_id: u32,
4557}
4558
4559/// Set the the channel to be shutdown (see [`OpenTargetControlHandle::shutdown`])
4560/// if the responder is dropped without sending a response, so that the client
4561/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4562impl std::ops::Drop for OpenTargetStrictTwoWayResponder {
4563    fn drop(&mut self) {
4564        self.control_handle.shutdown();
4565        // Safety: drops once, never accessed again
4566        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4567    }
4568}
4569
4570impl fidl::endpoints::Responder for OpenTargetStrictTwoWayResponder {
4571    type ControlHandle = OpenTargetControlHandle;
4572
4573    fn control_handle(&self) -> &OpenTargetControlHandle {
4574        &self.control_handle
4575    }
4576
4577    fn drop_without_shutdown(mut self) {
4578        // Safety: drops once, never accessed again due to mem::forget
4579        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4580        // Prevent Drop from running (which would shut down the channel)
4581        std::mem::forget(self);
4582    }
4583}
4584
4585impl OpenTargetStrictTwoWayResponder {
4586    /// Sends a response to the FIDL transaction.
4587    ///
4588    /// Sets the channel to shutdown if an error occurs.
4589    pub fn send(self) -> Result<(), fidl::Error> {
4590        let _result = self.send_raw();
4591        if _result.is_err() {
4592            self.control_handle.shutdown();
4593        }
4594        self.drop_without_shutdown();
4595        _result
4596    }
4597
4598    /// Similar to "send" but does not shutdown the channel if an error occurs.
4599    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
4600        let _result = self.send_raw();
4601        self.drop_without_shutdown();
4602        _result
4603    }
4604
4605    fn send_raw(&self) -> Result<(), fidl::Error> {
4606        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
4607            (),
4608            self.tx_id,
4609            0x70020c582a57ef03,
4610            fidl::encoding::DynamicFlags::empty(),
4611        )
4612    }
4613}
4614
4615#[must_use = "FIDL methods require a response to be sent"]
4616#[derive(Debug)]
4617pub struct OpenTargetStrictTwoWayFieldsResponder {
4618    control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
4619    tx_id: u32,
4620}
4621
4622/// Set the the channel to be shutdown (see [`OpenTargetControlHandle::shutdown`])
4623/// if the responder is dropped without sending a response, so that the client
4624/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4625impl std::ops::Drop for OpenTargetStrictTwoWayFieldsResponder {
4626    fn drop(&mut self) {
4627        self.control_handle.shutdown();
4628        // Safety: drops once, never accessed again
4629        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4630    }
4631}
4632
4633impl fidl::endpoints::Responder for OpenTargetStrictTwoWayFieldsResponder {
4634    type ControlHandle = OpenTargetControlHandle;
4635
4636    fn control_handle(&self) -> &OpenTargetControlHandle {
4637        &self.control_handle
4638    }
4639
4640    fn drop_without_shutdown(mut self) {
4641        // Safety: drops once, never accessed again due to mem::forget
4642        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4643        // Prevent Drop from running (which would shut down the channel)
4644        std::mem::forget(self);
4645    }
4646}
4647
4648impl OpenTargetStrictTwoWayFieldsResponder {
4649    /// Sends a response to the FIDL transaction.
4650    ///
4651    /// Sets the channel to shutdown if an error occurs.
4652    pub fn send(self, mut some_field: i32) -> Result<(), fidl::Error> {
4653        let _result = self.send_raw(some_field);
4654        if _result.is_err() {
4655            self.control_handle.shutdown();
4656        }
4657        self.drop_without_shutdown();
4658        _result
4659    }
4660
4661    /// Similar to "send" but does not shutdown the channel if an error occurs.
4662    pub fn send_no_shutdown_on_err(self, mut some_field: i32) -> Result<(), fidl::Error> {
4663        let _result = self.send_raw(some_field);
4664        self.drop_without_shutdown();
4665        _result
4666    }
4667
4668    fn send_raw(&self, mut some_field: i32) -> Result<(), fidl::Error> {
4669        self.control_handle.inner.send::<OpenTargetStrictTwoWayFieldsResponse>(
4670            (some_field,),
4671            self.tx_id,
4672            0x2be6e1cc40008010,
4673            fidl::encoding::DynamicFlags::empty(),
4674        )
4675    }
4676}
4677
4678#[must_use = "FIDL methods require a response to be sent"]
4679#[derive(Debug)]
4680pub struct OpenTargetStrictTwoWayErrResponder {
4681    control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
4682    tx_id: u32,
4683}
4684
4685/// Set the the channel to be shutdown (see [`OpenTargetControlHandle::shutdown`])
4686/// if the responder is dropped without sending a response, so that the client
4687/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4688impl std::ops::Drop for OpenTargetStrictTwoWayErrResponder {
4689    fn drop(&mut self) {
4690        self.control_handle.shutdown();
4691        // Safety: drops once, never accessed again
4692        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4693    }
4694}
4695
4696impl fidl::endpoints::Responder for OpenTargetStrictTwoWayErrResponder {
4697    type ControlHandle = OpenTargetControlHandle;
4698
4699    fn control_handle(&self) -> &OpenTargetControlHandle {
4700        &self.control_handle
4701    }
4702
4703    fn drop_without_shutdown(mut self) {
4704        // Safety: drops once, never accessed again due to mem::forget
4705        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4706        // Prevent Drop from running (which would shut down the channel)
4707        std::mem::forget(self);
4708    }
4709}
4710
4711impl OpenTargetStrictTwoWayErrResponder {
4712    /// Sends a response to the FIDL transaction.
4713    ///
4714    /// Sets the channel to shutdown if an error occurs.
4715    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4716        let _result = self.send_raw(result);
4717        if _result.is_err() {
4718            self.control_handle.shutdown();
4719        }
4720        self.drop_without_shutdown();
4721        _result
4722    }
4723
4724    /// Similar to "send" but does not shutdown the channel if an error occurs.
4725    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4726        let _result = self.send_raw(result);
4727        self.drop_without_shutdown();
4728        _result
4729    }
4730
4731    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4732        self.control_handle
4733            .inner
4734            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4735                result,
4736                self.tx_id,
4737                0x6efc16069ebd0b2c,
4738                fidl::encoding::DynamicFlags::empty(),
4739            )
4740    }
4741}
4742
4743#[must_use = "FIDL methods require a response to be sent"]
4744#[derive(Debug)]
4745pub struct OpenTargetStrictTwoWayFieldsErrResponder {
4746    control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
4747    tx_id: u32,
4748}
4749
4750/// Set the the channel to be shutdown (see [`OpenTargetControlHandle::shutdown`])
4751/// if the responder is dropped without sending a response, so that the client
4752/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4753impl std::ops::Drop for OpenTargetStrictTwoWayFieldsErrResponder {
4754    fn drop(&mut self) {
4755        self.control_handle.shutdown();
4756        // Safety: drops once, never accessed again
4757        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4758    }
4759}
4760
4761impl fidl::endpoints::Responder for OpenTargetStrictTwoWayFieldsErrResponder {
4762    type ControlHandle = OpenTargetControlHandle;
4763
4764    fn control_handle(&self) -> &OpenTargetControlHandle {
4765        &self.control_handle
4766    }
4767
4768    fn drop_without_shutdown(mut self) {
4769        // Safety: drops once, never accessed again due to mem::forget
4770        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4771        // Prevent Drop from running (which would shut down the channel)
4772        std::mem::forget(self);
4773    }
4774}
4775
4776impl OpenTargetStrictTwoWayFieldsErrResponder {
4777    /// Sends a response to the FIDL transaction.
4778    ///
4779    /// Sets the channel to shutdown if an error occurs.
4780    pub fn send(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
4781        let _result = self.send_raw(result);
4782        if _result.is_err() {
4783            self.control_handle.shutdown();
4784        }
4785        self.drop_without_shutdown();
4786        _result
4787    }
4788
4789    /// Similar to "send" but does not shutdown the channel if an error occurs.
4790    pub fn send_no_shutdown_on_err(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
4791        let _result = self.send_raw(result);
4792        self.drop_without_shutdown();
4793        _result
4794    }
4795
4796    fn send_raw(&self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
4797        self.control_handle.inner.send::<fidl::encoding::ResultType<
4798            OpenTargetStrictTwoWayFieldsErrResponse,
4799            i32,
4800        >>(
4801            result.map(|some_field| (some_field,)),
4802            self.tx_id,
4803            0x309c8adda770fcf0,
4804            fidl::encoding::DynamicFlags::empty(),
4805        )
4806    }
4807}
4808
4809#[must_use = "FIDL methods require a response to be sent"]
4810#[derive(Debug)]
4811pub struct OpenTargetFlexibleTwoWayResponder {
4812    control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
4813    tx_id: u32,
4814}
4815
4816/// Set the the channel to be shutdown (see [`OpenTargetControlHandle::shutdown`])
4817/// if the responder is dropped without sending a response, so that the client
4818/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4819impl std::ops::Drop for OpenTargetFlexibleTwoWayResponder {
4820    fn drop(&mut self) {
4821        self.control_handle.shutdown();
4822        // Safety: drops once, never accessed again
4823        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4824    }
4825}
4826
4827impl fidl::endpoints::Responder for OpenTargetFlexibleTwoWayResponder {
4828    type ControlHandle = OpenTargetControlHandle;
4829
4830    fn control_handle(&self) -> &OpenTargetControlHandle {
4831        &self.control_handle
4832    }
4833
4834    fn drop_without_shutdown(mut self) {
4835        // Safety: drops once, never accessed again due to mem::forget
4836        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4837        // Prevent Drop from running (which would shut down the channel)
4838        std::mem::forget(self);
4839    }
4840}
4841
4842impl OpenTargetFlexibleTwoWayResponder {
4843    /// Sends a response to the FIDL transaction.
4844    ///
4845    /// Sets the channel to shutdown if an error occurs.
4846    pub fn send(self) -> Result<(), fidl::Error> {
4847        let _result = self.send_raw();
4848        if _result.is_err() {
4849            self.control_handle.shutdown();
4850        }
4851        self.drop_without_shutdown();
4852        _result
4853    }
4854
4855    /// Similar to "send" but does not shutdown the channel if an error occurs.
4856    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
4857        let _result = self.send_raw();
4858        self.drop_without_shutdown();
4859        _result
4860    }
4861
4862    fn send_raw(&self) -> Result<(), fidl::Error> {
4863        self.control_handle.inner.send::<fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>>(
4864            fidl::encoding::Flexible::new(()),
4865            self.tx_id,
4866            0x19f932dac7810c71,
4867            fidl::encoding::DynamicFlags::FLEXIBLE,
4868        )
4869    }
4870}
4871
4872#[must_use = "FIDL methods require a response to be sent"]
4873#[derive(Debug)]
4874pub struct OpenTargetFlexibleTwoWayFieldsResponder {
4875    control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
4876    tx_id: u32,
4877}
4878
4879/// Set the the channel to be shutdown (see [`OpenTargetControlHandle::shutdown`])
4880/// if the responder is dropped without sending a response, so that the client
4881/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4882impl std::ops::Drop for OpenTargetFlexibleTwoWayFieldsResponder {
4883    fn drop(&mut self) {
4884        self.control_handle.shutdown();
4885        // Safety: drops once, never accessed again
4886        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4887    }
4888}
4889
4890impl fidl::endpoints::Responder for OpenTargetFlexibleTwoWayFieldsResponder {
4891    type ControlHandle = OpenTargetControlHandle;
4892
4893    fn control_handle(&self) -> &OpenTargetControlHandle {
4894        &self.control_handle
4895    }
4896
4897    fn drop_without_shutdown(mut self) {
4898        // Safety: drops once, never accessed again due to mem::forget
4899        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4900        // Prevent Drop from running (which would shut down the channel)
4901        std::mem::forget(self);
4902    }
4903}
4904
4905impl OpenTargetFlexibleTwoWayFieldsResponder {
4906    /// Sends a response to the FIDL transaction.
4907    ///
4908    /// Sets the channel to shutdown if an error occurs.
4909    pub fn send(self, mut some_field: i32) -> Result<(), fidl::Error> {
4910        let _result = self.send_raw(some_field);
4911        if _result.is_err() {
4912            self.control_handle.shutdown();
4913        }
4914        self.drop_without_shutdown();
4915        _result
4916    }
4917
4918    /// Similar to "send" but does not shutdown the channel if an error occurs.
4919    pub fn send_no_shutdown_on_err(self, mut some_field: i32) -> Result<(), fidl::Error> {
4920        let _result = self.send_raw(some_field);
4921        self.drop_without_shutdown();
4922        _result
4923    }
4924
4925    fn send_raw(&self, mut some_field: i32) -> Result<(), fidl::Error> {
4926        self.control_handle.inner.send::<fidl::encoding::FlexibleType<
4927            OpenTargetFlexibleTwoWayFieldsResponse,
4928        >>(
4929            fidl::encoding::Flexible::new((some_field,)),
4930            self.tx_id,
4931            0x47cca5ddb4207774,
4932            fidl::encoding::DynamicFlags::FLEXIBLE,
4933        )
4934    }
4935}
4936
4937#[must_use = "FIDL methods require a response to be sent"]
4938#[derive(Debug)]
4939pub struct OpenTargetFlexibleTwoWayErrResponder {
4940    control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
4941    tx_id: u32,
4942}
4943
4944/// Set the the channel to be shutdown (see [`OpenTargetControlHandle::shutdown`])
4945/// if the responder is dropped without sending a response, so that the client
4946/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4947impl std::ops::Drop for OpenTargetFlexibleTwoWayErrResponder {
4948    fn drop(&mut self) {
4949        self.control_handle.shutdown();
4950        // Safety: drops once, never accessed again
4951        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4952    }
4953}
4954
4955impl fidl::endpoints::Responder for OpenTargetFlexibleTwoWayErrResponder {
4956    type ControlHandle = OpenTargetControlHandle;
4957
4958    fn control_handle(&self) -> &OpenTargetControlHandle {
4959        &self.control_handle
4960    }
4961
4962    fn drop_without_shutdown(mut self) {
4963        // Safety: drops once, never accessed again due to mem::forget
4964        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4965        // Prevent Drop from running (which would shut down the channel)
4966        std::mem::forget(self);
4967    }
4968}
4969
4970impl OpenTargetFlexibleTwoWayErrResponder {
4971    /// Sends a response to the FIDL transaction.
4972    ///
4973    /// Sets the channel to shutdown if an error occurs.
4974    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4975        let _result = self.send_raw(result);
4976        if _result.is_err() {
4977            self.control_handle.shutdown();
4978        }
4979        self.drop_without_shutdown();
4980        _result
4981    }
4982
4983    /// Similar to "send" but does not shutdown the channel if an error occurs.
4984    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4985        let _result = self.send_raw(result);
4986        self.drop_without_shutdown();
4987        _result
4988    }
4989
4990    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4991        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4992            fidl::encoding::EmptyStruct,
4993            i32,
4994        >>(
4995            fidl::encoding::FlexibleResult::new(result),
4996            self.tx_id,
4997            0x52aa19681fea3a0,
4998            fidl::encoding::DynamicFlags::FLEXIBLE,
4999        )
5000    }
5001}
5002
5003#[must_use = "FIDL methods require a response to be sent"]
5004#[derive(Debug)]
5005pub struct OpenTargetFlexibleTwoWayFieldsErrResponder {
5006    control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
5007    tx_id: u32,
5008}
5009
5010/// Set the the channel to be shutdown (see [`OpenTargetControlHandle::shutdown`])
5011/// if the responder is dropped without sending a response, so that the client
5012/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5013impl std::ops::Drop for OpenTargetFlexibleTwoWayFieldsErrResponder {
5014    fn drop(&mut self) {
5015        self.control_handle.shutdown();
5016        // Safety: drops once, never accessed again
5017        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5018    }
5019}
5020
5021impl fidl::endpoints::Responder for OpenTargetFlexibleTwoWayFieldsErrResponder {
5022    type ControlHandle = OpenTargetControlHandle;
5023
5024    fn control_handle(&self) -> &OpenTargetControlHandle {
5025        &self.control_handle
5026    }
5027
5028    fn drop_without_shutdown(mut self) {
5029        // Safety: drops once, never accessed again due to mem::forget
5030        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5031        // Prevent Drop from running (which would shut down the channel)
5032        std::mem::forget(self);
5033    }
5034}
5035
5036impl OpenTargetFlexibleTwoWayFieldsErrResponder {
5037    /// Sends a response to the FIDL transaction.
5038    ///
5039    /// Sets the channel to shutdown if an error occurs.
5040    pub fn send(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
5041        let _result = self.send_raw(result);
5042        if _result.is_err() {
5043            self.control_handle.shutdown();
5044        }
5045        self.drop_without_shutdown();
5046        _result
5047    }
5048
5049    /// Similar to "send" but does not shutdown the channel if an error occurs.
5050    pub fn send_no_shutdown_on_err(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
5051        let _result = self.send_raw(result);
5052        self.drop_without_shutdown();
5053        _result
5054    }
5055
5056    fn send_raw(&self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
5057        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
5058            OpenTargetFlexibleTwoWayFieldsErrResponse,
5059            i32,
5060        >>(
5061            fidl::encoding::FlexibleResult::new(result.map(|some_field| (some_field,))),
5062            self.tx_id,
5063            0x1ab7dd4c6a3650b6,
5064            fidl::encoding::DynamicFlags::FLEXIBLE,
5065        )
5066    }
5067}
5068
5069#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5070pub struct RunnerMarker;
5071
5072impl fidl::endpoints::ProtocolMarker for RunnerMarker {
5073    type Proxy = RunnerProxy;
5074    type RequestStream = RunnerRequestStream;
5075    #[cfg(target_os = "fuchsia")]
5076    type SynchronousProxy = RunnerSynchronousProxy;
5077
5078    const DEBUG_NAME: &'static str = "fidl.serversuite.Runner";
5079}
5080impl fidl::endpoints::DiscoverableProtocolMarker for RunnerMarker {}
5081pub type RunnerStartResult = Result<(), StartError>;
5082
5083pub trait RunnerProxyInterface: Send + Sync {
5084    type GetVersionResponseFut: std::future::Future<Output = Result<u64, fidl::Error>> + Send;
5085    fn r#get_version(&self) -> Self::GetVersionResponseFut;
5086    type CheckAliveResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
5087    fn r#check_alive(&self) -> Self::CheckAliveResponseFut;
5088    type StartResponseFut: std::future::Future<Output = Result<RunnerStartResult, fidl::Error>>
5089        + Send;
5090    fn r#start(&self, test: Test, any_target: AnyTarget) -> Self::StartResponseFut;
5091    type ShutdownWithEpitaphResponseFut: std::future::Future<Output = Result<(), fidl::Error>>
5092        + Send;
5093    fn r#shutdown_with_epitaph(&self, epitaph_status: i32) -> Self::ShutdownWithEpitaphResponseFut;
5094    type SendOpenTargetStrictEventResponseFut: std::future::Future<Output = Result<(), fidl::Error>>
5095        + Send;
5096    fn r#send_open_target_strict_event(&self) -> Self::SendOpenTargetStrictEventResponseFut;
5097    type SendOpenTargetFlexibleEventResponseFut: std::future::Future<Output = Result<(), fidl::Error>>
5098        + Send;
5099    fn r#send_open_target_flexible_event(&self) -> Self::SendOpenTargetFlexibleEventResponseFut;
5100}
5101#[derive(Debug)]
5102#[cfg(target_os = "fuchsia")]
5103pub struct RunnerSynchronousProxy {
5104    client: fidl::client::sync::Client,
5105}
5106
5107#[cfg(target_os = "fuchsia")]
5108impl fidl::endpoints::SynchronousProxy for RunnerSynchronousProxy {
5109    type Proxy = RunnerProxy;
5110    type Protocol = RunnerMarker;
5111
5112    fn from_channel(inner: fidl::Channel) -> Self {
5113        Self::new(inner)
5114    }
5115
5116    fn into_channel(self) -> fidl::Channel {
5117        self.client.into_channel()
5118    }
5119
5120    fn as_channel(&self) -> &fidl::Channel {
5121        self.client.as_channel()
5122    }
5123}
5124
5125#[cfg(target_os = "fuchsia")]
5126impl RunnerSynchronousProxy {
5127    pub fn new(channel: fidl::Channel) -> Self {
5128        let protocol_name = <RunnerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5129        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
5130    }
5131
5132    pub fn into_channel(self) -> fidl::Channel {
5133        self.client.into_channel()
5134    }
5135
5136    /// Waits until an event arrives and returns it. It is safe for other
5137    /// threads to make concurrent requests while waiting for an event.
5138    pub fn wait_for_event(
5139        &self,
5140        deadline: zx::MonotonicInstant,
5141    ) -> Result<RunnerEvent, fidl::Error> {
5142        RunnerEvent::decode(self.client.wait_for_event(deadline)?)
5143    }
5144
5145    pub fn r#get_version(&self, ___deadline: zx::MonotonicInstant) -> Result<u64, fidl::Error> {
5146        let _response =
5147            self.client.send_query::<fidl::encoding::EmptyPayload, RunnerGetVersionResponse>(
5148                (),
5149                0x3c70bef2e59d06a7,
5150                fidl::encoding::DynamicFlags::empty(),
5151                ___deadline,
5152            )?;
5153        Ok(_response.version)
5154    }
5155
5156    pub fn r#check_alive(&self, ___deadline: zx::MonotonicInstant) -> Result<(), fidl::Error> {
5157        let _response =
5158            self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
5159                (),
5160                0x2449c31d30d6f5b7,
5161                fidl::encoding::DynamicFlags::empty(),
5162                ___deadline,
5163            )?;
5164        Ok(_response)
5165    }
5166
5167    pub fn r#start(
5168        &self,
5169        mut test: Test,
5170        mut any_target: AnyTarget,
5171        ___deadline: zx::MonotonicInstant,
5172    ) -> Result<RunnerStartResult, fidl::Error> {
5173        let _response = self.client.send_query::<RunnerStartRequest, fidl::encoding::ResultType<
5174            fidl::encoding::EmptyStruct,
5175            StartError,
5176        >>(
5177            (test, &mut any_target),
5178            0x2d4735726d30a5b0,
5179            fidl::encoding::DynamicFlags::empty(),
5180            ___deadline,
5181        )?;
5182        Ok(_response.map(|x| x))
5183    }
5184
5185    pub fn r#shutdown_with_epitaph(
5186        &self,
5187        mut epitaph_status: i32,
5188        ___deadline: zx::MonotonicInstant,
5189    ) -> Result<(), fidl::Error> {
5190        let _response = self
5191            .client
5192            .send_query::<RunnerShutdownWithEpitaphRequest, fidl::encoding::EmptyPayload>(
5193                (epitaph_status,),
5194                0x7a15369d88e1e8ec,
5195                fidl::encoding::DynamicFlags::empty(),
5196                ___deadline,
5197            )?;
5198        Ok(_response)
5199    }
5200
5201    pub fn r#send_open_target_strict_event(
5202        &self,
5203        ___deadline: zx::MonotonicInstant,
5204    ) -> Result<(), fidl::Error> {
5205        let _response =
5206            self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
5207                (),
5208                0x1c3e4452a20c9590,
5209                fidl::encoding::DynamicFlags::empty(),
5210                ___deadline,
5211            )?;
5212        Ok(_response)
5213    }
5214
5215    pub fn r#send_open_target_flexible_event(
5216        &self,
5217        ___deadline: zx::MonotonicInstant,
5218    ) -> Result<(), fidl::Error> {
5219        let _response =
5220            self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
5221                (),
5222                0x2d2c9446799baeb6,
5223                fidl::encoding::DynamicFlags::empty(),
5224                ___deadline,
5225            )?;
5226        Ok(_response)
5227    }
5228}
5229
5230#[derive(Debug, Clone)]
5231pub struct RunnerProxy {
5232    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
5233}
5234
5235impl fidl::endpoints::Proxy for RunnerProxy {
5236    type Protocol = RunnerMarker;
5237
5238    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
5239        Self::new(inner)
5240    }
5241
5242    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
5243        self.client.into_channel().map_err(|client| Self { client })
5244    }
5245
5246    fn as_channel(&self) -> &::fidl::AsyncChannel {
5247        self.client.as_channel()
5248    }
5249}
5250
5251impl RunnerProxy {
5252    /// Create a new Proxy for fidl.serversuite/Runner.
5253    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
5254        let protocol_name = <RunnerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5255        Self { client: fidl::client::Client::new(channel, protocol_name) }
5256    }
5257
5258    /// Get a Stream of events from the remote end of the protocol.
5259    ///
5260    /// # Panics
5261    ///
5262    /// Panics if the event stream was already taken.
5263    pub fn take_event_stream(&self) -> RunnerEventStream {
5264        RunnerEventStream { event_receiver: self.client.take_event_receiver() }
5265    }
5266
5267    pub fn r#get_version(
5268        &self,
5269    ) -> fidl::client::QueryResponseFut<u64, fidl::encoding::DefaultFuchsiaResourceDialect> {
5270        RunnerProxyInterface::r#get_version(self)
5271    }
5272
5273    pub fn r#check_alive(
5274        &self,
5275    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
5276        RunnerProxyInterface::r#check_alive(self)
5277    }
5278
5279    pub fn r#start(
5280        &self,
5281        mut test: Test,
5282        mut any_target: AnyTarget,
5283    ) -> fidl::client::QueryResponseFut<
5284        RunnerStartResult,
5285        fidl::encoding::DefaultFuchsiaResourceDialect,
5286    > {
5287        RunnerProxyInterface::r#start(self, test, any_target)
5288    }
5289
5290    pub fn r#shutdown_with_epitaph(
5291        &self,
5292        mut epitaph_status: i32,
5293    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
5294        RunnerProxyInterface::r#shutdown_with_epitaph(self, epitaph_status)
5295    }
5296
5297    pub fn r#send_open_target_strict_event(
5298        &self,
5299    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
5300        RunnerProxyInterface::r#send_open_target_strict_event(self)
5301    }
5302
5303    pub fn r#send_open_target_flexible_event(
5304        &self,
5305    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
5306        RunnerProxyInterface::r#send_open_target_flexible_event(self)
5307    }
5308}
5309
5310impl RunnerProxyInterface for RunnerProxy {
5311    type GetVersionResponseFut =
5312        fidl::client::QueryResponseFut<u64, fidl::encoding::DefaultFuchsiaResourceDialect>;
5313    fn r#get_version(&self) -> Self::GetVersionResponseFut {
5314        fn _decode(
5315            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5316        ) -> Result<u64, fidl::Error> {
5317            let _response = fidl::client::decode_transaction_body::<
5318                RunnerGetVersionResponse,
5319                fidl::encoding::DefaultFuchsiaResourceDialect,
5320                0x3c70bef2e59d06a7,
5321            >(_buf?)?;
5322            Ok(_response.version)
5323        }
5324        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, u64>(
5325            (),
5326            0x3c70bef2e59d06a7,
5327            fidl::encoding::DynamicFlags::empty(),
5328            _decode,
5329        )
5330    }
5331
5332    type CheckAliveResponseFut =
5333        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
5334    fn r#check_alive(&self) -> Self::CheckAliveResponseFut {
5335        fn _decode(
5336            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5337        ) -> Result<(), fidl::Error> {
5338            let _response = fidl::client::decode_transaction_body::<
5339                fidl::encoding::EmptyPayload,
5340                fidl::encoding::DefaultFuchsiaResourceDialect,
5341                0x2449c31d30d6f5b7,
5342            >(_buf?)?;
5343            Ok(_response)
5344        }
5345        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
5346            (),
5347            0x2449c31d30d6f5b7,
5348            fidl::encoding::DynamicFlags::empty(),
5349            _decode,
5350        )
5351    }
5352
5353    type StartResponseFut = fidl::client::QueryResponseFut<
5354        RunnerStartResult,
5355        fidl::encoding::DefaultFuchsiaResourceDialect,
5356    >;
5357    fn r#start(&self, mut test: Test, mut any_target: AnyTarget) -> Self::StartResponseFut {
5358        fn _decode(
5359            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5360        ) -> Result<RunnerStartResult, fidl::Error> {
5361            let _response = fidl::client::decode_transaction_body::<
5362                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, StartError>,
5363                fidl::encoding::DefaultFuchsiaResourceDialect,
5364                0x2d4735726d30a5b0,
5365            >(_buf?)?;
5366            Ok(_response.map(|x| x))
5367        }
5368        self.client.send_query_and_decode::<RunnerStartRequest, RunnerStartResult>(
5369            (test, &mut any_target),
5370            0x2d4735726d30a5b0,
5371            fidl::encoding::DynamicFlags::empty(),
5372            _decode,
5373        )
5374    }
5375
5376    type ShutdownWithEpitaphResponseFut =
5377        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
5378    fn r#shutdown_with_epitaph(
5379        &self,
5380        mut epitaph_status: i32,
5381    ) -> Self::ShutdownWithEpitaphResponseFut {
5382        fn _decode(
5383            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5384        ) -> Result<(), fidl::Error> {
5385            let _response = fidl::client::decode_transaction_body::<
5386                fidl::encoding::EmptyPayload,
5387                fidl::encoding::DefaultFuchsiaResourceDialect,
5388                0x7a15369d88e1e8ec,
5389            >(_buf?)?;
5390            Ok(_response)
5391        }
5392        self.client.send_query_and_decode::<RunnerShutdownWithEpitaphRequest, ()>(
5393            (epitaph_status,),
5394            0x7a15369d88e1e8ec,
5395            fidl::encoding::DynamicFlags::empty(),
5396            _decode,
5397        )
5398    }
5399
5400    type SendOpenTargetStrictEventResponseFut =
5401        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
5402    fn r#send_open_target_strict_event(&self) -> Self::SendOpenTargetStrictEventResponseFut {
5403        fn _decode(
5404            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5405        ) -> Result<(), fidl::Error> {
5406            let _response = fidl::client::decode_transaction_body::<
5407                fidl::encoding::EmptyPayload,
5408                fidl::encoding::DefaultFuchsiaResourceDialect,
5409                0x1c3e4452a20c9590,
5410            >(_buf?)?;
5411            Ok(_response)
5412        }
5413        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
5414            (),
5415            0x1c3e4452a20c9590,
5416            fidl::encoding::DynamicFlags::empty(),
5417            _decode,
5418        )
5419    }
5420
5421    type SendOpenTargetFlexibleEventResponseFut =
5422        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
5423    fn r#send_open_target_flexible_event(&self) -> Self::SendOpenTargetFlexibleEventResponseFut {
5424        fn _decode(
5425            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5426        ) -> Result<(), fidl::Error> {
5427            let _response = fidl::client::decode_transaction_body::<
5428                fidl::encoding::EmptyPayload,
5429                fidl::encoding::DefaultFuchsiaResourceDialect,
5430                0x2d2c9446799baeb6,
5431            >(_buf?)?;
5432            Ok(_response)
5433        }
5434        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
5435            (),
5436            0x2d2c9446799baeb6,
5437            fidl::encoding::DynamicFlags::empty(),
5438            _decode,
5439        )
5440    }
5441}
5442
5443pub struct RunnerEventStream {
5444    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
5445}
5446
5447impl std::marker::Unpin for RunnerEventStream {}
5448
5449impl futures::stream::FusedStream for RunnerEventStream {
5450    fn is_terminated(&self) -> bool {
5451        self.event_receiver.is_terminated()
5452    }
5453}
5454
5455impl futures::Stream for RunnerEventStream {
5456    type Item = Result<RunnerEvent, fidl::Error>;
5457
5458    fn poll_next(
5459        mut self: std::pin::Pin<&mut Self>,
5460        cx: &mut std::task::Context<'_>,
5461    ) -> std::task::Poll<Option<Self::Item>> {
5462        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5463            &mut self.event_receiver,
5464            cx
5465        )?) {
5466            Some(buf) => std::task::Poll::Ready(Some(RunnerEvent::decode(buf))),
5467            None => std::task::Poll::Ready(None),
5468        }
5469    }
5470}
5471
5472#[derive(Debug)]
5473pub enum RunnerEvent {
5474    OnTeardown { reason: TeardownReason },
5475    OnReceivedUnknownMethod { ordinal: u64, unknown_method_type: UnknownMethodType },
5476    OnReceivedClosedTargetOneWayNoPayload {},
5477    OnReceivedOpenTargetStrictOneWay {},
5478    OnReceivedOpenTargetFlexibleOneWay {},
5479}
5480
5481impl RunnerEvent {
5482    #[allow(irrefutable_let_patterns)]
5483    pub fn into_on_teardown(self) -> Option<TeardownReason> {
5484        if let RunnerEvent::OnTeardown { reason } = self {
5485            Some((reason))
5486        } else {
5487            None
5488        }
5489    }
5490    #[allow(irrefutable_let_patterns)]
5491    pub fn into_on_received_unknown_method(self) -> Option<(u64, UnknownMethodType)> {
5492        if let RunnerEvent::OnReceivedUnknownMethod { ordinal, unknown_method_type } = self {
5493            Some((ordinal, unknown_method_type))
5494        } else {
5495            None
5496        }
5497    }
5498    #[allow(irrefutable_let_patterns)]
5499    pub fn into_on_received_closed_target_one_way_no_payload(self) -> Option<()> {
5500        if let RunnerEvent::OnReceivedClosedTargetOneWayNoPayload {} = self {
5501            Some(())
5502        } else {
5503            None
5504        }
5505    }
5506    #[allow(irrefutable_let_patterns)]
5507    pub fn into_on_received_open_target_strict_one_way(self) -> Option<()> {
5508        if let RunnerEvent::OnReceivedOpenTargetStrictOneWay {} = self {
5509            Some(())
5510        } else {
5511            None
5512        }
5513    }
5514    #[allow(irrefutable_let_patterns)]
5515    pub fn into_on_received_open_target_flexible_one_way(self) -> Option<()> {
5516        if let RunnerEvent::OnReceivedOpenTargetFlexibleOneWay {} = self {
5517            Some(())
5518        } else {
5519            None
5520        }
5521    }
5522
5523    /// Decodes a message buffer as a [`RunnerEvent`].
5524    fn decode(
5525        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5526    ) -> Result<RunnerEvent, fidl::Error> {
5527        let (bytes, _handles) = buf.split_mut();
5528        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5529        debug_assert_eq!(tx_header.tx_id, 0);
5530        match tx_header.ordinal {
5531            0x4472273866753acf => {
5532                let mut out = fidl::new_empty!(
5533                    RunnerOnTeardownRequest,
5534                    fidl::encoding::DefaultFuchsiaResourceDialect
5535                );
5536                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RunnerOnTeardownRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
5537                Ok((RunnerEvent::OnTeardown { reason: out.reason }))
5538            }
5539            0x3c7f8d66a4f4c0e4 => {
5540                let mut out = fidl::new_empty!(
5541                    UnknownMethodInfo,
5542                    fidl::encoding::DefaultFuchsiaResourceDialect
5543                );
5544                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<UnknownMethodInfo>(&tx_header, _body_bytes, _handles, &mut out)?;
5545                Ok((RunnerEvent::OnReceivedUnknownMethod {
5546                    ordinal: out.ordinal,
5547                    unknown_method_type: out.unknown_method_type,
5548                }))
5549            }
5550            0x56915f3fcde32b6f => {
5551                let mut out = fidl::new_empty!(
5552                    fidl::encoding::EmptyPayload,
5553                    fidl::encoding::DefaultFuchsiaResourceDialect
5554                );
5555                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
5556                Ok((RunnerEvent::OnReceivedClosedTargetOneWayNoPayload {}))
5557            }
5558            0x5b82db8b0ffe97c5 => {
5559                let mut out = fidl::new_empty!(
5560                    fidl::encoding::EmptyPayload,
5561                    fidl::encoding::DefaultFuchsiaResourceDialect
5562                );
5563                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
5564                Ok((RunnerEvent::OnReceivedOpenTargetStrictOneWay {}))
5565            }
5566            0x2428c34ecface889 => {
5567                let mut out = fidl::new_empty!(
5568                    fidl::encoding::EmptyPayload,
5569                    fidl::encoding::DefaultFuchsiaResourceDialect
5570                );
5571                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
5572                Ok((RunnerEvent::OnReceivedOpenTargetFlexibleOneWay {}))
5573            }
5574            _ => Err(fidl::Error::UnknownOrdinal {
5575                ordinal: tx_header.ordinal,
5576                protocol_name: <RunnerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5577            }),
5578        }
5579    }
5580}
5581
5582/// A Stream of incoming requests for fidl.serversuite/Runner.
5583pub struct RunnerRequestStream {
5584    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5585    is_terminated: bool,
5586}
5587
5588impl std::marker::Unpin for RunnerRequestStream {}
5589
5590impl futures::stream::FusedStream for RunnerRequestStream {
5591    fn is_terminated(&self) -> bool {
5592        self.is_terminated
5593    }
5594}
5595
5596impl fidl::endpoints::RequestStream for RunnerRequestStream {
5597    type Protocol = RunnerMarker;
5598    type ControlHandle = RunnerControlHandle;
5599
5600    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
5601        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5602    }
5603
5604    fn control_handle(&self) -> Self::ControlHandle {
5605        RunnerControlHandle { inner: self.inner.clone() }
5606    }
5607
5608    fn into_inner(
5609        self,
5610    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
5611    {
5612        (self.inner, self.is_terminated)
5613    }
5614
5615    fn from_inner(
5616        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5617        is_terminated: bool,
5618    ) -> Self {
5619        Self { inner, is_terminated }
5620    }
5621}
5622
5623impl futures::Stream for RunnerRequestStream {
5624    type Item = Result<RunnerRequest, fidl::Error>;
5625
5626    fn poll_next(
5627        mut self: std::pin::Pin<&mut Self>,
5628        cx: &mut std::task::Context<'_>,
5629    ) -> std::task::Poll<Option<Self::Item>> {
5630        let this = &mut *self;
5631        if this.inner.check_shutdown(cx) {
5632            this.is_terminated = true;
5633            return std::task::Poll::Ready(None);
5634        }
5635        if this.is_terminated {
5636            panic!("polled RunnerRequestStream after completion");
5637        }
5638        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
5639            |bytes, handles| {
5640                match this.inner.channel().read_etc(cx, bytes, handles) {
5641                    std::task::Poll::Ready(Ok(())) => {}
5642                    std::task::Poll::Pending => return std::task::Poll::Pending,
5643                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
5644                        this.is_terminated = true;
5645                        return std::task::Poll::Ready(None);
5646                    }
5647                    std::task::Poll::Ready(Err(e)) => {
5648                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5649                            e.into(),
5650                        ))))
5651                    }
5652                }
5653
5654                // A message has been received from the channel
5655                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5656
5657                std::task::Poll::Ready(Some(match header.ordinal {
5658                    0x3c70bef2e59d06a7 => {
5659                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5660                        let mut req = fidl::new_empty!(
5661                            fidl::encoding::EmptyPayload,
5662                            fidl::encoding::DefaultFuchsiaResourceDialect
5663                        );
5664                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5665                        let control_handle = RunnerControlHandle { inner: this.inner.clone() };
5666                        Ok(RunnerRequest::GetVersion {
5667                            responder: RunnerGetVersionResponder {
5668                                control_handle: std::mem::ManuallyDrop::new(control_handle),
5669                                tx_id: header.tx_id,
5670                            },
5671                        })
5672                    }
5673                    0x2449c31d30d6f5b7 => {
5674                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5675                        let mut req = fidl::new_empty!(
5676                            fidl::encoding::EmptyPayload,
5677                            fidl::encoding::DefaultFuchsiaResourceDialect
5678                        );
5679                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5680                        let control_handle = RunnerControlHandle { inner: this.inner.clone() };
5681                        Ok(RunnerRequest::CheckAlive {
5682                            responder: RunnerCheckAliveResponder {
5683                                control_handle: std::mem::ManuallyDrop::new(control_handle),
5684                                tx_id: header.tx_id,
5685                            },
5686                        })
5687                    }
5688                    0x2d4735726d30a5b0 => {
5689                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5690                        let mut req = fidl::new_empty!(
5691                            RunnerStartRequest,
5692                            fidl::encoding::DefaultFuchsiaResourceDialect
5693                        );
5694                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RunnerStartRequest>(&header, _body_bytes, handles, &mut req)?;
5695                        let control_handle = RunnerControlHandle { inner: this.inner.clone() };
5696                        Ok(RunnerRequest::Start {
5697                            test: req.test,
5698                            any_target: req.any_target,
5699
5700                            responder: RunnerStartResponder {
5701                                control_handle: std::mem::ManuallyDrop::new(control_handle),
5702                                tx_id: header.tx_id,
5703                            },
5704                        })
5705                    }
5706                    0x7a15369d88e1e8ec => {
5707                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5708                        let mut req = fidl::new_empty!(
5709                            RunnerShutdownWithEpitaphRequest,
5710                            fidl::encoding::DefaultFuchsiaResourceDialect
5711                        );
5712                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RunnerShutdownWithEpitaphRequest>(&header, _body_bytes, handles, &mut req)?;
5713                        let control_handle = RunnerControlHandle { inner: this.inner.clone() };
5714                        Ok(RunnerRequest::ShutdownWithEpitaph {
5715                            epitaph_status: req.epitaph_status,
5716
5717                            responder: RunnerShutdownWithEpitaphResponder {
5718                                control_handle: std::mem::ManuallyDrop::new(control_handle),
5719                                tx_id: header.tx_id,
5720                            },
5721                        })
5722                    }
5723                    0x1c3e4452a20c9590 => {
5724                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5725                        let mut req = fidl::new_empty!(
5726                            fidl::encoding::EmptyPayload,
5727                            fidl::encoding::DefaultFuchsiaResourceDialect
5728                        );
5729                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5730                        let control_handle = RunnerControlHandle { inner: this.inner.clone() };
5731                        Ok(RunnerRequest::SendOpenTargetStrictEvent {
5732                            responder: RunnerSendOpenTargetStrictEventResponder {
5733                                control_handle: std::mem::ManuallyDrop::new(control_handle),
5734                                tx_id: header.tx_id,
5735                            },
5736                        })
5737                    }
5738                    0x2d2c9446799baeb6 => {
5739                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5740                        let mut req = fidl::new_empty!(
5741                            fidl::encoding::EmptyPayload,
5742                            fidl::encoding::DefaultFuchsiaResourceDialect
5743                        );
5744                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5745                        let control_handle = RunnerControlHandle { inner: this.inner.clone() };
5746                        Ok(RunnerRequest::SendOpenTargetFlexibleEvent {
5747                            responder: RunnerSendOpenTargetFlexibleEventResponder {
5748                                control_handle: std::mem::ManuallyDrop::new(control_handle),
5749                                tx_id: header.tx_id,
5750                            },
5751                        })
5752                    }
5753                    _ => Err(fidl::Error::UnknownOrdinal {
5754                        ordinal: header.ordinal,
5755                        protocol_name:
5756                            <RunnerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5757                    }),
5758                }))
5759            },
5760        )
5761    }
5762}
5763
5764#[derive(Debug)]
5765pub enum RunnerRequest {
5766    GetVersion { responder: RunnerGetVersionResponder },
5767    CheckAlive { responder: RunnerCheckAliveResponder },
5768    Start { test: Test, any_target: AnyTarget, responder: RunnerStartResponder },
5769    ShutdownWithEpitaph { epitaph_status: i32, responder: RunnerShutdownWithEpitaphResponder },
5770    SendOpenTargetStrictEvent { responder: RunnerSendOpenTargetStrictEventResponder },
5771    SendOpenTargetFlexibleEvent { responder: RunnerSendOpenTargetFlexibleEventResponder },
5772}
5773
5774impl RunnerRequest {
5775    #[allow(irrefutable_let_patterns)]
5776    pub fn into_get_version(self) -> Option<(RunnerGetVersionResponder)> {
5777        if let RunnerRequest::GetVersion { responder } = self {
5778            Some((responder))
5779        } else {
5780            None
5781        }
5782    }
5783
5784    #[allow(irrefutable_let_patterns)]
5785    pub fn into_check_alive(self) -> Option<(RunnerCheckAliveResponder)> {
5786        if let RunnerRequest::CheckAlive { responder } = self {
5787            Some((responder))
5788        } else {
5789            None
5790        }
5791    }
5792
5793    #[allow(irrefutable_let_patterns)]
5794    pub fn into_start(self) -> Option<(Test, AnyTarget, RunnerStartResponder)> {
5795        if let RunnerRequest::Start { test, any_target, responder } = self {
5796            Some((test, any_target, responder))
5797        } else {
5798            None
5799        }
5800    }
5801
5802    #[allow(irrefutable_let_patterns)]
5803    pub fn into_shutdown_with_epitaph(self) -> Option<(i32, RunnerShutdownWithEpitaphResponder)> {
5804        if let RunnerRequest::ShutdownWithEpitaph { epitaph_status, responder } = self {
5805            Some((epitaph_status, responder))
5806        } else {
5807            None
5808        }
5809    }
5810
5811    #[allow(irrefutable_let_patterns)]
5812    pub fn into_send_open_target_strict_event(
5813        self,
5814    ) -> Option<(RunnerSendOpenTargetStrictEventResponder)> {
5815        if let RunnerRequest::SendOpenTargetStrictEvent { responder } = self {
5816            Some((responder))
5817        } else {
5818            None
5819        }
5820    }
5821
5822    #[allow(irrefutable_let_patterns)]
5823    pub fn into_send_open_target_flexible_event(
5824        self,
5825    ) -> Option<(RunnerSendOpenTargetFlexibleEventResponder)> {
5826        if let RunnerRequest::SendOpenTargetFlexibleEvent { responder } = self {
5827            Some((responder))
5828        } else {
5829            None
5830        }
5831    }
5832
5833    /// Name of the method defined in FIDL
5834    pub fn method_name(&self) -> &'static str {
5835        match *self {
5836            RunnerRequest::GetVersion { .. } => "get_version",
5837            RunnerRequest::CheckAlive { .. } => "check_alive",
5838            RunnerRequest::Start { .. } => "start",
5839            RunnerRequest::ShutdownWithEpitaph { .. } => "shutdown_with_epitaph",
5840            RunnerRequest::SendOpenTargetStrictEvent { .. } => "send_open_target_strict_event",
5841            RunnerRequest::SendOpenTargetFlexibleEvent { .. } => "send_open_target_flexible_event",
5842        }
5843    }
5844}
5845
5846#[derive(Debug, Clone)]
5847pub struct RunnerControlHandle {
5848    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5849}
5850
5851impl fidl::endpoints::ControlHandle for RunnerControlHandle {
5852    fn shutdown(&self) {
5853        self.inner.shutdown()
5854    }
5855    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5856        self.inner.shutdown_with_epitaph(status)
5857    }
5858
5859    fn is_closed(&self) -> bool {
5860        self.inner.channel().is_closed()
5861    }
5862    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5863        self.inner.channel().on_closed()
5864    }
5865
5866    #[cfg(target_os = "fuchsia")]
5867    fn signal_peer(
5868        &self,
5869        clear_mask: zx::Signals,
5870        set_mask: zx::Signals,
5871    ) -> Result<(), zx_status::Status> {
5872        use fidl::Peered;
5873        self.inner.channel().signal_peer(clear_mask, set_mask)
5874    }
5875}
5876
5877impl RunnerControlHandle {
5878    pub fn send_on_teardown(&self, mut reason: TeardownReason) -> Result<(), fidl::Error> {
5879        self.inner.send::<RunnerOnTeardownRequest>(
5880            (reason,),
5881            0,
5882            0x4472273866753acf,
5883            fidl::encoding::DynamicFlags::empty(),
5884        )
5885    }
5886
5887    pub fn send_on_received_unknown_method(
5888        &self,
5889        mut ordinal: u64,
5890        mut unknown_method_type: UnknownMethodType,
5891    ) -> Result<(), fidl::Error> {
5892        self.inner.send::<UnknownMethodInfo>(
5893            (ordinal, unknown_method_type),
5894            0,
5895            0x3c7f8d66a4f4c0e4,
5896            fidl::encoding::DynamicFlags::empty(),
5897        )
5898    }
5899
5900    pub fn send_on_received_closed_target_one_way_no_payload(&self) -> Result<(), fidl::Error> {
5901        self.inner.send::<fidl::encoding::EmptyPayload>(
5902            (),
5903            0,
5904            0x56915f3fcde32b6f,
5905            fidl::encoding::DynamicFlags::empty(),
5906        )
5907    }
5908
5909    pub fn send_on_received_open_target_strict_one_way(&self) -> Result<(), fidl::Error> {
5910        self.inner.send::<fidl::encoding::EmptyPayload>(
5911            (),
5912            0,
5913            0x5b82db8b0ffe97c5,
5914            fidl::encoding::DynamicFlags::empty(),
5915        )
5916    }
5917
5918    pub fn send_on_received_open_target_flexible_one_way(&self) -> Result<(), fidl::Error> {
5919        self.inner.send::<fidl::encoding::EmptyPayload>(
5920            (),
5921            0,
5922            0x2428c34ecface889,
5923            fidl::encoding::DynamicFlags::empty(),
5924        )
5925    }
5926}
5927
5928#[must_use = "FIDL methods require a response to be sent"]
5929#[derive(Debug)]
5930pub struct RunnerGetVersionResponder {
5931    control_handle: std::mem::ManuallyDrop<RunnerControlHandle>,
5932    tx_id: u32,
5933}
5934
5935/// Set the the channel to be shutdown (see [`RunnerControlHandle::shutdown`])
5936/// if the responder is dropped without sending a response, so that the client
5937/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5938impl std::ops::Drop for RunnerGetVersionResponder {
5939    fn drop(&mut self) {
5940        self.control_handle.shutdown();
5941        // Safety: drops once, never accessed again
5942        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5943    }
5944}
5945
5946impl fidl::endpoints::Responder for RunnerGetVersionResponder {
5947    type ControlHandle = RunnerControlHandle;
5948
5949    fn control_handle(&self) -> &RunnerControlHandle {
5950        &self.control_handle
5951    }
5952
5953    fn drop_without_shutdown(mut self) {
5954        // Safety: drops once, never accessed again due to mem::forget
5955        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5956        // Prevent Drop from running (which would shut down the channel)
5957        std::mem::forget(self);
5958    }
5959}
5960
5961impl RunnerGetVersionResponder {
5962    /// Sends a response to the FIDL transaction.
5963    ///
5964    /// Sets the channel to shutdown if an error occurs.
5965    pub fn send(self, mut version: u64) -> Result<(), fidl::Error> {
5966        let _result = self.send_raw(version);
5967        if _result.is_err() {
5968            self.control_handle.shutdown();
5969        }
5970        self.drop_without_shutdown();
5971        _result
5972    }
5973
5974    /// Similar to "send" but does not shutdown the channel if an error occurs.
5975    pub fn send_no_shutdown_on_err(self, mut version: u64) -> Result<(), fidl::Error> {
5976        let _result = self.send_raw(version);
5977        self.drop_without_shutdown();
5978        _result
5979    }
5980
5981    fn send_raw(&self, mut version: u64) -> Result<(), fidl::Error> {
5982        self.control_handle.inner.send::<RunnerGetVersionResponse>(
5983            (version,),
5984            self.tx_id,
5985            0x3c70bef2e59d06a7,
5986            fidl::encoding::DynamicFlags::empty(),
5987        )
5988    }
5989}
5990
5991#[must_use = "FIDL methods require a response to be sent"]
5992#[derive(Debug)]
5993pub struct RunnerCheckAliveResponder {
5994    control_handle: std::mem::ManuallyDrop<RunnerControlHandle>,
5995    tx_id: u32,
5996}
5997
5998/// Set the the channel to be shutdown (see [`RunnerControlHandle::shutdown`])
5999/// if the responder is dropped without sending a response, so that the client
6000/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
6001impl std::ops::Drop for RunnerCheckAliveResponder {
6002    fn drop(&mut self) {
6003        self.control_handle.shutdown();
6004        // Safety: drops once, never accessed again
6005        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6006    }
6007}
6008
6009impl fidl::endpoints::Responder for RunnerCheckAliveResponder {
6010    type ControlHandle = RunnerControlHandle;
6011
6012    fn control_handle(&self) -> &RunnerControlHandle {
6013        &self.control_handle
6014    }
6015
6016    fn drop_without_shutdown(mut self) {
6017        // Safety: drops once, never accessed again due to mem::forget
6018        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6019        // Prevent Drop from running (which would shut down the channel)
6020        std::mem::forget(self);
6021    }
6022}
6023
6024impl RunnerCheckAliveResponder {
6025    /// Sends a response to the FIDL transaction.
6026    ///
6027    /// Sets the channel to shutdown if an error occurs.
6028    pub fn send(self) -> Result<(), fidl::Error> {
6029        let _result = self.send_raw();
6030        if _result.is_err() {
6031            self.control_handle.shutdown();
6032        }
6033        self.drop_without_shutdown();
6034        _result
6035    }
6036
6037    /// Similar to "send" but does not shutdown the channel if an error occurs.
6038    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
6039        let _result = self.send_raw();
6040        self.drop_without_shutdown();
6041        _result
6042    }
6043
6044    fn send_raw(&self) -> Result<(), fidl::Error> {
6045        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
6046            (),
6047            self.tx_id,
6048            0x2449c31d30d6f5b7,
6049            fidl::encoding::DynamicFlags::empty(),
6050        )
6051    }
6052}
6053
6054#[must_use = "FIDL methods require a response to be sent"]
6055#[derive(Debug)]
6056pub struct RunnerStartResponder {
6057    control_handle: std::mem::ManuallyDrop<RunnerControlHandle>,
6058    tx_id: u32,
6059}
6060
6061/// Set the the channel to be shutdown (see [`RunnerControlHandle::shutdown`])
6062/// if the responder is dropped without sending a response, so that the client
6063/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
6064impl std::ops::Drop for RunnerStartResponder {
6065    fn drop(&mut self) {
6066        self.control_handle.shutdown();
6067        // Safety: drops once, never accessed again
6068        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6069    }
6070}
6071
6072impl fidl::endpoints::Responder for RunnerStartResponder {
6073    type ControlHandle = RunnerControlHandle;
6074
6075    fn control_handle(&self) -> &RunnerControlHandle {
6076        &self.control_handle
6077    }
6078
6079    fn drop_without_shutdown(mut self) {
6080        // Safety: drops once, never accessed again due to mem::forget
6081        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6082        // Prevent Drop from running (which would shut down the channel)
6083        std::mem::forget(self);
6084    }
6085}
6086
6087impl RunnerStartResponder {
6088    /// Sends a response to the FIDL transaction.
6089    ///
6090    /// Sets the channel to shutdown if an error occurs.
6091    pub fn send(self, mut result: Result<(), StartError>) -> Result<(), fidl::Error> {
6092        let _result = self.send_raw(result);
6093        if _result.is_err() {
6094            self.control_handle.shutdown();
6095        }
6096        self.drop_without_shutdown();
6097        _result
6098    }
6099
6100    /// Similar to "send" but does not shutdown the channel if an error occurs.
6101    pub fn send_no_shutdown_on_err(
6102        self,
6103        mut result: Result<(), StartError>,
6104    ) -> Result<(), fidl::Error> {
6105        let _result = self.send_raw(result);
6106        self.drop_without_shutdown();
6107        _result
6108    }
6109
6110    fn send_raw(&self, mut result: Result<(), StartError>) -> Result<(), fidl::Error> {
6111        self.control_handle
6112            .inner
6113            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, StartError>>(
6114                result,
6115                self.tx_id,
6116                0x2d4735726d30a5b0,
6117                fidl::encoding::DynamicFlags::empty(),
6118            )
6119    }
6120}
6121
6122#[must_use = "FIDL methods require a response to be sent"]
6123#[derive(Debug)]
6124pub struct RunnerShutdownWithEpitaphResponder {
6125    control_handle: std::mem::ManuallyDrop<RunnerControlHandle>,
6126    tx_id: u32,
6127}
6128
6129/// Set the the channel to be shutdown (see [`RunnerControlHandle::shutdown`])
6130/// if the responder is dropped without sending a response, so that the client
6131/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
6132impl std::ops::Drop for RunnerShutdownWithEpitaphResponder {
6133    fn drop(&mut self) {
6134        self.control_handle.shutdown();
6135        // Safety: drops once, never accessed again
6136        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6137    }
6138}
6139
6140impl fidl::endpoints::Responder for RunnerShutdownWithEpitaphResponder {
6141    type ControlHandle = RunnerControlHandle;
6142
6143    fn control_handle(&self) -> &RunnerControlHandle {
6144        &self.control_handle
6145    }
6146
6147    fn drop_without_shutdown(mut self) {
6148        // Safety: drops once, never accessed again due to mem::forget
6149        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6150        // Prevent Drop from running (which would shut down the channel)
6151        std::mem::forget(self);
6152    }
6153}
6154
6155impl RunnerShutdownWithEpitaphResponder {
6156    /// Sends a response to the FIDL transaction.
6157    ///
6158    /// Sets the channel to shutdown if an error occurs.
6159    pub fn send(self) -> Result<(), fidl::Error> {
6160        let _result = self.send_raw();
6161        if _result.is_err() {
6162            self.control_handle.shutdown();
6163        }
6164        self.drop_without_shutdown();
6165        _result
6166    }
6167
6168    /// Similar to "send" but does not shutdown the channel if an error occurs.
6169    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
6170        let _result = self.send_raw();
6171        self.drop_without_shutdown();
6172        _result
6173    }
6174
6175    fn send_raw(&self) -> Result<(), fidl::Error> {
6176        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
6177            (),
6178            self.tx_id,
6179            0x7a15369d88e1e8ec,
6180            fidl::encoding::DynamicFlags::empty(),
6181        )
6182    }
6183}
6184
6185#[must_use = "FIDL methods require a response to be sent"]
6186#[derive(Debug)]
6187pub struct RunnerSendOpenTargetStrictEventResponder {
6188    control_handle: std::mem::ManuallyDrop<RunnerControlHandle>,
6189    tx_id: u32,
6190}
6191
6192/// Set the the channel to be shutdown (see [`RunnerControlHandle::shutdown`])
6193/// if the responder is dropped without sending a response, so that the client
6194/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
6195impl std::ops::Drop for RunnerSendOpenTargetStrictEventResponder {
6196    fn drop(&mut self) {
6197        self.control_handle.shutdown();
6198        // Safety: drops once, never accessed again
6199        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6200    }
6201}
6202
6203impl fidl::endpoints::Responder for RunnerSendOpenTargetStrictEventResponder {
6204    type ControlHandle = RunnerControlHandle;
6205
6206    fn control_handle(&self) -> &RunnerControlHandle {
6207        &self.control_handle
6208    }
6209
6210    fn drop_without_shutdown(mut self) {
6211        // Safety: drops once, never accessed again due to mem::forget
6212        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6213        // Prevent Drop from running (which would shut down the channel)
6214        std::mem::forget(self);
6215    }
6216}
6217
6218impl RunnerSendOpenTargetStrictEventResponder {
6219    /// Sends a response to the FIDL transaction.
6220    ///
6221    /// Sets the channel to shutdown if an error occurs.
6222    pub fn send(self) -> Result<(), fidl::Error> {
6223        let _result = self.send_raw();
6224        if _result.is_err() {
6225            self.control_handle.shutdown();
6226        }
6227        self.drop_without_shutdown();
6228        _result
6229    }
6230
6231    /// Similar to "send" but does not shutdown the channel if an error occurs.
6232    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
6233        let _result = self.send_raw();
6234        self.drop_without_shutdown();
6235        _result
6236    }
6237
6238    fn send_raw(&self) -> Result<(), fidl::Error> {
6239        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
6240            (),
6241            self.tx_id,
6242            0x1c3e4452a20c9590,
6243            fidl::encoding::DynamicFlags::empty(),
6244        )
6245    }
6246}
6247
6248#[must_use = "FIDL methods require a response to be sent"]
6249#[derive(Debug)]
6250pub struct RunnerSendOpenTargetFlexibleEventResponder {
6251    control_handle: std::mem::ManuallyDrop<RunnerControlHandle>,
6252    tx_id: u32,
6253}
6254
6255/// Set the the channel to be shutdown (see [`RunnerControlHandle::shutdown`])
6256/// if the responder is dropped without sending a response, so that the client
6257/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
6258impl std::ops::Drop for RunnerSendOpenTargetFlexibleEventResponder {
6259    fn drop(&mut self) {
6260        self.control_handle.shutdown();
6261        // Safety: drops once, never accessed again
6262        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6263    }
6264}
6265
6266impl fidl::endpoints::Responder for RunnerSendOpenTargetFlexibleEventResponder {
6267    type ControlHandle = RunnerControlHandle;
6268
6269    fn control_handle(&self) -> &RunnerControlHandle {
6270        &self.control_handle
6271    }
6272
6273    fn drop_without_shutdown(mut self) {
6274        // Safety: drops once, never accessed again due to mem::forget
6275        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6276        // Prevent Drop from running (which would shut down the channel)
6277        std::mem::forget(self);
6278    }
6279}
6280
6281impl RunnerSendOpenTargetFlexibleEventResponder {
6282    /// Sends a response to the FIDL transaction.
6283    ///
6284    /// Sets the channel to shutdown if an error occurs.
6285    pub fn send(self) -> Result<(), fidl::Error> {
6286        let _result = self.send_raw();
6287        if _result.is_err() {
6288            self.control_handle.shutdown();
6289        }
6290        self.drop_without_shutdown();
6291        _result
6292    }
6293
6294    /// Similar to "send" but does not shutdown the channel if an error occurs.
6295    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
6296        let _result = self.send_raw();
6297        self.drop_without_shutdown();
6298        _result
6299    }
6300
6301    fn send_raw(&self) -> Result<(), fidl::Error> {
6302        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
6303            (),
6304            self.tx_id,
6305            0x2d2c9446799baeb6,
6306            fidl::encoding::DynamicFlags::empty(),
6307        )
6308    }
6309}
6310
6311mod internal {
6312    use super::*;
6313    unsafe impl fidl::encoding::TypeMarker for TeardownReason {
6314        type Owned = Self;
6315
6316        #[inline(always)]
6317        fn inline_align(_context: fidl::encoding::Context) -> usize {
6318            4
6319        }
6320
6321        #[inline(always)]
6322        fn inline_size(_context: fidl::encoding::Context) -> usize {
6323            4
6324        }
6325    }
6326
6327    impl fidl::encoding::ValueTypeMarker for TeardownReason {
6328        type Borrowed<'a> = Self;
6329        #[inline(always)]
6330        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6331            *value
6332        }
6333    }
6334
6335    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for TeardownReason {
6336        #[inline]
6337        unsafe fn encode(
6338            self,
6339            encoder: &mut fidl::encoding::Encoder<'_, D>,
6340            offset: usize,
6341            _depth: fidl::encoding::Depth,
6342        ) -> fidl::Result<()> {
6343            encoder.debug_check_bounds::<Self>(offset);
6344            if self.bits() & Self::all().bits() != self.bits() {
6345                return Err(fidl::Error::InvalidBitsValue);
6346            }
6347            encoder.write_num(self.bits(), offset);
6348            Ok(())
6349        }
6350    }
6351
6352    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TeardownReason {
6353        #[inline(always)]
6354        fn new_empty() -> Self {
6355            Self::empty()
6356        }
6357
6358        #[inline]
6359        unsafe fn decode(
6360            &mut self,
6361            decoder: &mut fidl::encoding::Decoder<'_, D>,
6362            offset: usize,
6363            _depth: fidl::encoding::Depth,
6364        ) -> fidl::Result<()> {
6365            decoder.debug_check_bounds::<Self>(offset);
6366            let prim = decoder.read_num::<u32>(offset);
6367            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
6368            Ok(())
6369        }
6370    }
6371    unsafe impl fidl::encoding::TypeMarker for StartError {
6372        type Owned = Self;
6373
6374        #[inline(always)]
6375        fn inline_align(_context: fidl::encoding::Context) -> usize {
6376            std::mem::align_of::<u32>()
6377        }
6378
6379        #[inline(always)]
6380        fn inline_size(_context: fidl::encoding::Context) -> usize {
6381            std::mem::size_of::<u32>()
6382        }
6383
6384        #[inline(always)]
6385        fn encode_is_copy() -> bool {
6386            true
6387        }
6388
6389        #[inline(always)]
6390        fn decode_is_copy() -> bool {
6391            false
6392        }
6393    }
6394
6395    impl fidl::encoding::ValueTypeMarker for StartError {
6396        type Borrowed<'a> = Self;
6397        #[inline(always)]
6398        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6399            *value
6400        }
6401    }
6402
6403    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for StartError {
6404        #[inline]
6405        unsafe fn encode(
6406            self,
6407            encoder: &mut fidl::encoding::Encoder<'_, D>,
6408            offset: usize,
6409            _depth: fidl::encoding::Depth,
6410        ) -> fidl::Result<()> {
6411            encoder.debug_check_bounds::<Self>(offset);
6412            encoder.write_num(self.into_primitive(), offset);
6413            Ok(())
6414        }
6415    }
6416
6417    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StartError {
6418        #[inline(always)]
6419        fn new_empty() -> Self {
6420            Self::TestDisabled
6421        }
6422
6423        #[inline]
6424        unsafe fn decode(
6425            &mut self,
6426            decoder: &mut fidl::encoding::Decoder<'_, D>,
6427            offset: usize,
6428            _depth: fidl::encoding::Depth,
6429        ) -> fidl::Result<()> {
6430            decoder.debug_check_bounds::<Self>(offset);
6431            let prim = decoder.read_num::<u32>(offset);
6432
6433            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6434            Ok(())
6435        }
6436    }
6437    unsafe impl fidl::encoding::TypeMarker for Test {
6438        type Owned = Self;
6439
6440        #[inline(always)]
6441        fn inline_align(_context: fidl::encoding::Context) -> usize {
6442            std::mem::align_of::<u32>()
6443        }
6444
6445        #[inline(always)]
6446        fn inline_size(_context: fidl::encoding::Context) -> usize {
6447            std::mem::size_of::<u32>()
6448        }
6449
6450        #[inline(always)]
6451        fn encode_is_copy() -> bool {
6452            false
6453        }
6454
6455        #[inline(always)]
6456        fn decode_is_copy() -> bool {
6457            false
6458        }
6459    }
6460
6461    impl fidl::encoding::ValueTypeMarker for Test {
6462        type Borrowed<'a> = Self;
6463        #[inline(always)]
6464        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6465            *value
6466        }
6467    }
6468
6469    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for Test {
6470        #[inline]
6471        unsafe fn encode(
6472            self,
6473            encoder: &mut fidl::encoding::Encoder<'_, D>,
6474            offset: usize,
6475            _depth: fidl::encoding::Depth,
6476        ) -> fidl::Result<()> {
6477            encoder.debug_check_bounds::<Self>(offset);
6478            encoder.write_num(self.into_primitive(), offset);
6479            Ok(())
6480        }
6481    }
6482
6483    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Test {
6484        #[inline(always)]
6485        fn new_empty() -> Self {
6486            Self::unknown()
6487        }
6488
6489        #[inline]
6490        unsafe fn decode(
6491            &mut self,
6492            decoder: &mut fidl::encoding::Decoder<'_, D>,
6493            offset: usize,
6494            _depth: fidl::encoding::Depth,
6495        ) -> fidl::Result<()> {
6496            decoder.debug_check_bounds::<Self>(offset);
6497            let prim = decoder.read_num::<u32>(offset);
6498
6499            *self = Self::from_primitive_allow_unknown(prim);
6500            Ok(())
6501        }
6502    }
6503    unsafe impl fidl::encoding::TypeMarker for UnknownMethodType {
6504        type Owned = Self;
6505
6506        #[inline(always)]
6507        fn inline_align(_context: fidl::encoding::Context) -> usize {
6508            std::mem::align_of::<u32>()
6509        }
6510
6511        #[inline(always)]
6512        fn inline_size(_context: fidl::encoding::Context) -> usize {
6513            std::mem::size_of::<u32>()
6514        }
6515
6516        #[inline(always)]
6517        fn encode_is_copy() -> bool {
6518            true
6519        }
6520
6521        #[inline(always)]
6522        fn decode_is_copy() -> bool {
6523            false
6524        }
6525    }
6526
6527    impl fidl::encoding::ValueTypeMarker for UnknownMethodType {
6528        type Borrowed<'a> = Self;
6529        #[inline(always)]
6530        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6531            *value
6532        }
6533    }
6534
6535    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6536        for UnknownMethodType
6537    {
6538        #[inline]
6539        unsafe fn encode(
6540            self,
6541            encoder: &mut fidl::encoding::Encoder<'_, D>,
6542            offset: usize,
6543            _depth: fidl::encoding::Depth,
6544        ) -> fidl::Result<()> {
6545            encoder.debug_check_bounds::<Self>(offset);
6546            encoder.write_num(self.into_primitive(), offset);
6547            Ok(())
6548        }
6549    }
6550
6551    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnknownMethodType {
6552        #[inline(always)]
6553        fn new_empty() -> Self {
6554            Self::OneWay
6555        }
6556
6557        #[inline]
6558        unsafe fn decode(
6559            &mut self,
6560            decoder: &mut fidl::encoding::Decoder<'_, D>,
6561            offset: usize,
6562            _depth: fidl::encoding::Depth,
6563        ) -> fidl::Result<()> {
6564            decoder.debug_check_bounds::<Self>(offset);
6565            let prim = decoder.read_num::<u32>(offset);
6566
6567            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6568            Ok(())
6569        }
6570    }
6571
6572    impl fidl::encoding::ValueTypeMarker for ClosedTargetByteVectorSizeRequest {
6573        type Borrowed<'a> = &'a Self;
6574        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6575            value
6576        }
6577    }
6578
6579    unsafe impl fidl::encoding::TypeMarker for ClosedTargetByteVectorSizeRequest {
6580        type Owned = Self;
6581
6582        #[inline(always)]
6583        fn inline_align(_context: fidl::encoding::Context) -> usize {
6584            8
6585        }
6586
6587        #[inline(always)]
6588        fn inline_size(_context: fidl::encoding::Context) -> usize {
6589            16
6590        }
6591    }
6592
6593    unsafe impl<D: fidl::encoding::ResourceDialect>
6594        fidl::encoding::Encode<ClosedTargetByteVectorSizeRequest, D>
6595        for &ClosedTargetByteVectorSizeRequest
6596    {
6597        #[inline]
6598        unsafe fn encode(
6599            self,
6600            encoder: &mut fidl::encoding::Encoder<'_, D>,
6601            offset: usize,
6602            _depth: fidl::encoding::Depth,
6603        ) -> fidl::Result<()> {
6604            encoder.debug_check_bounds::<ClosedTargetByteVectorSizeRequest>(offset);
6605            // Delegate to tuple encoding.
6606            fidl::encoding::Encode::<ClosedTargetByteVectorSizeRequest, D>::encode(
6607                (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
6608                    &self.vec,
6609                ),),
6610                encoder,
6611                offset,
6612                _depth,
6613            )
6614        }
6615    }
6616    unsafe impl<
6617            D: fidl::encoding::ResourceDialect,
6618            T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
6619        > fidl::encoding::Encode<ClosedTargetByteVectorSizeRequest, D> for (T0,)
6620    {
6621        #[inline]
6622        unsafe fn encode(
6623            self,
6624            encoder: &mut fidl::encoding::Encoder<'_, D>,
6625            offset: usize,
6626            depth: fidl::encoding::Depth,
6627        ) -> fidl::Result<()> {
6628            encoder.debug_check_bounds::<ClosedTargetByteVectorSizeRequest>(offset);
6629            // Zero out padding regions. There's no need to apply masks
6630            // because the unmasked parts will be overwritten by fields.
6631            // Write the fields.
6632            self.0.encode(encoder, offset + 0, depth)?;
6633            Ok(())
6634        }
6635    }
6636
6637    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6638        for ClosedTargetByteVectorSizeRequest
6639    {
6640        #[inline(always)]
6641        fn new_empty() -> Self {
6642            Self { vec: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
6643        }
6644
6645        #[inline]
6646        unsafe fn decode(
6647            &mut self,
6648            decoder: &mut fidl::encoding::Decoder<'_, D>,
6649            offset: usize,
6650            _depth: fidl::encoding::Depth,
6651        ) -> fidl::Result<()> {
6652            decoder.debug_check_bounds::<Self>(offset);
6653            // Verify that padding bytes are zero.
6654            fidl::decode!(
6655                fidl::encoding::UnboundedVector<u8>,
6656                D,
6657                &mut self.vec,
6658                decoder,
6659                offset + 0,
6660                _depth
6661            )?;
6662            Ok(())
6663        }
6664    }
6665
6666    impl fidl::encoding::ValueTypeMarker for ClosedTargetByteVectorSizeResponse {
6667        type Borrowed<'a> = &'a Self;
6668        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6669            value
6670        }
6671    }
6672
6673    unsafe impl fidl::encoding::TypeMarker for ClosedTargetByteVectorSizeResponse {
6674        type Owned = Self;
6675
6676        #[inline(always)]
6677        fn inline_align(_context: fidl::encoding::Context) -> usize {
6678            4
6679        }
6680
6681        #[inline(always)]
6682        fn inline_size(_context: fidl::encoding::Context) -> usize {
6683            4
6684        }
6685        #[inline(always)]
6686        fn encode_is_copy() -> bool {
6687            true
6688        }
6689
6690        #[inline(always)]
6691        fn decode_is_copy() -> bool {
6692            true
6693        }
6694    }
6695
6696    unsafe impl<D: fidl::encoding::ResourceDialect>
6697        fidl::encoding::Encode<ClosedTargetByteVectorSizeResponse, D>
6698        for &ClosedTargetByteVectorSizeResponse
6699    {
6700        #[inline]
6701        unsafe fn encode(
6702            self,
6703            encoder: &mut fidl::encoding::Encoder<'_, D>,
6704            offset: usize,
6705            _depth: fidl::encoding::Depth,
6706        ) -> fidl::Result<()> {
6707            encoder.debug_check_bounds::<ClosedTargetByteVectorSizeResponse>(offset);
6708            unsafe {
6709                // Copy the object into the buffer.
6710                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6711                (buf_ptr as *mut ClosedTargetByteVectorSizeResponse)
6712                    .write_unaligned((self as *const ClosedTargetByteVectorSizeResponse).read());
6713                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6714                // done second because the memcpy will write garbage to these bytes.
6715            }
6716            Ok(())
6717        }
6718    }
6719    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
6720        fidl::encoding::Encode<ClosedTargetByteVectorSizeResponse, D> for (T0,)
6721    {
6722        #[inline]
6723        unsafe fn encode(
6724            self,
6725            encoder: &mut fidl::encoding::Encoder<'_, D>,
6726            offset: usize,
6727            depth: fidl::encoding::Depth,
6728        ) -> fidl::Result<()> {
6729            encoder.debug_check_bounds::<ClosedTargetByteVectorSizeResponse>(offset);
6730            // Zero out padding regions. There's no need to apply masks
6731            // because the unmasked parts will be overwritten by fields.
6732            // Write the fields.
6733            self.0.encode(encoder, offset + 0, depth)?;
6734            Ok(())
6735        }
6736    }
6737
6738    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6739        for ClosedTargetByteVectorSizeResponse
6740    {
6741        #[inline(always)]
6742        fn new_empty() -> Self {
6743            Self { n: fidl::new_empty!(u32, D) }
6744        }
6745
6746        #[inline]
6747        unsafe fn decode(
6748            &mut self,
6749            decoder: &mut fidl::encoding::Decoder<'_, D>,
6750            offset: usize,
6751            _depth: fidl::encoding::Depth,
6752        ) -> fidl::Result<()> {
6753            decoder.debug_check_bounds::<Self>(offset);
6754            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6755            // Verify that padding bytes are zero.
6756            // Copy from the buffer into the object.
6757            unsafe {
6758                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
6759            }
6760            Ok(())
6761        }
6762    }
6763
6764    impl fidl::encoding::ValueTypeMarker for ClosedTargetCreateNByteVectorRequest {
6765        type Borrowed<'a> = &'a Self;
6766        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6767            value
6768        }
6769    }
6770
6771    unsafe impl fidl::encoding::TypeMarker for ClosedTargetCreateNByteVectorRequest {
6772        type Owned = Self;
6773
6774        #[inline(always)]
6775        fn inline_align(_context: fidl::encoding::Context) -> usize {
6776            4
6777        }
6778
6779        #[inline(always)]
6780        fn inline_size(_context: fidl::encoding::Context) -> usize {
6781            4
6782        }
6783        #[inline(always)]
6784        fn encode_is_copy() -> bool {
6785            true
6786        }
6787
6788        #[inline(always)]
6789        fn decode_is_copy() -> bool {
6790            true
6791        }
6792    }
6793
6794    unsafe impl<D: fidl::encoding::ResourceDialect>
6795        fidl::encoding::Encode<ClosedTargetCreateNByteVectorRequest, D>
6796        for &ClosedTargetCreateNByteVectorRequest
6797    {
6798        #[inline]
6799        unsafe fn encode(
6800            self,
6801            encoder: &mut fidl::encoding::Encoder<'_, D>,
6802            offset: usize,
6803            _depth: fidl::encoding::Depth,
6804        ) -> fidl::Result<()> {
6805            encoder.debug_check_bounds::<ClosedTargetCreateNByteVectorRequest>(offset);
6806            unsafe {
6807                // Copy the object into the buffer.
6808                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6809                (buf_ptr as *mut ClosedTargetCreateNByteVectorRequest)
6810                    .write_unaligned((self as *const ClosedTargetCreateNByteVectorRequest).read());
6811                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6812                // done second because the memcpy will write garbage to these bytes.
6813            }
6814            Ok(())
6815        }
6816    }
6817    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
6818        fidl::encoding::Encode<ClosedTargetCreateNByteVectorRequest, D> for (T0,)
6819    {
6820        #[inline]
6821        unsafe fn encode(
6822            self,
6823            encoder: &mut fidl::encoding::Encoder<'_, D>,
6824            offset: usize,
6825            depth: fidl::encoding::Depth,
6826        ) -> fidl::Result<()> {
6827            encoder.debug_check_bounds::<ClosedTargetCreateNByteVectorRequest>(offset);
6828            // Zero out padding regions. There's no need to apply masks
6829            // because the unmasked parts will be overwritten by fields.
6830            // Write the fields.
6831            self.0.encode(encoder, offset + 0, depth)?;
6832            Ok(())
6833        }
6834    }
6835
6836    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6837        for ClosedTargetCreateNByteVectorRequest
6838    {
6839        #[inline(always)]
6840        fn new_empty() -> Self {
6841            Self { n: fidl::new_empty!(u32, D) }
6842        }
6843
6844        #[inline]
6845        unsafe fn decode(
6846            &mut self,
6847            decoder: &mut fidl::encoding::Decoder<'_, D>,
6848            offset: usize,
6849            _depth: fidl::encoding::Depth,
6850        ) -> fidl::Result<()> {
6851            decoder.debug_check_bounds::<Self>(offset);
6852            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6853            // Verify that padding bytes are zero.
6854            // Copy from the buffer into the object.
6855            unsafe {
6856                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
6857            }
6858            Ok(())
6859        }
6860    }
6861
6862    impl fidl::encoding::ValueTypeMarker for ClosedTargetCreateNByteVectorResponse {
6863        type Borrowed<'a> = &'a Self;
6864        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6865            value
6866        }
6867    }
6868
6869    unsafe impl fidl::encoding::TypeMarker for ClosedTargetCreateNByteVectorResponse {
6870        type Owned = Self;
6871
6872        #[inline(always)]
6873        fn inline_align(_context: fidl::encoding::Context) -> usize {
6874            8
6875        }
6876
6877        #[inline(always)]
6878        fn inline_size(_context: fidl::encoding::Context) -> usize {
6879            16
6880        }
6881    }
6882
6883    unsafe impl<D: fidl::encoding::ResourceDialect>
6884        fidl::encoding::Encode<ClosedTargetCreateNByteVectorResponse, D>
6885        for &ClosedTargetCreateNByteVectorResponse
6886    {
6887        #[inline]
6888        unsafe fn encode(
6889            self,
6890            encoder: &mut fidl::encoding::Encoder<'_, D>,
6891            offset: usize,
6892            _depth: fidl::encoding::Depth,
6893        ) -> fidl::Result<()> {
6894            encoder.debug_check_bounds::<ClosedTargetCreateNByteVectorResponse>(offset);
6895            // Delegate to tuple encoding.
6896            fidl::encoding::Encode::<ClosedTargetCreateNByteVectorResponse, D>::encode(
6897                (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
6898                    &self.vec,
6899                ),),
6900                encoder,
6901                offset,
6902                _depth,
6903            )
6904        }
6905    }
6906    unsafe impl<
6907            D: fidl::encoding::ResourceDialect,
6908            T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
6909        > fidl::encoding::Encode<ClosedTargetCreateNByteVectorResponse, D> for (T0,)
6910    {
6911        #[inline]
6912        unsafe fn encode(
6913            self,
6914            encoder: &mut fidl::encoding::Encoder<'_, D>,
6915            offset: usize,
6916            depth: fidl::encoding::Depth,
6917        ) -> fidl::Result<()> {
6918            encoder.debug_check_bounds::<ClosedTargetCreateNByteVectorResponse>(offset);
6919            // Zero out padding regions. There's no need to apply masks
6920            // because the unmasked parts will be overwritten by fields.
6921            // Write the fields.
6922            self.0.encode(encoder, offset + 0, depth)?;
6923            Ok(())
6924        }
6925    }
6926
6927    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6928        for ClosedTargetCreateNByteVectorResponse
6929    {
6930        #[inline(always)]
6931        fn new_empty() -> Self {
6932            Self { vec: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
6933        }
6934
6935        #[inline]
6936        unsafe fn decode(
6937            &mut self,
6938            decoder: &mut fidl::encoding::Decoder<'_, D>,
6939            offset: usize,
6940            _depth: fidl::encoding::Depth,
6941        ) -> fidl::Result<()> {
6942            decoder.debug_check_bounds::<Self>(offset);
6943            // Verify that padding bytes are zero.
6944            fidl::decode!(
6945                fidl::encoding::UnboundedVector<u8>,
6946                D,
6947                &mut self.vec,
6948                decoder,
6949                offset + 0,
6950                _depth
6951            )?;
6952            Ok(())
6953        }
6954    }
6955
6956    impl fidl::encoding::ResourceTypeMarker for ClosedTargetCreateNHandleVectorRequest {
6957        type Borrowed<'a> = &'a mut Self;
6958        fn take_or_borrow<'a>(
6959            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6960        ) -> Self::Borrowed<'a> {
6961            value
6962        }
6963    }
6964
6965    unsafe impl fidl::encoding::TypeMarker for ClosedTargetCreateNHandleVectorRequest {
6966        type Owned = Self;
6967
6968        #[inline(always)]
6969        fn inline_align(_context: fidl::encoding::Context) -> usize {
6970            4
6971        }
6972
6973        #[inline(always)]
6974        fn inline_size(_context: fidl::encoding::Context) -> usize {
6975            4
6976        }
6977        #[inline(always)]
6978        fn encode_is_copy() -> bool {
6979            true
6980        }
6981
6982        #[inline(always)]
6983        fn decode_is_copy() -> bool {
6984            true
6985        }
6986    }
6987
6988    unsafe impl
6989        fidl::encoding::Encode<
6990            ClosedTargetCreateNHandleVectorRequest,
6991            fidl::encoding::DefaultFuchsiaResourceDialect,
6992        > for &mut ClosedTargetCreateNHandleVectorRequest
6993    {
6994        #[inline]
6995        unsafe fn encode(
6996            self,
6997            encoder: &mut fidl::encoding::Encoder<
6998                '_,
6999                fidl::encoding::DefaultFuchsiaResourceDialect,
7000            >,
7001            offset: usize,
7002            _depth: fidl::encoding::Depth,
7003        ) -> fidl::Result<()> {
7004            encoder.debug_check_bounds::<ClosedTargetCreateNHandleVectorRequest>(offset);
7005            unsafe {
7006                // Copy the object into the buffer.
7007                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7008                (buf_ptr as *mut ClosedTargetCreateNHandleVectorRequest).write_unaligned(
7009                    (self as *const ClosedTargetCreateNHandleVectorRequest).read(),
7010                );
7011                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
7012                // done second because the memcpy will write garbage to these bytes.
7013            }
7014            Ok(())
7015        }
7016    }
7017    unsafe impl<T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>>
7018        fidl::encoding::Encode<
7019            ClosedTargetCreateNHandleVectorRequest,
7020            fidl::encoding::DefaultFuchsiaResourceDialect,
7021        > for (T0,)
7022    {
7023        #[inline]
7024        unsafe fn encode(
7025            self,
7026            encoder: &mut fidl::encoding::Encoder<
7027                '_,
7028                fidl::encoding::DefaultFuchsiaResourceDialect,
7029            >,
7030            offset: usize,
7031            depth: fidl::encoding::Depth,
7032        ) -> fidl::Result<()> {
7033            encoder.debug_check_bounds::<ClosedTargetCreateNHandleVectorRequest>(offset);
7034            // Zero out padding regions. There's no need to apply masks
7035            // because the unmasked parts will be overwritten by fields.
7036            // Write the fields.
7037            self.0.encode(encoder, offset + 0, depth)?;
7038            Ok(())
7039        }
7040    }
7041
7042    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7043        for ClosedTargetCreateNHandleVectorRequest
7044    {
7045        #[inline(always)]
7046        fn new_empty() -> Self {
7047            Self { n: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect) }
7048        }
7049
7050        #[inline]
7051        unsafe fn decode(
7052            &mut self,
7053            decoder: &mut fidl::encoding::Decoder<
7054                '_,
7055                fidl::encoding::DefaultFuchsiaResourceDialect,
7056            >,
7057            offset: usize,
7058            _depth: fidl::encoding::Depth,
7059        ) -> fidl::Result<()> {
7060            decoder.debug_check_bounds::<Self>(offset);
7061            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7062            // Verify that padding bytes are zero.
7063            // Copy from the buffer into the object.
7064            unsafe {
7065                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
7066            }
7067            Ok(())
7068        }
7069    }
7070
7071    impl fidl::encoding::ResourceTypeMarker for ClosedTargetCreateNHandleVectorResponse {
7072        type Borrowed<'a> = &'a mut Self;
7073        fn take_or_borrow<'a>(
7074            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7075        ) -> Self::Borrowed<'a> {
7076            value
7077        }
7078    }
7079
7080    unsafe impl fidl::encoding::TypeMarker for ClosedTargetCreateNHandleVectorResponse {
7081        type Owned = Self;
7082
7083        #[inline(always)]
7084        fn inline_align(_context: fidl::encoding::Context) -> usize {
7085            8
7086        }
7087
7088        #[inline(always)]
7089        fn inline_size(_context: fidl::encoding::Context) -> usize {
7090            16
7091        }
7092    }
7093
7094    unsafe impl
7095        fidl::encoding::Encode<
7096            ClosedTargetCreateNHandleVectorResponse,
7097            fidl::encoding::DefaultFuchsiaResourceDialect,
7098        > for &mut ClosedTargetCreateNHandleVectorResponse
7099    {
7100        #[inline]
7101        unsafe fn encode(
7102            self,
7103            encoder: &mut fidl::encoding::Encoder<
7104                '_,
7105                fidl::encoding::DefaultFuchsiaResourceDialect,
7106            >,
7107            offset: usize,
7108            _depth: fidl::encoding::Depth,
7109        ) -> fidl::Result<()> {
7110            encoder.debug_check_bounds::<ClosedTargetCreateNHandleVectorResponse>(offset);
7111            // Delegate to tuple encoding.
7112            fidl::encoding::Encode::<
7113                ClosedTargetCreateNHandleVectorResponse,
7114                fidl::encoding::DefaultFuchsiaResourceDialect,
7115            >::encode(
7116                (<fidl::encoding::UnboundedVector<
7117                    fidl::encoding::HandleType<
7118                        fidl::Event,
7119                        { fidl::ObjectType::EVENT.into_raw() },
7120                        2147483648,
7121                    >,
7122                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7123                    &mut self.vec
7124                ),),
7125                encoder,
7126                offset,
7127                _depth,
7128            )
7129        }
7130    }
7131    unsafe impl<
7132            T0: fidl::encoding::Encode<
7133                fidl::encoding::UnboundedVector<
7134                    fidl::encoding::HandleType<
7135                        fidl::Event,
7136                        { fidl::ObjectType::EVENT.into_raw() },
7137                        2147483648,
7138                    >,
7139                >,
7140                fidl::encoding::DefaultFuchsiaResourceDialect,
7141            >,
7142        >
7143        fidl::encoding::Encode<
7144            ClosedTargetCreateNHandleVectorResponse,
7145            fidl::encoding::DefaultFuchsiaResourceDialect,
7146        > for (T0,)
7147    {
7148        #[inline]
7149        unsafe fn encode(
7150            self,
7151            encoder: &mut fidl::encoding::Encoder<
7152                '_,
7153                fidl::encoding::DefaultFuchsiaResourceDialect,
7154            >,
7155            offset: usize,
7156            depth: fidl::encoding::Depth,
7157        ) -> fidl::Result<()> {
7158            encoder.debug_check_bounds::<ClosedTargetCreateNHandleVectorResponse>(offset);
7159            // Zero out padding regions. There's no need to apply masks
7160            // because the unmasked parts will be overwritten by fields.
7161            // Write the fields.
7162            self.0.encode(encoder, offset + 0, depth)?;
7163            Ok(())
7164        }
7165    }
7166
7167    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7168        for ClosedTargetCreateNHandleVectorResponse
7169    {
7170        #[inline(always)]
7171        fn new_empty() -> Self {
7172            Self {
7173                vec: fidl::new_empty!(
7174                    fidl::encoding::UnboundedVector<
7175                        fidl::encoding::HandleType<
7176                            fidl::Event,
7177                            { fidl::ObjectType::EVENT.into_raw() },
7178                            2147483648,
7179                        >,
7180                    >,
7181                    fidl::encoding::DefaultFuchsiaResourceDialect
7182                ),
7183            }
7184        }
7185
7186        #[inline]
7187        unsafe fn decode(
7188            &mut self,
7189            decoder: &mut fidl::encoding::Decoder<
7190                '_,
7191                fidl::encoding::DefaultFuchsiaResourceDialect,
7192            >,
7193            offset: usize,
7194            _depth: fidl::encoding::Depth,
7195        ) -> fidl::Result<()> {
7196            decoder.debug_check_bounds::<Self>(offset);
7197            // Verify that padding bytes are zero.
7198            fidl::decode!(
7199                fidl::encoding::UnboundedVector<
7200                    fidl::encoding::HandleType<
7201                        fidl::Event,
7202                        { fidl::ObjectType::EVENT.into_raw() },
7203                        2147483648,
7204                    >,
7205                >,
7206                fidl::encoding::DefaultFuchsiaResourceDialect,
7207                &mut self.vec,
7208                decoder,
7209                offset + 0,
7210                _depth
7211            )?;
7212            Ok(())
7213        }
7214    }
7215
7216    impl fidl::encoding::ResourceTypeMarker for ClosedTargetEchoAsTransferableSignalableEventRequest {
7217        type Borrowed<'a> = &'a mut Self;
7218        fn take_or_borrow<'a>(
7219            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7220        ) -> Self::Borrowed<'a> {
7221            value
7222        }
7223    }
7224
7225    unsafe impl fidl::encoding::TypeMarker for ClosedTargetEchoAsTransferableSignalableEventRequest {
7226        type Owned = Self;
7227
7228        #[inline(always)]
7229        fn inline_align(_context: fidl::encoding::Context) -> usize {
7230            4
7231        }
7232
7233        #[inline(always)]
7234        fn inline_size(_context: fidl::encoding::Context) -> usize {
7235            4
7236        }
7237    }
7238
7239    unsafe impl
7240        fidl::encoding::Encode<
7241            ClosedTargetEchoAsTransferableSignalableEventRequest,
7242            fidl::encoding::DefaultFuchsiaResourceDialect,
7243        > for &mut ClosedTargetEchoAsTransferableSignalableEventRequest
7244    {
7245        #[inline]
7246        unsafe fn encode(
7247            self,
7248            encoder: &mut fidl::encoding::Encoder<
7249                '_,
7250                fidl::encoding::DefaultFuchsiaResourceDialect,
7251            >,
7252            offset: usize,
7253            _depth: fidl::encoding::Depth,
7254        ) -> fidl::Result<()> {
7255            encoder
7256                .debug_check_bounds::<ClosedTargetEchoAsTransferableSignalableEventRequest>(offset);
7257            // Delegate to tuple encoding.
7258            fidl::encoding::Encode::<
7259                ClosedTargetEchoAsTransferableSignalableEventRequest,
7260                fidl::encoding::DefaultFuchsiaResourceDialect,
7261            >::encode(
7262                (<fidl::encoding::HandleType<
7263                    fidl::Handle,
7264                    { fidl::ObjectType::NONE.into_raw() },
7265                    2147483648,
7266                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7267                    &mut self.handle
7268                ),),
7269                encoder,
7270                offset,
7271                _depth,
7272            )
7273        }
7274    }
7275    unsafe impl<
7276            T0: fidl::encoding::Encode<
7277                fidl::encoding::HandleType<
7278                    fidl::Handle,
7279                    { fidl::ObjectType::NONE.into_raw() },
7280                    2147483648,
7281                >,
7282                fidl::encoding::DefaultFuchsiaResourceDialect,
7283            >,
7284        >
7285        fidl::encoding::Encode<
7286            ClosedTargetEchoAsTransferableSignalableEventRequest,
7287            fidl::encoding::DefaultFuchsiaResourceDialect,
7288        > for (T0,)
7289    {
7290        #[inline]
7291        unsafe fn encode(
7292            self,
7293            encoder: &mut fidl::encoding::Encoder<
7294                '_,
7295                fidl::encoding::DefaultFuchsiaResourceDialect,
7296            >,
7297            offset: usize,
7298            depth: fidl::encoding::Depth,
7299        ) -> fidl::Result<()> {
7300            encoder
7301                .debug_check_bounds::<ClosedTargetEchoAsTransferableSignalableEventRequest>(offset);
7302            // Zero out padding regions. There's no need to apply masks
7303            // because the unmasked parts will be overwritten by fields.
7304            // Write the fields.
7305            self.0.encode(encoder, offset + 0, depth)?;
7306            Ok(())
7307        }
7308    }
7309
7310    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7311        for ClosedTargetEchoAsTransferableSignalableEventRequest
7312    {
7313        #[inline(always)]
7314        fn new_empty() -> Self {
7315            Self {
7316                handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7317            }
7318        }
7319
7320        #[inline]
7321        unsafe fn decode(
7322            &mut self,
7323            decoder: &mut fidl::encoding::Decoder<
7324                '_,
7325                fidl::encoding::DefaultFuchsiaResourceDialect,
7326            >,
7327            offset: usize,
7328            _depth: fidl::encoding::Depth,
7329        ) -> fidl::Result<()> {
7330            decoder.debug_check_bounds::<Self>(offset);
7331            // Verify that padding bytes are zero.
7332            fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle, decoder, offset + 0, _depth)?;
7333            Ok(())
7334        }
7335    }
7336
7337    impl fidl::encoding::ResourceTypeMarker for ClosedTargetEchoAsTransferableSignalableEventResponse {
7338        type Borrowed<'a> = &'a mut Self;
7339        fn take_or_borrow<'a>(
7340            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7341        ) -> Self::Borrowed<'a> {
7342            value
7343        }
7344    }
7345
7346    unsafe impl fidl::encoding::TypeMarker for ClosedTargetEchoAsTransferableSignalableEventResponse {
7347        type Owned = Self;
7348
7349        #[inline(always)]
7350        fn inline_align(_context: fidl::encoding::Context) -> usize {
7351            4
7352        }
7353
7354        #[inline(always)]
7355        fn inline_size(_context: fidl::encoding::Context) -> usize {
7356            4
7357        }
7358    }
7359
7360    unsafe impl
7361        fidl::encoding::Encode<
7362            ClosedTargetEchoAsTransferableSignalableEventResponse,
7363            fidl::encoding::DefaultFuchsiaResourceDialect,
7364        > for &mut ClosedTargetEchoAsTransferableSignalableEventResponse
7365    {
7366        #[inline]
7367        unsafe fn encode(
7368            self,
7369            encoder: &mut fidl::encoding::Encoder<
7370                '_,
7371                fidl::encoding::DefaultFuchsiaResourceDialect,
7372            >,
7373            offset: usize,
7374            _depth: fidl::encoding::Depth,
7375        ) -> fidl::Result<()> {
7376            encoder.debug_check_bounds::<ClosedTargetEchoAsTransferableSignalableEventResponse>(
7377                offset,
7378            );
7379            // Delegate to tuple encoding.
7380            fidl::encoding::Encode::<
7381                ClosedTargetEchoAsTransferableSignalableEventResponse,
7382                fidl::encoding::DefaultFuchsiaResourceDialect,
7383            >::encode(
7384                (<fidl::encoding::HandleType<
7385                    fidl::Event,
7386                    { fidl::ObjectType::EVENT.into_raw() },
7387                    4098,
7388                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7389                    &mut self.handle
7390                ),),
7391                encoder,
7392                offset,
7393                _depth,
7394            )
7395        }
7396    }
7397    unsafe impl<
7398            T0: fidl::encoding::Encode<
7399                fidl::encoding::HandleType<
7400                    fidl::Event,
7401                    { fidl::ObjectType::EVENT.into_raw() },
7402                    4098,
7403                >,
7404                fidl::encoding::DefaultFuchsiaResourceDialect,
7405            >,
7406        >
7407        fidl::encoding::Encode<
7408            ClosedTargetEchoAsTransferableSignalableEventResponse,
7409            fidl::encoding::DefaultFuchsiaResourceDialect,
7410        > for (T0,)
7411    {
7412        #[inline]
7413        unsafe fn encode(
7414            self,
7415            encoder: &mut fidl::encoding::Encoder<
7416                '_,
7417                fidl::encoding::DefaultFuchsiaResourceDialect,
7418            >,
7419            offset: usize,
7420            depth: fidl::encoding::Depth,
7421        ) -> fidl::Result<()> {
7422            encoder.debug_check_bounds::<ClosedTargetEchoAsTransferableSignalableEventResponse>(
7423                offset,
7424            );
7425            // Zero out padding regions. There's no need to apply masks
7426            // because the unmasked parts will be overwritten by fields.
7427            // Write the fields.
7428            self.0.encode(encoder, offset + 0, depth)?;
7429            Ok(())
7430        }
7431    }
7432
7433    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7434        for ClosedTargetEchoAsTransferableSignalableEventResponse
7435    {
7436        #[inline(always)]
7437        fn new_empty() -> Self {
7438            Self {
7439                handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 4098>, fidl::encoding::DefaultFuchsiaResourceDialect),
7440            }
7441        }
7442
7443        #[inline]
7444        unsafe fn decode(
7445            &mut self,
7446            decoder: &mut fidl::encoding::Decoder<
7447                '_,
7448                fidl::encoding::DefaultFuchsiaResourceDialect,
7449            >,
7450            offset: usize,
7451            _depth: fidl::encoding::Depth,
7452        ) -> fidl::Result<()> {
7453            decoder.debug_check_bounds::<Self>(offset);
7454            // Verify that padding bytes are zero.
7455            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 4098>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle, decoder, offset + 0, _depth)?;
7456            Ok(())
7457        }
7458    }
7459
7460    impl fidl::encoding::ResourceTypeMarker for ClosedTargetGetHandleRightsRequest {
7461        type Borrowed<'a> = &'a mut Self;
7462        fn take_or_borrow<'a>(
7463            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7464        ) -> Self::Borrowed<'a> {
7465            value
7466        }
7467    }
7468
7469    unsafe impl fidl::encoding::TypeMarker for ClosedTargetGetHandleRightsRequest {
7470        type Owned = Self;
7471
7472        #[inline(always)]
7473        fn inline_align(_context: fidl::encoding::Context) -> usize {
7474            4
7475        }
7476
7477        #[inline(always)]
7478        fn inline_size(_context: fidl::encoding::Context) -> usize {
7479            4
7480        }
7481    }
7482
7483    unsafe impl
7484        fidl::encoding::Encode<
7485            ClosedTargetGetHandleRightsRequest,
7486            fidl::encoding::DefaultFuchsiaResourceDialect,
7487        > for &mut ClosedTargetGetHandleRightsRequest
7488    {
7489        #[inline]
7490        unsafe fn encode(
7491            self,
7492            encoder: &mut fidl::encoding::Encoder<
7493                '_,
7494                fidl::encoding::DefaultFuchsiaResourceDialect,
7495            >,
7496            offset: usize,
7497            _depth: fidl::encoding::Depth,
7498        ) -> fidl::Result<()> {
7499            encoder.debug_check_bounds::<ClosedTargetGetHandleRightsRequest>(offset);
7500            // Delegate to tuple encoding.
7501            fidl::encoding::Encode::<
7502                ClosedTargetGetHandleRightsRequest,
7503                fidl::encoding::DefaultFuchsiaResourceDialect,
7504            >::encode(
7505                (<fidl::encoding::HandleType<
7506                    fidl::Handle,
7507                    { fidl::ObjectType::NONE.into_raw() },
7508                    2147483648,
7509                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7510                    &mut self.handle
7511                ),),
7512                encoder,
7513                offset,
7514                _depth,
7515            )
7516        }
7517    }
7518    unsafe impl<
7519            T0: fidl::encoding::Encode<
7520                fidl::encoding::HandleType<
7521                    fidl::Handle,
7522                    { fidl::ObjectType::NONE.into_raw() },
7523                    2147483648,
7524                >,
7525                fidl::encoding::DefaultFuchsiaResourceDialect,
7526            >,
7527        >
7528        fidl::encoding::Encode<
7529            ClosedTargetGetHandleRightsRequest,
7530            fidl::encoding::DefaultFuchsiaResourceDialect,
7531        > for (T0,)
7532    {
7533        #[inline]
7534        unsafe fn encode(
7535            self,
7536            encoder: &mut fidl::encoding::Encoder<
7537                '_,
7538                fidl::encoding::DefaultFuchsiaResourceDialect,
7539            >,
7540            offset: usize,
7541            depth: fidl::encoding::Depth,
7542        ) -> fidl::Result<()> {
7543            encoder.debug_check_bounds::<ClosedTargetGetHandleRightsRequest>(offset);
7544            // Zero out padding regions. There's no need to apply masks
7545            // because the unmasked parts will be overwritten by fields.
7546            // Write the fields.
7547            self.0.encode(encoder, offset + 0, depth)?;
7548            Ok(())
7549        }
7550    }
7551
7552    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7553        for ClosedTargetGetHandleRightsRequest
7554    {
7555        #[inline(always)]
7556        fn new_empty() -> Self {
7557            Self {
7558                handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7559            }
7560        }
7561
7562        #[inline]
7563        unsafe fn decode(
7564            &mut self,
7565            decoder: &mut fidl::encoding::Decoder<
7566                '_,
7567                fidl::encoding::DefaultFuchsiaResourceDialect,
7568            >,
7569            offset: usize,
7570            _depth: fidl::encoding::Depth,
7571        ) -> fidl::Result<()> {
7572            decoder.debug_check_bounds::<Self>(offset);
7573            // Verify that padding bytes are zero.
7574            fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle, decoder, offset + 0, _depth)?;
7575            Ok(())
7576        }
7577    }
7578
7579    impl fidl::encoding::ValueTypeMarker for ClosedTargetGetHandleRightsResponse {
7580        type Borrowed<'a> = &'a Self;
7581        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7582            value
7583        }
7584    }
7585
7586    unsafe impl fidl::encoding::TypeMarker for ClosedTargetGetHandleRightsResponse {
7587        type Owned = Self;
7588
7589        #[inline(always)]
7590        fn inline_align(_context: fidl::encoding::Context) -> usize {
7591            4
7592        }
7593
7594        #[inline(always)]
7595        fn inline_size(_context: fidl::encoding::Context) -> usize {
7596            4
7597        }
7598    }
7599
7600    unsafe impl<D: fidl::encoding::ResourceDialect>
7601        fidl::encoding::Encode<ClosedTargetGetHandleRightsResponse, D>
7602        for &ClosedTargetGetHandleRightsResponse
7603    {
7604        #[inline]
7605        unsafe fn encode(
7606            self,
7607            encoder: &mut fidl::encoding::Encoder<'_, D>,
7608            offset: usize,
7609            _depth: fidl::encoding::Depth,
7610        ) -> fidl::Result<()> {
7611            encoder.debug_check_bounds::<ClosedTargetGetHandleRightsResponse>(offset);
7612            // Delegate to tuple encoding.
7613            fidl::encoding::Encode::<ClosedTargetGetHandleRightsResponse, D>::encode(
7614                (<fidl::Rights as fidl::encoding::ValueTypeMarker>::borrow(&self.rights),),
7615                encoder,
7616                offset,
7617                _depth,
7618            )
7619        }
7620    }
7621    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<fidl::Rights, D>>
7622        fidl::encoding::Encode<ClosedTargetGetHandleRightsResponse, D> for (T0,)
7623    {
7624        #[inline]
7625        unsafe fn encode(
7626            self,
7627            encoder: &mut fidl::encoding::Encoder<'_, D>,
7628            offset: usize,
7629            depth: fidl::encoding::Depth,
7630        ) -> fidl::Result<()> {
7631            encoder.debug_check_bounds::<ClosedTargetGetHandleRightsResponse>(offset);
7632            // Zero out padding regions. There's no need to apply masks
7633            // because the unmasked parts will be overwritten by fields.
7634            // Write the fields.
7635            self.0.encode(encoder, offset + 0, depth)?;
7636            Ok(())
7637        }
7638    }
7639
7640    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7641        for ClosedTargetGetHandleRightsResponse
7642    {
7643        #[inline(always)]
7644        fn new_empty() -> Self {
7645            Self { rights: fidl::new_empty!(fidl::Rights, D) }
7646        }
7647
7648        #[inline]
7649        unsafe fn decode(
7650            &mut self,
7651            decoder: &mut fidl::encoding::Decoder<'_, D>,
7652            offset: usize,
7653            _depth: fidl::encoding::Depth,
7654        ) -> fidl::Result<()> {
7655            decoder.debug_check_bounds::<Self>(offset);
7656            // Verify that padding bytes are zero.
7657            fidl::decode!(fidl::Rights, D, &mut self.rights, decoder, offset + 0, _depth)?;
7658            Ok(())
7659        }
7660    }
7661
7662    impl fidl::encoding::ResourceTypeMarker for ClosedTargetGetSignalableEventRightsRequest {
7663        type Borrowed<'a> = &'a mut Self;
7664        fn take_or_borrow<'a>(
7665            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7666        ) -> Self::Borrowed<'a> {
7667            value
7668        }
7669    }
7670
7671    unsafe impl fidl::encoding::TypeMarker for ClosedTargetGetSignalableEventRightsRequest {
7672        type Owned = Self;
7673
7674        #[inline(always)]
7675        fn inline_align(_context: fidl::encoding::Context) -> usize {
7676            4
7677        }
7678
7679        #[inline(always)]
7680        fn inline_size(_context: fidl::encoding::Context) -> usize {
7681            4
7682        }
7683    }
7684
7685    unsafe impl
7686        fidl::encoding::Encode<
7687            ClosedTargetGetSignalableEventRightsRequest,
7688            fidl::encoding::DefaultFuchsiaResourceDialect,
7689        > for &mut ClosedTargetGetSignalableEventRightsRequest
7690    {
7691        #[inline]
7692        unsafe fn encode(
7693            self,
7694            encoder: &mut fidl::encoding::Encoder<
7695                '_,
7696                fidl::encoding::DefaultFuchsiaResourceDialect,
7697            >,
7698            offset: usize,
7699            _depth: fidl::encoding::Depth,
7700        ) -> fidl::Result<()> {
7701            encoder.debug_check_bounds::<ClosedTargetGetSignalableEventRightsRequest>(offset);
7702            // Delegate to tuple encoding.
7703            fidl::encoding::Encode::<
7704                ClosedTargetGetSignalableEventRightsRequest,
7705                fidl::encoding::DefaultFuchsiaResourceDialect,
7706            >::encode(
7707                (<fidl::encoding::HandleType<
7708                    fidl::Event,
7709                    { fidl::ObjectType::EVENT.into_raw() },
7710                    4096,
7711                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7712                    &mut self.handle
7713                ),),
7714                encoder,
7715                offset,
7716                _depth,
7717            )
7718        }
7719    }
7720    unsafe impl<
7721            T0: fidl::encoding::Encode<
7722                fidl::encoding::HandleType<
7723                    fidl::Event,
7724                    { fidl::ObjectType::EVENT.into_raw() },
7725                    4096,
7726                >,
7727                fidl::encoding::DefaultFuchsiaResourceDialect,
7728            >,
7729        >
7730        fidl::encoding::Encode<
7731            ClosedTargetGetSignalableEventRightsRequest,
7732            fidl::encoding::DefaultFuchsiaResourceDialect,
7733        > for (T0,)
7734    {
7735        #[inline]
7736        unsafe fn encode(
7737            self,
7738            encoder: &mut fidl::encoding::Encoder<
7739                '_,
7740                fidl::encoding::DefaultFuchsiaResourceDialect,
7741            >,
7742            offset: usize,
7743            depth: fidl::encoding::Depth,
7744        ) -> fidl::Result<()> {
7745            encoder.debug_check_bounds::<ClosedTargetGetSignalableEventRightsRequest>(offset);
7746            // Zero out padding regions. There's no need to apply masks
7747            // because the unmasked parts will be overwritten by fields.
7748            // Write the fields.
7749            self.0.encode(encoder, offset + 0, depth)?;
7750            Ok(())
7751        }
7752    }
7753
7754    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7755        for ClosedTargetGetSignalableEventRightsRequest
7756    {
7757        #[inline(always)]
7758        fn new_empty() -> Self {
7759            Self {
7760                handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 4096>, fidl::encoding::DefaultFuchsiaResourceDialect),
7761            }
7762        }
7763
7764        #[inline]
7765        unsafe fn decode(
7766            &mut self,
7767            decoder: &mut fidl::encoding::Decoder<
7768                '_,
7769                fidl::encoding::DefaultFuchsiaResourceDialect,
7770            >,
7771            offset: usize,
7772            _depth: fidl::encoding::Depth,
7773        ) -> fidl::Result<()> {
7774            decoder.debug_check_bounds::<Self>(offset);
7775            // Verify that padding bytes are zero.
7776            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 4096>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle, decoder, offset + 0, _depth)?;
7777            Ok(())
7778        }
7779    }
7780
7781    impl fidl::encoding::ValueTypeMarker for ClosedTargetGetSignalableEventRightsResponse {
7782        type Borrowed<'a> = &'a Self;
7783        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7784            value
7785        }
7786    }
7787
7788    unsafe impl fidl::encoding::TypeMarker for ClosedTargetGetSignalableEventRightsResponse {
7789        type Owned = Self;
7790
7791        #[inline(always)]
7792        fn inline_align(_context: fidl::encoding::Context) -> usize {
7793            4
7794        }
7795
7796        #[inline(always)]
7797        fn inline_size(_context: fidl::encoding::Context) -> usize {
7798            4
7799        }
7800    }
7801
7802    unsafe impl<D: fidl::encoding::ResourceDialect>
7803        fidl::encoding::Encode<ClosedTargetGetSignalableEventRightsResponse, D>
7804        for &ClosedTargetGetSignalableEventRightsResponse
7805    {
7806        #[inline]
7807        unsafe fn encode(
7808            self,
7809            encoder: &mut fidl::encoding::Encoder<'_, D>,
7810            offset: usize,
7811            _depth: fidl::encoding::Depth,
7812        ) -> fidl::Result<()> {
7813            encoder.debug_check_bounds::<ClosedTargetGetSignalableEventRightsResponse>(offset);
7814            // Delegate to tuple encoding.
7815            fidl::encoding::Encode::<ClosedTargetGetSignalableEventRightsResponse, D>::encode(
7816                (<fidl::Rights as fidl::encoding::ValueTypeMarker>::borrow(&self.rights),),
7817                encoder,
7818                offset,
7819                _depth,
7820            )
7821        }
7822    }
7823    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<fidl::Rights, D>>
7824        fidl::encoding::Encode<ClosedTargetGetSignalableEventRightsResponse, D> for (T0,)
7825    {
7826        #[inline]
7827        unsafe fn encode(
7828            self,
7829            encoder: &mut fidl::encoding::Encoder<'_, D>,
7830            offset: usize,
7831            depth: fidl::encoding::Depth,
7832        ) -> fidl::Result<()> {
7833            encoder.debug_check_bounds::<ClosedTargetGetSignalableEventRightsResponse>(offset);
7834            // Zero out padding regions. There's no need to apply masks
7835            // because the unmasked parts will be overwritten by fields.
7836            // Write the fields.
7837            self.0.encode(encoder, offset + 0, depth)?;
7838            Ok(())
7839        }
7840    }
7841
7842    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7843        for ClosedTargetGetSignalableEventRightsResponse
7844    {
7845        #[inline(always)]
7846        fn new_empty() -> Self {
7847            Self { rights: fidl::new_empty!(fidl::Rights, D) }
7848        }
7849
7850        #[inline]
7851        unsafe fn decode(
7852            &mut self,
7853            decoder: &mut fidl::encoding::Decoder<'_, D>,
7854            offset: usize,
7855            _depth: fidl::encoding::Depth,
7856        ) -> fidl::Result<()> {
7857            decoder.debug_check_bounds::<Self>(offset);
7858            // Verify that padding bytes are zero.
7859            fidl::decode!(fidl::Rights, D, &mut self.rights, decoder, offset + 0, _depth)?;
7860            Ok(())
7861        }
7862    }
7863
7864    impl fidl::encoding::ResourceTypeMarker for ClosedTargetHandleVectorSizeRequest {
7865        type Borrowed<'a> = &'a mut Self;
7866        fn take_or_borrow<'a>(
7867            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7868        ) -> Self::Borrowed<'a> {
7869            value
7870        }
7871    }
7872
7873    unsafe impl fidl::encoding::TypeMarker for ClosedTargetHandleVectorSizeRequest {
7874        type Owned = Self;
7875
7876        #[inline(always)]
7877        fn inline_align(_context: fidl::encoding::Context) -> usize {
7878            8
7879        }
7880
7881        #[inline(always)]
7882        fn inline_size(_context: fidl::encoding::Context) -> usize {
7883            16
7884        }
7885    }
7886
7887    unsafe impl
7888        fidl::encoding::Encode<
7889            ClosedTargetHandleVectorSizeRequest,
7890            fidl::encoding::DefaultFuchsiaResourceDialect,
7891        > for &mut ClosedTargetHandleVectorSizeRequest
7892    {
7893        #[inline]
7894        unsafe fn encode(
7895            self,
7896            encoder: &mut fidl::encoding::Encoder<
7897                '_,
7898                fidl::encoding::DefaultFuchsiaResourceDialect,
7899            >,
7900            offset: usize,
7901            _depth: fidl::encoding::Depth,
7902        ) -> fidl::Result<()> {
7903            encoder.debug_check_bounds::<ClosedTargetHandleVectorSizeRequest>(offset);
7904            // Delegate to tuple encoding.
7905            fidl::encoding::Encode::<
7906                ClosedTargetHandleVectorSizeRequest,
7907                fidl::encoding::DefaultFuchsiaResourceDialect,
7908            >::encode(
7909                (<fidl::encoding::UnboundedVector<
7910                    fidl::encoding::HandleType<
7911                        fidl::Event,
7912                        { fidl::ObjectType::EVENT.into_raw() },
7913                        2147483648,
7914                    >,
7915                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7916                    &mut self.vec
7917                ),),
7918                encoder,
7919                offset,
7920                _depth,
7921            )
7922        }
7923    }
7924    unsafe impl<
7925            T0: fidl::encoding::Encode<
7926                fidl::encoding::UnboundedVector<
7927                    fidl::encoding::HandleType<
7928                        fidl::Event,
7929                        { fidl::ObjectType::EVENT.into_raw() },
7930                        2147483648,
7931                    >,
7932                >,
7933                fidl::encoding::DefaultFuchsiaResourceDialect,
7934            >,
7935        >
7936        fidl::encoding::Encode<
7937            ClosedTargetHandleVectorSizeRequest,
7938            fidl::encoding::DefaultFuchsiaResourceDialect,
7939        > for (T0,)
7940    {
7941        #[inline]
7942        unsafe fn encode(
7943            self,
7944            encoder: &mut fidl::encoding::Encoder<
7945                '_,
7946                fidl::encoding::DefaultFuchsiaResourceDialect,
7947            >,
7948            offset: usize,
7949            depth: fidl::encoding::Depth,
7950        ) -> fidl::Result<()> {
7951            encoder.debug_check_bounds::<ClosedTargetHandleVectorSizeRequest>(offset);
7952            // Zero out padding regions. There's no need to apply masks
7953            // because the unmasked parts will be overwritten by fields.
7954            // Write the fields.
7955            self.0.encode(encoder, offset + 0, depth)?;
7956            Ok(())
7957        }
7958    }
7959
7960    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7961        for ClosedTargetHandleVectorSizeRequest
7962    {
7963        #[inline(always)]
7964        fn new_empty() -> Self {
7965            Self {
7966                vec: fidl::new_empty!(
7967                    fidl::encoding::UnboundedVector<
7968                        fidl::encoding::HandleType<
7969                            fidl::Event,
7970                            { fidl::ObjectType::EVENT.into_raw() },
7971                            2147483648,
7972                        >,
7973                    >,
7974                    fidl::encoding::DefaultFuchsiaResourceDialect
7975                ),
7976            }
7977        }
7978
7979        #[inline]
7980        unsafe fn decode(
7981            &mut self,
7982            decoder: &mut fidl::encoding::Decoder<
7983                '_,
7984                fidl::encoding::DefaultFuchsiaResourceDialect,
7985            >,
7986            offset: usize,
7987            _depth: fidl::encoding::Depth,
7988        ) -> fidl::Result<()> {
7989            decoder.debug_check_bounds::<Self>(offset);
7990            // Verify that padding bytes are zero.
7991            fidl::decode!(
7992                fidl::encoding::UnboundedVector<
7993                    fidl::encoding::HandleType<
7994                        fidl::Event,
7995                        { fidl::ObjectType::EVENT.into_raw() },
7996                        2147483648,
7997                    >,
7998                >,
7999                fidl::encoding::DefaultFuchsiaResourceDialect,
8000                &mut self.vec,
8001                decoder,
8002                offset + 0,
8003                _depth
8004            )?;
8005            Ok(())
8006        }
8007    }
8008
8009    impl fidl::encoding::ValueTypeMarker for ClosedTargetHandleVectorSizeResponse {
8010        type Borrowed<'a> = &'a Self;
8011        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8012            value
8013        }
8014    }
8015
8016    unsafe impl fidl::encoding::TypeMarker for ClosedTargetHandleVectorSizeResponse {
8017        type Owned = Self;
8018
8019        #[inline(always)]
8020        fn inline_align(_context: fidl::encoding::Context) -> usize {
8021            4
8022        }
8023
8024        #[inline(always)]
8025        fn inline_size(_context: fidl::encoding::Context) -> usize {
8026            4
8027        }
8028        #[inline(always)]
8029        fn encode_is_copy() -> bool {
8030            true
8031        }
8032
8033        #[inline(always)]
8034        fn decode_is_copy() -> bool {
8035            true
8036        }
8037    }
8038
8039    unsafe impl<D: fidl::encoding::ResourceDialect>
8040        fidl::encoding::Encode<ClosedTargetHandleVectorSizeResponse, D>
8041        for &ClosedTargetHandleVectorSizeResponse
8042    {
8043        #[inline]
8044        unsafe fn encode(
8045            self,
8046            encoder: &mut fidl::encoding::Encoder<'_, D>,
8047            offset: usize,
8048            _depth: fidl::encoding::Depth,
8049        ) -> fidl::Result<()> {
8050            encoder.debug_check_bounds::<ClosedTargetHandleVectorSizeResponse>(offset);
8051            unsafe {
8052                // Copy the object into the buffer.
8053                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8054                (buf_ptr as *mut ClosedTargetHandleVectorSizeResponse)
8055                    .write_unaligned((self as *const ClosedTargetHandleVectorSizeResponse).read());
8056                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8057                // done second because the memcpy will write garbage to these bytes.
8058            }
8059            Ok(())
8060        }
8061    }
8062    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
8063        fidl::encoding::Encode<ClosedTargetHandleVectorSizeResponse, D> for (T0,)
8064    {
8065        #[inline]
8066        unsafe fn encode(
8067            self,
8068            encoder: &mut fidl::encoding::Encoder<'_, D>,
8069            offset: usize,
8070            depth: fidl::encoding::Depth,
8071        ) -> fidl::Result<()> {
8072            encoder.debug_check_bounds::<ClosedTargetHandleVectorSizeResponse>(offset);
8073            // Zero out padding regions. There's no need to apply masks
8074            // because the unmasked parts will be overwritten by fields.
8075            // Write the fields.
8076            self.0.encode(encoder, offset + 0, depth)?;
8077            Ok(())
8078        }
8079    }
8080
8081    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8082        for ClosedTargetHandleVectorSizeResponse
8083    {
8084        #[inline(always)]
8085        fn new_empty() -> Self {
8086            Self { n: fidl::new_empty!(u32, D) }
8087        }
8088
8089        #[inline]
8090        unsafe fn decode(
8091            &mut self,
8092            decoder: &mut fidl::encoding::Decoder<'_, D>,
8093            offset: usize,
8094            _depth: fidl::encoding::Depth,
8095        ) -> fidl::Result<()> {
8096            decoder.debug_check_bounds::<Self>(offset);
8097            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8098            // Verify that padding bytes are zero.
8099            // Copy from the buffer into the object.
8100            unsafe {
8101                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
8102            }
8103            Ok(())
8104        }
8105    }
8106
8107    impl fidl::encoding::ValueTypeMarker for ClosedTargetTwoWayStructPayloadRequest {
8108        type Borrowed<'a> = &'a Self;
8109        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8110            value
8111        }
8112    }
8113
8114    unsafe impl fidl::encoding::TypeMarker for ClosedTargetTwoWayStructPayloadRequest {
8115        type Owned = Self;
8116
8117        #[inline(always)]
8118        fn inline_align(_context: fidl::encoding::Context) -> usize {
8119            1
8120        }
8121
8122        #[inline(always)]
8123        fn inline_size(_context: fidl::encoding::Context) -> usize {
8124            1
8125        }
8126        #[inline(always)]
8127        fn encode_is_copy() -> bool {
8128            true
8129        }
8130
8131        #[inline(always)]
8132        fn decode_is_copy() -> bool {
8133            true
8134        }
8135    }
8136
8137    unsafe impl<D: fidl::encoding::ResourceDialect>
8138        fidl::encoding::Encode<ClosedTargetTwoWayStructPayloadRequest, D>
8139        for &ClosedTargetTwoWayStructPayloadRequest
8140    {
8141        #[inline]
8142        unsafe fn encode(
8143            self,
8144            encoder: &mut fidl::encoding::Encoder<'_, D>,
8145            offset: usize,
8146            _depth: fidl::encoding::Depth,
8147        ) -> fidl::Result<()> {
8148            encoder.debug_check_bounds::<ClosedTargetTwoWayStructPayloadRequest>(offset);
8149            unsafe {
8150                // Copy the object into the buffer.
8151                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8152                (buf_ptr as *mut ClosedTargetTwoWayStructPayloadRequest).write_unaligned(
8153                    (self as *const ClosedTargetTwoWayStructPayloadRequest).read(),
8154                );
8155                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8156                // done second because the memcpy will write garbage to these bytes.
8157            }
8158            Ok(())
8159        }
8160    }
8161    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i8, D>>
8162        fidl::encoding::Encode<ClosedTargetTwoWayStructPayloadRequest, D> for (T0,)
8163    {
8164        #[inline]
8165        unsafe fn encode(
8166            self,
8167            encoder: &mut fidl::encoding::Encoder<'_, D>,
8168            offset: usize,
8169            depth: fidl::encoding::Depth,
8170        ) -> fidl::Result<()> {
8171            encoder.debug_check_bounds::<ClosedTargetTwoWayStructPayloadRequest>(offset);
8172            // Zero out padding regions. There's no need to apply masks
8173            // because the unmasked parts will be overwritten by fields.
8174            // Write the fields.
8175            self.0.encode(encoder, offset + 0, depth)?;
8176            Ok(())
8177        }
8178    }
8179
8180    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8181        for ClosedTargetTwoWayStructPayloadRequest
8182    {
8183        #[inline(always)]
8184        fn new_empty() -> Self {
8185            Self { v: fidl::new_empty!(i8, D) }
8186        }
8187
8188        #[inline]
8189        unsafe fn decode(
8190            &mut self,
8191            decoder: &mut fidl::encoding::Decoder<'_, D>,
8192            offset: usize,
8193            _depth: fidl::encoding::Depth,
8194        ) -> fidl::Result<()> {
8195            decoder.debug_check_bounds::<Self>(offset);
8196            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8197            // Verify that padding bytes are zero.
8198            // Copy from the buffer into the object.
8199            unsafe {
8200                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
8201            }
8202            Ok(())
8203        }
8204    }
8205
8206    impl fidl::encoding::ValueTypeMarker for ClosedTargetTwoWayStructPayloadResponse {
8207        type Borrowed<'a> = &'a Self;
8208        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8209            value
8210        }
8211    }
8212
8213    unsafe impl fidl::encoding::TypeMarker for ClosedTargetTwoWayStructPayloadResponse {
8214        type Owned = Self;
8215
8216        #[inline(always)]
8217        fn inline_align(_context: fidl::encoding::Context) -> usize {
8218            1
8219        }
8220
8221        #[inline(always)]
8222        fn inline_size(_context: fidl::encoding::Context) -> usize {
8223            1
8224        }
8225        #[inline(always)]
8226        fn encode_is_copy() -> bool {
8227            true
8228        }
8229
8230        #[inline(always)]
8231        fn decode_is_copy() -> bool {
8232            true
8233        }
8234    }
8235
8236    unsafe impl<D: fidl::encoding::ResourceDialect>
8237        fidl::encoding::Encode<ClosedTargetTwoWayStructPayloadResponse, D>
8238        for &ClosedTargetTwoWayStructPayloadResponse
8239    {
8240        #[inline]
8241        unsafe fn encode(
8242            self,
8243            encoder: &mut fidl::encoding::Encoder<'_, D>,
8244            offset: usize,
8245            _depth: fidl::encoding::Depth,
8246        ) -> fidl::Result<()> {
8247            encoder.debug_check_bounds::<ClosedTargetTwoWayStructPayloadResponse>(offset);
8248            unsafe {
8249                // Copy the object into the buffer.
8250                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8251                (buf_ptr as *mut ClosedTargetTwoWayStructPayloadResponse).write_unaligned(
8252                    (self as *const ClosedTargetTwoWayStructPayloadResponse).read(),
8253                );
8254                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8255                // done second because the memcpy will write garbage to these bytes.
8256            }
8257            Ok(())
8258        }
8259    }
8260    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i8, D>>
8261        fidl::encoding::Encode<ClosedTargetTwoWayStructPayloadResponse, D> for (T0,)
8262    {
8263        #[inline]
8264        unsafe fn encode(
8265            self,
8266            encoder: &mut fidl::encoding::Encoder<'_, D>,
8267            offset: usize,
8268            depth: fidl::encoding::Depth,
8269        ) -> fidl::Result<()> {
8270            encoder.debug_check_bounds::<ClosedTargetTwoWayStructPayloadResponse>(offset);
8271            // Zero out padding regions. There's no need to apply masks
8272            // because the unmasked parts will be overwritten by fields.
8273            // Write the fields.
8274            self.0.encode(encoder, offset + 0, depth)?;
8275            Ok(())
8276        }
8277    }
8278
8279    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8280        for ClosedTargetTwoWayStructPayloadResponse
8281    {
8282        #[inline(always)]
8283        fn new_empty() -> Self {
8284            Self { v: fidl::new_empty!(i8, D) }
8285        }
8286
8287        #[inline]
8288        unsafe fn decode(
8289            &mut self,
8290            decoder: &mut fidl::encoding::Decoder<'_, D>,
8291            offset: usize,
8292            _depth: fidl::encoding::Depth,
8293        ) -> fidl::Result<()> {
8294            decoder.debug_check_bounds::<Self>(offset);
8295            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8296            // Verify that padding bytes are zero.
8297            // Copy from the buffer into the object.
8298            unsafe {
8299                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
8300            }
8301            Ok(())
8302        }
8303    }
8304
8305    impl fidl::encoding::ValueTypeMarker for ClosedTargetTwoWayResultResponse {
8306        type Borrowed<'a> = &'a Self;
8307        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8308            value
8309        }
8310    }
8311
8312    unsafe impl fidl::encoding::TypeMarker for ClosedTargetTwoWayResultResponse {
8313        type Owned = Self;
8314
8315        #[inline(always)]
8316        fn inline_align(_context: fidl::encoding::Context) -> usize {
8317            8
8318        }
8319
8320        #[inline(always)]
8321        fn inline_size(_context: fidl::encoding::Context) -> usize {
8322            16
8323        }
8324    }
8325
8326    unsafe impl<D: fidl::encoding::ResourceDialect>
8327        fidl::encoding::Encode<ClosedTargetTwoWayResultResponse, D>
8328        for &ClosedTargetTwoWayResultResponse
8329    {
8330        #[inline]
8331        unsafe fn encode(
8332            self,
8333            encoder: &mut fidl::encoding::Encoder<'_, D>,
8334            offset: usize,
8335            _depth: fidl::encoding::Depth,
8336        ) -> fidl::Result<()> {
8337            encoder.debug_check_bounds::<ClosedTargetTwoWayResultResponse>(offset);
8338            // Delegate to tuple encoding.
8339            fidl::encoding::Encode::<ClosedTargetTwoWayResultResponse, D>::encode(
8340                (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
8341                    &self.payload,
8342                ),),
8343                encoder,
8344                offset,
8345                _depth,
8346            )
8347        }
8348    }
8349    unsafe impl<
8350            D: fidl::encoding::ResourceDialect,
8351            T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
8352        > fidl::encoding::Encode<ClosedTargetTwoWayResultResponse, D> for (T0,)
8353    {
8354        #[inline]
8355        unsafe fn encode(
8356            self,
8357            encoder: &mut fidl::encoding::Encoder<'_, D>,
8358            offset: usize,
8359            depth: fidl::encoding::Depth,
8360        ) -> fidl::Result<()> {
8361            encoder.debug_check_bounds::<ClosedTargetTwoWayResultResponse>(offset);
8362            // Zero out padding regions. There's no need to apply masks
8363            // because the unmasked parts will be overwritten by fields.
8364            // Write the fields.
8365            self.0.encode(encoder, offset + 0, depth)?;
8366            Ok(())
8367        }
8368    }
8369
8370    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8371        for ClosedTargetTwoWayResultResponse
8372    {
8373        #[inline(always)]
8374        fn new_empty() -> Self {
8375            Self { payload: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
8376        }
8377
8378        #[inline]
8379        unsafe fn decode(
8380            &mut self,
8381            decoder: &mut fidl::encoding::Decoder<'_, D>,
8382            offset: usize,
8383            _depth: fidl::encoding::Depth,
8384        ) -> fidl::Result<()> {
8385            decoder.debug_check_bounds::<Self>(offset);
8386            // Verify that padding bytes are zero.
8387            fidl::decode!(
8388                fidl::encoding::UnboundedString,
8389                D,
8390                &mut self.payload,
8391                decoder,
8392                offset + 0,
8393                _depth
8394            )?;
8395            Ok(())
8396        }
8397    }
8398
8399    impl fidl::encoding::ValueTypeMarker for Empty {
8400        type Borrowed<'a> = &'a Self;
8401        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8402            value
8403        }
8404    }
8405
8406    unsafe impl fidl::encoding::TypeMarker for Empty {
8407        type Owned = Self;
8408
8409        #[inline(always)]
8410        fn inline_align(_context: fidl::encoding::Context) -> usize {
8411            1
8412        }
8413
8414        #[inline(always)]
8415        fn inline_size(_context: fidl::encoding::Context) -> usize {
8416            1
8417        }
8418    }
8419
8420    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Empty, D> for &Empty {
8421        #[inline]
8422        unsafe fn encode(
8423            self,
8424            encoder: &mut fidl::encoding::Encoder<'_, D>,
8425            offset: usize,
8426            _depth: fidl::encoding::Depth,
8427        ) -> fidl::Result<()> {
8428            encoder.debug_check_bounds::<Empty>(offset);
8429            encoder.write_num(0u8, offset);
8430            Ok(())
8431        }
8432    }
8433
8434    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Empty {
8435        #[inline(always)]
8436        fn new_empty() -> Self {
8437            Self
8438        }
8439
8440        #[inline]
8441        unsafe fn decode(
8442            &mut self,
8443            decoder: &mut fidl::encoding::Decoder<'_, D>,
8444            offset: usize,
8445            _depth: fidl::encoding::Depth,
8446        ) -> fidl::Result<()> {
8447            decoder.debug_check_bounds::<Self>(offset);
8448            match decoder.read_num::<u8>(offset) {
8449                0 => Ok(()),
8450                _ => Err(fidl::Error::Invalid),
8451            }
8452        }
8453    }
8454
8455    impl fidl::encoding::ValueTypeMarker for OpenTargetFlexibleTwoWayFieldsRequest {
8456        type Borrowed<'a> = &'a Self;
8457        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8458            value
8459        }
8460    }
8461
8462    unsafe impl fidl::encoding::TypeMarker for OpenTargetFlexibleTwoWayFieldsRequest {
8463        type Owned = Self;
8464
8465        #[inline(always)]
8466        fn inline_align(_context: fidl::encoding::Context) -> usize {
8467            4
8468        }
8469
8470        #[inline(always)]
8471        fn inline_size(_context: fidl::encoding::Context) -> usize {
8472            4
8473        }
8474        #[inline(always)]
8475        fn encode_is_copy() -> bool {
8476            true
8477        }
8478
8479        #[inline(always)]
8480        fn decode_is_copy() -> bool {
8481            true
8482        }
8483    }
8484
8485    unsafe impl<D: fidl::encoding::ResourceDialect>
8486        fidl::encoding::Encode<OpenTargetFlexibleTwoWayFieldsRequest, D>
8487        for &OpenTargetFlexibleTwoWayFieldsRequest
8488    {
8489        #[inline]
8490        unsafe fn encode(
8491            self,
8492            encoder: &mut fidl::encoding::Encoder<'_, D>,
8493            offset: usize,
8494            _depth: fidl::encoding::Depth,
8495        ) -> fidl::Result<()> {
8496            encoder.debug_check_bounds::<OpenTargetFlexibleTwoWayFieldsRequest>(offset);
8497            unsafe {
8498                // Copy the object into the buffer.
8499                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8500                (buf_ptr as *mut OpenTargetFlexibleTwoWayFieldsRequest)
8501                    .write_unaligned((self as *const OpenTargetFlexibleTwoWayFieldsRequest).read());
8502                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8503                // done second because the memcpy will write garbage to these bytes.
8504            }
8505            Ok(())
8506        }
8507    }
8508    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
8509        fidl::encoding::Encode<OpenTargetFlexibleTwoWayFieldsRequest, D> for (T0,)
8510    {
8511        #[inline]
8512        unsafe fn encode(
8513            self,
8514            encoder: &mut fidl::encoding::Encoder<'_, D>,
8515            offset: usize,
8516            depth: fidl::encoding::Depth,
8517        ) -> fidl::Result<()> {
8518            encoder.debug_check_bounds::<OpenTargetFlexibleTwoWayFieldsRequest>(offset);
8519            // Zero out padding regions. There's no need to apply masks
8520            // because the unmasked parts will be overwritten by fields.
8521            // Write the fields.
8522            self.0.encode(encoder, offset + 0, depth)?;
8523            Ok(())
8524        }
8525    }
8526
8527    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8528        for OpenTargetFlexibleTwoWayFieldsRequest
8529    {
8530        #[inline(always)]
8531        fn new_empty() -> Self {
8532            Self { reply_with: fidl::new_empty!(i32, D) }
8533        }
8534
8535        #[inline]
8536        unsafe fn decode(
8537            &mut self,
8538            decoder: &mut fidl::encoding::Decoder<'_, D>,
8539            offset: usize,
8540            _depth: fidl::encoding::Depth,
8541        ) -> fidl::Result<()> {
8542            decoder.debug_check_bounds::<Self>(offset);
8543            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8544            // Verify that padding bytes are zero.
8545            // Copy from the buffer into the object.
8546            unsafe {
8547                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
8548            }
8549            Ok(())
8550        }
8551    }
8552
8553    impl fidl::encoding::ValueTypeMarker for OpenTargetStrictTwoWayFieldsRequest {
8554        type Borrowed<'a> = &'a Self;
8555        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8556            value
8557        }
8558    }
8559
8560    unsafe impl fidl::encoding::TypeMarker for OpenTargetStrictTwoWayFieldsRequest {
8561        type Owned = Self;
8562
8563        #[inline(always)]
8564        fn inline_align(_context: fidl::encoding::Context) -> usize {
8565            4
8566        }
8567
8568        #[inline(always)]
8569        fn inline_size(_context: fidl::encoding::Context) -> usize {
8570            4
8571        }
8572        #[inline(always)]
8573        fn encode_is_copy() -> bool {
8574            true
8575        }
8576
8577        #[inline(always)]
8578        fn decode_is_copy() -> bool {
8579            true
8580        }
8581    }
8582
8583    unsafe impl<D: fidl::encoding::ResourceDialect>
8584        fidl::encoding::Encode<OpenTargetStrictTwoWayFieldsRequest, D>
8585        for &OpenTargetStrictTwoWayFieldsRequest
8586    {
8587        #[inline]
8588        unsafe fn encode(
8589            self,
8590            encoder: &mut fidl::encoding::Encoder<'_, D>,
8591            offset: usize,
8592            _depth: fidl::encoding::Depth,
8593        ) -> fidl::Result<()> {
8594            encoder.debug_check_bounds::<OpenTargetStrictTwoWayFieldsRequest>(offset);
8595            unsafe {
8596                // Copy the object into the buffer.
8597                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8598                (buf_ptr as *mut OpenTargetStrictTwoWayFieldsRequest)
8599                    .write_unaligned((self as *const OpenTargetStrictTwoWayFieldsRequest).read());
8600                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8601                // done second because the memcpy will write garbage to these bytes.
8602            }
8603            Ok(())
8604        }
8605    }
8606    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
8607        fidl::encoding::Encode<OpenTargetStrictTwoWayFieldsRequest, D> for (T0,)
8608    {
8609        #[inline]
8610        unsafe fn encode(
8611            self,
8612            encoder: &mut fidl::encoding::Encoder<'_, D>,
8613            offset: usize,
8614            depth: fidl::encoding::Depth,
8615        ) -> fidl::Result<()> {
8616            encoder.debug_check_bounds::<OpenTargetStrictTwoWayFieldsRequest>(offset);
8617            // Zero out padding regions. There's no need to apply masks
8618            // because the unmasked parts will be overwritten by fields.
8619            // Write the fields.
8620            self.0.encode(encoder, offset + 0, depth)?;
8621            Ok(())
8622        }
8623    }
8624
8625    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8626        for OpenTargetStrictTwoWayFieldsRequest
8627    {
8628        #[inline(always)]
8629        fn new_empty() -> Self {
8630            Self { reply_with: fidl::new_empty!(i32, D) }
8631        }
8632
8633        #[inline]
8634        unsafe fn decode(
8635            &mut self,
8636            decoder: &mut fidl::encoding::Decoder<'_, D>,
8637            offset: usize,
8638            _depth: fidl::encoding::Depth,
8639        ) -> fidl::Result<()> {
8640            decoder.debug_check_bounds::<Self>(offset);
8641            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8642            // Verify that padding bytes are zero.
8643            // Copy from the buffer into the object.
8644            unsafe {
8645                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
8646            }
8647            Ok(())
8648        }
8649    }
8650
8651    impl fidl::encoding::ValueTypeMarker for OpenTargetStrictTwoWayFieldsResponse {
8652        type Borrowed<'a> = &'a Self;
8653        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8654            value
8655        }
8656    }
8657
8658    unsafe impl fidl::encoding::TypeMarker for OpenTargetStrictTwoWayFieldsResponse {
8659        type Owned = Self;
8660
8661        #[inline(always)]
8662        fn inline_align(_context: fidl::encoding::Context) -> usize {
8663            4
8664        }
8665
8666        #[inline(always)]
8667        fn inline_size(_context: fidl::encoding::Context) -> usize {
8668            4
8669        }
8670        #[inline(always)]
8671        fn encode_is_copy() -> bool {
8672            true
8673        }
8674
8675        #[inline(always)]
8676        fn decode_is_copy() -> bool {
8677            true
8678        }
8679    }
8680
8681    unsafe impl<D: fidl::encoding::ResourceDialect>
8682        fidl::encoding::Encode<OpenTargetStrictTwoWayFieldsResponse, D>
8683        for &OpenTargetStrictTwoWayFieldsResponse
8684    {
8685        #[inline]
8686        unsafe fn encode(
8687            self,
8688            encoder: &mut fidl::encoding::Encoder<'_, D>,
8689            offset: usize,
8690            _depth: fidl::encoding::Depth,
8691        ) -> fidl::Result<()> {
8692            encoder.debug_check_bounds::<OpenTargetStrictTwoWayFieldsResponse>(offset);
8693            unsafe {
8694                // Copy the object into the buffer.
8695                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8696                (buf_ptr as *mut OpenTargetStrictTwoWayFieldsResponse)
8697                    .write_unaligned((self as *const OpenTargetStrictTwoWayFieldsResponse).read());
8698                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8699                // done second because the memcpy will write garbage to these bytes.
8700            }
8701            Ok(())
8702        }
8703    }
8704    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
8705        fidl::encoding::Encode<OpenTargetStrictTwoWayFieldsResponse, D> for (T0,)
8706    {
8707        #[inline]
8708        unsafe fn encode(
8709            self,
8710            encoder: &mut fidl::encoding::Encoder<'_, D>,
8711            offset: usize,
8712            depth: fidl::encoding::Depth,
8713        ) -> fidl::Result<()> {
8714            encoder.debug_check_bounds::<OpenTargetStrictTwoWayFieldsResponse>(offset);
8715            // Zero out padding regions. There's no need to apply masks
8716            // because the unmasked parts will be overwritten by fields.
8717            // Write the fields.
8718            self.0.encode(encoder, offset + 0, depth)?;
8719            Ok(())
8720        }
8721    }
8722
8723    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8724        for OpenTargetStrictTwoWayFieldsResponse
8725    {
8726        #[inline(always)]
8727        fn new_empty() -> Self {
8728            Self { some_field: fidl::new_empty!(i32, D) }
8729        }
8730
8731        #[inline]
8732        unsafe fn decode(
8733            &mut self,
8734            decoder: &mut fidl::encoding::Decoder<'_, D>,
8735            offset: usize,
8736            _depth: fidl::encoding::Depth,
8737        ) -> fidl::Result<()> {
8738            decoder.debug_check_bounds::<Self>(offset);
8739            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8740            // Verify that padding bytes are zero.
8741            // Copy from the buffer into the object.
8742            unsafe {
8743                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
8744            }
8745            Ok(())
8746        }
8747    }
8748
8749    impl fidl::encoding::ValueTypeMarker for OpenTargetFlexibleTwoWayFieldsErrResponse {
8750        type Borrowed<'a> = &'a Self;
8751        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8752            value
8753        }
8754    }
8755
8756    unsafe impl fidl::encoding::TypeMarker for OpenTargetFlexibleTwoWayFieldsErrResponse {
8757        type Owned = Self;
8758
8759        #[inline(always)]
8760        fn inline_align(_context: fidl::encoding::Context) -> usize {
8761            4
8762        }
8763
8764        #[inline(always)]
8765        fn inline_size(_context: fidl::encoding::Context) -> usize {
8766            4
8767        }
8768        #[inline(always)]
8769        fn encode_is_copy() -> bool {
8770            true
8771        }
8772
8773        #[inline(always)]
8774        fn decode_is_copy() -> bool {
8775            true
8776        }
8777    }
8778
8779    unsafe impl<D: fidl::encoding::ResourceDialect>
8780        fidl::encoding::Encode<OpenTargetFlexibleTwoWayFieldsErrResponse, D>
8781        for &OpenTargetFlexibleTwoWayFieldsErrResponse
8782    {
8783        #[inline]
8784        unsafe fn encode(
8785            self,
8786            encoder: &mut fidl::encoding::Encoder<'_, D>,
8787            offset: usize,
8788            _depth: fidl::encoding::Depth,
8789        ) -> fidl::Result<()> {
8790            encoder.debug_check_bounds::<OpenTargetFlexibleTwoWayFieldsErrResponse>(offset);
8791            unsafe {
8792                // Copy the object into the buffer.
8793                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8794                (buf_ptr as *mut OpenTargetFlexibleTwoWayFieldsErrResponse).write_unaligned(
8795                    (self as *const OpenTargetFlexibleTwoWayFieldsErrResponse).read(),
8796                );
8797                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8798                // done second because the memcpy will write garbage to these bytes.
8799            }
8800            Ok(())
8801        }
8802    }
8803    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
8804        fidl::encoding::Encode<OpenTargetFlexibleTwoWayFieldsErrResponse, D> for (T0,)
8805    {
8806        #[inline]
8807        unsafe fn encode(
8808            self,
8809            encoder: &mut fidl::encoding::Encoder<'_, D>,
8810            offset: usize,
8811            depth: fidl::encoding::Depth,
8812        ) -> fidl::Result<()> {
8813            encoder.debug_check_bounds::<OpenTargetFlexibleTwoWayFieldsErrResponse>(offset);
8814            // Zero out padding regions. There's no need to apply masks
8815            // because the unmasked parts will be overwritten by fields.
8816            // Write the fields.
8817            self.0.encode(encoder, offset + 0, depth)?;
8818            Ok(())
8819        }
8820    }
8821
8822    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8823        for OpenTargetFlexibleTwoWayFieldsErrResponse
8824    {
8825        #[inline(always)]
8826        fn new_empty() -> Self {
8827            Self { some_field: fidl::new_empty!(i32, D) }
8828        }
8829
8830        #[inline]
8831        unsafe fn decode(
8832            &mut self,
8833            decoder: &mut fidl::encoding::Decoder<'_, D>,
8834            offset: usize,
8835            _depth: fidl::encoding::Depth,
8836        ) -> fidl::Result<()> {
8837            decoder.debug_check_bounds::<Self>(offset);
8838            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8839            // Verify that padding bytes are zero.
8840            // Copy from the buffer into the object.
8841            unsafe {
8842                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
8843            }
8844            Ok(())
8845        }
8846    }
8847
8848    impl fidl::encoding::ValueTypeMarker for OpenTargetFlexibleTwoWayFieldsResponse {
8849        type Borrowed<'a> = &'a Self;
8850        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8851            value
8852        }
8853    }
8854
8855    unsafe impl fidl::encoding::TypeMarker for OpenTargetFlexibleTwoWayFieldsResponse {
8856        type Owned = Self;
8857
8858        #[inline(always)]
8859        fn inline_align(_context: fidl::encoding::Context) -> usize {
8860            4
8861        }
8862
8863        #[inline(always)]
8864        fn inline_size(_context: fidl::encoding::Context) -> usize {
8865            4
8866        }
8867        #[inline(always)]
8868        fn encode_is_copy() -> bool {
8869            true
8870        }
8871
8872        #[inline(always)]
8873        fn decode_is_copy() -> bool {
8874            true
8875        }
8876    }
8877
8878    unsafe impl<D: fidl::encoding::ResourceDialect>
8879        fidl::encoding::Encode<OpenTargetFlexibleTwoWayFieldsResponse, D>
8880        for &OpenTargetFlexibleTwoWayFieldsResponse
8881    {
8882        #[inline]
8883        unsafe fn encode(
8884            self,
8885            encoder: &mut fidl::encoding::Encoder<'_, D>,
8886            offset: usize,
8887            _depth: fidl::encoding::Depth,
8888        ) -> fidl::Result<()> {
8889            encoder.debug_check_bounds::<OpenTargetFlexibleTwoWayFieldsResponse>(offset);
8890            unsafe {
8891                // Copy the object into the buffer.
8892                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8893                (buf_ptr as *mut OpenTargetFlexibleTwoWayFieldsResponse).write_unaligned(
8894                    (self as *const OpenTargetFlexibleTwoWayFieldsResponse).read(),
8895                );
8896                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8897                // done second because the memcpy will write garbage to these bytes.
8898            }
8899            Ok(())
8900        }
8901    }
8902    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
8903        fidl::encoding::Encode<OpenTargetFlexibleTwoWayFieldsResponse, D> for (T0,)
8904    {
8905        #[inline]
8906        unsafe fn encode(
8907            self,
8908            encoder: &mut fidl::encoding::Encoder<'_, D>,
8909            offset: usize,
8910            depth: fidl::encoding::Depth,
8911        ) -> fidl::Result<()> {
8912            encoder.debug_check_bounds::<OpenTargetFlexibleTwoWayFieldsResponse>(offset);
8913            // Zero out padding regions. There's no need to apply masks
8914            // because the unmasked parts will be overwritten by fields.
8915            // Write the fields.
8916            self.0.encode(encoder, offset + 0, depth)?;
8917            Ok(())
8918        }
8919    }
8920
8921    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8922        for OpenTargetFlexibleTwoWayFieldsResponse
8923    {
8924        #[inline(always)]
8925        fn new_empty() -> Self {
8926            Self { some_field: fidl::new_empty!(i32, D) }
8927        }
8928
8929        #[inline]
8930        unsafe fn decode(
8931            &mut self,
8932            decoder: &mut fidl::encoding::Decoder<'_, D>,
8933            offset: usize,
8934            _depth: fidl::encoding::Depth,
8935        ) -> fidl::Result<()> {
8936            decoder.debug_check_bounds::<Self>(offset);
8937            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8938            // Verify that padding bytes are zero.
8939            // Copy from the buffer into the object.
8940            unsafe {
8941                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
8942            }
8943            Ok(())
8944        }
8945    }
8946
8947    impl fidl::encoding::ValueTypeMarker for OpenTargetStrictTwoWayFieldsErrResponse {
8948        type Borrowed<'a> = &'a Self;
8949        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8950            value
8951        }
8952    }
8953
8954    unsafe impl fidl::encoding::TypeMarker for OpenTargetStrictTwoWayFieldsErrResponse {
8955        type Owned = Self;
8956
8957        #[inline(always)]
8958        fn inline_align(_context: fidl::encoding::Context) -> usize {
8959            4
8960        }
8961
8962        #[inline(always)]
8963        fn inline_size(_context: fidl::encoding::Context) -> usize {
8964            4
8965        }
8966        #[inline(always)]
8967        fn encode_is_copy() -> bool {
8968            true
8969        }
8970
8971        #[inline(always)]
8972        fn decode_is_copy() -> bool {
8973            true
8974        }
8975    }
8976
8977    unsafe impl<D: fidl::encoding::ResourceDialect>
8978        fidl::encoding::Encode<OpenTargetStrictTwoWayFieldsErrResponse, D>
8979        for &OpenTargetStrictTwoWayFieldsErrResponse
8980    {
8981        #[inline]
8982        unsafe fn encode(
8983            self,
8984            encoder: &mut fidl::encoding::Encoder<'_, D>,
8985            offset: usize,
8986            _depth: fidl::encoding::Depth,
8987        ) -> fidl::Result<()> {
8988            encoder.debug_check_bounds::<OpenTargetStrictTwoWayFieldsErrResponse>(offset);
8989            unsafe {
8990                // Copy the object into the buffer.
8991                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8992                (buf_ptr as *mut OpenTargetStrictTwoWayFieldsErrResponse).write_unaligned(
8993                    (self as *const OpenTargetStrictTwoWayFieldsErrResponse).read(),
8994                );
8995                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8996                // done second because the memcpy will write garbage to these bytes.
8997            }
8998            Ok(())
8999        }
9000    }
9001    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
9002        fidl::encoding::Encode<OpenTargetStrictTwoWayFieldsErrResponse, D> for (T0,)
9003    {
9004        #[inline]
9005        unsafe fn encode(
9006            self,
9007            encoder: &mut fidl::encoding::Encoder<'_, D>,
9008            offset: usize,
9009            depth: fidl::encoding::Depth,
9010        ) -> fidl::Result<()> {
9011            encoder.debug_check_bounds::<OpenTargetStrictTwoWayFieldsErrResponse>(offset);
9012            // Zero out padding regions. There's no need to apply masks
9013            // because the unmasked parts will be overwritten by fields.
9014            // Write the fields.
9015            self.0.encode(encoder, offset + 0, depth)?;
9016            Ok(())
9017        }
9018    }
9019
9020    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9021        for OpenTargetStrictTwoWayFieldsErrResponse
9022    {
9023        #[inline(always)]
9024        fn new_empty() -> Self {
9025            Self { some_field: fidl::new_empty!(i32, D) }
9026        }
9027
9028        #[inline]
9029        unsafe fn decode(
9030            &mut self,
9031            decoder: &mut fidl::encoding::Decoder<'_, D>,
9032            offset: usize,
9033            _depth: fidl::encoding::Depth,
9034        ) -> fidl::Result<()> {
9035            decoder.debug_check_bounds::<Self>(offset);
9036            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9037            // Verify that padding bytes are zero.
9038            // Copy from the buffer into the object.
9039            unsafe {
9040                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
9041            }
9042            Ok(())
9043        }
9044    }
9045
9046    impl fidl::encoding::ValueTypeMarker for RunnerGetVersionResponse {
9047        type Borrowed<'a> = &'a Self;
9048        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9049            value
9050        }
9051    }
9052
9053    unsafe impl fidl::encoding::TypeMarker for RunnerGetVersionResponse {
9054        type Owned = Self;
9055
9056        #[inline(always)]
9057        fn inline_align(_context: fidl::encoding::Context) -> usize {
9058            8
9059        }
9060
9061        #[inline(always)]
9062        fn inline_size(_context: fidl::encoding::Context) -> usize {
9063            8
9064        }
9065        #[inline(always)]
9066        fn encode_is_copy() -> bool {
9067            true
9068        }
9069
9070        #[inline(always)]
9071        fn decode_is_copy() -> bool {
9072            true
9073        }
9074    }
9075
9076    unsafe impl<D: fidl::encoding::ResourceDialect>
9077        fidl::encoding::Encode<RunnerGetVersionResponse, D> for &RunnerGetVersionResponse
9078    {
9079        #[inline]
9080        unsafe fn encode(
9081            self,
9082            encoder: &mut fidl::encoding::Encoder<'_, D>,
9083            offset: usize,
9084            _depth: fidl::encoding::Depth,
9085        ) -> fidl::Result<()> {
9086            encoder.debug_check_bounds::<RunnerGetVersionResponse>(offset);
9087            unsafe {
9088                // Copy the object into the buffer.
9089                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9090                (buf_ptr as *mut RunnerGetVersionResponse)
9091                    .write_unaligned((self as *const RunnerGetVersionResponse).read());
9092                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9093                // done second because the memcpy will write garbage to these bytes.
9094            }
9095            Ok(())
9096        }
9097    }
9098    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
9099        fidl::encoding::Encode<RunnerGetVersionResponse, D> for (T0,)
9100    {
9101        #[inline]
9102        unsafe fn encode(
9103            self,
9104            encoder: &mut fidl::encoding::Encoder<'_, D>,
9105            offset: usize,
9106            depth: fidl::encoding::Depth,
9107        ) -> fidl::Result<()> {
9108            encoder.debug_check_bounds::<RunnerGetVersionResponse>(offset);
9109            // Zero out padding regions. There's no need to apply masks
9110            // because the unmasked parts will be overwritten by fields.
9111            // Write the fields.
9112            self.0.encode(encoder, offset + 0, depth)?;
9113            Ok(())
9114        }
9115    }
9116
9117    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9118        for RunnerGetVersionResponse
9119    {
9120        #[inline(always)]
9121        fn new_empty() -> Self {
9122            Self { version: fidl::new_empty!(u64, D) }
9123        }
9124
9125        #[inline]
9126        unsafe fn decode(
9127            &mut self,
9128            decoder: &mut fidl::encoding::Decoder<'_, D>,
9129            offset: usize,
9130            _depth: fidl::encoding::Depth,
9131        ) -> fidl::Result<()> {
9132            decoder.debug_check_bounds::<Self>(offset);
9133            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9134            // Verify that padding bytes are zero.
9135            // Copy from the buffer into the object.
9136            unsafe {
9137                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9138            }
9139            Ok(())
9140        }
9141    }
9142
9143    impl fidl::encoding::ValueTypeMarker for RunnerOnTeardownRequest {
9144        type Borrowed<'a> = &'a Self;
9145        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9146            value
9147        }
9148    }
9149
9150    unsafe impl fidl::encoding::TypeMarker for RunnerOnTeardownRequest {
9151        type Owned = Self;
9152
9153        #[inline(always)]
9154        fn inline_align(_context: fidl::encoding::Context) -> usize {
9155            4
9156        }
9157
9158        #[inline(always)]
9159        fn inline_size(_context: fidl::encoding::Context) -> usize {
9160            4
9161        }
9162    }
9163
9164    unsafe impl<D: fidl::encoding::ResourceDialect>
9165        fidl::encoding::Encode<RunnerOnTeardownRequest, D> for &RunnerOnTeardownRequest
9166    {
9167        #[inline]
9168        unsafe fn encode(
9169            self,
9170            encoder: &mut fidl::encoding::Encoder<'_, D>,
9171            offset: usize,
9172            _depth: fidl::encoding::Depth,
9173        ) -> fidl::Result<()> {
9174            encoder.debug_check_bounds::<RunnerOnTeardownRequest>(offset);
9175            // Delegate to tuple encoding.
9176            fidl::encoding::Encode::<RunnerOnTeardownRequest, D>::encode(
9177                (<TeardownReason as fidl::encoding::ValueTypeMarker>::borrow(&self.reason),),
9178                encoder,
9179                offset,
9180                _depth,
9181            )
9182        }
9183    }
9184    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TeardownReason, D>>
9185        fidl::encoding::Encode<RunnerOnTeardownRequest, D> for (T0,)
9186    {
9187        #[inline]
9188        unsafe fn encode(
9189            self,
9190            encoder: &mut fidl::encoding::Encoder<'_, D>,
9191            offset: usize,
9192            depth: fidl::encoding::Depth,
9193        ) -> fidl::Result<()> {
9194            encoder.debug_check_bounds::<RunnerOnTeardownRequest>(offset);
9195            // Zero out padding regions. There's no need to apply masks
9196            // because the unmasked parts will be overwritten by fields.
9197            // Write the fields.
9198            self.0.encode(encoder, offset + 0, depth)?;
9199            Ok(())
9200        }
9201    }
9202
9203    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9204        for RunnerOnTeardownRequest
9205    {
9206        #[inline(always)]
9207        fn new_empty() -> Self {
9208            Self { reason: fidl::new_empty!(TeardownReason, D) }
9209        }
9210
9211        #[inline]
9212        unsafe fn decode(
9213            &mut self,
9214            decoder: &mut fidl::encoding::Decoder<'_, D>,
9215            offset: usize,
9216            _depth: fidl::encoding::Depth,
9217        ) -> fidl::Result<()> {
9218            decoder.debug_check_bounds::<Self>(offset);
9219            // Verify that padding bytes are zero.
9220            fidl::decode!(TeardownReason, D, &mut self.reason, decoder, offset + 0, _depth)?;
9221            Ok(())
9222        }
9223    }
9224
9225    impl fidl::encoding::ValueTypeMarker for RunnerShutdownWithEpitaphRequest {
9226        type Borrowed<'a> = &'a Self;
9227        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9228            value
9229        }
9230    }
9231
9232    unsafe impl fidl::encoding::TypeMarker for RunnerShutdownWithEpitaphRequest {
9233        type Owned = Self;
9234
9235        #[inline(always)]
9236        fn inline_align(_context: fidl::encoding::Context) -> usize {
9237            4
9238        }
9239
9240        #[inline(always)]
9241        fn inline_size(_context: fidl::encoding::Context) -> usize {
9242            4
9243        }
9244        #[inline(always)]
9245        fn encode_is_copy() -> bool {
9246            true
9247        }
9248
9249        #[inline(always)]
9250        fn decode_is_copy() -> bool {
9251            true
9252        }
9253    }
9254
9255    unsafe impl<D: fidl::encoding::ResourceDialect>
9256        fidl::encoding::Encode<RunnerShutdownWithEpitaphRequest, D>
9257        for &RunnerShutdownWithEpitaphRequest
9258    {
9259        #[inline]
9260        unsafe fn encode(
9261            self,
9262            encoder: &mut fidl::encoding::Encoder<'_, D>,
9263            offset: usize,
9264            _depth: fidl::encoding::Depth,
9265        ) -> fidl::Result<()> {
9266            encoder.debug_check_bounds::<RunnerShutdownWithEpitaphRequest>(offset);
9267            unsafe {
9268                // Copy the object into the buffer.
9269                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9270                (buf_ptr as *mut RunnerShutdownWithEpitaphRequest)
9271                    .write_unaligned((self as *const RunnerShutdownWithEpitaphRequest).read());
9272                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9273                // done second because the memcpy will write garbage to these bytes.
9274            }
9275            Ok(())
9276        }
9277    }
9278    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
9279        fidl::encoding::Encode<RunnerShutdownWithEpitaphRequest, D> for (T0,)
9280    {
9281        #[inline]
9282        unsafe fn encode(
9283            self,
9284            encoder: &mut fidl::encoding::Encoder<'_, D>,
9285            offset: usize,
9286            depth: fidl::encoding::Depth,
9287        ) -> fidl::Result<()> {
9288            encoder.debug_check_bounds::<RunnerShutdownWithEpitaphRequest>(offset);
9289            // Zero out padding regions. There's no need to apply masks
9290            // because the unmasked parts will be overwritten by fields.
9291            // Write the fields.
9292            self.0.encode(encoder, offset + 0, depth)?;
9293            Ok(())
9294        }
9295    }
9296
9297    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9298        for RunnerShutdownWithEpitaphRequest
9299    {
9300        #[inline(always)]
9301        fn new_empty() -> Self {
9302            Self { epitaph_status: fidl::new_empty!(i32, D) }
9303        }
9304
9305        #[inline]
9306        unsafe fn decode(
9307            &mut self,
9308            decoder: &mut fidl::encoding::Decoder<'_, D>,
9309            offset: usize,
9310            _depth: fidl::encoding::Depth,
9311        ) -> fidl::Result<()> {
9312            decoder.debug_check_bounds::<Self>(offset);
9313            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9314            // Verify that padding bytes are zero.
9315            // Copy from the buffer into the object.
9316            unsafe {
9317                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
9318            }
9319            Ok(())
9320        }
9321    }
9322
9323    impl fidl::encoding::ResourceTypeMarker for RunnerStartRequest {
9324        type Borrowed<'a> = &'a mut Self;
9325        fn take_or_borrow<'a>(
9326            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9327        ) -> Self::Borrowed<'a> {
9328            value
9329        }
9330    }
9331
9332    unsafe impl fidl::encoding::TypeMarker for RunnerStartRequest {
9333        type Owned = Self;
9334
9335        #[inline(always)]
9336        fn inline_align(_context: fidl::encoding::Context) -> usize {
9337            8
9338        }
9339
9340        #[inline(always)]
9341        fn inline_size(_context: fidl::encoding::Context) -> usize {
9342            24
9343        }
9344    }
9345
9346    unsafe impl
9347        fidl::encoding::Encode<RunnerStartRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
9348        for &mut RunnerStartRequest
9349    {
9350        #[inline]
9351        unsafe fn encode(
9352            self,
9353            encoder: &mut fidl::encoding::Encoder<
9354                '_,
9355                fidl::encoding::DefaultFuchsiaResourceDialect,
9356            >,
9357            offset: usize,
9358            _depth: fidl::encoding::Depth,
9359        ) -> fidl::Result<()> {
9360            encoder.debug_check_bounds::<RunnerStartRequest>(offset);
9361            // Delegate to tuple encoding.
9362            fidl::encoding::Encode::<
9363                RunnerStartRequest,
9364                fidl::encoding::DefaultFuchsiaResourceDialect,
9365            >::encode(
9366                (
9367                    <Test as fidl::encoding::ValueTypeMarker>::borrow(&self.test),
9368                    <AnyTarget as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9369                        &mut self.any_target,
9370                    ),
9371                ),
9372                encoder,
9373                offset,
9374                _depth,
9375            )
9376        }
9377    }
9378    unsafe impl<
9379            T0: fidl::encoding::Encode<Test, fidl::encoding::DefaultFuchsiaResourceDialect>,
9380            T1: fidl::encoding::Encode<AnyTarget, fidl::encoding::DefaultFuchsiaResourceDialect>,
9381        >
9382        fidl::encoding::Encode<RunnerStartRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
9383        for (T0, T1)
9384    {
9385        #[inline]
9386        unsafe fn encode(
9387            self,
9388            encoder: &mut fidl::encoding::Encoder<
9389                '_,
9390                fidl::encoding::DefaultFuchsiaResourceDialect,
9391            >,
9392            offset: usize,
9393            depth: fidl::encoding::Depth,
9394        ) -> fidl::Result<()> {
9395            encoder.debug_check_bounds::<RunnerStartRequest>(offset);
9396            // Zero out padding regions. There's no need to apply masks
9397            // because the unmasked parts will be overwritten by fields.
9398            unsafe {
9399                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
9400                (ptr as *mut u64).write_unaligned(0);
9401            }
9402            // Write the fields.
9403            self.0.encode(encoder, offset + 0, depth)?;
9404            self.1.encode(encoder, offset + 8, depth)?;
9405            Ok(())
9406        }
9407    }
9408
9409    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9410        for RunnerStartRequest
9411    {
9412        #[inline(always)]
9413        fn new_empty() -> Self {
9414            Self {
9415                test: fidl::new_empty!(Test, fidl::encoding::DefaultFuchsiaResourceDialect),
9416                any_target: fidl::new_empty!(
9417                    AnyTarget,
9418                    fidl::encoding::DefaultFuchsiaResourceDialect
9419                ),
9420            }
9421        }
9422
9423        #[inline]
9424        unsafe fn decode(
9425            &mut self,
9426            decoder: &mut fidl::encoding::Decoder<
9427                '_,
9428                fidl::encoding::DefaultFuchsiaResourceDialect,
9429            >,
9430            offset: usize,
9431            _depth: fidl::encoding::Depth,
9432        ) -> fidl::Result<()> {
9433            decoder.debug_check_bounds::<Self>(offset);
9434            // Verify that padding bytes are zero.
9435            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
9436            let padval = unsafe { (ptr as *const u64).read_unaligned() };
9437            let mask = 0xffffffff00000000u64;
9438            let maskedval = padval & mask;
9439            if maskedval != 0 {
9440                return Err(fidl::Error::NonZeroPadding {
9441                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
9442                });
9443            }
9444            fidl::decode!(
9445                Test,
9446                fidl::encoding::DefaultFuchsiaResourceDialect,
9447                &mut self.test,
9448                decoder,
9449                offset + 0,
9450                _depth
9451            )?;
9452            fidl::decode!(
9453                AnyTarget,
9454                fidl::encoding::DefaultFuchsiaResourceDialect,
9455                &mut self.any_target,
9456                decoder,
9457                offset + 8,
9458                _depth
9459            )?;
9460            Ok(())
9461        }
9462    }
9463
9464    impl fidl::encoding::ValueTypeMarker for UnknownMethodInfo {
9465        type Borrowed<'a> = &'a Self;
9466        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9467            value
9468        }
9469    }
9470
9471    unsafe impl fidl::encoding::TypeMarker for UnknownMethodInfo {
9472        type Owned = Self;
9473
9474        #[inline(always)]
9475        fn inline_align(_context: fidl::encoding::Context) -> usize {
9476            8
9477        }
9478
9479        #[inline(always)]
9480        fn inline_size(_context: fidl::encoding::Context) -> usize {
9481            16
9482        }
9483    }
9484
9485    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnknownMethodInfo, D>
9486        for &UnknownMethodInfo
9487    {
9488        #[inline]
9489        unsafe fn encode(
9490            self,
9491            encoder: &mut fidl::encoding::Encoder<'_, D>,
9492            offset: usize,
9493            _depth: fidl::encoding::Depth,
9494        ) -> fidl::Result<()> {
9495            encoder.debug_check_bounds::<UnknownMethodInfo>(offset);
9496            // Delegate to tuple encoding.
9497            fidl::encoding::Encode::<UnknownMethodInfo, D>::encode(
9498                (
9499                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.ordinal),
9500                    <UnknownMethodType as fidl::encoding::ValueTypeMarker>::borrow(
9501                        &self.unknown_method_type,
9502                    ),
9503                ),
9504                encoder,
9505                offset,
9506                _depth,
9507            )
9508        }
9509    }
9510    unsafe impl<
9511            D: fidl::encoding::ResourceDialect,
9512            T0: fidl::encoding::Encode<u64, D>,
9513            T1: fidl::encoding::Encode<UnknownMethodType, D>,
9514        > fidl::encoding::Encode<UnknownMethodInfo, D> for (T0, T1)
9515    {
9516        #[inline]
9517        unsafe fn encode(
9518            self,
9519            encoder: &mut fidl::encoding::Encoder<'_, D>,
9520            offset: usize,
9521            depth: fidl::encoding::Depth,
9522        ) -> fidl::Result<()> {
9523            encoder.debug_check_bounds::<UnknownMethodInfo>(offset);
9524            // Zero out padding regions. There's no need to apply masks
9525            // because the unmasked parts will be overwritten by fields.
9526            unsafe {
9527                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9528                (ptr as *mut u64).write_unaligned(0);
9529            }
9530            // Write the fields.
9531            self.0.encode(encoder, offset + 0, depth)?;
9532            self.1.encode(encoder, offset + 8, depth)?;
9533            Ok(())
9534        }
9535    }
9536
9537    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnknownMethodInfo {
9538        #[inline(always)]
9539        fn new_empty() -> Self {
9540            Self {
9541                ordinal: fidl::new_empty!(u64, D),
9542                unknown_method_type: fidl::new_empty!(UnknownMethodType, D),
9543            }
9544        }
9545
9546        #[inline]
9547        unsafe fn decode(
9548            &mut self,
9549            decoder: &mut fidl::encoding::Decoder<'_, D>,
9550            offset: usize,
9551            _depth: fidl::encoding::Depth,
9552        ) -> fidl::Result<()> {
9553            decoder.debug_check_bounds::<Self>(offset);
9554            // Verify that padding bytes are zero.
9555            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9556            let padval = unsafe { (ptr as *const u64).read_unaligned() };
9557            let mask = 0xffffffff00000000u64;
9558            let maskedval = padval & mask;
9559            if maskedval != 0 {
9560                return Err(fidl::Error::NonZeroPadding {
9561                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9562                });
9563            }
9564            fidl::decode!(u64, D, &mut self.ordinal, decoder, offset + 0, _depth)?;
9565            fidl::decode!(
9566                UnknownMethodType,
9567                D,
9568                &mut self.unknown_method_type,
9569                decoder,
9570                offset + 8,
9571                _depth
9572            )?;
9573            Ok(())
9574        }
9575    }
9576
9577    impl ClosedTargetTwoWayTablePayloadRequest {
9578        #[inline(always)]
9579        fn max_ordinal_present(&self) -> u64 {
9580            if let Some(_) = self.v {
9581                return 1;
9582            }
9583            0
9584        }
9585    }
9586
9587    impl fidl::encoding::ValueTypeMarker for ClosedTargetTwoWayTablePayloadRequest {
9588        type Borrowed<'a> = &'a Self;
9589        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9590            value
9591        }
9592    }
9593
9594    unsafe impl fidl::encoding::TypeMarker for ClosedTargetTwoWayTablePayloadRequest {
9595        type Owned = Self;
9596
9597        #[inline(always)]
9598        fn inline_align(_context: fidl::encoding::Context) -> usize {
9599            8
9600        }
9601
9602        #[inline(always)]
9603        fn inline_size(_context: fidl::encoding::Context) -> usize {
9604            16
9605        }
9606    }
9607
9608    unsafe impl<D: fidl::encoding::ResourceDialect>
9609        fidl::encoding::Encode<ClosedTargetTwoWayTablePayloadRequest, D>
9610        for &ClosedTargetTwoWayTablePayloadRequest
9611    {
9612        unsafe fn encode(
9613            self,
9614            encoder: &mut fidl::encoding::Encoder<'_, D>,
9615            offset: usize,
9616            mut depth: fidl::encoding::Depth,
9617        ) -> fidl::Result<()> {
9618            encoder.debug_check_bounds::<ClosedTargetTwoWayTablePayloadRequest>(offset);
9619            // Vector header
9620            let max_ordinal: u64 = self.max_ordinal_present();
9621            encoder.write_num(max_ordinal, offset);
9622            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
9623            // Calling encoder.out_of_line_offset(0) is not allowed.
9624            if max_ordinal == 0 {
9625                return Ok(());
9626            }
9627            depth.increment()?;
9628            let envelope_size = 8;
9629            let bytes_len = max_ordinal as usize * envelope_size;
9630            #[allow(unused_variables)]
9631            let offset = encoder.out_of_line_offset(bytes_len);
9632            let mut _prev_end_offset: usize = 0;
9633            if 1 > max_ordinal {
9634                return Ok(());
9635            }
9636
9637            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
9638            // are envelope_size bytes.
9639            let cur_offset: usize = (1 - 1) * envelope_size;
9640
9641            // Zero reserved fields.
9642            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
9643
9644            // Safety:
9645            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
9646            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
9647            //   envelope_size bytes, there is always sufficient room.
9648            fidl::encoding::encode_in_envelope_optional::<i8, D>(
9649                self.v.as_ref().map(<i8 as fidl::encoding::ValueTypeMarker>::borrow),
9650                encoder,
9651                offset + cur_offset,
9652                depth,
9653            )?;
9654
9655            _prev_end_offset = cur_offset + envelope_size;
9656
9657            Ok(())
9658        }
9659    }
9660
9661    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9662        for ClosedTargetTwoWayTablePayloadRequest
9663    {
9664        #[inline(always)]
9665        fn new_empty() -> Self {
9666            Self::default()
9667        }
9668
9669        unsafe fn decode(
9670            &mut self,
9671            decoder: &mut fidl::encoding::Decoder<'_, D>,
9672            offset: usize,
9673            mut depth: fidl::encoding::Depth,
9674        ) -> fidl::Result<()> {
9675            decoder.debug_check_bounds::<Self>(offset);
9676            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
9677                None => return Err(fidl::Error::NotNullable),
9678                Some(len) => len,
9679            };
9680            // Calling decoder.out_of_line_offset(0) is not allowed.
9681            if len == 0 {
9682                return Ok(());
9683            };
9684            depth.increment()?;
9685            let envelope_size = 8;
9686            let bytes_len = len * envelope_size;
9687            let offset = decoder.out_of_line_offset(bytes_len)?;
9688            // Decode the envelope for each type.
9689            let mut _next_ordinal_to_read = 0;
9690            let mut next_offset = offset;
9691            let end_offset = offset + bytes_len;
9692            _next_ordinal_to_read += 1;
9693            if next_offset >= end_offset {
9694                return Ok(());
9695            }
9696
9697            // Decode unknown envelopes for gaps in ordinals.
9698            while _next_ordinal_to_read < 1 {
9699                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9700                _next_ordinal_to_read += 1;
9701                next_offset += envelope_size;
9702            }
9703
9704            let next_out_of_line = decoder.next_out_of_line();
9705            let handles_before = decoder.remaining_handles();
9706            if let Some((inlined, num_bytes, num_handles)) =
9707                fidl::encoding::decode_envelope_header(decoder, next_offset)?
9708            {
9709                let member_inline_size =
9710                    <i8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
9711                if inlined != (member_inline_size <= 4) {
9712                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
9713                }
9714                let inner_offset;
9715                let mut inner_depth = depth.clone();
9716                if inlined {
9717                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
9718                    inner_offset = next_offset;
9719                } else {
9720                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
9721                    inner_depth.increment()?;
9722                }
9723                let val_ref = self.v.get_or_insert_with(|| fidl::new_empty!(i8, D));
9724                fidl::decode!(i8, D, val_ref, decoder, inner_offset, inner_depth)?;
9725                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
9726                {
9727                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
9728                }
9729                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
9730                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
9731                }
9732            }
9733
9734            next_offset += envelope_size;
9735
9736            // Decode the remaining unknown envelopes.
9737            while next_offset < end_offset {
9738                _next_ordinal_to_read += 1;
9739                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9740                next_offset += envelope_size;
9741            }
9742
9743            Ok(())
9744        }
9745    }
9746
9747    impl ClosedTargetTwoWayTablePayloadResponse {
9748        #[inline(always)]
9749        fn max_ordinal_present(&self) -> u64 {
9750            if let Some(_) = self.v {
9751                return 1;
9752            }
9753            0
9754        }
9755    }
9756
9757    impl fidl::encoding::ValueTypeMarker for ClosedTargetTwoWayTablePayloadResponse {
9758        type Borrowed<'a> = &'a Self;
9759        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9760            value
9761        }
9762    }
9763
9764    unsafe impl fidl::encoding::TypeMarker for ClosedTargetTwoWayTablePayloadResponse {
9765        type Owned = Self;
9766
9767        #[inline(always)]
9768        fn inline_align(_context: fidl::encoding::Context) -> usize {
9769            8
9770        }
9771
9772        #[inline(always)]
9773        fn inline_size(_context: fidl::encoding::Context) -> usize {
9774            16
9775        }
9776    }
9777
9778    unsafe impl<D: fidl::encoding::ResourceDialect>
9779        fidl::encoding::Encode<ClosedTargetTwoWayTablePayloadResponse, D>
9780        for &ClosedTargetTwoWayTablePayloadResponse
9781    {
9782        unsafe fn encode(
9783            self,
9784            encoder: &mut fidl::encoding::Encoder<'_, D>,
9785            offset: usize,
9786            mut depth: fidl::encoding::Depth,
9787        ) -> fidl::Result<()> {
9788            encoder.debug_check_bounds::<ClosedTargetTwoWayTablePayloadResponse>(offset);
9789            // Vector header
9790            let max_ordinal: u64 = self.max_ordinal_present();
9791            encoder.write_num(max_ordinal, offset);
9792            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
9793            // Calling encoder.out_of_line_offset(0) is not allowed.
9794            if max_ordinal == 0 {
9795                return Ok(());
9796            }
9797            depth.increment()?;
9798            let envelope_size = 8;
9799            let bytes_len = max_ordinal as usize * envelope_size;
9800            #[allow(unused_variables)]
9801            let offset = encoder.out_of_line_offset(bytes_len);
9802            let mut _prev_end_offset: usize = 0;
9803            if 1 > max_ordinal {
9804                return Ok(());
9805            }
9806
9807            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
9808            // are envelope_size bytes.
9809            let cur_offset: usize = (1 - 1) * envelope_size;
9810
9811            // Zero reserved fields.
9812            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
9813
9814            // Safety:
9815            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
9816            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
9817            //   envelope_size bytes, there is always sufficient room.
9818            fidl::encoding::encode_in_envelope_optional::<i8, D>(
9819                self.v.as_ref().map(<i8 as fidl::encoding::ValueTypeMarker>::borrow),
9820                encoder,
9821                offset + cur_offset,
9822                depth,
9823            )?;
9824
9825            _prev_end_offset = cur_offset + envelope_size;
9826
9827            Ok(())
9828        }
9829    }
9830
9831    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9832        for ClosedTargetTwoWayTablePayloadResponse
9833    {
9834        #[inline(always)]
9835        fn new_empty() -> Self {
9836            Self::default()
9837        }
9838
9839        unsafe fn decode(
9840            &mut self,
9841            decoder: &mut fidl::encoding::Decoder<'_, D>,
9842            offset: usize,
9843            mut depth: fidl::encoding::Depth,
9844        ) -> fidl::Result<()> {
9845            decoder.debug_check_bounds::<Self>(offset);
9846            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
9847                None => return Err(fidl::Error::NotNullable),
9848                Some(len) => len,
9849            };
9850            // Calling decoder.out_of_line_offset(0) is not allowed.
9851            if len == 0 {
9852                return Ok(());
9853            };
9854            depth.increment()?;
9855            let envelope_size = 8;
9856            let bytes_len = len * envelope_size;
9857            let offset = decoder.out_of_line_offset(bytes_len)?;
9858            // Decode the envelope for each type.
9859            let mut _next_ordinal_to_read = 0;
9860            let mut next_offset = offset;
9861            let end_offset = offset + bytes_len;
9862            _next_ordinal_to_read += 1;
9863            if next_offset >= end_offset {
9864                return Ok(());
9865            }
9866
9867            // Decode unknown envelopes for gaps in ordinals.
9868            while _next_ordinal_to_read < 1 {
9869                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9870                _next_ordinal_to_read += 1;
9871                next_offset += envelope_size;
9872            }
9873
9874            let next_out_of_line = decoder.next_out_of_line();
9875            let handles_before = decoder.remaining_handles();
9876            if let Some((inlined, num_bytes, num_handles)) =
9877                fidl::encoding::decode_envelope_header(decoder, next_offset)?
9878            {
9879                let member_inline_size =
9880                    <i8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
9881                if inlined != (member_inline_size <= 4) {
9882                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
9883                }
9884                let inner_offset;
9885                let mut inner_depth = depth.clone();
9886                if inlined {
9887                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
9888                    inner_offset = next_offset;
9889                } else {
9890                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
9891                    inner_depth.increment()?;
9892                }
9893                let val_ref = self.v.get_or_insert_with(|| fidl::new_empty!(i8, D));
9894                fidl::decode!(i8, D, val_ref, decoder, inner_offset, inner_depth)?;
9895                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
9896                {
9897                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
9898                }
9899                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
9900                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
9901                }
9902            }
9903
9904            next_offset += envelope_size;
9905
9906            // Decode the remaining unknown envelopes.
9907            while next_offset < end_offset {
9908                _next_ordinal_to_read += 1;
9909                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9910                next_offset += envelope_size;
9911            }
9912
9913            Ok(())
9914        }
9915    }
9916
9917    impl fidl::encoding::ResourceTypeMarker for AnyTarget {
9918        type Borrowed<'a> = &'a mut Self;
9919        fn take_or_borrow<'a>(
9920            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9921        ) -> Self::Borrowed<'a> {
9922            value
9923        }
9924    }
9925
9926    unsafe impl fidl::encoding::TypeMarker for AnyTarget {
9927        type Owned = Self;
9928
9929        #[inline(always)]
9930        fn inline_align(_context: fidl::encoding::Context) -> usize {
9931            8
9932        }
9933
9934        #[inline(always)]
9935        fn inline_size(_context: fidl::encoding::Context) -> usize {
9936            16
9937        }
9938    }
9939
9940    unsafe impl fidl::encoding::Encode<AnyTarget, fidl::encoding::DefaultFuchsiaResourceDialect>
9941        for &mut AnyTarget
9942    {
9943        #[inline]
9944        unsafe fn encode(
9945            self,
9946            encoder: &mut fidl::encoding::Encoder<
9947                '_,
9948                fidl::encoding::DefaultFuchsiaResourceDialect,
9949            >,
9950            offset: usize,
9951            _depth: fidl::encoding::Depth,
9952        ) -> fidl::Result<()> {
9953            encoder.debug_check_bounds::<AnyTarget>(offset);
9954            encoder.write_num::<u64>(self.ordinal(), offset);
9955            match self {
9956            AnyTarget::Closed(ref mut val) => {
9957                fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClosedTargetMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
9958                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClosedTargetMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
9959                    encoder, offset + 8, _depth
9960                )
9961            }
9962            AnyTarget::Ajar(ref mut val) => {
9963                fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<AjarTargetMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
9964                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<AjarTargetMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
9965                    encoder, offset + 8, _depth
9966                )
9967            }
9968            AnyTarget::Open(ref mut val) => {
9969                fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<OpenTargetMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
9970                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<OpenTargetMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
9971                    encoder, offset + 8, _depth
9972                )
9973            }
9974        }
9975        }
9976    }
9977
9978    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for AnyTarget {
9979        #[inline(always)]
9980        fn new_empty() -> Self {
9981            Self::Closed(fidl::new_empty!(
9982                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClosedTargetMarker>>,
9983                fidl::encoding::DefaultFuchsiaResourceDialect
9984            ))
9985        }
9986
9987        #[inline]
9988        unsafe fn decode(
9989            &mut self,
9990            decoder: &mut fidl::encoding::Decoder<
9991                '_,
9992                fidl::encoding::DefaultFuchsiaResourceDialect,
9993            >,
9994            offset: usize,
9995            mut depth: fidl::encoding::Depth,
9996        ) -> fidl::Result<()> {
9997            decoder.debug_check_bounds::<Self>(offset);
9998            #[allow(unused_variables)]
9999            let next_out_of_line = decoder.next_out_of_line();
10000            let handles_before = decoder.remaining_handles();
10001            let (ordinal, inlined, num_bytes, num_handles) =
10002                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
10003
10004            let member_inline_size = match ordinal {
10005            1 => <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClosedTargetMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
10006            2 => <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<AjarTargetMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
10007            3 => <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<OpenTargetMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
10008            _ => return Err(fidl::Error::UnknownUnionTag),
10009        };
10010
10011            if inlined != (member_inline_size <= 4) {
10012                return Err(fidl::Error::InvalidInlineBitInEnvelope);
10013            }
10014            let _inner_offset;
10015            if inlined {
10016                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
10017                _inner_offset = offset + 8;
10018            } else {
10019                depth.increment()?;
10020                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10021            }
10022            match ordinal {
10023                1 => {
10024                    #[allow(irrefutable_let_patterns)]
10025                    if let AnyTarget::Closed(_) = self {
10026                        // Do nothing, read the value into the object
10027                    } else {
10028                        // Initialize `self` to the right variant
10029                        *self = AnyTarget::Closed(fidl::new_empty!(
10030                            fidl::encoding::Endpoint<
10031                                fidl::endpoints::ServerEnd<ClosedTargetMarker>,
10032                            >,
10033                            fidl::encoding::DefaultFuchsiaResourceDialect
10034                        ));
10035                    }
10036                    #[allow(irrefutable_let_patterns)]
10037                    if let AnyTarget::Closed(ref mut val) = self {
10038                        fidl::decode!(
10039                            fidl::encoding::Endpoint<
10040                                fidl::endpoints::ServerEnd<ClosedTargetMarker>,
10041                            >,
10042                            fidl::encoding::DefaultFuchsiaResourceDialect,
10043                            val,
10044                            decoder,
10045                            _inner_offset,
10046                            depth
10047                        )?;
10048                    } else {
10049                        unreachable!()
10050                    }
10051                }
10052                2 => {
10053                    #[allow(irrefutable_let_patterns)]
10054                    if let AnyTarget::Ajar(_) = self {
10055                        // Do nothing, read the value into the object
10056                    } else {
10057                        // Initialize `self` to the right variant
10058                        *self = AnyTarget::Ajar(fidl::new_empty!(
10059                            fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<AjarTargetMarker>>,
10060                            fidl::encoding::DefaultFuchsiaResourceDialect
10061                        ));
10062                    }
10063                    #[allow(irrefutable_let_patterns)]
10064                    if let AnyTarget::Ajar(ref mut val) = self {
10065                        fidl::decode!(
10066                            fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<AjarTargetMarker>>,
10067                            fidl::encoding::DefaultFuchsiaResourceDialect,
10068                            val,
10069                            decoder,
10070                            _inner_offset,
10071                            depth
10072                        )?;
10073                    } else {
10074                        unreachable!()
10075                    }
10076                }
10077                3 => {
10078                    #[allow(irrefutable_let_patterns)]
10079                    if let AnyTarget::Open(_) = self {
10080                        // Do nothing, read the value into the object
10081                    } else {
10082                        // Initialize `self` to the right variant
10083                        *self = AnyTarget::Open(fidl::new_empty!(
10084                            fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<OpenTargetMarker>>,
10085                            fidl::encoding::DefaultFuchsiaResourceDialect
10086                        ));
10087                    }
10088                    #[allow(irrefutable_let_patterns)]
10089                    if let AnyTarget::Open(ref mut val) = self {
10090                        fidl::decode!(
10091                            fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<OpenTargetMarker>>,
10092                            fidl::encoding::DefaultFuchsiaResourceDialect,
10093                            val,
10094                            decoder,
10095                            _inner_offset,
10096                            depth
10097                        )?;
10098                    } else {
10099                        unreachable!()
10100                    }
10101                }
10102                ordinal => panic!("unexpected ordinal {:?}", ordinal),
10103            }
10104            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
10105                return Err(fidl::Error::InvalidNumBytesInEnvelope);
10106            }
10107            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10108                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10109            }
10110            Ok(())
10111        }
10112    }
10113
10114    impl fidl::encoding::ValueTypeMarker for ClosedTargetTwoWayResultRequest {
10115        type Borrowed<'a> = &'a Self;
10116        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10117            value
10118        }
10119    }
10120
10121    unsafe impl fidl::encoding::TypeMarker for ClosedTargetTwoWayResultRequest {
10122        type Owned = Self;
10123
10124        #[inline(always)]
10125        fn inline_align(_context: fidl::encoding::Context) -> usize {
10126            8
10127        }
10128
10129        #[inline(always)]
10130        fn inline_size(_context: fidl::encoding::Context) -> usize {
10131            16
10132        }
10133    }
10134
10135    unsafe impl<D: fidl::encoding::ResourceDialect>
10136        fidl::encoding::Encode<ClosedTargetTwoWayResultRequest, D>
10137        for &ClosedTargetTwoWayResultRequest
10138    {
10139        #[inline]
10140        unsafe fn encode(
10141            self,
10142            encoder: &mut fidl::encoding::Encoder<'_, D>,
10143            offset: usize,
10144            _depth: fidl::encoding::Depth,
10145        ) -> fidl::Result<()> {
10146            encoder.debug_check_bounds::<ClosedTargetTwoWayResultRequest>(offset);
10147            encoder.write_num::<u64>(self.ordinal(), offset);
10148            match self {
10149            ClosedTargetTwoWayResultRequest::Payload(ref val) => {
10150                fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedString, D>(
10151                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(val),
10152                    encoder, offset + 8, _depth
10153                )
10154            }
10155            ClosedTargetTwoWayResultRequest::Error(ref val) => {
10156                fidl::encoding::encode_in_envelope::<u32, D>(
10157                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
10158                    encoder, offset + 8, _depth
10159                )
10160            }
10161        }
10162        }
10163    }
10164
10165    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10166        for ClosedTargetTwoWayResultRequest
10167    {
10168        #[inline(always)]
10169        fn new_empty() -> Self {
10170            Self::Payload(fidl::new_empty!(fidl::encoding::UnboundedString, D))
10171        }
10172
10173        #[inline]
10174        unsafe fn decode(
10175            &mut self,
10176            decoder: &mut fidl::encoding::Decoder<'_, D>,
10177            offset: usize,
10178            mut depth: fidl::encoding::Depth,
10179        ) -> fidl::Result<()> {
10180            decoder.debug_check_bounds::<Self>(offset);
10181            #[allow(unused_variables)]
10182            let next_out_of_line = decoder.next_out_of_line();
10183            let handles_before = decoder.remaining_handles();
10184            let (ordinal, inlined, num_bytes, num_handles) =
10185                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
10186
10187            let member_inline_size = match ordinal {
10188                1 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
10189                    decoder.context,
10190                ),
10191                2 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
10192                _ => return Err(fidl::Error::UnknownUnionTag),
10193            };
10194
10195            if inlined != (member_inline_size <= 4) {
10196                return Err(fidl::Error::InvalidInlineBitInEnvelope);
10197            }
10198            let _inner_offset;
10199            if inlined {
10200                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
10201                _inner_offset = offset + 8;
10202            } else {
10203                depth.increment()?;
10204                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10205            }
10206            match ordinal {
10207                1 => {
10208                    #[allow(irrefutable_let_patterns)]
10209                    if let ClosedTargetTwoWayResultRequest::Payload(_) = self {
10210                        // Do nothing, read the value into the object
10211                    } else {
10212                        // Initialize `self` to the right variant
10213                        *self = ClosedTargetTwoWayResultRequest::Payload(fidl::new_empty!(
10214                            fidl::encoding::UnboundedString,
10215                            D
10216                        ));
10217                    }
10218                    #[allow(irrefutable_let_patterns)]
10219                    if let ClosedTargetTwoWayResultRequest::Payload(ref mut val) = self {
10220                        fidl::decode!(
10221                            fidl::encoding::UnboundedString,
10222                            D,
10223                            val,
10224                            decoder,
10225                            _inner_offset,
10226                            depth
10227                        )?;
10228                    } else {
10229                        unreachable!()
10230                    }
10231                }
10232                2 => {
10233                    #[allow(irrefutable_let_patterns)]
10234                    if let ClosedTargetTwoWayResultRequest::Error(_) = self {
10235                        // Do nothing, read the value into the object
10236                    } else {
10237                        // Initialize `self` to the right variant
10238                        *self = ClosedTargetTwoWayResultRequest::Error(fidl::new_empty!(u32, D));
10239                    }
10240                    #[allow(irrefutable_let_patterns)]
10241                    if let ClosedTargetTwoWayResultRequest::Error(ref mut val) = self {
10242                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
10243                    } else {
10244                        unreachable!()
10245                    }
10246                }
10247                ordinal => panic!("unexpected ordinal {:?}", ordinal),
10248            }
10249            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
10250                return Err(fidl::Error::InvalidNumBytesInEnvelope);
10251            }
10252            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10253                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10254            }
10255            Ok(())
10256        }
10257    }
10258
10259    impl fidl::encoding::ValueTypeMarker for ClosedTargetTwoWayUnionPayloadRequest {
10260        type Borrowed<'a> = &'a Self;
10261        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10262            value
10263        }
10264    }
10265
10266    unsafe impl fidl::encoding::TypeMarker for ClosedTargetTwoWayUnionPayloadRequest {
10267        type Owned = Self;
10268
10269        #[inline(always)]
10270        fn inline_align(_context: fidl::encoding::Context) -> usize {
10271            8
10272        }
10273
10274        #[inline(always)]
10275        fn inline_size(_context: fidl::encoding::Context) -> usize {
10276            16
10277        }
10278    }
10279
10280    unsafe impl<D: fidl::encoding::ResourceDialect>
10281        fidl::encoding::Encode<ClosedTargetTwoWayUnionPayloadRequest, D>
10282        for &ClosedTargetTwoWayUnionPayloadRequest
10283    {
10284        #[inline]
10285        unsafe fn encode(
10286            self,
10287            encoder: &mut fidl::encoding::Encoder<'_, D>,
10288            offset: usize,
10289            _depth: fidl::encoding::Depth,
10290        ) -> fidl::Result<()> {
10291            encoder.debug_check_bounds::<ClosedTargetTwoWayUnionPayloadRequest>(offset);
10292            encoder.write_num::<u64>(self.ordinal(), offset);
10293            match self {
10294                ClosedTargetTwoWayUnionPayloadRequest::V(ref val) => {
10295                    fidl::encoding::encode_in_envelope::<i8, D>(
10296                        <i8 as fidl::encoding::ValueTypeMarker>::borrow(val),
10297                        encoder,
10298                        offset + 8,
10299                        _depth,
10300                    )
10301                }
10302                ClosedTargetTwoWayUnionPayloadRequest::__SourceBreaking { .. } => {
10303                    Err(fidl::Error::UnknownUnionTag)
10304                }
10305            }
10306        }
10307    }
10308
10309    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10310        for ClosedTargetTwoWayUnionPayloadRequest
10311    {
10312        #[inline(always)]
10313        fn new_empty() -> Self {
10314            Self::__SourceBreaking { unknown_ordinal: 0 }
10315        }
10316
10317        #[inline]
10318        unsafe fn decode(
10319            &mut self,
10320            decoder: &mut fidl::encoding::Decoder<'_, D>,
10321            offset: usize,
10322            mut depth: fidl::encoding::Depth,
10323        ) -> fidl::Result<()> {
10324            decoder.debug_check_bounds::<Self>(offset);
10325            #[allow(unused_variables)]
10326            let next_out_of_line = decoder.next_out_of_line();
10327            let handles_before = decoder.remaining_handles();
10328            let (ordinal, inlined, num_bytes, num_handles) =
10329                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
10330
10331            let member_inline_size = match ordinal {
10332                1 => <i8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
10333                0 => return Err(fidl::Error::UnknownUnionTag),
10334                _ => num_bytes as usize,
10335            };
10336
10337            if inlined != (member_inline_size <= 4) {
10338                return Err(fidl::Error::InvalidInlineBitInEnvelope);
10339            }
10340            let _inner_offset;
10341            if inlined {
10342                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
10343                _inner_offset = offset + 8;
10344            } else {
10345                depth.increment()?;
10346                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10347            }
10348            match ordinal {
10349                1 => {
10350                    #[allow(irrefutable_let_patterns)]
10351                    if let ClosedTargetTwoWayUnionPayloadRequest::V(_) = self {
10352                        // Do nothing, read the value into the object
10353                    } else {
10354                        // Initialize `self` to the right variant
10355                        *self = ClosedTargetTwoWayUnionPayloadRequest::V(fidl::new_empty!(i8, D));
10356                    }
10357                    #[allow(irrefutable_let_patterns)]
10358                    if let ClosedTargetTwoWayUnionPayloadRequest::V(ref mut val) = self {
10359                        fidl::decode!(i8, D, val, decoder, _inner_offset, depth)?;
10360                    } else {
10361                        unreachable!()
10362                    }
10363                }
10364                #[allow(deprecated)]
10365                ordinal => {
10366                    for _ in 0..num_handles {
10367                        decoder.drop_next_handle()?;
10368                    }
10369                    *self = ClosedTargetTwoWayUnionPayloadRequest::__SourceBreaking {
10370                        unknown_ordinal: ordinal,
10371                    };
10372                }
10373            }
10374            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
10375                return Err(fidl::Error::InvalidNumBytesInEnvelope);
10376            }
10377            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10378                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10379            }
10380            Ok(())
10381        }
10382    }
10383
10384    impl fidl::encoding::ValueTypeMarker for ClosedTargetTwoWayUnionPayloadResponse {
10385        type Borrowed<'a> = &'a Self;
10386        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10387            value
10388        }
10389    }
10390
10391    unsafe impl fidl::encoding::TypeMarker for ClosedTargetTwoWayUnionPayloadResponse {
10392        type Owned = Self;
10393
10394        #[inline(always)]
10395        fn inline_align(_context: fidl::encoding::Context) -> usize {
10396            8
10397        }
10398
10399        #[inline(always)]
10400        fn inline_size(_context: fidl::encoding::Context) -> usize {
10401            16
10402        }
10403    }
10404
10405    unsafe impl<D: fidl::encoding::ResourceDialect>
10406        fidl::encoding::Encode<ClosedTargetTwoWayUnionPayloadResponse, D>
10407        for &ClosedTargetTwoWayUnionPayloadResponse
10408    {
10409        #[inline]
10410        unsafe fn encode(
10411            self,
10412            encoder: &mut fidl::encoding::Encoder<'_, D>,
10413            offset: usize,
10414            _depth: fidl::encoding::Depth,
10415        ) -> fidl::Result<()> {
10416            encoder.debug_check_bounds::<ClosedTargetTwoWayUnionPayloadResponse>(offset);
10417            encoder.write_num::<u64>(self.ordinal(), offset);
10418            match self {
10419                ClosedTargetTwoWayUnionPayloadResponse::V(ref val) => {
10420                    fidl::encoding::encode_in_envelope::<i8, D>(
10421                        <i8 as fidl::encoding::ValueTypeMarker>::borrow(val),
10422                        encoder,
10423                        offset + 8,
10424                        _depth,
10425                    )
10426                }
10427                ClosedTargetTwoWayUnionPayloadResponse::__SourceBreaking { .. } => {
10428                    Err(fidl::Error::UnknownUnionTag)
10429                }
10430            }
10431        }
10432    }
10433
10434    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10435        for ClosedTargetTwoWayUnionPayloadResponse
10436    {
10437        #[inline(always)]
10438        fn new_empty() -> Self {
10439            Self::__SourceBreaking { unknown_ordinal: 0 }
10440        }
10441
10442        #[inline]
10443        unsafe fn decode(
10444            &mut self,
10445            decoder: &mut fidl::encoding::Decoder<'_, D>,
10446            offset: usize,
10447            mut depth: fidl::encoding::Depth,
10448        ) -> fidl::Result<()> {
10449            decoder.debug_check_bounds::<Self>(offset);
10450            #[allow(unused_variables)]
10451            let next_out_of_line = decoder.next_out_of_line();
10452            let handles_before = decoder.remaining_handles();
10453            let (ordinal, inlined, num_bytes, num_handles) =
10454                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
10455
10456            let member_inline_size = match ordinal {
10457                1 => <i8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
10458                0 => return Err(fidl::Error::UnknownUnionTag),
10459                _ => num_bytes as usize,
10460            };
10461
10462            if inlined != (member_inline_size <= 4) {
10463                return Err(fidl::Error::InvalidInlineBitInEnvelope);
10464            }
10465            let _inner_offset;
10466            if inlined {
10467                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
10468                _inner_offset = offset + 8;
10469            } else {
10470                depth.increment()?;
10471                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10472            }
10473            match ordinal {
10474                1 => {
10475                    #[allow(irrefutable_let_patterns)]
10476                    if let ClosedTargetTwoWayUnionPayloadResponse::V(_) = self {
10477                        // Do nothing, read the value into the object
10478                    } else {
10479                        // Initialize `self` to the right variant
10480                        *self = ClosedTargetTwoWayUnionPayloadResponse::V(fidl::new_empty!(i8, D));
10481                    }
10482                    #[allow(irrefutable_let_patterns)]
10483                    if let ClosedTargetTwoWayUnionPayloadResponse::V(ref mut val) = self {
10484                        fidl::decode!(i8, D, val, decoder, _inner_offset, depth)?;
10485                    } else {
10486                        unreachable!()
10487                    }
10488                }
10489                #[allow(deprecated)]
10490                ordinal => {
10491                    for _ in 0..num_handles {
10492                        decoder.drop_next_handle()?;
10493                    }
10494                    *self = ClosedTargetTwoWayUnionPayloadResponse::__SourceBreaking {
10495                        unknown_ordinal: ordinal,
10496                    };
10497                }
10498            }
10499            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
10500                return Err(fidl::Error::InvalidNumBytesInEnvelope);
10501            }
10502            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10503                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10504            }
10505            Ok(())
10506        }
10507    }
10508
10509    impl fidl::encoding::ValueTypeMarker for OpenTargetFlexibleTwoWayErrRequest {
10510        type Borrowed<'a> = &'a Self;
10511        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10512            value
10513        }
10514    }
10515
10516    unsafe impl fidl::encoding::TypeMarker for OpenTargetFlexibleTwoWayErrRequest {
10517        type Owned = Self;
10518
10519        #[inline(always)]
10520        fn inline_align(_context: fidl::encoding::Context) -> usize {
10521            8
10522        }
10523
10524        #[inline(always)]
10525        fn inline_size(_context: fidl::encoding::Context) -> usize {
10526            16
10527        }
10528    }
10529
10530    unsafe impl<D: fidl::encoding::ResourceDialect>
10531        fidl::encoding::Encode<OpenTargetFlexibleTwoWayErrRequest, D>
10532        for &OpenTargetFlexibleTwoWayErrRequest
10533    {
10534        #[inline]
10535        unsafe fn encode(
10536            self,
10537            encoder: &mut fidl::encoding::Encoder<'_, D>,
10538            offset: usize,
10539            _depth: fidl::encoding::Depth,
10540        ) -> fidl::Result<()> {
10541            encoder.debug_check_bounds::<OpenTargetFlexibleTwoWayErrRequest>(offset);
10542            encoder.write_num::<u64>(self.ordinal(), offset);
10543            match self {
10544                OpenTargetFlexibleTwoWayErrRequest::ReplySuccess(ref val) => {
10545                    fidl::encoding::encode_in_envelope::<Empty, D>(
10546                        <Empty as fidl::encoding::ValueTypeMarker>::borrow(val),
10547                        encoder,
10548                        offset + 8,
10549                        _depth,
10550                    )
10551                }
10552                OpenTargetFlexibleTwoWayErrRequest::ReplyError(ref val) => {
10553                    fidl::encoding::encode_in_envelope::<i32, D>(
10554                        <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
10555                        encoder,
10556                        offset + 8,
10557                        _depth,
10558                    )
10559                }
10560            }
10561        }
10562    }
10563
10564    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10565        for OpenTargetFlexibleTwoWayErrRequest
10566    {
10567        #[inline(always)]
10568        fn new_empty() -> Self {
10569            Self::ReplySuccess(fidl::new_empty!(Empty, D))
10570        }
10571
10572        #[inline]
10573        unsafe fn decode(
10574            &mut self,
10575            decoder: &mut fidl::encoding::Decoder<'_, D>,
10576            offset: usize,
10577            mut depth: fidl::encoding::Depth,
10578        ) -> fidl::Result<()> {
10579            decoder.debug_check_bounds::<Self>(offset);
10580            #[allow(unused_variables)]
10581            let next_out_of_line = decoder.next_out_of_line();
10582            let handles_before = decoder.remaining_handles();
10583            let (ordinal, inlined, num_bytes, num_handles) =
10584                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
10585
10586            let member_inline_size = match ordinal {
10587                1 => <Empty as fidl::encoding::TypeMarker>::inline_size(decoder.context),
10588                2 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
10589                _ => return Err(fidl::Error::UnknownUnionTag),
10590            };
10591
10592            if inlined != (member_inline_size <= 4) {
10593                return Err(fidl::Error::InvalidInlineBitInEnvelope);
10594            }
10595            let _inner_offset;
10596            if inlined {
10597                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
10598                _inner_offset = offset + 8;
10599            } else {
10600                depth.increment()?;
10601                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10602            }
10603            match ordinal {
10604                1 => {
10605                    #[allow(irrefutable_let_patterns)]
10606                    if let OpenTargetFlexibleTwoWayErrRequest::ReplySuccess(_) = self {
10607                        // Do nothing, read the value into the object
10608                    } else {
10609                        // Initialize `self` to the right variant
10610                        *self = OpenTargetFlexibleTwoWayErrRequest::ReplySuccess(fidl::new_empty!(
10611                            Empty, D
10612                        ));
10613                    }
10614                    #[allow(irrefutable_let_patterns)]
10615                    if let OpenTargetFlexibleTwoWayErrRequest::ReplySuccess(ref mut val) = self {
10616                        fidl::decode!(Empty, D, val, decoder, _inner_offset, depth)?;
10617                    } else {
10618                        unreachable!()
10619                    }
10620                }
10621                2 => {
10622                    #[allow(irrefutable_let_patterns)]
10623                    if let OpenTargetFlexibleTwoWayErrRequest::ReplyError(_) = self {
10624                        // Do nothing, read the value into the object
10625                    } else {
10626                        // Initialize `self` to the right variant
10627                        *self = OpenTargetFlexibleTwoWayErrRequest::ReplyError(fidl::new_empty!(
10628                            i32, D
10629                        ));
10630                    }
10631                    #[allow(irrefutable_let_patterns)]
10632                    if let OpenTargetFlexibleTwoWayErrRequest::ReplyError(ref mut val) = self {
10633                        fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
10634                    } else {
10635                        unreachable!()
10636                    }
10637                }
10638                ordinal => panic!("unexpected ordinal {:?}", ordinal),
10639            }
10640            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
10641                return Err(fidl::Error::InvalidNumBytesInEnvelope);
10642            }
10643            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10644                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10645            }
10646            Ok(())
10647        }
10648    }
10649
10650    impl fidl::encoding::ValueTypeMarker for OpenTargetFlexibleTwoWayFieldsErrRequest {
10651        type Borrowed<'a> = &'a Self;
10652        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10653            value
10654        }
10655    }
10656
10657    unsafe impl fidl::encoding::TypeMarker for OpenTargetFlexibleTwoWayFieldsErrRequest {
10658        type Owned = Self;
10659
10660        #[inline(always)]
10661        fn inline_align(_context: fidl::encoding::Context) -> usize {
10662            8
10663        }
10664
10665        #[inline(always)]
10666        fn inline_size(_context: fidl::encoding::Context) -> usize {
10667            16
10668        }
10669    }
10670
10671    unsafe impl<D: fidl::encoding::ResourceDialect>
10672        fidl::encoding::Encode<OpenTargetFlexibleTwoWayFieldsErrRequest, D>
10673        for &OpenTargetFlexibleTwoWayFieldsErrRequest
10674    {
10675        #[inline]
10676        unsafe fn encode(
10677            self,
10678            encoder: &mut fidl::encoding::Encoder<'_, D>,
10679            offset: usize,
10680            _depth: fidl::encoding::Depth,
10681        ) -> fidl::Result<()> {
10682            encoder.debug_check_bounds::<OpenTargetFlexibleTwoWayFieldsErrRequest>(offset);
10683            encoder.write_num::<u64>(self.ordinal(), offset);
10684            match self {
10685                OpenTargetFlexibleTwoWayFieldsErrRequest::ReplySuccess(ref val) => {
10686                    fidl::encoding::encode_in_envelope::<i32, D>(
10687                        <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
10688                        encoder,
10689                        offset + 8,
10690                        _depth,
10691                    )
10692                }
10693                OpenTargetFlexibleTwoWayFieldsErrRequest::ReplyError(ref val) => {
10694                    fidl::encoding::encode_in_envelope::<i32, D>(
10695                        <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
10696                        encoder,
10697                        offset + 8,
10698                        _depth,
10699                    )
10700                }
10701            }
10702        }
10703    }
10704
10705    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10706        for OpenTargetFlexibleTwoWayFieldsErrRequest
10707    {
10708        #[inline(always)]
10709        fn new_empty() -> Self {
10710            Self::ReplySuccess(fidl::new_empty!(i32, D))
10711        }
10712
10713        #[inline]
10714        unsafe fn decode(
10715            &mut self,
10716            decoder: &mut fidl::encoding::Decoder<'_, D>,
10717            offset: usize,
10718            mut depth: fidl::encoding::Depth,
10719        ) -> fidl::Result<()> {
10720            decoder.debug_check_bounds::<Self>(offset);
10721            #[allow(unused_variables)]
10722            let next_out_of_line = decoder.next_out_of_line();
10723            let handles_before = decoder.remaining_handles();
10724            let (ordinal, inlined, num_bytes, num_handles) =
10725                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
10726
10727            let member_inline_size = match ordinal {
10728                1 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
10729                2 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
10730                _ => return Err(fidl::Error::UnknownUnionTag),
10731            };
10732
10733            if inlined != (member_inline_size <= 4) {
10734                return Err(fidl::Error::InvalidInlineBitInEnvelope);
10735            }
10736            let _inner_offset;
10737            if inlined {
10738                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
10739                _inner_offset = offset + 8;
10740            } else {
10741                depth.increment()?;
10742                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10743            }
10744            match ordinal {
10745                1 => {
10746                    #[allow(irrefutable_let_patterns)]
10747                    if let OpenTargetFlexibleTwoWayFieldsErrRequest::ReplySuccess(_) = self {
10748                        // Do nothing, read the value into the object
10749                    } else {
10750                        // Initialize `self` to the right variant
10751                        *self = OpenTargetFlexibleTwoWayFieldsErrRequest::ReplySuccess(
10752                            fidl::new_empty!(i32, D),
10753                        );
10754                    }
10755                    #[allow(irrefutable_let_patterns)]
10756                    if let OpenTargetFlexibleTwoWayFieldsErrRequest::ReplySuccess(ref mut val) =
10757                        self
10758                    {
10759                        fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
10760                    } else {
10761                        unreachable!()
10762                    }
10763                }
10764                2 => {
10765                    #[allow(irrefutable_let_patterns)]
10766                    if let OpenTargetFlexibleTwoWayFieldsErrRequest::ReplyError(_) = self {
10767                        // Do nothing, read the value into the object
10768                    } else {
10769                        // Initialize `self` to the right variant
10770                        *self = OpenTargetFlexibleTwoWayFieldsErrRequest::ReplyError(
10771                            fidl::new_empty!(i32, D),
10772                        );
10773                    }
10774                    #[allow(irrefutable_let_patterns)]
10775                    if let OpenTargetFlexibleTwoWayFieldsErrRequest::ReplyError(ref mut val) = self
10776                    {
10777                        fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
10778                    } else {
10779                        unreachable!()
10780                    }
10781                }
10782                ordinal => panic!("unexpected ordinal {:?}", ordinal),
10783            }
10784            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
10785                return Err(fidl::Error::InvalidNumBytesInEnvelope);
10786            }
10787            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10788                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10789            }
10790            Ok(())
10791        }
10792    }
10793
10794    impl fidl::encoding::ValueTypeMarker for OpenTargetStrictTwoWayErrRequest {
10795        type Borrowed<'a> = &'a Self;
10796        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10797            value
10798        }
10799    }
10800
10801    unsafe impl fidl::encoding::TypeMarker for OpenTargetStrictTwoWayErrRequest {
10802        type Owned = Self;
10803
10804        #[inline(always)]
10805        fn inline_align(_context: fidl::encoding::Context) -> usize {
10806            8
10807        }
10808
10809        #[inline(always)]
10810        fn inline_size(_context: fidl::encoding::Context) -> usize {
10811            16
10812        }
10813    }
10814
10815    unsafe impl<D: fidl::encoding::ResourceDialect>
10816        fidl::encoding::Encode<OpenTargetStrictTwoWayErrRequest, D>
10817        for &OpenTargetStrictTwoWayErrRequest
10818    {
10819        #[inline]
10820        unsafe fn encode(
10821            self,
10822            encoder: &mut fidl::encoding::Encoder<'_, D>,
10823            offset: usize,
10824            _depth: fidl::encoding::Depth,
10825        ) -> fidl::Result<()> {
10826            encoder.debug_check_bounds::<OpenTargetStrictTwoWayErrRequest>(offset);
10827            encoder.write_num::<u64>(self.ordinal(), offset);
10828            match self {
10829                OpenTargetStrictTwoWayErrRequest::ReplySuccess(ref val) => {
10830                    fidl::encoding::encode_in_envelope::<Empty, D>(
10831                        <Empty as fidl::encoding::ValueTypeMarker>::borrow(val),
10832                        encoder,
10833                        offset + 8,
10834                        _depth,
10835                    )
10836                }
10837                OpenTargetStrictTwoWayErrRequest::ReplyError(ref val) => {
10838                    fidl::encoding::encode_in_envelope::<i32, D>(
10839                        <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
10840                        encoder,
10841                        offset + 8,
10842                        _depth,
10843                    )
10844                }
10845            }
10846        }
10847    }
10848
10849    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10850        for OpenTargetStrictTwoWayErrRequest
10851    {
10852        #[inline(always)]
10853        fn new_empty() -> Self {
10854            Self::ReplySuccess(fidl::new_empty!(Empty, D))
10855        }
10856
10857        #[inline]
10858        unsafe fn decode(
10859            &mut self,
10860            decoder: &mut fidl::encoding::Decoder<'_, D>,
10861            offset: usize,
10862            mut depth: fidl::encoding::Depth,
10863        ) -> fidl::Result<()> {
10864            decoder.debug_check_bounds::<Self>(offset);
10865            #[allow(unused_variables)]
10866            let next_out_of_line = decoder.next_out_of_line();
10867            let handles_before = decoder.remaining_handles();
10868            let (ordinal, inlined, num_bytes, num_handles) =
10869                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
10870
10871            let member_inline_size = match ordinal {
10872                1 => <Empty as fidl::encoding::TypeMarker>::inline_size(decoder.context),
10873                2 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
10874                _ => return Err(fidl::Error::UnknownUnionTag),
10875            };
10876
10877            if inlined != (member_inline_size <= 4) {
10878                return Err(fidl::Error::InvalidInlineBitInEnvelope);
10879            }
10880            let _inner_offset;
10881            if inlined {
10882                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
10883                _inner_offset = offset + 8;
10884            } else {
10885                depth.increment()?;
10886                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10887            }
10888            match ordinal {
10889                1 => {
10890                    #[allow(irrefutable_let_patterns)]
10891                    if let OpenTargetStrictTwoWayErrRequest::ReplySuccess(_) = self {
10892                        // Do nothing, read the value into the object
10893                    } else {
10894                        // Initialize `self` to the right variant
10895                        *self = OpenTargetStrictTwoWayErrRequest::ReplySuccess(fidl::new_empty!(
10896                            Empty, D
10897                        ));
10898                    }
10899                    #[allow(irrefutable_let_patterns)]
10900                    if let OpenTargetStrictTwoWayErrRequest::ReplySuccess(ref mut val) = self {
10901                        fidl::decode!(Empty, D, val, decoder, _inner_offset, depth)?;
10902                    } else {
10903                        unreachable!()
10904                    }
10905                }
10906                2 => {
10907                    #[allow(irrefutable_let_patterns)]
10908                    if let OpenTargetStrictTwoWayErrRequest::ReplyError(_) = self {
10909                        // Do nothing, read the value into the object
10910                    } else {
10911                        // Initialize `self` to the right variant
10912                        *self =
10913                            OpenTargetStrictTwoWayErrRequest::ReplyError(fidl::new_empty!(i32, D));
10914                    }
10915                    #[allow(irrefutable_let_patterns)]
10916                    if let OpenTargetStrictTwoWayErrRequest::ReplyError(ref mut val) = self {
10917                        fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
10918                    } else {
10919                        unreachable!()
10920                    }
10921                }
10922                ordinal => panic!("unexpected ordinal {:?}", ordinal),
10923            }
10924            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
10925                return Err(fidl::Error::InvalidNumBytesInEnvelope);
10926            }
10927            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10928                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10929            }
10930            Ok(())
10931        }
10932    }
10933
10934    impl fidl::encoding::ValueTypeMarker for OpenTargetStrictTwoWayFieldsErrRequest {
10935        type Borrowed<'a> = &'a Self;
10936        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10937            value
10938        }
10939    }
10940
10941    unsafe impl fidl::encoding::TypeMarker for OpenTargetStrictTwoWayFieldsErrRequest {
10942        type Owned = Self;
10943
10944        #[inline(always)]
10945        fn inline_align(_context: fidl::encoding::Context) -> usize {
10946            8
10947        }
10948
10949        #[inline(always)]
10950        fn inline_size(_context: fidl::encoding::Context) -> usize {
10951            16
10952        }
10953    }
10954
10955    unsafe impl<D: fidl::encoding::ResourceDialect>
10956        fidl::encoding::Encode<OpenTargetStrictTwoWayFieldsErrRequest, D>
10957        for &OpenTargetStrictTwoWayFieldsErrRequest
10958    {
10959        #[inline]
10960        unsafe fn encode(
10961            self,
10962            encoder: &mut fidl::encoding::Encoder<'_, D>,
10963            offset: usize,
10964            _depth: fidl::encoding::Depth,
10965        ) -> fidl::Result<()> {
10966            encoder.debug_check_bounds::<OpenTargetStrictTwoWayFieldsErrRequest>(offset);
10967            encoder.write_num::<u64>(self.ordinal(), offset);
10968            match self {
10969                OpenTargetStrictTwoWayFieldsErrRequest::ReplySuccess(ref val) => {
10970                    fidl::encoding::encode_in_envelope::<i32, D>(
10971                        <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
10972                        encoder,
10973                        offset + 8,
10974                        _depth,
10975                    )
10976                }
10977                OpenTargetStrictTwoWayFieldsErrRequest::ReplyError(ref val) => {
10978                    fidl::encoding::encode_in_envelope::<i32, D>(
10979                        <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
10980                        encoder,
10981                        offset + 8,
10982                        _depth,
10983                    )
10984                }
10985            }
10986        }
10987    }
10988
10989    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10990        for OpenTargetStrictTwoWayFieldsErrRequest
10991    {
10992        #[inline(always)]
10993        fn new_empty() -> Self {
10994            Self::ReplySuccess(fidl::new_empty!(i32, D))
10995        }
10996
10997        #[inline]
10998        unsafe fn decode(
10999            &mut self,
11000            decoder: &mut fidl::encoding::Decoder<'_, D>,
11001            offset: usize,
11002            mut depth: fidl::encoding::Depth,
11003        ) -> fidl::Result<()> {
11004            decoder.debug_check_bounds::<Self>(offset);
11005            #[allow(unused_variables)]
11006            let next_out_of_line = decoder.next_out_of_line();
11007            let handles_before = decoder.remaining_handles();
11008            let (ordinal, inlined, num_bytes, num_handles) =
11009                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
11010
11011            let member_inline_size = match ordinal {
11012                1 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
11013                2 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
11014                _ => return Err(fidl::Error::UnknownUnionTag),
11015            };
11016
11017            if inlined != (member_inline_size <= 4) {
11018                return Err(fidl::Error::InvalidInlineBitInEnvelope);
11019            }
11020            let _inner_offset;
11021            if inlined {
11022                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
11023                _inner_offset = offset + 8;
11024            } else {
11025                depth.increment()?;
11026                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11027            }
11028            match ordinal {
11029                1 => {
11030                    #[allow(irrefutable_let_patterns)]
11031                    if let OpenTargetStrictTwoWayFieldsErrRequest::ReplySuccess(_) = self {
11032                        // Do nothing, read the value into the object
11033                    } else {
11034                        // Initialize `self` to the right variant
11035                        *self = OpenTargetStrictTwoWayFieldsErrRequest::ReplySuccess(
11036                            fidl::new_empty!(i32, D),
11037                        );
11038                    }
11039                    #[allow(irrefutable_let_patterns)]
11040                    if let OpenTargetStrictTwoWayFieldsErrRequest::ReplySuccess(ref mut val) = self
11041                    {
11042                        fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
11043                    } else {
11044                        unreachable!()
11045                    }
11046                }
11047                2 => {
11048                    #[allow(irrefutable_let_patterns)]
11049                    if let OpenTargetStrictTwoWayFieldsErrRequest::ReplyError(_) = self {
11050                        // Do nothing, read the value into the object
11051                    } else {
11052                        // Initialize `self` to the right variant
11053                        *self = OpenTargetStrictTwoWayFieldsErrRequest::ReplyError(
11054                            fidl::new_empty!(i32, D),
11055                        );
11056                    }
11057                    #[allow(irrefutable_let_patterns)]
11058                    if let OpenTargetStrictTwoWayFieldsErrRequest::ReplyError(ref mut val) = self {
11059                        fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
11060                    } else {
11061                        unreachable!()
11062                    }
11063                }
11064                ordinal => panic!("unexpected ordinal {:?}", ordinal),
11065            }
11066            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
11067                return Err(fidl::Error::InvalidNumBytesInEnvelope);
11068            }
11069            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11070                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11071            }
11072            Ok(())
11073        }
11074    }
11075}