Skip to main content

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 _};
10pub use fidl_fidl_serversuite__common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15#[repr(C)]
16pub struct ClosedTargetCreateNHandleVectorRequest {
17    pub n: u32,
18}
19
20impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
21    for ClosedTargetCreateNHandleVectorRequest
22{
23}
24
25#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
26pub struct ClosedTargetCreateNHandleVectorResponse {
27    pub vec: Vec<fidl::Event>,
28}
29
30impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
31    for ClosedTargetCreateNHandleVectorResponse
32{
33}
34
35#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36pub struct ClosedTargetEchoAsTransferableSignalableEventRequest {
37    pub handle: fidl::NullableHandle,
38}
39
40impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
41    for ClosedTargetEchoAsTransferableSignalableEventRequest
42{
43}
44
45#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
46pub struct ClosedTargetEchoAsTransferableSignalableEventResponse {
47    pub handle: fidl::Event,
48}
49
50impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
51    for ClosedTargetEchoAsTransferableSignalableEventResponse
52{
53}
54
55#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
56pub struct ClosedTargetGetHandleRightsRequest {
57    pub handle: fidl::NullableHandle,
58}
59
60impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
61    for ClosedTargetGetHandleRightsRequest
62{
63}
64
65#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
66pub struct ClosedTargetGetSignalableEventRightsRequest {
67    pub handle: fidl::Event,
68}
69
70impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
71    for ClosedTargetGetSignalableEventRightsRequest
72{
73}
74
75#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
76pub struct ClosedTargetHandleVectorSizeRequest {
77    pub vec: Vec<fidl::Event>,
78}
79
80impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
81    for ClosedTargetHandleVectorSizeRequest
82{
83}
84
85#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
86pub struct RunnerStartRequest {
87    pub test: Test,
88    pub any_target: AnyTarget,
89}
90
91impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for RunnerStartRequest {}
92
93#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
94pub enum AnyTarget {
95    Closed(fidl::endpoints::ServerEnd<ClosedTargetMarker>),
96    Ajar(fidl::endpoints::ServerEnd<AjarTargetMarker>),
97    Open(fidl::endpoints::ServerEnd<OpenTargetMarker>),
98}
99
100impl AnyTarget {
101    #[inline]
102    pub fn ordinal(&self) -> u64 {
103        match *self {
104            Self::Closed(_) => 1,
105            Self::Ajar(_) => 2,
106            Self::Open(_) => 3,
107        }
108    }
109}
110
111impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for AnyTarget {}
112
113#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
114pub struct AjarTargetMarker;
115
116impl fidl::endpoints::ProtocolMarker for AjarTargetMarker {
117    type Proxy = AjarTargetProxy;
118    type RequestStream = AjarTargetRequestStream;
119    #[cfg(target_os = "fuchsia")]
120    type SynchronousProxy = AjarTargetSynchronousProxy;
121
122    const DEBUG_NAME: &'static str = "(anonymous) AjarTarget";
123}
124
125pub trait AjarTargetProxyInterface: Send + Sync {}
126#[derive(Debug)]
127#[cfg(target_os = "fuchsia")]
128pub struct AjarTargetSynchronousProxy {
129    client: fidl::client::sync::Client,
130}
131
132#[cfg(target_os = "fuchsia")]
133impl fidl::endpoints::SynchronousProxy for AjarTargetSynchronousProxy {
134    type Proxy = AjarTargetProxy;
135    type Protocol = AjarTargetMarker;
136
137    fn from_channel(inner: fidl::Channel) -> Self {
138        Self::new(inner)
139    }
140
141    fn into_channel(self) -> fidl::Channel {
142        self.client.into_channel()
143    }
144
145    fn as_channel(&self) -> &fidl::Channel {
146        self.client.as_channel()
147    }
148}
149
150#[cfg(target_os = "fuchsia")]
151impl AjarTargetSynchronousProxy {
152    pub fn new(channel: fidl::Channel) -> Self {
153        Self { client: fidl::client::sync::Client::new(channel) }
154    }
155
156    pub fn into_channel(self) -> fidl::Channel {
157        self.client.into_channel()
158    }
159
160    /// Waits until an event arrives and returns it. It is safe for other
161    /// threads to make concurrent requests while waiting for an event.
162    pub fn wait_for_event(
163        &self,
164        deadline: zx::MonotonicInstant,
165    ) -> Result<AjarTargetEvent, fidl::Error> {
166        AjarTargetEvent::decode(self.client.wait_for_event::<AjarTargetMarker>(deadline)?)
167    }
168}
169
170#[cfg(target_os = "fuchsia")]
171impl From<AjarTargetSynchronousProxy> for zx::NullableHandle {
172    fn from(value: AjarTargetSynchronousProxy) -> Self {
173        value.into_channel().into()
174    }
175}
176
177#[cfg(target_os = "fuchsia")]
178impl From<fidl::Channel> for AjarTargetSynchronousProxy {
179    fn from(value: fidl::Channel) -> Self {
180        Self::new(value)
181    }
182}
183
184#[cfg(target_os = "fuchsia")]
185impl fidl::endpoints::FromClient for AjarTargetSynchronousProxy {
186    type Protocol = AjarTargetMarker;
187
188    fn from_client(value: fidl::endpoints::ClientEnd<AjarTargetMarker>) -> Self {
189        Self::new(value.into_channel())
190    }
191}
192
193#[derive(Debug, Clone)]
194pub struct AjarTargetProxy {
195    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
196}
197
198impl fidl::endpoints::Proxy for AjarTargetProxy {
199    type Protocol = AjarTargetMarker;
200
201    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
202        Self::new(inner)
203    }
204
205    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
206        self.client.into_channel().map_err(|client| Self { client })
207    }
208
209    fn as_channel(&self) -> &::fidl::AsyncChannel {
210        self.client.as_channel()
211    }
212}
213
214impl AjarTargetProxy {
215    /// Create a new Proxy for fidl.serversuite/AjarTarget.
216    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
217        let protocol_name = <AjarTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
218        Self { client: fidl::client::Client::new(channel, protocol_name) }
219    }
220
221    /// Get a Stream of events from the remote end of the protocol.
222    ///
223    /// # Panics
224    ///
225    /// Panics if the event stream was already taken.
226    pub fn take_event_stream(&self) -> AjarTargetEventStream {
227        AjarTargetEventStream { event_receiver: self.client.take_event_receiver() }
228    }
229}
230
231impl AjarTargetProxyInterface for AjarTargetProxy {}
232
233pub struct AjarTargetEventStream {
234    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
235}
236
237impl std::marker::Unpin for AjarTargetEventStream {}
238
239impl futures::stream::FusedStream for AjarTargetEventStream {
240    fn is_terminated(&self) -> bool {
241        self.event_receiver.is_terminated()
242    }
243}
244
245impl futures::Stream for AjarTargetEventStream {
246    type Item = Result<AjarTargetEvent, fidl::Error>;
247
248    fn poll_next(
249        mut self: std::pin::Pin<&mut Self>,
250        cx: &mut std::task::Context<'_>,
251    ) -> std::task::Poll<Option<Self::Item>> {
252        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
253            &mut self.event_receiver,
254            cx
255        )?) {
256            Some(buf) => std::task::Poll::Ready(Some(AjarTargetEvent::decode(buf))),
257            None => std::task::Poll::Ready(None),
258        }
259    }
260}
261
262#[derive(Debug)]
263pub enum AjarTargetEvent {
264    #[non_exhaustive]
265    _UnknownEvent {
266        /// Ordinal of the event that was sent.
267        ordinal: u64,
268    },
269}
270
271impl AjarTargetEvent {
272    /// Decodes a message buffer as a [`AjarTargetEvent`].
273    fn decode(
274        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
275    ) -> Result<AjarTargetEvent, fidl::Error> {
276        let (bytes, _handles) = buf.split_mut();
277        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
278        debug_assert_eq!(tx_header.tx_id, 0);
279        match tx_header.ordinal {
280            _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
281                Ok(AjarTargetEvent::_UnknownEvent { ordinal: tx_header.ordinal })
282            }
283            _ => Err(fidl::Error::UnknownOrdinal {
284                ordinal: tx_header.ordinal,
285                protocol_name: <AjarTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
286            }),
287        }
288    }
289}
290
291/// A Stream of incoming requests for fidl.serversuite/AjarTarget.
292pub struct AjarTargetRequestStream {
293    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
294    is_terminated: bool,
295}
296
297impl std::marker::Unpin for AjarTargetRequestStream {}
298
299impl futures::stream::FusedStream for AjarTargetRequestStream {
300    fn is_terminated(&self) -> bool {
301        self.is_terminated
302    }
303}
304
305impl fidl::endpoints::RequestStream for AjarTargetRequestStream {
306    type Protocol = AjarTargetMarker;
307    type ControlHandle = AjarTargetControlHandle;
308
309    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
310        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
311    }
312
313    fn control_handle(&self) -> Self::ControlHandle {
314        AjarTargetControlHandle { inner: self.inner.clone() }
315    }
316
317    fn into_inner(
318        self,
319    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
320    {
321        (self.inner, self.is_terminated)
322    }
323
324    fn from_inner(
325        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
326        is_terminated: bool,
327    ) -> Self {
328        Self { inner, is_terminated }
329    }
330}
331
332impl futures::Stream for AjarTargetRequestStream {
333    type Item = Result<AjarTargetRequest, fidl::Error>;
334
335    fn poll_next(
336        mut self: std::pin::Pin<&mut Self>,
337        cx: &mut std::task::Context<'_>,
338    ) -> std::task::Poll<Option<Self::Item>> {
339        let this = &mut *self;
340        if this.inner.check_shutdown(cx) {
341            this.is_terminated = true;
342            return std::task::Poll::Ready(None);
343        }
344        if this.is_terminated {
345            panic!("polled AjarTargetRequestStream after completion");
346        }
347        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
348            |bytes, handles| {
349                match this.inner.channel().read_etc(cx, bytes, handles) {
350                    std::task::Poll::Ready(Ok(())) => {}
351                    std::task::Poll::Pending => return std::task::Poll::Pending,
352                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
353                        this.is_terminated = true;
354                        return std::task::Poll::Ready(None);
355                    }
356                    std::task::Poll::Ready(Err(e)) => {
357                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
358                            e.into(),
359                        ))));
360                    }
361                }
362
363                // A message has been received from the channel
364                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
365
366                std::task::Poll::Ready(Some(match header.ordinal {
367                    _ if header.tx_id == 0
368                        && header
369                            .dynamic_flags()
370                            .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
371                    {
372                        Ok(AjarTargetRequest::_UnknownMethod {
373                            ordinal: header.ordinal,
374                            control_handle: AjarTargetControlHandle { inner: this.inner.clone() },
375                        })
376                    }
377                    _ => Err(fidl::Error::UnknownOrdinal {
378                        ordinal: header.ordinal,
379                        protocol_name:
380                            <AjarTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
381                    }),
382                }))
383            },
384        )
385    }
386}
387
388#[derive(Debug)]
389pub enum AjarTargetRequest {
390    /// An interaction was received which does not match any known method.
391    #[non_exhaustive]
392    _UnknownMethod {
393        /// Ordinal of the method that was called.
394        ordinal: u64,
395        control_handle: AjarTargetControlHandle,
396    },
397}
398
399impl AjarTargetRequest {
400    /// Name of the method defined in FIDL
401    pub fn method_name(&self) -> &'static str {
402        match *self {
403            AjarTargetRequest::_UnknownMethod { .. } => "unknown one-way method",
404        }
405    }
406}
407
408#[derive(Debug, Clone)]
409pub struct AjarTargetControlHandle {
410    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
411}
412
413impl fidl::endpoints::ControlHandle for AjarTargetControlHandle {
414    fn shutdown(&self) {
415        self.inner.shutdown()
416    }
417
418    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
419        self.inner.shutdown_with_epitaph(status)
420    }
421
422    fn is_closed(&self) -> bool {
423        self.inner.channel().is_closed()
424    }
425    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
426        self.inner.channel().on_closed()
427    }
428
429    #[cfg(target_os = "fuchsia")]
430    fn signal_peer(
431        &self,
432        clear_mask: zx::Signals,
433        set_mask: zx::Signals,
434    ) -> Result<(), zx_status::Status> {
435        use fidl::Peered;
436        self.inner.channel().signal_peer(clear_mask, set_mask)
437    }
438}
439
440impl AjarTargetControlHandle {}
441
442#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
443pub struct ClosedTargetMarker;
444
445impl fidl::endpoints::ProtocolMarker for ClosedTargetMarker {
446    type Proxy = ClosedTargetProxy;
447    type RequestStream = ClosedTargetRequestStream;
448    #[cfg(target_os = "fuchsia")]
449    type SynchronousProxy = ClosedTargetSynchronousProxy;
450
451    const DEBUG_NAME: &'static str = "(anonymous) ClosedTarget";
452}
453pub type ClosedTargetTwoWayResultResult = Result<String, u32>;
454
455pub trait ClosedTargetProxyInterface: Send + Sync {
456    fn r#one_way_no_payload(&self) -> Result<(), fidl::Error>;
457    type TwoWayNoPayloadResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
458    fn r#two_way_no_payload(&self) -> Self::TwoWayNoPayloadResponseFut;
459    type TwoWayStructPayloadResponseFut: std::future::Future<Output = Result<i8, fidl::Error>>
460        + Send;
461    fn r#two_way_struct_payload(&self, v: i8) -> Self::TwoWayStructPayloadResponseFut;
462    type TwoWayTablePayloadResponseFut: std::future::Future<Output = Result<ClosedTargetTwoWayTablePayloadResponse, fidl::Error>>
463        + Send;
464    fn r#two_way_table_payload(
465        &self,
466        payload: &ClosedTargetTwoWayTablePayloadRequest,
467    ) -> Self::TwoWayTablePayloadResponseFut;
468    type TwoWayUnionPayloadResponseFut: std::future::Future<Output = Result<ClosedTargetTwoWayUnionPayloadResponse, fidl::Error>>
469        + Send;
470    fn r#two_way_union_payload(
471        &self,
472        payload: &ClosedTargetTwoWayUnionPayloadRequest,
473    ) -> Self::TwoWayUnionPayloadResponseFut;
474    type TwoWayResultResponseFut: std::future::Future<Output = Result<ClosedTargetTwoWayResultResult, fidl::Error>>
475        + Send;
476    fn r#two_way_result(
477        &self,
478        payload: &ClosedTargetTwoWayResultRequest,
479    ) -> Self::TwoWayResultResponseFut;
480    type GetHandleRightsResponseFut: std::future::Future<Output = Result<fidl::Rights, fidl::Error>>
481        + Send;
482    fn r#get_handle_rights(&self, handle: fidl::NullableHandle)
483    -> Self::GetHandleRightsResponseFut;
484    type GetSignalableEventRightsResponseFut: std::future::Future<Output = Result<fidl::Rights, fidl::Error>>
485        + Send;
486    fn r#get_signalable_event_rights(
487        &self,
488        handle: fidl::Event,
489    ) -> Self::GetSignalableEventRightsResponseFut;
490    type EchoAsTransferableSignalableEventResponseFut: std::future::Future<Output = Result<fidl::Event, fidl::Error>>
491        + Send;
492    fn r#echo_as_transferable_signalable_event(
493        &self,
494        handle: fidl::NullableHandle,
495    ) -> Self::EchoAsTransferableSignalableEventResponseFut;
496    type ByteVectorSizeResponseFut: std::future::Future<Output = Result<u32, fidl::Error>> + Send;
497    fn r#byte_vector_size(&self, vec: &[u8]) -> Self::ByteVectorSizeResponseFut;
498    type HandleVectorSizeResponseFut: std::future::Future<Output = Result<u32, fidl::Error>> + Send;
499    fn r#handle_vector_size(&self, vec: Vec<fidl::Event>) -> Self::HandleVectorSizeResponseFut;
500    type CreateNByteVectorResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>>
501        + Send;
502    fn r#create_n_byte_vector(&self, n: u32) -> Self::CreateNByteVectorResponseFut;
503    type CreateNHandleVectorResponseFut: std::future::Future<Output = Result<Vec<fidl::Event>, fidl::Error>>
504        + Send;
505    fn r#create_n_handle_vector(&self, n: u32) -> Self::CreateNHandleVectorResponseFut;
506}
507#[derive(Debug)]
508#[cfg(target_os = "fuchsia")]
509pub struct ClosedTargetSynchronousProxy {
510    client: fidl::client::sync::Client,
511}
512
513#[cfg(target_os = "fuchsia")]
514impl fidl::endpoints::SynchronousProxy for ClosedTargetSynchronousProxy {
515    type Proxy = ClosedTargetProxy;
516    type Protocol = ClosedTargetMarker;
517
518    fn from_channel(inner: fidl::Channel) -> Self {
519        Self::new(inner)
520    }
521
522    fn into_channel(self) -> fidl::Channel {
523        self.client.into_channel()
524    }
525
526    fn as_channel(&self) -> &fidl::Channel {
527        self.client.as_channel()
528    }
529}
530
531#[cfg(target_os = "fuchsia")]
532impl ClosedTargetSynchronousProxy {
533    pub fn new(channel: fidl::Channel) -> Self {
534        Self { client: fidl::client::sync::Client::new(channel) }
535    }
536
537    pub fn into_channel(self) -> fidl::Channel {
538        self.client.into_channel()
539    }
540
541    /// Waits until an event arrives and returns it. It is safe for other
542    /// threads to make concurrent requests while waiting for an event.
543    pub fn wait_for_event(
544        &self,
545        deadline: zx::MonotonicInstant,
546    ) -> Result<ClosedTargetEvent, fidl::Error> {
547        ClosedTargetEvent::decode(self.client.wait_for_event::<ClosedTargetMarker>(deadline)?)
548    }
549
550    pub fn r#one_way_no_payload(&self) -> Result<(), fidl::Error> {
551        self.client.send::<fidl::encoding::EmptyPayload>(
552            (),
553            0x66bd5fe1d4c019e,
554            fidl::encoding::DynamicFlags::empty(),
555        )
556    }
557
558    pub fn r#two_way_no_payload(
559        &self,
560        ___deadline: zx::MonotonicInstant,
561    ) -> Result<(), fidl::Error> {
562        let _response = self.client.send_query::<
563            fidl::encoding::EmptyPayload,
564            fidl::encoding::EmptyPayload,
565            ClosedTargetMarker,
566        >(
567            (),
568            0x5bda1d1c46a5ae5f,
569            fidl::encoding::DynamicFlags::empty(),
570            ___deadline,
571        )?;
572        Ok(_response)
573    }
574
575    pub fn r#two_way_struct_payload(
576        &self,
577        mut v: i8,
578        ___deadline: zx::MonotonicInstant,
579    ) -> Result<i8, fidl::Error> {
580        let _response = self.client.send_query::<
581            ClosedTargetTwoWayStructPayloadRequest,
582            ClosedTargetTwoWayStructPayloadResponse,
583            ClosedTargetMarker,
584        >(
585            (v,),
586            0x313769ab1b770c90,
587            fidl::encoding::DynamicFlags::empty(),
588            ___deadline,
589        )?;
590        Ok(_response.v)
591    }
592
593    pub fn r#two_way_table_payload(
594        &self,
595        mut payload: &ClosedTargetTwoWayTablePayloadRequest,
596        ___deadline: zx::MonotonicInstant,
597    ) -> Result<ClosedTargetTwoWayTablePayloadResponse, fidl::Error> {
598        let _response = self.client.send_query::<
599            ClosedTargetTwoWayTablePayloadRequest,
600            ClosedTargetTwoWayTablePayloadResponse,
601            ClosedTargetMarker,
602        >(
603            payload,
604            0x631f7f27b6872baa,
605            fidl::encoding::DynamicFlags::empty(),
606            ___deadline,
607        )?;
608        Ok(_response)
609    }
610
611    pub fn r#two_way_union_payload(
612        &self,
613        mut payload: &ClosedTargetTwoWayUnionPayloadRequest,
614        ___deadline: zx::MonotonicInstant,
615    ) -> Result<ClosedTargetTwoWayUnionPayloadResponse, fidl::Error> {
616        let _response = self.client.send_query::<
617            ClosedTargetTwoWayUnionPayloadRequest,
618            ClosedTargetTwoWayUnionPayloadResponse,
619            ClosedTargetMarker,
620        >(
621            payload,
622            0x77d0365370536dba,
623            fidl::encoding::DynamicFlags::empty(),
624            ___deadline,
625        )?;
626        Ok(_response)
627    }
628
629    pub fn r#two_way_result(
630        &self,
631        mut payload: &ClosedTargetTwoWayResultRequest,
632        ___deadline: zx::MonotonicInstant,
633    ) -> Result<ClosedTargetTwoWayResultResult, fidl::Error> {
634        let _response = self.client.send_query::<
635            ClosedTargetTwoWayResultRequest,
636            fidl::encoding::ResultType<ClosedTargetTwoWayResultResponse, u32>,
637            ClosedTargetMarker,
638        >(
639            payload,
640            0xb32549e6f50894c,
641            fidl::encoding::DynamicFlags::empty(),
642            ___deadline,
643        )?;
644        Ok(_response.map(|x| x.payload))
645    }
646
647    pub fn r#get_handle_rights(
648        &self,
649        mut handle: fidl::NullableHandle,
650        ___deadline: zx::MonotonicInstant,
651    ) -> Result<fidl::Rights, fidl::Error> {
652        let _response = self.client.send_query::<
653            ClosedTargetGetHandleRightsRequest,
654            ClosedTargetGetHandleRightsResponse,
655            ClosedTargetMarker,
656        >(
657            (handle,),
658            0x1098d82f79effbe8,
659            fidl::encoding::DynamicFlags::empty(),
660            ___deadline,
661        )?;
662        Ok(_response.rights)
663    }
664
665    pub fn r#get_signalable_event_rights(
666        &self,
667        mut handle: fidl::Event,
668        ___deadline: zx::MonotonicInstant,
669    ) -> Result<fidl::Rights, fidl::Error> {
670        let _response = self.client.send_query::<
671            ClosedTargetGetSignalableEventRightsRequest,
672            ClosedTargetGetSignalableEventRightsResponse,
673            ClosedTargetMarker,
674        >(
675            (handle,),
676            0x698c31448fd5daf,
677            fidl::encoding::DynamicFlags::empty(),
678            ___deadline,
679        )?;
680        Ok(_response.rights)
681    }
682
683    pub fn r#echo_as_transferable_signalable_event(
684        &self,
685        mut handle: fidl::NullableHandle,
686        ___deadline: zx::MonotonicInstant,
687    ) -> Result<fidl::Event, fidl::Error> {
688        let _response = self.client.send_query::<
689            ClosedTargetEchoAsTransferableSignalableEventRequest,
690            ClosedTargetEchoAsTransferableSignalableEventResponse,
691            ClosedTargetMarker,
692        >(
693            (handle,),
694            0x5ec627bdc2e02ca0,
695            fidl::encoding::DynamicFlags::empty(),
696            ___deadline,
697        )?;
698        Ok(_response.handle)
699    }
700
701    pub fn r#byte_vector_size(
702        &self,
703        mut vec: &[u8],
704        ___deadline: zx::MonotonicInstant,
705    ) -> Result<u32, fidl::Error> {
706        let _response = self.client.send_query::<
707            ClosedTargetByteVectorSizeRequest,
708            ClosedTargetByteVectorSizeResponse,
709            ClosedTargetMarker,
710        >(
711            (vec,),
712            0x104b2f9aa8b7fe25,
713            fidl::encoding::DynamicFlags::empty(),
714            ___deadline,
715        )?;
716        Ok(_response.n)
717    }
718
719    pub fn r#handle_vector_size(
720        &self,
721        mut vec: Vec<fidl::Event>,
722        ___deadline: zx::MonotonicInstant,
723    ) -> Result<u32, fidl::Error> {
724        let _response = self.client.send_query::<
725            ClosedTargetHandleVectorSizeRequest,
726            ClosedTargetHandleVectorSizeResponse,
727            ClosedTargetMarker,
728        >(
729            (vec.as_mut(),),
730            0x4c1ac83570a98537,
731            fidl::encoding::DynamicFlags::empty(),
732            ___deadline,
733        )?;
734        Ok(_response.n)
735    }
736
737    pub fn r#create_n_byte_vector(
738        &self,
739        mut n: u32,
740        ___deadline: zx::MonotonicInstant,
741    ) -> Result<Vec<u8>, fidl::Error> {
742        let _response = self.client.send_query::<
743            ClosedTargetCreateNByteVectorRequest,
744            ClosedTargetCreateNByteVectorResponse,
745            ClosedTargetMarker,
746        >(
747            (n,),
748            0x1ecd88ef664e9c61,
749            fidl::encoding::DynamicFlags::empty(),
750            ___deadline,
751        )?;
752        Ok(_response.vec)
753    }
754
755    pub fn r#create_n_handle_vector(
756        &self,
757        mut n: u32,
758        ___deadline: zx::MonotonicInstant,
759    ) -> Result<Vec<fidl::Event>, fidl::Error> {
760        let _response = self.client.send_query::<
761            ClosedTargetCreateNHandleVectorRequest,
762            ClosedTargetCreateNHandleVectorResponse,
763            ClosedTargetMarker,
764        >(
765            (n,),
766            0x26341ba1fa66813d,
767            fidl::encoding::DynamicFlags::empty(),
768            ___deadline,
769        )?;
770        Ok(_response.vec)
771    }
772}
773
774#[cfg(target_os = "fuchsia")]
775impl From<ClosedTargetSynchronousProxy> for zx::NullableHandle {
776    fn from(value: ClosedTargetSynchronousProxy) -> Self {
777        value.into_channel().into()
778    }
779}
780
781#[cfg(target_os = "fuchsia")]
782impl From<fidl::Channel> for ClosedTargetSynchronousProxy {
783    fn from(value: fidl::Channel) -> Self {
784        Self::new(value)
785    }
786}
787
788#[cfg(target_os = "fuchsia")]
789impl fidl::endpoints::FromClient for ClosedTargetSynchronousProxy {
790    type Protocol = ClosedTargetMarker;
791
792    fn from_client(value: fidl::endpoints::ClientEnd<ClosedTargetMarker>) -> Self {
793        Self::new(value.into_channel())
794    }
795}
796
797#[derive(Debug, Clone)]
798pub struct ClosedTargetProxy {
799    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
800}
801
802impl fidl::endpoints::Proxy for ClosedTargetProxy {
803    type Protocol = ClosedTargetMarker;
804
805    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
806        Self::new(inner)
807    }
808
809    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
810        self.client.into_channel().map_err(|client| Self { client })
811    }
812
813    fn as_channel(&self) -> &::fidl::AsyncChannel {
814        self.client.as_channel()
815    }
816}
817
818impl ClosedTargetProxy {
819    /// Create a new Proxy for fidl.serversuite/ClosedTarget.
820    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
821        let protocol_name = <ClosedTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
822        Self { client: fidl::client::Client::new(channel, protocol_name) }
823    }
824
825    /// Get a Stream of events from the remote end of the protocol.
826    ///
827    /// # Panics
828    ///
829    /// Panics if the event stream was already taken.
830    pub fn take_event_stream(&self) -> ClosedTargetEventStream {
831        ClosedTargetEventStream { event_receiver: self.client.take_event_receiver() }
832    }
833
834    pub fn r#one_way_no_payload(&self) -> Result<(), fidl::Error> {
835        ClosedTargetProxyInterface::r#one_way_no_payload(self)
836    }
837
838    pub fn r#two_way_no_payload(
839        &self,
840    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
841        ClosedTargetProxyInterface::r#two_way_no_payload(self)
842    }
843
844    pub fn r#two_way_struct_payload(
845        &self,
846        mut v: i8,
847    ) -> fidl::client::QueryResponseFut<i8, fidl::encoding::DefaultFuchsiaResourceDialect> {
848        ClosedTargetProxyInterface::r#two_way_struct_payload(self, v)
849    }
850
851    pub fn r#two_way_table_payload(
852        &self,
853        mut payload: &ClosedTargetTwoWayTablePayloadRequest,
854    ) -> fidl::client::QueryResponseFut<
855        ClosedTargetTwoWayTablePayloadResponse,
856        fidl::encoding::DefaultFuchsiaResourceDialect,
857    > {
858        ClosedTargetProxyInterface::r#two_way_table_payload(self, payload)
859    }
860
861    pub fn r#two_way_union_payload(
862        &self,
863        mut payload: &ClosedTargetTwoWayUnionPayloadRequest,
864    ) -> fidl::client::QueryResponseFut<
865        ClosedTargetTwoWayUnionPayloadResponse,
866        fidl::encoding::DefaultFuchsiaResourceDialect,
867    > {
868        ClosedTargetProxyInterface::r#two_way_union_payload(self, payload)
869    }
870
871    pub fn r#two_way_result(
872        &self,
873        mut payload: &ClosedTargetTwoWayResultRequest,
874    ) -> fidl::client::QueryResponseFut<
875        ClosedTargetTwoWayResultResult,
876        fidl::encoding::DefaultFuchsiaResourceDialect,
877    > {
878        ClosedTargetProxyInterface::r#two_way_result(self, payload)
879    }
880
881    pub fn r#get_handle_rights(
882        &self,
883        mut handle: fidl::NullableHandle,
884    ) -> fidl::client::QueryResponseFut<fidl::Rights, fidl::encoding::DefaultFuchsiaResourceDialect>
885    {
886        ClosedTargetProxyInterface::r#get_handle_rights(self, handle)
887    }
888
889    pub fn r#get_signalable_event_rights(
890        &self,
891        mut handle: fidl::Event,
892    ) -> fidl::client::QueryResponseFut<fidl::Rights, fidl::encoding::DefaultFuchsiaResourceDialect>
893    {
894        ClosedTargetProxyInterface::r#get_signalable_event_rights(self, handle)
895    }
896
897    pub fn r#echo_as_transferable_signalable_event(
898        &self,
899        mut handle: fidl::NullableHandle,
900    ) -> fidl::client::QueryResponseFut<fidl::Event, fidl::encoding::DefaultFuchsiaResourceDialect>
901    {
902        ClosedTargetProxyInterface::r#echo_as_transferable_signalable_event(self, handle)
903    }
904
905    pub fn r#byte_vector_size(
906        &self,
907        mut vec: &[u8],
908    ) -> fidl::client::QueryResponseFut<u32, fidl::encoding::DefaultFuchsiaResourceDialect> {
909        ClosedTargetProxyInterface::r#byte_vector_size(self, vec)
910    }
911
912    pub fn r#handle_vector_size(
913        &self,
914        mut vec: Vec<fidl::Event>,
915    ) -> fidl::client::QueryResponseFut<u32, fidl::encoding::DefaultFuchsiaResourceDialect> {
916        ClosedTargetProxyInterface::r#handle_vector_size(self, vec)
917    }
918
919    pub fn r#create_n_byte_vector(
920        &self,
921        mut n: u32,
922    ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
923    {
924        ClosedTargetProxyInterface::r#create_n_byte_vector(self, n)
925    }
926
927    pub fn r#create_n_handle_vector(
928        &self,
929        mut n: u32,
930    ) -> fidl::client::QueryResponseFut<
931        Vec<fidl::Event>,
932        fidl::encoding::DefaultFuchsiaResourceDialect,
933    > {
934        ClosedTargetProxyInterface::r#create_n_handle_vector(self, n)
935    }
936}
937
938impl ClosedTargetProxyInterface for ClosedTargetProxy {
939    fn r#one_way_no_payload(&self) -> Result<(), fidl::Error> {
940        self.client.send::<fidl::encoding::EmptyPayload>(
941            (),
942            0x66bd5fe1d4c019e,
943            fidl::encoding::DynamicFlags::empty(),
944        )
945    }
946
947    type TwoWayNoPayloadResponseFut =
948        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
949    fn r#two_way_no_payload(&self) -> Self::TwoWayNoPayloadResponseFut {
950        fn _decode(
951            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
952        ) -> Result<(), fidl::Error> {
953            let _response = fidl::client::decode_transaction_body::<
954                fidl::encoding::EmptyPayload,
955                fidl::encoding::DefaultFuchsiaResourceDialect,
956                0x5bda1d1c46a5ae5f,
957            >(_buf?)?;
958            Ok(_response)
959        }
960        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
961            (),
962            0x5bda1d1c46a5ae5f,
963            fidl::encoding::DynamicFlags::empty(),
964            _decode,
965        )
966    }
967
968    type TwoWayStructPayloadResponseFut =
969        fidl::client::QueryResponseFut<i8, fidl::encoding::DefaultFuchsiaResourceDialect>;
970    fn r#two_way_struct_payload(&self, mut v: i8) -> Self::TwoWayStructPayloadResponseFut {
971        fn _decode(
972            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
973        ) -> Result<i8, fidl::Error> {
974            let _response = fidl::client::decode_transaction_body::<
975                ClosedTargetTwoWayStructPayloadResponse,
976                fidl::encoding::DefaultFuchsiaResourceDialect,
977                0x313769ab1b770c90,
978            >(_buf?)?;
979            Ok(_response.v)
980        }
981        self.client.send_query_and_decode::<ClosedTargetTwoWayStructPayloadRequest, i8>(
982            (v,),
983            0x313769ab1b770c90,
984            fidl::encoding::DynamicFlags::empty(),
985            _decode,
986        )
987    }
988
989    type TwoWayTablePayloadResponseFut = fidl::client::QueryResponseFut<
990        ClosedTargetTwoWayTablePayloadResponse,
991        fidl::encoding::DefaultFuchsiaResourceDialect,
992    >;
993    fn r#two_way_table_payload(
994        &self,
995        mut payload: &ClosedTargetTwoWayTablePayloadRequest,
996    ) -> Self::TwoWayTablePayloadResponseFut {
997        fn _decode(
998            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
999        ) -> Result<ClosedTargetTwoWayTablePayloadResponse, fidl::Error> {
1000            let _response = fidl::client::decode_transaction_body::<
1001                ClosedTargetTwoWayTablePayloadResponse,
1002                fidl::encoding::DefaultFuchsiaResourceDialect,
1003                0x631f7f27b6872baa,
1004            >(_buf?)?;
1005            Ok(_response)
1006        }
1007        self.client.send_query_and_decode::<
1008            ClosedTargetTwoWayTablePayloadRequest,
1009            ClosedTargetTwoWayTablePayloadResponse,
1010        >(
1011            payload,
1012            0x631f7f27b6872baa,
1013            fidl::encoding::DynamicFlags::empty(),
1014            _decode,
1015        )
1016    }
1017
1018    type TwoWayUnionPayloadResponseFut = fidl::client::QueryResponseFut<
1019        ClosedTargetTwoWayUnionPayloadResponse,
1020        fidl::encoding::DefaultFuchsiaResourceDialect,
1021    >;
1022    fn r#two_way_union_payload(
1023        &self,
1024        mut payload: &ClosedTargetTwoWayUnionPayloadRequest,
1025    ) -> Self::TwoWayUnionPayloadResponseFut {
1026        fn _decode(
1027            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1028        ) -> Result<ClosedTargetTwoWayUnionPayloadResponse, fidl::Error> {
1029            let _response = fidl::client::decode_transaction_body::<
1030                ClosedTargetTwoWayUnionPayloadResponse,
1031                fidl::encoding::DefaultFuchsiaResourceDialect,
1032                0x77d0365370536dba,
1033            >(_buf?)?;
1034            Ok(_response)
1035        }
1036        self.client.send_query_and_decode::<
1037            ClosedTargetTwoWayUnionPayloadRequest,
1038            ClosedTargetTwoWayUnionPayloadResponse,
1039        >(
1040            payload,
1041            0x77d0365370536dba,
1042            fidl::encoding::DynamicFlags::empty(),
1043            _decode,
1044        )
1045    }
1046
1047    type TwoWayResultResponseFut = fidl::client::QueryResponseFut<
1048        ClosedTargetTwoWayResultResult,
1049        fidl::encoding::DefaultFuchsiaResourceDialect,
1050    >;
1051    fn r#two_way_result(
1052        &self,
1053        mut payload: &ClosedTargetTwoWayResultRequest,
1054    ) -> Self::TwoWayResultResponseFut {
1055        fn _decode(
1056            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1057        ) -> Result<ClosedTargetTwoWayResultResult, fidl::Error> {
1058            let _response = fidl::client::decode_transaction_body::<
1059                fidl::encoding::ResultType<ClosedTargetTwoWayResultResponse, u32>,
1060                fidl::encoding::DefaultFuchsiaResourceDialect,
1061                0xb32549e6f50894c,
1062            >(_buf?)?;
1063            Ok(_response.map(|x| x.payload))
1064        }
1065        self.client.send_query_and_decode::<
1066            ClosedTargetTwoWayResultRequest,
1067            ClosedTargetTwoWayResultResult,
1068        >(
1069            payload,
1070            0xb32549e6f50894c,
1071            fidl::encoding::DynamicFlags::empty(),
1072            _decode,
1073        )
1074    }
1075
1076    type GetHandleRightsResponseFut =
1077        fidl::client::QueryResponseFut<fidl::Rights, fidl::encoding::DefaultFuchsiaResourceDialect>;
1078    fn r#get_handle_rights(
1079        &self,
1080        mut handle: fidl::NullableHandle,
1081    ) -> Self::GetHandleRightsResponseFut {
1082        fn _decode(
1083            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1084        ) -> Result<fidl::Rights, fidl::Error> {
1085            let _response = fidl::client::decode_transaction_body::<
1086                ClosedTargetGetHandleRightsResponse,
1087                fidl::encoding::DefaultFuchsiaResourceDialect,
1088                0x1098d82f79effbe8,
1089            >(_buf?)?;
1090            Ok(_response.rights)
1091        }
1092        self.client.send_query_and_decode::<ClosedTargetGetHandleRightsRequest, fidl::Rights>(
1093            (handle,),
1094            0x1098d82f79effbe8,
1095            fidl::encoding::DynamicFlags::empty(),
1096            _decode,
1097        )
1098    }
1099
1100    type GetSignalableEventRightsResponseFut =
1101        fidl::client::QueryResponseFut<fidl::Rights, fidl::encoding::DefaultFuchsiaResourceDialect>;
1102    fn r#get_signalable_event_rights(
1103        &self,
1104        mut handle: fidl::Event,
1105    ) -> Self::GetSignalableEventRightsResponseFut {
1106        fn _decode(
1107            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1108        ) -> Result<fidl::Rights, fidl::Error> {
1109            let _response = fidl::client::decode_transaction_body::<
1110                ClosedTargetGetSignalableEventRightsResponse,
1111                fidl::encoding::DefaultFuchsiaResourceDialect,
1112                0x698c31448fd5daf,
1113            >(_buf?)?;
1114            Ok(_response.rights)
1115        }
1116        self.client
1117            .send_query_and_decode::<ClosedTargetGetSignalableEventRightsRequest, fidl::Rights>(
1118                (handle,),
1119                0x698c31448fd5daf,
1120                fidl::encoding::DynamicFlags::empty(),
1121                _decode,
1122            )
1123    }
1124
1125    type EchoAsTransferableSignalableEventResponseFut =
1126        fidl::client::QueryResponseFut<fidl::Event, fidl::encoding::DefaultFuchsiaResourceDialect>;
1127    fn r#echo_as_transferable_signalable_event(
1128        &self,
1129        mut handle: fidl::NullableHandle,
1130    ) -> Self::EchoAsTransferableSignalableEventResponseFut {
1131        fn _decode(
1132            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1133        ) -> Result<fidl::Event, fidl::Error> {
1134            let _response = fidl::client::decode_transaction_body::<
1135                ClosedTargetEchoAsTransferableSignalableEventResponse,
1136                fidl::encoding::DefaultFuchsiaResourceDialect,
1137                0x5ec627bdc2e02ca0,
1138            >(_buf?)?;
1139            Ok(_response.handle)
1140        }
1141        self.client.send_query_and_decode::<
1142            ClosedTargetEchoAsTransferableSignalableEventRequest,
1143            fidl::Event,
1144        >(
1145            (handle,),
1146            0x5ec627bdc2e02ca0,
1147            fidl::encoding::DynamicFlags::empty(),
1148            _decode,
1149        )
1150    }
1151
1152    type ByteVectorSizeResponseFut =
1153        fidl::client::QueryResponseFut<u32, fidl::encoding::DefaultFuchsiaResourceDialect>;
1154    fn r#byte_vector_size(&self, mut vec: &[u8]) -> Self::ByteVectorSizeResponseFut {
1155        fn _decode(
1156            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1157        ) -> Result<u32, fidl::Error> {
1158            let _response = fidl::client::decode_transaction_body::<
1159                ClosedTargetByteVectorSizeResponse,
1160                fidl::encoding::DefaultFuchsiaResourceDialect,
1161                0x104b2f9aa8b7fe25,
1162            >(_buf?)?;
1163            Ok(_response.n)
1164        }
1165        self.client.send_query_and_decode::<ClosedTargetByteVectorSizeRequest, u32>(
1166            (vec,),
1167            0x104b2f9aa8b7fe25,
1168            fidl::encoding::DynamicFlags::empty(),
1169            _decode,
1170        )
1171    }
1172
1173    type HandleVectorSizeResponseFut =
1174        fidl::client::QueryResponseFut<u32, fidl::encoding::DefaultFuchsiaResourceDialect>;
1175    fn r#handle_vector_size(&self, mut vec: Vec<fidl::Event>) -> Self::HandleVectorSizeResponseFut {
1176        fn _decode(
1177            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1178        ) -> Result<u32, fidl::Error> {
1179            let _response = fidl::client::decode_transaction_body::<
1180                ClosedTargetHandleVectorSizeResponse,
1181                fidl::encoding::DefaultFuchsiaResourceDialect,
1182                0x4c1ac83570a98537,
1183            >(_buf?)?;
1184            Ok(_response.n)
1185        }
1186        self.client.send_query_and_decode::<ClosedTargetHandleVectorSizeRequest, u32>(
1187            (vec.as_mut(),),
1188            0x4c1ac83570a98537,
1189            fidl::encoding::DynamicFlags::empty(),
1190            _decode,
1191        )
1192    }
1193
1194    type CreateNByteVectorResponseFut =
1195        fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
1196    fn r#create_n_byte_vector(&self, mut n: u32) -> Self::CreateNByteVectorResponseFut {
1197        fn _decode(
1198            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1199        ) -> Result<Vec<u8>, fidl::Error> {
1200            let _response = fidl::client::decode_transaction_body::<
1201                ClosedTargetCreateNByteVectorResponse,
1202                fidl::encoding::DefaultFuchsiaResourceDialect,
1203                0x1ecd88ef664e9c61,
1204            >(_buf?)?;
1205            Ok(_response.vec)
1206        }
1207        self.client.send_query_and_decode::<ClosedTargetCreateNByteVectorRequest, Vec<u8>>(
1208            (n,),
1209            0x1ecd88ef664e9c61,
1210            fidl::encoding::DynamicFlags::empty(),
1211            _decode,
1212        )
1213    }
1214
1215    type CreateNHandleVectorResponseFut = fidl::client::QueryResponseFut<
1216        Vec<fidl::Event>,
1217        fidl::encoding::DefaultFuchsiaResourceDialect,
1218    >;
1219    fn r#create_n_handle_vector(&self, mut n: u32) -> Self::CreateNHandleVectorResponseFut {
1220        fn _decode(
1221            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1222        ) -> Result<Vec<fidl::Event>, fidl::Error> {
1223            let _response = fidl::client::decode_transaction_body::<
1224                ClosedTargetCreateNHandleVectorResponse,
1225                fidl::encoding::DefaultFuchsiaResourceDialect,
1226                0x26341ba1fa66813d,
1227            >(_buf?)?;
1228            Ok(_response.vec)
1229        }
1230        self.client
1231            .send_query_and_decode::<ClosedTargetCreateNHandleVectorRequest, Vec<fidl::Event>>(
1232                (n,),
1233                0x26341ba1fa66813d,
1234                fidl::encoding::DynamicFlags::empty(),
1235                _decode,
1236            )
1237    }
1238}
1239
1240pub struct ClosedTargetEventStream {
1241    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1242}
1243
1244impl std::marker::Unpin for ClosedTargetEventStream {}
1245
1246impl futures::stream::FusedStream for ClosedTargetEventStream {
1247    fn is_terminated(&self) -> bool {
1248        self.event_receiver.is_terminated()
1249    }
1250}
1251
1252impl futures::Stream for ClosedTargetEventStream {
1253    type Item = Result<ClosedTargetEvent, fidl::Error>;
1254
1255    fn poll_next(
1256        mut self: std::pin::Pin<&mut Self>,
1257        cx: &mut std::task::Context<'_>,
1258    ) -> std::task::Poll<Option<Self::Item>> {
1259        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1260            &mut self.event_receiver,
1261            cx
1262        )?) {
1263            Some(buf) => std::task::Poll::Ready(Some(ClosedTargetEvent::decode(buf))),
1264            None => std::task::Poll::Ready(None),
1265        }
1266    }
1267}
1268
1269#[derive(Debug)]
1270pub enum ClosedTargetEvent {}
1271
1272impl ClosedTargetEvent {
1273    /// Decodes a message buffer as a [`ClosedTargetEvent`].
1274    fn decode(
1275        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1276    ) -> Result<ClosedTargetEvent, fidl::Error> {
1277        let (bytes, _handles) = buf.split_mut();
1278        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1279        debug_assert_eq!(tx_header.tx_id, 0);
1280        match tx_header.ordinal {
1281            _ => Err(fidl::Error::UnknownOrdinal {
1282                ordinal: tx_header.ordinal,
1283                protocol_name: <ClosedTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1284            }),
1285        }
1286    }
1287}
1288
1289/// A Stream of incoming requests for fidl.serversuite/ClosedTarget.
1290pub struct ClosedTargetRequestStream {
1291    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1292    is_terminated: bool,
1293}
1294
1295impl std::marker::Unpin for ClosedTargetRequestStream {}
1296
1297impl futures::stream::FusedStream for ClosedTargetRequestStream {
1298    fn is_terminated(&self) -> bool {
1299        self.is_terminated
1300    }
1301}
1302
1303impl fidl::endpoints::RequestStream for ClosedTargetRequestStream {
1304    type Protocol = ClosedTargetMarker;
1305    type ControlHandle = ClosedTargetControlHandle;
1306
1307    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1308        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1309    }
1310
1311    fn control_handle(&self) -> Self::ControlHandle {
1312        ClosedTargetControlHandle { inner: self.inner.clone() }
1313    }
1314
1315    fn into_inner(
1316        self,
1317    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1318    {
1319        (self.inner, self.is_terminated)
1320    }
1321
1322    fn from_inner(
1323        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1324        is_terminated: bool,
1325    ) -> Self {
1326        Self { inner, is_terminated }
1327    }
1328}
1329
1330impl futures::Stream for ClosedTargetRequestStream {
1331    type Item = Result<ClosedTargetRequest, fidl::Error>;
1332
1333    fn poll_next(
1334        mut self: std::pin::Pin<&mut Self>,
1335        cx: &mut std::task::Context<'_>,
1336    ) -> std::task::Poll<Option<Self::Item>> {
1337        let this = &mut *self;
1338        if this.inner.check_shutdown(cx) {
1339            this.is_terminated = true;
1340            return std::task::Poll::Ready(None);
1341        }
1342        if this.is_terminated {
1343            panic!("polled ClosedTargetRequestStream after completion");
1344        }
1345        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1346            |bytes, handles| {
1347                match this.inner.channel().read_etc(cx, bytes, handles) {
1348                    std::task::Poll::Ready(Ok(())) => {}
1349                    std::task::Poll::Pending => return std::task::Poll::Pending,
1350                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1351                        this.is_terminated = true;
1352                        return std::task::Poll::Ready(None);
1353                    }
1354                    std::task::Poll::Ready(Err(e)) => {
1355                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1356                            e.into(),
1357                        ))));
1358                    }
1359                }
1360
1361                // A message has been received from the channel
1362                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1363
1364                std::task::Poll::Ready(Some(match header.ordinal {
1365                    0x66bd5fe1d4c019e => {
1366                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1367                        let mut req = fidl::new_empty!(
1368                            fidl::encoding::EmptyPayload,
1369                            fidl::encoding::DefaultFuchsiaResourceDialect
1370                        );
1371                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1372                        let control_handle =
1373                            ClosedTargetControlHandle { inner: this.inner.clone() };
1374                        Ok(ClosedTargetRequest::OneWayNoPayload { control_handle })
1375                    }
1376                    0x5bda1d1c46a5ae5f => {
1377                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1378                        let mut req = fidl::new_empty!(
1379                            fidl::encoding::EmptyPayload,
1380                            fidl::encoding::DefaultFuchsiaResourceDialect
1381                        );
1382                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1383                        let control_handle =
1384                            ClosedTargetControlHandle { inner: this.inner.clone() };
1385                        Ok(ClosedTargetRequest::TwoWayNoPayload {
1386                            responder: ClosedTargetTwoWayNoPayloadResponder {
1387                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1388                                tx_id: header.tx_id,
1389                            },
1390                        })
1391                    }
1392                    0x313769ab1b770c90 => {
1393                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1394                        let mut req = fidl::new_empty!(
1395                            ClosedTargetTwoWayStructPayloadRequest,
1396                            fidl::encoding::DefaultFuchsiaResourceDialect
1397                        );
1398                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetTwoWayStructPayloadRequest>(&header, _body_bytes, handles, &mut req)?;
1399                        let control_handle =
1400                            ClosedTargetControlHandle { inner: this.inner.clone() };
1401                        Ok(ClosedTargetRequest::TwoWayStructPayload {
1402                            v: req.v,
1403
1404                            responder: ClosedTargetTwoWayStructPayloadResponder {
1405                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1406                                tx_id: header.tx_id,
1407                            },
1408                        })
1409                    }
1410                    0x631f7f27b6872baa => {
1411                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1412                        let mut req = fidl::new_empty!(
1413                            ClosedTargetTwoWayTablePayloadRequest,
1414                            fidl::encoding::DefaultFuchsiaResourceDialect
1415                        );
1416                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetTwoWayTablePayloadRequest>(&header, _body_bytes, handles, &mut req)?;
1417                        let control_handle =
1418                            ClosedTargetControlHandle { inner: this.inner.clone() };
1419                        Ok(ClosedTargetRequest::TwoWayTablePayload {
1420                            payload: req,
1421                            responder: ClosedTargetTwoWayTablePayloadResponder {
1422                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1423                                tx_id: header.tx_id,
1424                            },
1425                        })
1426                    }
1427                    0x77d0365370536dba => {
1428                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1429                        let mut req = fidl::new_empty!(
1430                            ClosedTargetTwoWayUnionPayloadRequest,
1431                            fidl::encoding::DefaultFuchsiaResourceDialect
1432                        );
1433                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetTwoWayUnionPayloadRequest>(&header, _body_bytes, handles, &mut req)?;
1434                        let control_handle =
1435                            ClosedTargetControlHandle { inner: this.inner.clone() };
1436                        Ok(ClosedTargetRequest::TwoWayUnionPayload {
1437                            payload: req,
1438                            responder: ClosedTargetTwoWayUnionPayloadResponder {
1439                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1440                                tx_id: header.tx_id,
1441                            },
1442                        })
1443                    }
1444                    0xb32549e6f50894c => {
1445                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1446                        let mut req = fidl::new_empty!(
1447                            ClosedTargetTwoWayResultRequest,
1448                            fidl::encoding::DefaultFuchsiaResourceDialect
1449                        );
1450                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetTwoWayResultRequest>(&header, _body_bytes, handles, &mut req)?;
1451                        let control_handle =
1452                            ClosedTargetControlHandle { inner: this.inner.clone() };
1453                        Ok(ClosedTargetRequest::TwoWayResult {
1454                            payload: req,
1455                            responder: ClosedTargetTwoWayResultResponder {
1456                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1457                                tx_id: header.tx_id,
1458                            },
1459                        })
1460                    }
1461                    0x1098d82f79effbe8 => {
1462                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1463                        let mut req = fidl::new_empty!(
1464                            ClosedTargetGetHandleRightsRequest,
1465                            fidl::encoding::DefaultFuchsiaResourceDialect
1466                        );
1467                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetGetHandleRightsRequest>(&header, _body_bytes, handles, &mut req)?;
1468                        let control_handle =
1469                            ClosedTargetControlHandle { inner: this.inner.clone() };
1470                        Ok(ClosedTargetRequest::GetHandleRights {
1471                            handle: req.handle,
1472
1473                            responder: ClosedTargetGetHandleRightsResponder {
1474                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1475                                tx_id: header.tx_id,
1476                            },
1477                        })
1478                    }
1479                    0x698c31448fd5daf => {
1480                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1481                        let mut req = fidl::new_empty!(
1482                            ClosedTargetGetSignalableEventRightsRequest,
1483                            fidl::encoding::DefaultFuchsiaResourceDialect
1484                        );
1485                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetGetSignalableEventRightsRequest>(&header, _body_bytes, handles, &mut req)?;
1486                        let control_handle =
1487                            ClosedTargetControlHandle { inner: this.inner.clone() };
1488                        Ok(ClosedTargetRequest::GetSignalableEventRights {
1489                            handle: req.handle,
1490
1491                            responder: ClosedTargetGetSignalableEventRightsResponder {
1492                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1493                                tx_id: header.tx_id,
1494                            },
1495                        })
1496                    }
1497                    0x5ec627bdc2e02ca0 => {
1498                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1499                        let mut req = fidl::new_empty!(
1500                            ClosedTargetEchoAsTransferableSignalableEventRequest,
1501                            fidl::encoding::DefaultFuchsiaResourceDialect
1502                        );
1503                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetEchoAsTransferableSignalableEventRequest>(&header, _body_bytes, handles, &mut req)?;
1504                        let control_handle =
1505                            ClosedTargetControlHandle { inner: this.inner.clone() };
1506                        Ok(ClosedTargetRequest::EchoAsTransferableSignalableEvent {
1507                            handle: req.handle,
1508
1509                            responder: ClosedTargetEchoAsTransferableSignalableEventResponder {
1510                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1511                                tx_id: header.tx_id,
1512                            },
1513                        })
1514                    }
1515                    0x104b2f9aa8b7fe25 => {
1516                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1517                        let mut req = fidl::new_empty!(
1518                            ClosedTargetByteVectorSizeRequest,
1519                            fidl::encoding::DefaultFuchsiaResourceDialect
1520                        );
1521                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetByteVectorSizeRequest>(&header, _body_bytes, handles, &mut req)?;
1522                        let control_handle =
1523                            ClosedTargetControlHandle { inner: this.inner.clone() };
1524                        Ok(ClosedTargetRequest::ByteVectorSize {
1525                            vec: req.vec,
1526
1527                            responder: ClosedTargetByteVectorSizeResponder {
1528                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1529                                tx_id: header.tx_id,
1530                            },
1531                        })
1532                    }
1533                    0x4c1ac83570a98537 => {
1534                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1535                        let mut req = fidl::new_empty!(
1536                            ClosedTargetHandleVectorSizeRequest,
1537                            fidl::encoding::DefaultFuchsiaResourceDialect
1538                        );
1539                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetHandleVectorSizeRequest>(&header, _body_bytes, handles, &mut req)?;
1540                        let control_handle =
1541                            ClosedTargetControlHandle { inner: this.inner.clone() };
1542                        Ok(ClosedTargetRequest::HandleVectorSize {
1543                            vec: req.vec,
1544
1545                            responder: ClosedTargetHandleVectorSizeResponder {
1546                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1547                                tx_id: header.tx_id,
1548                            },
1549                        })
1550                    }
1551                    0x1ecd88ef664e9c61 => {
1552                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1553                        let mut req = fidl::new_empty!(
1554                            ClosedTargetCreateNByteVectorRequest,
1555                            fidl::encoding::DefaultFuchsiaResourceDialect
1556                        );
1557                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetCreateNByteVectorRequest>(&header, _body_bytes, handles, &mut req)?;
1558                        let control_handle =
1559                            ClosedTargetControlHandle { inner: this.inner.clone() };
1560                        Ok(ClosedTargetRequest::CreateNByteVector {
1561                            n: req.n,
1562
1563                            responder: ClosedTargetCreateNByteVectorResponder {
1564                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1565                                tx_id: header.tx_id,
1566                            },
1567                        })
1568                    }
1569                    0x26341ba1fa66813d => {
1570                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1571                        let mut req = fidl::new_empty!(
1572                            ClosedTargetCreateNHandleVectorRequest,
1573                            fidl::encoding::DefaultFuchsiaResourceDialect
1574                        );
1575                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetCreateNHandleVectorRequest>(&header, _body_bytes, handles, &mut req)?;
1576                        let control_handle =
1577                            ClosedTargetControlHandle { inner: this.inner.clone() };
1578                        Ok(ClosedTargetRequest::CreateNHandleVector {
1579                            n: req.n,
1580
1581                            responder: ClosedTargetCreateNHandleVectorResponder {
1582                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1583                                tx_id: header.tx_id,
1584                            },
1585                        })
1586                    }
1587                    _ => Err(fidl::Error::UnknownOrdinal {
1588                        ordinal: header.ordinal,
1589                        protocol_name:
1590                            <ClosedTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1591                    }),
1592                }))
1593            },
1594        )
1595    }
1596}
1597
1598#[derive(Debug)]
1599pub enum ClosedTargetRequest {
1600    OneWayNoPayload {
1601        control_handle: ClosedTargetControlHandle,
1602    },
1603    TwoWayNoPayload {
1604        responder: ClosedTargetTwoWayNoPayloadResponder,
1605    },
1606    TwoWayStructPayload {
1607        v: i8,
1608        responder: ClosedTargetTwoWayStructPayloadResponder,
1609    },
1610    TwoWayTablePayload {
1611        payload: ClosedTargetTwoWayTablePayloadRequest,
1612        responder: ClosedTargetTwoWayTablePayloadResponder,
1613    },
1614    TwoWayUnionPayload {
1615        payload: ClosedTargetTwoWayUnionPayloadRequest,
1616        responder: ClosedTargetTwoWayUnionPayloadResponder,
1617    },
1618    TwoWayResult {
1619        payload: ClosedTargetTwoWayResultRequest,
1620        responder: ClosedTargetTwoWayResultResponder,
1621    },
1622    GetHandleRights {
1623        handle: fidl::NullableHandle,
1624        responder: ClosedTargetGetHandleRightsResponder,
1625    },
1626    GetSignalableEventRights {
1627        handle: fidl::Event,
1628        responder: ClosedTargetGetSignalableEventRightsResponder,
1629    },
1630    EchoAsTransferableSignalableEvent {
1631        handle: fidl::NullableHandle,
1632        responder: ClosedTargetEchoAsTransferableSignalableEventResponder,
1633    },
1634    ByteVectorSize {
1635        vec: Vec<u8>,
1636        responder: ClosedTargetByteVectorSizeResponder,
1637    },
1638    HandleVectorSize {
1639        vec: Vec<fidl::Event>,
1640        responder: ClosedTargetHandleVectorSizeResponder,
1641    },
1642    CreateNByteVector {
1643        n: u32,
1644        responder: ClosedTargetCreateNByteVectorResponder,
1645    },
1646    CreateNHandleVector {
1647        n: u32,
1648        responder: ClosedTargetCreateNHandleVectorResponder,
1649    },
1650}
1651
1652impl ClosedTargetRequest {
1653    #[allow(irrefutable_let_patterns)]
1654    pub fn into_one_way_no_payload(self) -> Option<(ClosedTargetControlHandle)> {
1655        if let ClosedTargetRequest::OneWayNoPayload { control_handle } = self {
1656            Some((control_handle))
1657        } else {
1658            None
1659        }
1660    }
1661
1662    #[allow(irrefutable_let_patterns)]
1663    pub fn into_two_way_no_payload(self) -> Option<(ClosedTargetTwoWayNoPayloadResponder)> {
1664        if let ClosedTargetRequest::TwoWayNoPayload { responder } = self {
1665            Some((responder))
1666        } else {
1667            None
1668        }
1669    }
1670
1671    #[allow(irrefutable_let_patterns)]
1672    pub fn into_two_way_struct_payload(
1673        self,
1674    ) -> Option<(i8, ClosedTargetTwoWayStructPayloadResponder)> {
1675        if let ClosedTargetRequest::TwoWayStructPayload { v, responder } = self {
1676            Some((v, responder))
1677        } else {
1678            None
1679        }
1680    }
1681
1682    #[allow(irrefutable_let_patterns)]
1683    pub fn into_two_way_table_payload(
1684        self,
1685    ) -> Option<(ClosedTargetTwoWayTablePayloadRequest, ClosedTargetTwoWayTablePayloadResponder)>
1686    {
1687        if let ClosedTargetRequest::TwoWayTablePayload { payload, responder } = self {
1688            Some((payload, responder))
1689        } else {
1690            None
1691        }
1692    }
1693
1694    #[allow(irrefutable_let_patterns)]
1695    pub fn into_two_way_union_payload(
1696        self,
1697    ) -> Option<(ClosedTargetTwoWayUnionPayloadRequest, ClosedTargetTwoWayUnionPayloadResponder)>
1698    {
1699        if let ClosedTargetRequest::TwoWayUnionPayload { payload, responder } = self {
1700            Some((payload, responder))
1701        } else {
1702            None
1703        }
1704    }
1705
1706    #[allow(irrefutable_let_patterns)]
1707    pub fn into_two_way_result(
1708        self,
1709    ) -> Option<(ClosedTargetTwoWayResultRequest, ClosedTargetTwoWayResultResponder)> {
1710        if let ClosedTargetRequest::TwoWayResult { payload, responder } = self {
1711            Some((payload, responder))
1712        } else {
1713            None
1714        }
1715    }
1716
1717    #[allow(irrefutable_let_patterns)]
1718    pub fn into_get_handle_rights(
1719        self,
1720    ) -> Option<(fidl::NullableHandle, ClosedTargetGetHandleRightsResponder)> {
1721        if let ClosedTargetRequest::GetHandleRights { handle, responder } = self {
1722            Some((handle, responder))
1723        } else {
1724            None
1725        }
1726    }
1727
1728    #[allow(irrefutable_let_patterns)]
1729    pub fn into_get_signalable_event_rights(
1730        self,
1731    ) -> Option<(fidl::Event, ClosedTargetGetSignalableEventRightsResponder)> {
1732        if let ClosedTargetRequest::GetSignalableEventRights { handle, responder } = self {
1733            Some((handle, responder))
1734        } else {
1735            None
1736        }
1737    }
1738
1739    #[allow(irrefutable_let_patterns)]
1740    pub fn into_echo_as_transferable_signalable_event(
1741        self,
1742    ) -> Option<(fidl::NullableHandle, ClosedTargetEchoAsTransferableSignalableEventResponder)>
1743    {
1744        if let ClosedTargetRequest::EchoAsTransferableSignalableEvent { handle, responder } = self {
1745            Some((handle, responder))
1746        } else {
1747            None
1748        }
1749    }
1750
1751    #[allow(irrefutable_let_patterns)]
1752    pub fn into_byte_vector_size(self) -> Option<(Vec<u8>, ClosedTargetByteVectorSizeResponder)> {
1753        if let ClosedTargetRequest::ByteVectorSize { vec, responder } = self {
1754            Some((vec, responder))
1755        } else {
1756            None
1757        }
1758    }
1759
1760    #[allow(irrefutable_let_patterns)]
1761    pub fn into_handle_vector_size(
1762        self,
1763    ) -> Option<(Vec<fidl::Event>, ClosedTargetHandleVectorSizeResponder)> {
1764        if let ClosedTargetRequest::HandleVectorSize { vec, responder } = self {
1765            Some((vec, responder))
1766        } else {
1767            None
1768        }
1769    }
1770
1771    #[allow(irrefutable_let_patterns)]
1772    pub fn into_create_n_byte_vector(
1773        self,
1774    ) -> Option<(u32, ClosedTargetCreateNByteVectorResponder)> {
1775        if let ClosedTargetRequest::CreateNByteVector { n, responder } = self {
1776            Some((n, responder))
1777        } else {
1778            None
1779        }
1780    }
1781
1782    #[allow(irrefutable_let_patterns)]
1783    pub fn into_create_n_handle_vector(
1784        self,
1785    ) -> Option<(u32, ClosedTargetCreateNHandleVectorResponder)> {
1786        if let ClosedTargetRequest::CreateNHandleVector { n, responder } = self {
1787            Some((n, responder))
1788        } else {
1789            None
1790        }
1791    }
1792
1793    /// Name of the method defined in FIDL
1794    pub fn method_name(&self) -> &'static str {
1795        match *self {
1796            ClosedTargetRequest::OneWayNoPayload { .. } => "one_way_no_payload",
1797            ClosedTargetRequest::TwoWayNoPayload { .. } => "two_way_no_payload",
1798            ClosedTargetRequest::TwoWayStructPayload { .. } => "two_way_struct_payload",
1799            ClosedTargetRequest::TwoWayTablePayload { .. } => "two_way_table_payload",
1800            ClosedTargetRequest::TwoWayUnionPayload { .. } => "two_way_union_payload",
1801            ClosedTargetRequest::TwoWayResult { .. } => "two_way_result",
1802            ClosedTargetRequest::GetHandleRights { .. } => "get_handle_rights",
1803            ClosedTargetRequest::GetSignalableEventRights { .. } => "get_signalable_event_rights",
1804            ClosedTargetRequest::EchoAsTransferableSignalableEvent { .. } => {
1805                "echo_as_transferable_signalable_event"
1806            }
1807            ClosedTargetRequest::ByteVectorSize { .. } => "byte_vector_size",
1808            ClosedTargetRequest::HandleVectorSize { .. } => "handle_vector_size",
1809            ClosedTargetRequest::CreateNByteVector { .. } => "create_n_byte_vector",
1810            ClosedTargetRequest::CreateNHandleVector { .. } => "create_n_handle_vector",
1811        }
1812    }
1813}
1814
1815#[derive(Debug, Clone)]
1816pub struct ClosedTargetControlHandle {
1817    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1818}
1819
1820impl fidl::endpoints::ControlHandle for ClosedTargetControlHandle {
1821    fn shutdown(&self) {
1822        self.inner.shutdown()
1823    }
1824
1825    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1826        self.inner.shutdown_with_epitaph(status)
1827    }
1828
1829    fn is_closed(&self) -> bool {
1830        self.inner.channel().is_closed()
1831    }
1832    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1833        self.inner.channel().on_closed()
1834    }
1835
1836    #[cfg(target_os = "fuchsia")]
1837    fn signal_peer(
1838        &self,
1839        clear_mask: zx::Signals,
1840        set_mask: zx::Signals,
1841    ) -> Result<(), zx_status::Status> {
1842        use fidl::Peered;
1843        self.inner.channel().signal_peer(clear_mask, set_mask)
1844    }
1845}
1846
1847impl ClosedTargetControlHandle {}
1848
1849#[must_use = "FIDL methods require a response to be sent"]
1850#[derive(Debug)]
1851pub struct ClosedTargetTwoWayNoPayloadResponder {
1852    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
1853    tx_id: u32,
1854}
1855
1856/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
1857/// if the responder is dropped without sending a response, so that the client
1858/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
1859impl std::ops::Drop for ClosedTargetTwoWayNoPayloadResponder {
1860    fn drop(&mut self) {
1861        self.control_handle.shutdown();
1862        // Safety: drops once, never accessed again
1863        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1864    }
1865}
1866
1867impl fidl::endpoints::Responder for ClosedTargetTwoWayNoPayloadResponder {
1868    type ControlHandle = ClosedTargetControlHandle;
1869
1870    fn control_handle(&self) -> &ClosedTargetControlHandle {
1871        &self.control_handle
1872    }
1873
1874    fn drop_without_shutdown(mut self) {
1875        // Safety: drops once, never accessed again due to mem::forget
1876        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1877        // Prevent Drop from running (which would shut down the channel)
1878        std::mem::forget(self);
1879    }
1880}
1881
1882impl ClosedTargetTwoWayNoPayloadResponder {
1883    /// Sends a response to the FIDL transaction.
1884    ///
1885    /// Sets the channel to shutdown if an error occurs.
1886    pub fn send(self) -> Result<(), fidl::Error> {
1887        let _result = self.send_raw();
1888        if _result.is_err() {
1889            self.control_handle.shutdown();
1890        }
1891        self.drop_without_shutdown();
1892        _result
1893    }
1894
1895    /// Similar to "send" but does not shutdown the channel if an error occurs.
1896    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
1897        let _result = self.send_raw();
1898        self.drop_without_shutdown();
1899        _result
1900    }
1901
1902    fn send_raw(&self) -> Result<(), fidl::Error> {
1903        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
1904            (),
1905            self.tx_id,
1906            0x5bda1d1c46a5ae5f,
1907            fidl::encoding::DynamicFlags::empty(),
1908        )
1909    }
1910}
1911
1912#[must_use = "FIDL methods require a response to be sent"]
1913#[derive(Debug)]
1914pub struct ClosedTargetTwoWayStructPayloadResponder {
1915    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
1916    tx_id: u32,
1917}
1918
1919/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
1920/// if the responder is dropped without sending a response, so that the client
1921/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
1922impl std::ops::Drop for ClosedTargetTwoWayStructPayloadResponder {
1923    fn drop(&mut self) {
1924        self.control_handle.shutdown();
1925        // Safety: drops once, never accessed again
1926        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1927    }
1928}
1929
1930impl fidl::endpoints::Responder for ClosedTargetTwoWayStructPayloadResponder {
1931    type ControlHandle = ClosedTargetControlHandle;
1932
1933    fn control_handle(&self) -> &ClosedTargetControlHandle {
1934        &self.control_handle
1935    }
1936
1937    fn drop_without_shutdown(mut self) {
1938        // Safety: drops once, never accessed again due to mem::forget
1939        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1940        // Prevent Drop from running (which would shut down the channel)
1941        std::mem::forget(self);
1942    }
1943}
1944
1945impl ClosedTargetTwoWayStructPayloadResponder {
1946    /// Sends a response to the FIDL transaction.
1947    ///
1948    /// Sets the channel to shutdown if an error occurs.
1949    pub fn send(self, mut v: i8) -> Result<(), fidl::Error> {
1950        let _result = self.send_raw(v);
1951        if _result.is_err() {
1952            self.control_handle.shutdown();
1953        }
1954        self.drop_without_shutdown();
1955        _result
1956    }
1957
1958    /// Similar to "send" but does not shutdown the channel if an error occurs.
1959    pub fn send_no_shutdown_on_err(self, mut v: i8) -> Result<(), fidl::Error> {
1960        let _result = self.send_raw(v);
1961        self.drop_without_shutdown();
1962        _result
1963    }
1964
1965    fn send_raw(&self, mut v: i8) -> Result<(), fidl::Error> {
1966        self.control_handle.inner.send::<ClosedTargetTwoWayStructPayloadResponse>(
1967            (v,),
1968            self.tx_id,
1969            0x313769ab1b770c90,
1970            fidl::encoding::DynamicFlags::empty(),
1971        )
1972    }
1973}
1974
1975#[must_use = "FIDL methods require a response to be sent"]
1976#[derive(Debug)]
1977pub struct ClosedTargetTwoWayTablePayloadResponder {
1978    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
1979    tx_id: u32,
1980}
1981
1982/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
1983/// if the responder is dropped without sending a response, so that the client
1984/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
1985impl std::ops::Drop for ClosedTargetTwoWayTablePayloadResponder {
1986    fn drop(&mut self) {
1987        self.control_handle.shutdown();
1988        // Safety: drops once, never accessed again
1989        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1990    }
1991}
1992
1993impl fidl::endpoints::Responder for ClosedTargetTwoWayTablePayloadResponder {
1994    type ControlHandle = ClosedTargetControlHandle;
1995
1996    fn control_handle(&self) -> &ClosedTargetControlHandle {
1997        &self.control_handle
1998    }
1999
2000    fn drop_without_shutdown(mut self) {
2001        // Safety: drops once, never accessed again due to mem::forget
2002        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2003        // Prevent Drop from running (which would shut down the channel)
2004        std::mem::forget(self);
2005    }
2006}
2007
2008impl ClosedTargetTwoWayTablePayloadResponder {
2009    /// Sends a response to the FIDL transaction.
2010    ///
2011    /// Sets the channel to shutdown if an error occurs.
2012    pub fn send(
2013        self,
2014        mut payload: &ClosedTargetTwoWayTablePayloadResponse,
2015    ) -> Result<(), fidl::Error> {
2016        let _result = self.send_raw(payload);
2017        if _result.is_err() {
2018            self.control_handle.shutdown();
2019        }
2020        self.drop_without_shutdown();
2021        _result
2022    }
2023
2024    /// Similar to "send" but does not shutdown the channel if an error occurs.
2025    pub fn send_no_shutdown_on_err(
2026        self,
2027        mut payload: &ClosedTargetTwoWayTablePayloadResponse,
2028    ) -> Result<(), fidl::Error> {
2029        let _result = self.send_raw(payload);
2030        self.drop_without_shutdown();
2031        _result
2032    }
2033
2034    fn send_raw(
2035        &self,
2036        mut payload: &ClosedTargetTwoWayTablePayloadResponse,
2037    ) -> Result<(), fidl::Error> {
2038        self.control_handle.inner.send::<ClosedTargetTwoWayTablePayloadResponse>(
2039            payload,
2040            self.tx_id,
2041            0x631f7f27b6872baa,
2042            fidl::encoding::DynamicFlags::empty(),
2043        )
2044    }
2045}
2046
2047#[must_use = "FIDL methods require a response to be sent"]
2048#[derive(Debug)]
2049pub struct ClosedTargetTwoWayUnionPayloadResponder {
2050    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2051    tx_id: u32,
2052}
2053
2054/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
2055/// if the responder is dropped without sending a response, so that the client
2056/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2057impl std::ops::Drop for ClosedTargetTwoWayUnionPayloadResponder {
2058    fn drop(&mut self) {
2059        self.control_handle.shutdown();
2060        // Safety: drops once, never accessed again
2061        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2062    }
2063}
2064
2065impl fidl::endpoints::Responder for ClosedTargetTwoWayUnionPayloadResponder {
2066    type ControlHandle = ClosedTargetControlHandle;
2067
2068    fn control_handle(&self) -> &ClosedTargetControlHandle {
2069        &self.control_handle
2070    }
2071
2072    fn drop_without_shutdown(mut self) {
2073        // Safety: drops once, never accessed again due to mem::forget
2074        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2075        // Prevent Drop from running (which would shut down the channel)
2076        std::mem::forget(self);
2077    }
2078}
2079
2080impl ClosedTargetTwoWayUnionPayloadResponder {
2081    /// Sends a response to the FIDL transaction.
2082    ///
2083    /// Sets the channel to shutdown if an error occurs.
2084    pub fn send(
2085        self,
2086        mut payload: &ClosedTargetTwoWayUnionPayloadResponse,
2087    ) -> Result<(), fidl::Error> {
2088        let _result = self.send_raw(payload);
2089        if _result.is_err() {
2090            self.control_handle.shutdown();
2091        }
2092        self.drop_without_shutdown();
2093        _result
2094    }
2095
2096    /// Similar to "send" but does not shutdown the channel if an error occurs.
2097    pub fn send_no_shutdown_on_err(
2098        self,
2099        mut payload: &ClosedTargetTwoWayUnionPayloadResponse,
2100    ) -> Result<(), fidl::Error> {
2101        let _result = self.send_raw(payload);
2102        self.drop_without_shutdown();
2103        _result
2104    }
2105
2106    fn send_raw(
2107        &self,
2108        mut payload: &ClosedTargetTwoWayUnionPayloadResponse,
2109    ) -> Result<(), fidl::Error> {
2110        self.control_handle.inner.send::<ClosedTargetTwoWayUnionPayloadResponse>(
2111            payload,
2112            self.tx_id,
2113            0x77d0365370536dba,
2114            fidl::encoding::DynamicFlags::empty(),
2115        )
2116    }
2117}
2118
2119#[must_use = "FIDL methods require a response to be sent"]
2120#[derive(Debug)]
2121pub struct ClosedTargetTwoWayResultResponder {
2122    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2123    tx_id: u32,
2124}
2125
2126/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
2127/// if the responder is dropped without sending a response, so that the client
2128/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2129impl std::ops::Drop for ClosedTargetTwoWayResultResponder {
2130    fn drop(&mut self) {
2131        self.control_handle.shutdown();
2132        // Safety: drops once, never accessed again
2133        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2134    }
2135}
2136
2137impl fidl::endpoints::Responder for ClosedTargetTwoWayResultResponder {
2138    type ControlHandle = ClosedTargetControlHandle;
2139
2140    fn control_handle(&self) -> &ClosedTargetControlHandle {
2141        &self.control_handle
2142    }
2143
2144    fn drop_without_shutdown(mut self) {
2145        // Safety: drops once, never accessed again due to mem::forget
2146        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2147        // Prevent Drop from running (which would shut down the channel)
2148        std::mem::forget(self);
2149    }
2150}
2151
2152impl ClosedTargetTwoWayResultResponder {
2153    /// Sends a response to the FIDL transaction.
2154    ///
2155    /// Sets the channel to shutdown if an error occurs.
2156    pub fn send(self, mut result: Result<&str, u32>) -> Result<(), fidl::Error> {
2157        let _result = self.send_raw(result);
2158        if _result.is_err() {
2159            self.control_handle.shutdown();
2160        }
2161        self.drop_without_shutdown();
2162        _result
2163    }
2164
2165    /// Similar to "send" but does not shutdown the channel if an error occurs.
2166    pub fn send_no_shutdown_on_err(self, mut result: Result<&str, u32>) -> Result<(), fidl::Error> {
2167        let _result = self.send_raw(result);
2168        self.drop_without_shutdown();
2169        _result
2170    }
2171
2172    fn send_raw(&self, mut result: Result<&str, u32>) -> Result<(), fidl::Error> {
2173        self.control_handle
2174            .inner
2175            .send::<fidl::encoding::ResultType<ClosedTargetTwoWayResultResponse, u32>>(
2176                result.map(|payload| (payload,)),
2177                self.tx_id,
2178                0xb32549e6f50894c,
2179                fidl::encoding::DynamicFlags::empty(),
2180            )
2181    }
2182}
2183
2184#[must_use = "FIDL methods require a response to be sent"]
2185#[derive(Debug)]
2186pub struct ClosedTargetGetHandleRightsResponder {
2187    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2188    tx_id: u32,
2189}
2190
2191/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
2192/// if the responder is dropped without sending a response, so that the client
2193/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2194impl std::ops::Drop for ClosedTargetGetHandleRightsResponder {
2195    fn drop(&mut self) {
2196        self.control_handle.shutdown();
2197        // Safety: drops once, never accessed again
2198        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2199    }
2200}
2201
2202impl fidl::endpoints::Responder for ClosedTargetGetHandleRightsResponder {
2203    type ControlHandle = ClosedTargetControlHandle;
2204
2205    fn control_handle(&self) -> &ClosedTargetControlHandle {
2206        &self.control_handle
2207    }
2208
2209    fn drop_without_shutdown(mut self) {
2210        // Safety: drops once, never accessed again due to mem::forget
2211        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2212        // Prevent Drop from running (which would shut down the channel)
2213        std::mem::forget(self);
2214    }
2215}
2216
2217impl ClosedTargetGetHandleRightsResponder {
2218    /// Sends a response to the FIDL transaction.
2219    ///
2220    /// Sets the channel to shutdown if an error occurs.
2221    pub fn send(self, mut rights: fidl::Rights) -> Result<(), fidl::Error> {
2222        let _result = self.send_raw(rights);
2223        if _result.is_err() {
2224            self.control_handle.shutdown();
2225        }
2226        self.drop_without_shutdown();
2227        _result
2228    }
2229
2230    /// Similar to "send" but does not shutdown the channel if an error occurs.
2231    pub fn send_no_shutdown_on_err(self, mut rights: fidl::Rights) -> Result<(), fidl::Error> {
2232        let _result = self.send_raw(rights);
2233        self.drop_without_shutdown();
2234        _result
2235    }
2236
2237    fn send_raw(&self, mut rights: fidl::Rights) -> Result<(), fidl::Error> {
2238        self.control_handle.inner.send::<ClosedTargetGetHandleRightsResponse>(
2239            (rights,),
2240            self.tx_id,
2241            0x1098d82f79effbe8,
2242            fidl::encoding::DynamicFlags::empty(),
2243        )
2244    }
2245}
2246
2247#[must_use = "FIDL methods require a response to be sent"]
2248#[derive(Debug)]
2249pub struct ClosedTargetGetSignalableEventRightsResponder {
2250    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2251    tx_id: u32,
2252}
2253
2254/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
2255/// if the responder is dropped without sending a response, so that the client
2256/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2257impl std::ops::Drop for ClosedTargetGetSignalableEventRightsResponder {
2258    fn drop(&mut self) {
2259        self.control_handle.shutdown();
2260        // Safety: drops once, never accessed again
2261        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2262    }
2263}
2264
2265impl fidl::endpoints::Responder for ClosedTargetGetSignalableEventRightsResponder {
2266    type ControlHandle = ClosedTargetControlHandle;
2267
2268    fn control_handle(&self) -> &ClosedTargetControlHandle {
2269        &self.control_handle
2270    }
2271
2272    fn drop_without_shutdown(mut self) {
2273        // Safety: drops once, never accessed again due to mem::forget
2274        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2275        // Prevent Drop from running (which would shut down the channel)
2276        std::mem::forget(self);
2277    }
2278}
2279
2280impl ClosedTargetGetSignalableEventRightsResponder {
2281    /// Sends a response to the FIDL transaction.
2282    ///
2283    /// Sets the channel to shutdown if an error occurs.
2284    pub fn send(self, mut rights: fidl::Rights) -> Result<(), fidl::Error> {
2285        let _result = self.send_raw(rights);
2286        if _result.is_err() {
2287            self.control_handle.shutdown();
2288        }
2289        self.drop_without_shutdown();
2290        _result
2291    }
2292
2293    /// Similar to "send" but does not shutdown the channel if an error occurs.
2294    pub fn send_no_shutdown_on_err(self, mut rights: fidl::Rights) -> Result<(), fidl::Error> {
2295        let _result = self.send_raw(rights);
2296        self.drop_without_shutdown();
2297        _result
2298    }
2299
2300    fn send_raw(&self, mut rights: fidl::Rights) -> Result<(), fidl::Error> {
2301        self.control_handle.inner.send::<ClosedTargetGetSignalableEventRightsResponse>(
2302            (rights,),
2303            self.tx_id,
2304            0x698c31448fd5daf,
2305            fidl::encoding::DynamicFlags::empty(),
2306        )
2307    }
2308}
2309
2310#[must_use = "FIDL methods require a response to be sent"]
2311#[derive(Debug)]
2312pub struct ClosedTargetEchoAsTransferableSignalableEventResponder {
2313    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2314    tx_id: u32,
2315}
2316
2317/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
2318/// if the responder is dropped without sending a response, so that the client
2319/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2320impl std::ops::Drop for ClosedTargetEchoAsTransferableSignalableEventResponder {
2321    fn drop(&mut self) {
2322        self.control_handle.shutdown();
2323        // Safety: drops once, never accessed again
2324        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2325    }
2326}
2327
2328impl fidl::endpoints::Responder for ClosedTargetEchoAsTransferableSignalableEventResponder {
2329    type ControlHandle = ClosedTargetControlHandle;
2330
2331    fn control_handle(&self) -> &ClosedTargetControlHandle {
2332        &self.control_handle
2333    }
2334
2335    fn drop_without_shutdown(mut self) {
2336        // Safety: drops once, never accessed again due to mem::forget
2337        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2338        // Prevent Drop from running (which would shut down the channel)
2339        std::mem::forget(self);
2340    }
2341}
2342
2343impl ClosedTargetEchoAsTransferableSignalableEventResponder {
2344    /// Sends a response to the FIDL transaction.
2345    ///
2346    /// Sets the channel to shutdown if an error occurs.
2347    pub fn send(self, mut handle: fidl::Event) -> Result<(), fidl::Error> {
2348        let _result = self.send_raw(handle);
2349        if _result.is_err() {
2350            self.control_handle.shutdown();
2351        }
2352        self.drop_without_shutdown();
2353        _result
2354    }
2355
2356    /// Similar to "send" but does not shutdown the channel if an error occurs.
2357    pub fn send_no_shutdown_on_err(self, mut handle: fidl::Event) -> Result<(), fidl::Error> {
2358        let _result = self.send_raw(handle);
2359        self.drop_without_shutdown();
2360        _result
2361    }
2362
2363    fn send_raw(&self, mut handle: fidl::Event) -> Result<(), fidl::Error> {
2364        self.control_handle.inner.send::<ClosedTargetEchoAsTransferableSignalableEventResponse>(
2365            (handle,),
2366            self.tx_id,
2367            0x5ec627bdc2e02ca0,
2368            fidl::encoding::DynamicFlags::empty(),
2369        )
2370    }
2371}
2372
2373#[must_use = "FIDL methods require a response to be sent"]
2374#[derive(Debug)]
2375pub struct ClosedTargetByteVectorSizeResponder {
2376    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2377    tx_id: u32,
2378}
2379
2380/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
2381/// if the responder is dropped without sending a response, so that the client
2382/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2383impl std::ops::Drop for ClosedTargetByteVectorSizeResponder {
2384    fn drop(&mut self) {
2385        self.control_handle.shutdown();
2386        // Safety: drops once, never accessed again
2387        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2388    }
2389}
2390
2391impl fidl::endpoints::Responder for ClosedTargetByteVectorSizeResponder {
2392    type ControlHandle = ClosedTargetControlHandle;
2393
2394    fn control_handle(&self) -> &ClosedTargetControlHandle {
2395        &self.control_handle
2396    }
2397
2398    fn drop_without_shutdown(mut self) {
2399        // Safety: drops once, never accessed again due to mem::forget
2400        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2401        // Prevent Drop from running (which would shut down the channel)
2402        std::mem::forget(self);
2403    }
2404}
2405
2406impl ClosedTargetByteVectorSizeResponder {
2407    /// Sends a response to the FIDL transaction.
2408    ///
2409    /// Sets the channel to shutdown if an error occurs.
2410    pub fn send(self, mut n: u32) -> Result<(), fidl::Error> {
2411        let _result = self.send_raw(n);
2412        if _result.is_err() {
2413            self.control_handle.shutdown();
2414        }
2415        self.drop_without_shutdown();
2416        _result
2417    }
2418
2419    /// Similar to "send" but does not shutdown the channel if an error occurs.
2420    pub fn send_no_shutdown_on_err(self, mut n: u32) -> Result<(), fidl::Error> {
2421        let _result = self.send_raw(n);
2422        self.drop_without_shutdown();
2423        _result
2424    }
2425
2426    fn send_raw(&self, mut n: u32) -> Result<(), fidl::Error> {
2427        self.control_handle.inner.send::<ClosedTargetByteVectorSizeResponse>(
2428            (n,),
2429            self.tx_id,
2430            0x104b2f9aa8b7fe25,
2431            fidl::encoding::DynamicFlags::empty(),
2432        )
2433    }
2434}
2435
2436#[must_use = "FIDL methods require a response to be sent"]
2437#[derive(Debug)]
2438pub struct ClosedTargetHandleVectorSizeResponder {
2439    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2440    tx_id: u32,
2441}
2442
2443/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
2444/// if the responder is dropped without sending a response, so that the client
2445/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2446impl std::ops::Drop for ClosedTargetHandleVectorSizeResponder {
2447    fn drop(&mut self) {
2448        self.control_handle.shutdown();
2449        // Safety: drops once, never accessed again
2450        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2451    }
2452}
2453
2454impl fidl::endpoints::Responder for ClosedTargetHandleVectorSizeResponder {
2455    type ControlHandle = ClosedTargetControlHandle;
2456
2457    fn control_handle(&self) -> &ClosedTargetControlHandle {
2458        &self.control_handle
2459    }
2460
2461    fn drop_without_shutdown(mut self) {
2462        // Safety: drops once, never accessed again due to mem::forget
2463        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2464        // Prevent Drop from running (which would shut down the channel)
2465        std::mem::forget(self);
2466    }
2467}
2468
2469impl ClosedTargetHandleVectorSizeResponder {
2470    /// Sends a response to the FIDL transaction.
2471    ///
2472    /// Sets the channel to shutdown if an error occurs.
2473    pub fn send(self, mut n: u32) -> Result<(), fidl::Error> {
2474        let _result = self.send_raw(n);
2475        if _result.is_err() {
2476            self.control_handle.shutdown();
2477        }
2478        self.drop_without_shutdown();
2479        _result
2480    }
2481
2482    /// Similar to "send" but does not shutdown the channel if an error occurs.
2483    pub fn send_no_shutdown_on_err(self, mut n: u32) -> Result<(), fidl::Error> {
2484        let _result = self.send_raw(n);
2485        self.drop_without_shutdown();
2486        _result
2487    }
2488
2489    fn send_raw(&self, mut n: u32) -> Result<(), fidl::Error> {
2490        self.control_handle.inner.send::<ClosedTargetHandleVectorSizeResponse>(
2491            (n,),
2492            self.tx_id,
2493            0x4c1ac83570a98537,
2494            fidl::encoding::DynamicFlags::empty(),
2495        )
2496    }
2497}
2498
2499#[must_use = "FIDL methods require a response to be sent"]
2500#[derive(Debug)]
2501pub struct ClosedTargetCreateNByteVectorResponder {
2502    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2503    tx_id: u32,
2504}
2505
2506/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
2507/// if the responder is dropped without sending a response, so that the client
2508/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2509impl std::ops::Drop for ClosedTargetCreateNByteVectorResponder {
2510    fn drop(&mut self) {
2511        self.control_handle.shutdown();
2512        // Safety: drops once, never accessed again
2513        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2514    }
2515}
2516
2517impl fidl::endpoints::Responder for ClosedTargetCreateNByteVectorResponder {
2518    type ControlHandle = ClosedTargetControlHandle;
2519
2520    fn control_handle(&self) -> &ClosedTargetControlHandle {
2521        &self.control_handle
2522    }
2523
2524    fn drop_without_shutdown(mut self) {
2525        // Safety: drops once, never accessed again due to mem::forget
2526        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2527        // Prevent Drop from running (which would shut down the channel)
2528        std::mem::forget(self);
2529    }
2530}
2531
2532impl ClosedTargetCreateNByteVectorResponder {
2533    /// Sends a response to the FIDL transaction.
2534    ///
2535    /// Sets the channel to shutdown if an error occurs.
2536    pub fn send(self, mut vec: &[u8]) -> Result<(), fidl::Error> {
2537        let _result = self.send_raw(vec);
2538        if _result.is_err() {
2539            self.control_handle.shutdown();
2540        }
2541        self.drop_without_shutdown();
2542        _result
2543    }
2544
2545    /// Similar to "send" but does not shutdown the channel if an error occurs.
2546    pub fn send_no_shutdown_on_err(self, mut vec: &[u8]) -> Result<(), fidl::Error> {
2547        let _result = self.send_raw(vec);
2548        self.drop_without_shutdown();
2549        _result
2550    }
2551
2552    fn send_raw(&self, mut vec: &[u8]) -> Result<(), fidl::Error> {
2553        self.control_handle.inner.send::<ClosedTargetCreateNByteVectorResponse>(
2554            (vec,),
2555            self.tx_id,
2556            0x1ecd88ef664e9c61,
2557            fidl::encoding::DynamicFlags::empty(),
2558        )
2559    }
2560}
2561
2562#[must_use = "FIDL methods require a response to be sent"]
2563#[derive(Debug)]
2564pub struct ClosedTargetCreateNHandleVectorResponder {
2565    control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2566    tx_id: u32,
2567}
2568
2569/// Set the the channel to be shutdown (see [`ClosedTargetControlHandle::shutdown`])
2570/// if the responder is dropped without sending a response, so that the client
2571/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2572impl std::ops::Drop for ClosedTargetCreateNHandleVectorResponder {
2573    fn drop(&mut self) {
2574        self.control_handle.shutdown();
2575        // Safety: drops once, never accessed again
2576        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2577    }
2578}
2579
2580impl fidl::endpoints::Responder for ClosedTargetCreateNHandleVectorResponder {
2581    type ControlHandle = ClosedTargetControlHandle;
2582
2583    fn control_handle(&self) -> &ClosedTargetControlHandle {
2584        &self.control_handle
2585    }
2586
2587    fn drop_without_shutdown(mut self) {
2588        // Safety: drops once, never accessed again due to mem::forget
2589        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2590        // Prevent Drop from running (which would shut down the channel)
2591        std::mem::forget(self);
2592    }
2593}
2594
2595impl ClosedTargetCreateNHandleVectorResponder {
2596    /// Sends a response to the FIDL transaction.
2597    ///
2598    /// Sets the channel to shutdown if an error occurs.
2599    pub fn send(self, mut vec: Vec<fidl::Event>) -> Result<(), fidl::Error> {
2600        let _result = self.send_raw(vec);
2601        if _result.is_err() {
2602            self.control_handle.shutdown();
2603        }
2604        self.drop_without_shutdown();
2605        _result
2606    }
2607
2608    /// Similar to "send" but does not shutdown the channel if an error occurs.
2609    pub fn send_no_shutdown_on_err(self, mut vec: Vec<fidl::Event>) -> Result<(), fidl::Error> {
2610        let _result = self.send_raw(vec);
2611        self.drop_without_shutdown();
2612        _result
2613    }
2614
2615    fn send_raw(&self, mut vec: Vec<fidl::Event>) -> Result<(), fidl::Error> {
2616        self.control_handle.inner.send::<ClosedTargetCreateNHandleVectorResponse>(
2617            (vec.as_mut(),),
2618            self.tx_id,
2619            0x26341ba1fa66813d,
2620            fidl::encoding::DynamicFlags::empty(),
2621        )
2622    }
2623}
2624
2625#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2626pub struct OpenTargetMarker;
2627
2628impl fidl::endpoints::ProtocolMarker for OpenTargetMarker {
2629    type Proxy = OpenTargetProxy;
2630    type RequestStream = OpenTargetRequestStream;
2631    #[cfg(target_os = "fuchsia")]
2632    type SynchronousProxy = OpenTargetSynchronousProxy;
2633
2634    const DEBUG_NAME: &'static str = "(anonymous) OpenTarget";
2635}
2636pub type OpenTargetStrictTwoWayErrResult = Result<(), i32>;
2637pub type OpenTargetStrictTwoWayFieldsErrResult = Result<i32, i32>;
2638pub type OpenTargetFlexibleTwoWayErrResult = Result<(), i32>;
2639pub type OpenTargetFlexibleTwoWayFieldsErrResult = Result<i32, i32>;
2640
2641pub trait OpenTargetProxyInterface: Send + Sync {
2642    fn r#strict_one_way(&self) -> Result<(), fidl::Error>;
2643    fn r#flexible_one_way(&self) -> Result<(), fidl::Error>;
2644    type StrictTwoWayResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
2645    fn r#strict_two_way(&self) -> Self::StrictTwoWayResponseFut;
2646    type StrictTwoWayFieldsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
2647        + Send;
2648    fn r#strict_two_way_fields(&self, reply_with: i32) -> Self::StrictTwoWayFieldsResponseFut;
2649    type StrictTwoWayErrResponseFut: std::future::Future<Output = Result<OpenTargetStrictTwoWayErrResult, fidl::Error>>
2650        + Send;
2651    fn r#strict_two_way_err(
2652        &self,
2653        payload: &OpenTargetStrictTwoWayErrRequest,
2654    ) -> Self::StrictTwoWayErrResponseFut;
2655    type StrictTwoWayFieldsErrResponseFut: std::future::Future<Output = Result<OpenTargetStrictTwoWayFieldsErrResult, fidl::Error>>
2656        + Send;
2657    fn r#strict_two_way_fields_err(
2658        &self,
2659        payload: &OpenTargetStrictTwoWayFieldsErrRequest,
2660    ) -> Self::StrictTwoWayFieldsErrResponseFut;
2661    type FlexibleTwoWayResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
2662    fn r#flexible_two_way(&self) -> Self::FlexibleTwoWayResponseFut;
2663    type FlexibleTwoWayFieldsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
2664        + Send;
2665    fn r#flexible_two_way_fields(&self, reply_with: i32) -> Self::FlexibleTwoWayFieldsResponseFut;
2666    type FlexibleTwoWayErrResponseFut: std::future::Future<Output = Result<OpenTargetFlexibleTwoWayErrResult, fidl::Error>>
2667        + Send;
2668    fn r#flexible_two_way_err(
2669        &self,
2670        payload: &OpenTargetFlexibleTwoWayErrRequest,
2671    ) -> Self::FlexibleTwoWayErrResponseFut;
2672    type FlexibleTwoWayFieldsErrResponseFut: std::future::Future<Output = Result<OpenTargetFlexibleTwoWayFieldsErrResult, fidl::Error>>
2673        + Send;
2674    fn r#flexible_two_way_fields_err(
2675        &self,
2676        payload: &OpenTargetFlexibleTwoWayFieldsErrRequest,
2677    ) -> Self::FlexibleTwoWayFieldsErrResponseFut;
2678}
2679#[derive(Debug)]
2680#[cfg(target_os = "fuchsia")]
2681pub struct OpenTargetSynchronousProxy {
2682    client: fidl::client::sync::Client,
2683}
2684
2685#[cfg(target_os = "fuchsia")]
2686impl fidl::endpoints::SynchronousProxy for OpenTargetSynchronousProxy {
2687    type Proxy = OpenTargetProxy;
2688    type Protocol = OpenTargetMarker;
2689
2690    fn from_channel(inner: fidl::Channel) -> Self {
2691        Self::new(inner)
2692    }
2693
2694    fn into_channel(self) -> fidl::Channel {
2695        self.client.into_channel()
2696    }
2697
2698    fn as_channel(&self) -> &fidl::Channel {
2699        self.client.as_channel()
2700    }
2701}
2702
2703#[cfg(target_os = "fuchsia")]
2704impl OpenTargetSynchronousProxy {
2705    pub fn new(channel: fidl::Channel) -> Self {
2706        Self { client: fidl::client::sync::Client::new(channel) }
2707    }
2708
2709    pub fn into_channel(self) -> fidl::Channel {
2710        self.client.into_channel()
2711    }
2712
2713    /// Waits until an event arrives and returns it. It is safe for other
2714    /// threads to make concurrent requests while waiting for an event.
2715    pub fn wait_for_event(
2716        &self,
2717        deadline: zx::MonotonicInstant,
2718    ) -> Result<OpenTargetEvent, fidl::Error> {
2719        OpenTargetEvent::decode(self.client.wait_for_event::<OpenTargetMarker>(deadline)?)
2720    }
2721
2722    pub fn r#strict_one_way(&self) -> Result<(), fidl::Error> {
2723        self.client.send::<fidl::encoding::EmptyPayload>(
2724            (),
2725            0x24dd8be3750aba9b,
2726            fidl::encoding::DynamicFlags::empty(),
2727        )
2728    }
2729
2730    pub fn r#flexible_one_way(&self) -> Result<(), fidl::Error> {
2731        self.client.send::<fidl::encoding::EmptyPayload>(
2732            (),
2733            0x421bbeb2bbc84a58,
2734            fidl::encoding::DynamicFlags::FLEXIBLE,
2735        )
2736    }
2737
2738    pub fn r#strict_two_way(&self, ___deadline: zx::MonotonicInstant) -> Result<(), fidl::Error> {
2739        let _response = self.client.send_query::<
2740            fidl::encoding::EmptyPayload,
2741            fidl::encoding::EmptyPayload,
2742            OpenTargetMarker,
2743        >(
2744            (),
2745            0x70020c582a57ef03,
2746            fidl::encoding::DynamicFlags::empty(),
2747            ___deadline,
2748        )?;
2749        Ok(_response)
2750    }
2751
2752    pub fn r#strict_two_way_fields(
2753        &self,
2754        mut reply_with: i32,
2755        ___deadline: zx::MonotonicInstant,
2756    ) -> Result<i32, fidl::Error> {
2757        let _response = self.client.send_query::<
2758            OpenTargetStrictTwoWayFieldsRequest,
2759            OpenTargetStrictTwoWayFieldsResponse,
2760            OpenTargetMarker,
2761        >(
2762            (reply_with,),
2763            0x2be6e1cc40008010,
2764            fidl::encoding::DynamicFlags::empty(),
2765            ___deadline,
2766        )?;
2767        Ok(_response.some_field)
2768    }
2769
2770    pub fn r#strict_two_way_err(
2771        &self,
2772        mut payload: &OpenTargetStrictTwoWayErrRequest,
2773        ___deadline: zx::MonotonicInstant,
2774    ) -> Result<OpenTargetStrictTwoWayErrResult, fidl::Error> {
2775        let _response = self.client.send_query::<
2776            OpenTargetStrictTwoWayErrRequest,
2777            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2778            OpenTargetMarker,
2779        >(
2780            payload,
2781            0x6efc16069ebd0b2c,
2782            fidl::encoding::DynamicFlags::empty(),
2783            ___deadline,
2784        )?;
2785        Ok(_response.map(|x| x))
2786    }
2787
2788    pub fn r#strict_two_way_fields_err(
2789        &self,
2790        mut payload: &OpenTargetStrictTwoWayFieldsErrRequest,
2791        ___deadline: zx::MonotonicInstant,
2792    ) -> Result<OpenTargetStrictTwoWayFieldsErrResult, fidl::Error> {
2793        let _response = self.client.send_query::<
2794            OpenTargetStrictTwoWayFieldsErrRequest,
2795            fidl::encoding::ResultType<OpenTargetStrictTwoWayFieldsErrResponse, i32>,
2796            OpenTargetMarker,
2797        >(
2798            payload,
2799            0x309c8adda770fcf0,
2800            fidl::encoding::DynamicFlags::empty(),
2801            ___deadline,
2802        )?;
2803        Ok(_response.map(|x| x.some_field))
2804    }
2805
2806    pub fn r#flexible_two_way(&self, ___deadline: zx::MonotonicInstant) -> Result<(), fidl::Error> {
2807        let _response = self.client.send_query::<
2808            fidl::encoding::EmptyPayload,
2809            fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
2810            OpenTargetMarker,
2811        >(
2812            (),
2813            0x19f932dac7810c71,
2814            fidl::encoding::DynamicFlags::FLEXIBLE,
2815            ___deadline,
2816        )?
2817        .into_result::<OpenTargetMarker>("flexible_two_way")?;
2818        Ok(_response)
2819    }
2820
2821    pub fn r#flexible_two_way_fields(
2822        &self,
2823        mut reply_with: i32,
2824        ___deadline: zx::MonotonicInstant,
2825    ) -> Result<i32, fidl::Error> {
2826        let _response = self.client.send_query::<
2827            OpenTargetFlexibleTwoWayFieldsRequest,
2828            fidl::encoding::FlexibleType<OpenTargetFlexibleTwoWayFieldsResponse>,
2829            OpenTargetMarker,
2830        >(
2831            (reply_with,),
2832            0x47cca5ddb4207774,
2833            fidl::encoding::DynamicFlags::FLEXIBLE,
2834            ___deadline,
2835        )?
2836        .into_result::<OpenTargetMarker>("flexible_two_way_fields")?;
2837        Ok(_response.some_field)
2838    }
2839
2840    pub fn r#flexible_two_way_err(
2841        &self,
2842        mut payload: &OpenTargetFlexibleTwoWayErrRequest,
2843        ___deadline: zx::MonotonicInstant,
2844    ) -> Result<OpenTargetFlexibleTwoWayErrResult, fidl::Error> {
2845        let _response = self.client.send_query::<
2846            OpenTargetFlexibleTwoWayErrRequest,
2847            fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
2848            OpenTargetMarker,
2849        >(
2850            payload,
2851            0x52aa19681fea3a0,
2852            fidl::encoding::DynamicFlags::FLEXIBLE,
2853            ___deadline,
2854        )?
2855        .into_result::<OpenTargetMarker>("flexible_two_way_err")?;
2856        Ok(_response.map(|x| x))
2857    }
2858
2859    pub fn r#flexible_two_way_fields_err(
2860        &self,
2861        mut payload: &OpenTargetFlexibleTwoWayFieldsErrRequest,
2862        ___deadline: zx::MonotonicInstant,
2863    ) -> Result<OpenTargetFlexibleTwoWayFieldsErrResult, fidl::Error> {
2864        let _response = self.client.send_query::<
2865            OpenTargetFlexibleTwoWayFieldsErrRequest,
2866            fidl::encoding::FlexibleResultType<OpenTargetFlexibleTwoWayFieldsErrResponse, i32>,
2867            OpenTargetMarker,
2868        >(
2869            payload,
2870            0x1ab7dd4c6a3650b6,
2871            fidl::encoding::DynamicFlags::FLEXIBLE,
2872            ___deadline,
2873        )?
2874        .into_result::<OpenTargetMarker>("flexible_two_way_fields_err")?;
2875        Ok(_response.map(|x| x.some_field))
2876    }
2877}
2878
2879#[cfg(target_os = "fuchsia")]
2880impl From<OpenTargetSynchronousProxy> for zx::NullableHandle {
2881    fn from(value: OpenTargetSynchronousProxy) -> Self {
2882        value.into_channel().into()
2883    }
2884}
2885
2886#[cfg(target_os = "fuchsia")]
2887impl From<fidl::Channel> for OpenTargetSynchronousProxy {
2888    fn from(value: fidl::Channel) -> Self {
2889        Self::new(value)
2890    }
2891}
2892
2893#[cfg(target_os = "fuchsia")]
2894impl fidl::endpoints::FromClient for OpenTargetSynchronousProxy {
2895    type Protocol = OpenTargetMarker;
2896
2897    fn from_client(value: fidl::endpoints::ClientEnd<OpenTargetMarker>) -> Self {
2898        Self::new(value.into_channel())
2899    }
2900}
2901
2902#[derive(Debug, Clone)]
2903pub struct OpenTargetProxy {
2904    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2905}
2906
2907impl fidl::endpoints::Proxy for OpenTargetProxy {
2908    type Protocol = OpenTargetMarker;
2909
2910    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2911        Self::new(inner)
2912    }
2913
2914    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2915        self.client.into_channel().map_err(|client| Self { client })
2916    }
2917
2918    fn as_channel(&self) -> &::fidl::AsyncChannel {
2919        self.client.as_channel()
2920    }
2921}
2922
2923impl OpenTargetProxy {
2924    /// Create a new Proxy for fidl.serversuite/OpenTarget.
2925    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2926        let protocol_name = <OpenTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2927        Self { client: fidl::client::Client::new(channel, protocol_name) }
2928    }
2929
2930    /// Get a Stream of events from the remote end of the protocol.
2931    ///
2932    /// # Panics
2933    ///
2934    /// Panics if the event stream was already taken.
2935    pub fn take_event_stream(&self) -> OpenTargetEventStream {
2936        OpenTargetEventStream { event_receiver: self.client.take_event_receiver() }
2937    }
2938
2939    pub fn r#strict_one_way(&self) -> Result<(), fidl::Error> {
2940        OpenTargetProxyInterface::r#strict_one_way(self)
2941    }
2942
2943    pub fn r#flexible_one_way(&self) -> Result<(), fidl::Error> {
2944        OpenTargetProxyInterface::r#flexible_one_way(self)
2945    }
2946
2947    pub fn r#strict_two_way(
2948        &self,
2949    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
2950        OpenTargetProxyInterface::r#strict_two_way(self)
2951    }
2952
2953    pub fn r#strict_two_way_fields(
2954        &self,
2955        mut reply_with: i32,
2956    ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2957        OpenTargetProxyInterface::r#strict_two_way_fields(self, reply_with)
2958    }
2959
2960    pub fn r#strict_two_way_err(
2961        &self,
2962        mut payload: &OpenTargetStrictTwoWayErrRequest,
2963    ) -> fidl::client::QueryResponseFut<
2964        OpenTargetStrictTwoWayErrResult,
2965        fidl::encoding::DefaultFuchsiaResourceDialect,
2966    > {
2967        OpenTargetProxyInterface::r#strict_two_way_err(self, payload)
2968    }
2969
2970    pub fn r#strict_two_way_fields_err(
2971        &self,
2972        mut payload: &OpenTargetStrictTwoWayFieldsErrRequest,
2973    ) -> fidl::client::QueryResponseFut<
2974        OpenTargetStrictTwoWayFieldsErrResult,
2975        fidl::encoding::DefaultFuchsiaResourceDialect,
2976    > {
2977        OpenTargetProxyInterface::r#strict_two_way_fields_err(self, payload)
2978    }
2979
2980    pub fn r#flexible_two_way(
2981        &self,
2982    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
2983        OpenTargetProxyInterface::r#flexible_two_way(self)
2984    }
2985
2986    pub fn r#flexible_two_way_fields(
2987        &self,
2988        mut reply_with: i32,
2989    ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2990        OpenTargetProxyInterface::r#flexible_two_way_fields(self, reply_with)
2991    }
2992
2993    pub fn r#flexible_two_way_err(
2994        &self,
2995        mut payload: &OpenTargetFlexibleTwoWayErrRequest,
2996    ) -> fidl::client::QueryResponseFut<
2997        OpenTargetFlexibleTwoWayErrResult,
2998        fidl::encoding::DefaultFuchsiaResourceDialect,
2999    > {
3000        OpenTargetProxyInterface::r#flexible_two_way_err(self, payload)
3001    }
3002
3003    pub fn r#flexible_two_way_fields_err(
3004        &self,
3005        mut payload: &OpenTargetFlexibleTwoWayFieldsErrRequest,
3006    ) -> fidl::client::QueryResponseFut<
3007        OpenTargetFlexibleTwoWayFieldsErrResult,
3008        fidl::encoding::DefaultFuchsiaResourceDialect,
3009    > {
3010        OpenTargetProxyInterface::r#flexible_two_way_fields_err(self, payload)
3011    }
3012}
3013
3014impl OpenTargetProxyInterface for OpenTargetProxy {
3015    fn r#strict_one_way(&self) -> Result<(), fidl::Error> {
3016        self.client.send::<fidl::encoding::EmptyPayload>(
3017            (),
3018            0x24dd8be3750aba9b,
3019            fidl::encoding::DynamicFlags::empty(),
3020        )
3021    }
3022
3023    fn r#flexible_one_way(&self) -> Result<(), fidl::Error> {
3024        self.client.send::<fidl::encoding::EmptyPayload>(
3025            (),
3026            0x421bbeb2bbc84a58,
3027            fidl::encoding::DynamicFlags::FLEXIBLE,
3028        )
3029    }
3030
3031    type StrictTwoWayResponseFut =
3032        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
3033    fn r#strict_two_way(&self) -> Self::StrictTwoWayResponseFut {
3034        fn _decode(
3035            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3036        ) -> Result<(), fidl::Error> {
3037            let _response = fidl::client::decode_transaction_body::<
3038                fidl::encoding::EmptyPayload,
3039                fidl::encoding::DefaultFuchsiaResourceDialect,
3040                0x70020c582a57ef03,
3041            >(_buf?)?;
3042            Ok(_response)
3043        }
3044        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
3045            (),
3046            0x70020c582a57ef03,
3047            fidl::encoding::DynamicFlags::empty(),
3048            _decode,
3049        )
3050    }
3051
3052    type StrictTwoWayFieldsResponseFut =
3053        fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
3054    fn r#strict_two_way_fields(&self, mut reply_with: i32) -> Self::StrictTwoWayFieldsResponseFut {
3055        fn _decode(
3056            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3057        ) -> Result<i32, fidl::Error> {
3058            let _response = fidl::client::decode_transaction_body::<
3059                OpenTargetStrictTwoWayFieldsResponse,
3060                fidl::encoding::DefaultFuchsiaResourceDialect,
3061                0x2be6e1cc40008010,
3062            >(_buf?)?;
3063            Ok(_response.some_field)
3064        }
3065        self.client.send_query_and_decode::<OpenTargetStrictTwoWayFieldsRequest, i32>(
3066            (reply_with,),
3067            0x2be6e1cc40008010,
3068            fidl::encoding::DynamicFlags::empty(),
3069            _decode,
3070        )
3071    }
3072
3073    type StrictTwoWayErrResponseFut = fidl::client::QueryResponseFut<
3074        OpenTargetStrictTwoWayErrResult,
3075        fidl::encoding::DefaultFuchsiaResourceDialect,
3076    >;
3077    fn r#strict_two_way_err(
3078        &self,
3079        mut payload: &OpenTargetStrictTwoWayErrRequest,
3080    ) -> Self::StrictTwoWayErrResponseFut {
3081        fn _decode(
3082            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3083        ) -> Result<OpenTargetStrictTwoWayErrResult, fidl::Error> {
3084            let _response = fidl::client::decode_transaction_body::<
3085                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3086                fidl::encoding::DefaultFuchsiaResourceDialect,
3087                0x6efc16069ebd0b2c,
3088            >(_buf?)?;
3089            Ok(_response.map(|x| x))
3090        }
3091        self.client.send_query_and_decode::<
3092            OpenTargetStrictTwoWayErrRequest,
3093            OpenTargetStrictTwoWayErrResult,
3094        >(
3095            payload,
3096            0x6efc16069ebd0b2c,
3097            fidl::encoding::DynamicFlags::empty(),
3098            _decode,
3099        )
3100    }
3101
3102    type StrictTwoWayFieldsErrResponseFut = fidl::client::QueryResponseFut<
3103        OpenTargetStrictTwoWayFieldsErrResult,
3104        fidl::encoding::DefaultFuchsiaResourceDialect,
3105    >;
3106    fn r#strict_two_way_fields_err(
3107        &self,
3108        mut payload: &OpenTargetStrictTwoWayFieldsErrRequest,
3109    ) -> Self::StrictTwoWayFieldsErrResponseFut {
3110        fn _decode(
3111            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3112        ) -> Result<OpenTargetStrictTwoWayFieldsErrResult, fidl::Error> {
3113            let _response = fidl::client::decode_transaction_body::<
3114                fidl::encoding::ResultType<OpenTargetStrictTwoWayFieldsErrResponse, i32>,
3115                fidl::encoding::DefaultFuchsiaResourceDialect,
3116                0x309c8adda770fcf0,
3117            >(_buf?)?;
3118            Ok(_response.map(|x| x.some_field))
3119        }
3120        self.client.send_query_and_decode::<
3121            OpenTargetStrictTwoWayFieldsErrRequest,
3122            OpenTargetStrictTwoWayFieldsErrResult,
3123        >(
3124            payload,
3125            0x309c8adda770fcf0,
3126            fidl::encoding::DynamicFlags::empty(),
3127            _decode,
3128        )
3129    }
3130
3131    type FlexibleTwoWayResponseFut =
3132        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
3133    fn r#flexible_two_way(&self) -> Self::FlexibleTwoWayResponseFut {
3134        fn _decode(
3135            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3136        ) -> Result<(), fidl::Error> {
3137            let _response = fidl::client::decode_transaction_body::<
3138                fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
3139                fidl::encoding::DefaultFuchsiaResourceDialect,
3140                0x19f932dac7810c71,
3141            >(_buf?)?
3142            .into_result::<OpenTargetMarker>("flexible_two_way")?;
3143            Ok(_response)
3144        }
3145        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
3146            (),
3147            0x19f932dac7810c71,
3148            fidl::encoding::DynamicFlags::FLEXIBLE,
3149            _decode,
3150        )
3151    }
3152
3153    type FlexibleTwoWayFieldsResponseFut =
3154        fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
3155    fn r#flexible_two_way_fields(
3156        &self,
3157        mut reply_with: i32,
3158    ) -> Self::FlexibleTwoWayFieldsResponseFut {
3159        fn _decode(
3160            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3161        ) -> Result<i32, fidl::Error> {
3162            let _response = fidl::client::decode_transaction_body::<
3163                fidl::encoding::FlexibleType<OpenTargetFlexibleTwoWayFieldsResponse>,
3164                fidl::encoding::DefaultFuchsiaResourceDialect,
3165                0x47cca5ddb4207774,
3166            >(_buf?)?
3167            .into_result::<OpenTargetMarker>("flexible_two_way_fields")?;
3168            Ok(_response.some_field)
3169        }
3170        self.client.send_query_and_decode::<OpenTargetFlexibleTwoWayFieldsRequest, i32>(
3171            (reply_with,),
3172            0x47cca5ddb4207774,
3173            fidl::encoding::DynamicFlags::FLEXIBLE,
3174            _decode,
3175        )
3176    }
3177
3178    type FlexibleTwoWayErrResponseFut = fidl::client::QueryResponseFut<
3179        OpenTargetFlexibleTwoWayErrResult,
3180        fidl::encoding::DefaultFuchsiaResourceDialect,
3181    >;
3182    fn r#flexible_two_way_err(
3183        &self,
3184        mut payload: &OpenTargetFlexibleTwoWayErrRequest,
3185    ) -> Self::FlexibleTwoWayErrResponseFut {
3186        fn _decode(
3187            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3188        ) -> Result<OpenTargetFlexibleTwoWayErrResult, fidl::Error> {
3189            let _response = fidl::client::decode_transaction_body::<
3190                fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
3191                fidl::encoding::DefaultFuchsiaResourceDialect,
3192                0x52aa19681fea3a0,
3193            >(_buf?)?
3194            .into_result::<OpenTargetMarker>("flexible_two_way_err")?;
3195            Ok(_response.map(|x| x))
3196        }
3197        self.client.send_query_and_decode::<
3198            OpenTargetFlexibleTwoWayErrRequest,
3199            OpenTargetFlexibleTwoWayErrResult,
3200        >(
3201            payload,
3202            0x52aa19681fea3a0,
3203            fidl::encoding::DynamicFlags::FLEXIBLE,
3204            _decode,
3205        )
3206    }
3207
3208    type FlexibleTwoWayFieldsErrResponseFut = fidl::client::QueryResponseFut<
3209        OpenTargetFlexibleTwoWayFieldsErrResult,
3210        fidl::encoding::DefaultFuchsiaResourceDialect,
3211    >;
3212    fn r#flexible_two_way_fields_err(
3213        &self,
3214        mut payload: &OpenTargetFlexibleTwoWayFieldsErrRequest,
3215    ) -> Self::FlexibleTwoWayFieldsErrResponseFut {
3216        fn _decode(
3217            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3218        ) -> Result<OpenTargetFlexibleTwoWayFieldsErrResult, fidl::Error> {
3219            let _response = fidl::client::decode_transaction_body::<
3220                fidl::encoding::FlexibleResultType<OpenTargetFlexibleTwoWayFieldsErrResponse, i32>,
3221                fidl::encoding::DefaultFuchsiaResourceDialect,
3222                0x1ab7dd4c6a3650b6,
3223            >(_buf?)?
3224            .into_result::<OpenTargetMarker>("flexible_two_way_fields_err")?;
3225            Ok(_response.map(|x| x.some_field))
3226        }
3227        self.client.send_query_and_decode::<
3228            OpenTargetFlexibleTwoWayFieldsErrRequest,
3229            OpenTargetFlexibleTwoWayFieldsErrResult,
3230        >(
3231            payload,
3232            0x1ab7dd4c6a3650b6,
3233            fidl::encoding::DynamicFlags::FLEXIBLE,
3234            _decode,
3235        )
3236    }
3237}
3238
3239pub struct OpenTargetEventStream {
3240    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3241}
3242
3243impl std::marker::Unpin for OpenTargetEventStream {}
3244
3245impl futures::stream::FusedStream for OpenTargetEventStream {
3246    fn is_terminated(&self) -> bool {
3247        self.event_receiver.is_terminated()
3248    }
3249}
3250
3251impl futures::Stream for OpenTargetEventStream {
3252    type Item = Result<OpenTargetEvent, fidl::Error>;
3253
3254    fn poll_next(
3255        mut self: std::pin::Pin<&mut Self>,
3256        cx: &mut std::task::Context<'_>,
3257    ) -> std::task::Poll<Option<Self::Item>> {
3258        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3259            &mut self.event_receiver,
3260            cx
3261        )?) {
3262            Some(buf) => std::task::Poll::Ready(Some(OpenTargetEvent::decode(buf))),
3263            None => std::task::Poll::Ready(None),
3264        }
3265    }
3266}
3267
3268#[derive(Debug)]
3269pub enum OpenTargetEvent {
3270    StrictEvent {},
3271    FlexibleEvent {},
3272    #[non_exhaustive]
3273    _UnknownEvent {
3274        /// Ordinal of the event that was sent.
3275        ordinal: u64,
3276    },
3277}
3278
3279impl OpenTargetEvent {
3280    #[allow(irrefutable_let_patterns)]
3281    pub fn into_strict_event(self) -> Option<()> {
3282        if let OpenTargetEvent::StrictEvent {} = self { Some(()) } else { None }
3283    }
3284    #[allow(irrefutable_let_patterns)]
3285    pub fn into_flexible_event(self) -> Option<()> {
3286        if let OpenTargetEvent::FlexibleEvent {} = self { Some(()) } else { None }
3287    }
3288
3289    /// Decodes a message buffer as a [`OpenTargetEvent`].
3290    fn decode(
3291        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3292    ) -> Result<OpenTargetEvent, fidl::Error> {
3293        let (bytes, _handles) = buf.split_mut();
3294        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3295        debug_assert_eq!(tx_header.tx_id, 0);
3296        match tx_header.ordinal {
3297            0x778f95d421c0685 => {
3298                let mut out = fidl::new_empty!(
3299                    fidl::encoding::EmptyPayload,
3300                    fidl::encoding::DefaultFuchsiaResourceDialect
3301                );
3302                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
3303                Ok((OpenTargetEvent::StrictEvent {}))
3304            }
3305            0x43d9ee0dca2bb33e => {
3306                let mut out = fidl::new_empty!(
3307                    fidl::encoding::EmptyPayload,
3308                    fidl::encoding::DefaultFuchsiaResourceDialect
3309                );
3310                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
3311                Ok((OpenTargetEvent::FlexibleEvent {}))
3312            }
3313            _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
3314                Ok(OpenTargetEvent::_UnknownEvent { ordinal: tx_header.ordinal })
3315            }
3316            _ => Err(fidl::Error::UnknownOrdinal {
3317                ordinal: tx_header.ordinal,
3318                protocol_name: <OpenTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3319            }),
3320        }
3321    }
3322}
3323
3324/// A Stream of incoming requests for fidl.serversuite/OpenTarget.
3325pub struct OpenTargetRequestStream {
3326    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3327    is_terminated: bool,
3328}
3329
3330impl std::marker::Unpin for OpenTargetRequestStream {}
3331
3332impl futures::stream::FusedStream for OpenTargetRequestStream {
3333    fn is_terminated(&self) -> bool {
3334        self.is_terminated
3335    }
3336}
3337
3338impl fidl::endpoints::RequestStream for OpenTargetRequestStream {
3339    type Protocol = OpenTargetMarker;
3340    type ControlHandle = OpenTargetControlHandle;
3341
3342    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3343        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3344    }
3345
3346    fn control_handle(&self) -> Self::ControlHandle {
3347        OpenTargetControlHandle { inner: self.inner.clone() }
3348    }
3349
3350    fn into_inner(
3351        self,
3352    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3353    {
3354        (self.inner, self.is_terminated)
3355    }
3356
3357    fn from_inner(
3358        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3359        is_terminated: bool,
3360    ) -> Self {
3361        Self { inner, is_terminated }
3362    }
3363}
3364
3365impl futures::Stream for OpenTargetRequestStream {
3366    type Item = Result<OpenTargetRequest, fidl::Error>;
3367
3368    fn poll_next(
3369        mut self: std::pin::Pin<&mut Self>,
3370        cx: &mut std::task::Context<'_>,
3371    ) -> std::task::Poll<Option<Self::Item>> {
3372        let this = &mut *self;
3373        if this.inner.check_shutdown(cx) {
3374            this.is_terminated = true;
3375            return std::task::Poll::Ready(None);
3376        }
3377        if this.is_terminated {
3378            panic!("polled OpenTargetRequestStream after completion");
3379        }
3380        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3381            |bytes, handles| {
3382                match this.inner.channel().read_etc(cx, bytes, handles) {
3383                    std::task::Poll::Ready(Ok(())) => {}
3384                    std::task::Poll::Pending => return std::task::Poll::Pending,
3385                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3386                        this.is_terminated = true;
3387                        return std::task::Poll::Ready(None);
3388                    }
3389                    std::task::Poll::Ready(Err(e)) => {
3390                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3391                            e.into(),
3392                        ))));
3393                    }
3394                }
3395
3396                // A message has been received from the channel
3397                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3398
3399                std::task::Poll::Ready(Some(match header.ordinal {
3400                    0x24dd8be3750aba9b => {
3401                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3402                        let mut req = fidl::new_empty!(
3403                            fidl::encoding::EmptyPayload,
3404                            fidl::encoding::DefaultFuchsiaResourceDialect
3405                        );
3406                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3407                        let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
3408                        Ok(OpenTargetRequest::StrictOneWay { control_handle })
3409                    }
3410                    0x421bbeb2bbc84a58 => {
3411                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3412                        let mut req = fidl::new_empty!(
3413                            fidl::encoding::EmptyPayload,
3414                            fidl::encoding::DefaultFuchsiaResourceDialect
3415                        );
3416                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3417                        let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
3418                        Ok(OpenTargetRequest::FlexibleOneWay { control_handle })
3419                    }
3420                    0x70020c582a57ef03 => {
3421                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3422                        let mut req = fidl::new_empty!(
3423                            fidl::encoding::EmptyPayload,
3424                            fidl::encoding::DefaultFuchsiaResourceDialect
3425                        );
3426                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3427                        let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
3428                        Ok(OpenTargetRequest::StrictTwoWay {
3429                            responder: OpenTargetStrictTwoWayResponder {
3430                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3431                                tx_id: header.tx_id,
3432                            },
3433                        })
3434                    }
3435                    0x2be6e1cc40008010 => {
3436                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3437                        let mut req = fidl::new_empty!(
3438                            OpenTargetStrictTwoWayFieldsRequest,
3439                            fidl::encoding::DefaultFuchsiaResourceDialect
3440                        );
3441                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenTargetStrictTwoWayFieldsRequest>(&header, _body_bytes, handles, &mut req)?;
3442                        let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
3443                        Ok(OpenTargetRequest::StrictTwoWayFields {
3444                            reply_with: req.reply_with,
3445
3446                            responder: OpenTargetStrictTwoWayFieldsResponder {
3447                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3448                                tx_id: header.tx_id,
3449                            },
3450                        })
3451                    }
3452                    0x6efc16069ebd0b2c => {
3453                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3454                        let mut req = fidl::new_empty!(
3455                            OpenTargetStrictTwoWayErrRequest,
3456                            fidl::encoding::DefaultFuchsiaResourceDialect
3457                        );
3458                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenTargetStrictTwoWayErrRequest>(&header, _body_bytes, handles, &mut req)?;
3459                        let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
3460                        Ok(OpenTargetRequest::StrictTwoWayErr {
3461                            payload: req,
3462                            responder: OpenTargetStrictTwoWayErrResponder {
3463                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3464                                tx_id: header.tx_id,
3465                            },
3466                        })
3467                    }
3468                    0x309c8adda770fcf0 => {
3469                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3470                        let mut req = fidl::new_empty!(
3471                            OpenTargetStrictTwoWayFieldsErrRequest,
3472                            fidl::encoding::DefaultFuchsiaResourceDialect
3473                        );
3474                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenTargetStrictTwoWayFieldsErrRequest>(&header, _body_bytes, handles, &mut req)?;
3475                        let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
3476                        Ok(OpenTargetRequest::StrictTwoWayFieldsErr {
3477                            payload: req,
3478                            responder: OpenTargetStrictTwoWayFieldsErrResponder {
3479                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3480                                tx_id: header.tx_id,
3481                            },
3482                        })
3483                    }
3484                    0x19f932dac7810c71 => {
3485                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3486                        let mut req = fidl::new_empty!(
3487                            fidl::encoding::EmptyPayload,
3488                            fidl::encoding::DefaultFuchsiaResourceDialect
3489                        );
3490                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3491                        let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
3492                        Ok(OpenTargetRequest::FlexibleTwoWay {
3493                            responder: OpenTargetFlexibleTwoWayResponder {
3494                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3495                                tx_id: header.tx_id,
3496                            },
3497                        })
3498                    }
3499                    0x47cca5ddb4207774 => {
3500                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3501                        let mut req = fidl::new_empty!(
3502                            OpenTargetFlexibleTwoWayFieldsRequest,
3503                            fidl::encoding::DefaultFuchsiaResourceDialect
3504                        );
3505                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenTargetFlexibleTwoWayFieldsRequest>(&header, _body_bytes, handles, &mut req)?;
3506                        let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
3507                        Ok(OpenTargetRequest::FlexibleTwoWayFields {
3508                            reply_with: req.reply_with,
3509
3510                            responder: OpenTargetFlexibleTwoWayFieldsResponder {
3511                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3512                                tx_id: header.tx_id,
3513                            },
3514                        })
3515                    }
3516                    0x52aa19681fea3a0 => {
3517                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3518                        let mut req = fidl::new_empty!(
3519                            OpenTargetFlexibleTwoWayErrRequest,
3520                            fidl::encoding::DefaultFuchsiaResourceDialect
3521                        );
3522                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenTargetFlexibleTwoWayErrRequest>(&header, _body_bytes, handles, &mut req)?;
3523                        let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
3524                        Ok(OpenTargetRequest::FlexibleTwoWayErr {
3525                            payload: req,
3526                            responder: OpenTargetFlexibleTwoWayErrResponder {
3527                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3528                                tx_id: header.tx_id,
3529                            },
3530                        })
3531                    }
3532                    0x1ab7dd4c6a3650b6 => {
3533                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3534                        let mut req = fidl::new_empty!(
3535                            OpenTargetFlexibleTwoWayFieldsErrRequest,
3536                            fidl::encoding::DefaultFuchsiaResourceDialect
3537                        );
3538                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenTargetFlexibleTwoWayFieldsErrRequest>(&header, _body_bytes, handles, &mut req)?;
3539                        let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
3540                        Ok(OpenTargetRequest::FlexibleTwoWayFieldsErr {
3541                            payload: req,
3542                            responder: OpenTargetFlexibleTwoWayFieldsErrResponder {
3543                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3544                                tx_id: header.tx_id,
3545                            },
3546                        })
3547                    }
3548                    _ if header.tx_id == 0
3549                        && header
3550                            .dynamic_flags()
3551                            .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3552                    {
3553                        Ok(OpenTargetRequest::_UnknownMethod {
3554                            ordinal: header.ordinal,
3555                            control_handle: OpenTargetControlHandle { inner: this.inner.clone() },
3556                            method_type: fidl::MethodType::OneWay,
3557                        })
3558                    }
3559                    _ if header
3560                        .dynamic_flags()
3561                        .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3562                    {
3563                        this.inner.send_framework_err(
3564                            fidl::encoding::FrameworkErr::UnknownMethod,
3565                            header.tx_id,
3566                            header.ordinal,
3567                            header.dynamic_flags(),
3568                            (bytes, handles),
3569                        )?;
3570                        Ok(OpenTargetRequest::_UnknownMethod {
3571                            ordinal: header.ordinal,
3572                            control_handle: OpenTargetControlHandle { inner: this.inner.clone() },
3573                            method_type: fidl::MethodType::TwoWay,
3574                        })
3575                    }
3576                    _ => Err(fidl::Error::UnknownOrdinal {
3577                        ordinal: header.ordinal,
3578                        protocol_name:
3579                            <OpenTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3580                    }),
3581                }))
3582            },
3583        )
3584    }
3585}
3586
3587#[derive(Debug)]
3588pub enum OpenTargetRequest {
3589    StrictOneWay {
3590        control_handle: OpenTargetControlHandle,
3591    },
3592    FlexibleOneWay {
3593        control_handle: OpenTargetControlHandle,
3594    },
3595    StrictTwoWay {
3596        responder: OpenTargetStrictTwoWayResponder,
3597    },
3598    StrictTwoWayFields {
3599        reply_with: i32,
3600        responder: OpenTargetStrictTwoWayFieldsResponder,
3601    },
3602    StrictTwoWayErr {
3603        payload: OpenTargetStrictTwoWayErrRequest,
3604        responder: OpenTargetStrictTwoWayErrResponder,
3605    },
3606    StrictTwoWayFieldsErr {
3607        payload: OpenTargetStrictTwoWayFieldsErrRequest,
3608        responder: OpenTargetStrictTwoWayFieldsErrResponder,
3609    },
3610    FlexibleTwoWay {
3611        responder: OpenTargetFlexibleTwoWayResponder,
3612    },
3613    FlexibleTwoWayFields {
3614        reply_with: i32,
3615        responder: OpenTargetFlexibleTwoWayFieldsResponder,
3616    },
3617    FlexibleTwoWayErr {
3618        payload: OpenTargetFlexibleTwoWayErrRequest,
3619        responder: OpenTargetFlexibleTwoWayErrResponder,
3620    },
3621    FlexibleTwoWayFieldsErr {
3622        payload: OpenTargetFlexibleTwoWayFieldsErrRequest,
3623        responder: OpenTargetFlexibleTwoWayFieldsErrResponder,
3624    },
3625    /// An interaction was received which does not match any known method.
3626    #[non_exhaustive]
3627    _UnknownMethod {
3628        /// Ordinal of the method that was called.
3629        ordinal: u64,
3630        control_handle: OpenTargetControlHandle,
3631        method_type: fidl::MethodType,
3632    },
3633}
3634
3635impl OpenTargetRequest {
3636    #[allow(irrefutable_let_patterns)]
3637    pub fn into_strict_one_way(self) -> Option<(OpenTargetControlHandle)> {
3638        if let OpenTargetRequest::StrictOneWay { control_handle } = self {
3639            Some((control_handle))
3640        } else {
3641            None
3642        }
3643    }
3644
3645    #[allow(irrefutable_let_patterns)]
3646    pub fn into_flexible_one_way(self) -> Option<(OpenTargetControlHandle)> {
3647        if let OpenTargetRequest::FlexibleOneWay { control_handle } = self {
3648            Some((control_handle))
3649        } else {
3650            None
3651        }
3652    }
3653
3654    #[allow(irrefutable_let_patterns)]
3655    pub fn into_strict_two_way(self) -> Option<(OpenTargetStrictTwoWayResponder)> {
3656        if let OpenTargetRequest::StrictTwoWay { responder } = self {
3657            Some((responder))
3658        } else {
3659            None
3660        }
3661    }
3662
3663    #[allow(irrefutable_let_patterns)]
3664    pub fn into_strict_two_way_fields(
3665        self,
3666    ) -> Option<(i32, OpenTargetStrictTwoWayFieldsResponder)> {
3667        if let OpenTargetRequest::StrictTwoWayFields { reply_with, responder } = self {
3668            Some((reply_with, responder))
3669        } else {
3670            None
3671        }
3672    }
3673
3674    #[allow(irrefutable_let_patterns)]
3675    pub fn into_strict_two_way_err(
3676        self,
3677    ) -> Option<(OpenTargetStrictTwoWayErrRequest, OpenTargetStrictTwoWayErrResponder)> {
3678        if let OpenTargetRequest::StrictTwoWayErr { payload, responder } = self {
3679            Some((payload, responder))
3680        } else {
3681            None
3682        }
3683    }
3684
3685    #[allow(irrefutable_let_patterns)]
3686    pub fn into_strict_two_way_fields_err(
3687        self,
3688    ) -> Option<(OpenTargetStrictTwoWayFieldsErrRequest, OpenTargetStrictTwoWayFieldsErrResponder)>
3689    {
3690        if let OpenTargetRequest::StrictTwoWayFieldsErr { payload, responder } = self {
3691            Some((payload, responder))
3692        } else {
3693            None
3694        }
3695    }
3696
3697    #[allow(irrefutable_let_patterns)]
3698    pub fn into_flexible_two_way(self) -> Option<(OpenTargetFlexibleTwoWayResponder)> {
3699        if let OpenTargetRequest::FlexibleTwoWay { responder } = self {
3700            Some((responder))
3701        } else {
3702            None
3703        }
3704    }
3705
3706    #[allow(irrefutable_let_patterns)]
3707    pub fn into_flexible_two_way_fields(
3708        self,
3709    ) -> Option<(i32, OpenTargetFlexibleTwoWayFieldsResponder)> {
3710        if let OpenTargetRequest::FlexibleTwoWayFields { reply_with, responder } = self {
3711            Some((reply_with, responder))
3712        } else {
3713            None
3714        }
3715    }
3716
3717    #[allow(irrefutable_let_patterns)]
3718    pub fn into_flexible_two_way_err(
3719        self,
3720    ) -> Option<(OpenTargetFlexibleTwoWayErrRequest, OpenTargetFlexibleTwoWayErrResponder)> {
3721        if let OpenTargetRequest::FlexibleTwoWayErr { payload, responder } = self {
3722            Some((payload, responder))
3723        } else {
3724            None
3725        }
3726    }
3727
3728    #[allow(irrefutable_let_patterns)]
3729    pub fn into_flexible_two_way_fields_err(
3730        self,
3731    ) -> Option<(
3732        OpenTargetFlexibleTwoWayFieldsErrRequest,
3733        OpenTargetFlexibleTwoWayFieldsErrResponder,
3734    )> {
3735        if let OpenTargetRequest::FlexibleTwoWayFieldsErr { payload, responder } = self {
3736            Some((payload, responder))
3737        } else {
3738            None
3739        }
3740    }
3741
3742    /// Name of the method defined in FIDL
3743    pub fn method_name(&self) -> &'static str {
3744        match *self {
3745            OpenTargetRequest::StrictOneWay { .. } => "strict_one_way",
3746            OpenTargetRequest::FlexibleOneWay { .. } => "flexible_one_way",
3747            OpenTargetRequest::StrictTwoWay { .. } => "strict_two_way",
3748            OpenTargetRequest::StrictTwoWayFields { .. } => "strict_two_way_fields",
3749            OpenTargetRequest::StrictTwoWayErr { .. } => "strict_two_way_err",
3750            OpenTargetRequest::StrictTwoWayFieldsErr { .. } => "strict_two_way_fields_err",
3751            OpenTargetRequest::FlexibleTwoWay { .. } => "flexible_two_way",
3752            OpenTargetRequest::FlexibleTwoWayFields { .. } => "flexible_two_way_fields",
3753            OpenTargetRequest::FlexibleTwoWayErr { .. } => "flexible_two_way_err",
3754            OpenTargetRequest::FlexibleTwoWayFieldsErr { .. } => "flexible_two_way_fields_err",
3755            OpenTargetRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
3756                "unknown one-way method"
3757            }
3758            OpenTargetRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
3759                "unknown two-way method"
3760            }
3761        }
3762    }
3763}
3764
3765#[derive(Debug, Clone)]
3766pub struct OpenTargetControlHandle {
3767    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3768}
3769
3770impl fidl::endpoints::ControlHandle for OpenTargetControlHandle {
3771    fn shutdown(&self) {
3772        self.inner.shutdown()
3773    }
3774
3775    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3776        self.inner.shutdown_with_epitaph(status)
3777    }
3778
3779    fn is_closed(&self) -> bool {
3780        self.inner.channel().is_closed()
3781    }
3782    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3783        self.inner.channel().on_closed()
3784    }
3785
3786    #[cfg(target_os = "fuchsia")]
3787    fn signal_peer(
3788        &self,
3789        clear_mask: zx::Signals,
3790        set_mask: zx::Signals,
3791    ) -> Result<(), zx_status::Status> {
3792        use fidl::Peered;
3793        self.inner.channel().signal_peer(clear_mask, set_mask)
3794    }
3795}
3796
3797impl OpenTargetControlHandle {
3798    pub fn send_strict_event(&self) -> Result<(), fidl::Error> {
3799        self.inner.send::<fidl::encoding::EmptyPayload>(
3800            (),
3801            0,
3802            0x778f95d421c0685,
3803            fidl::encoding::DynamicFlags::empty(),
3804        )
3805    }
3806
3807    pub fn send_flexible_event(&self) -> Result<(), fidl::Error> {
3808        self.inner.send::<fidl::encoding::EmptyPayload>(
3809            (),
3810            0,
3811            0x43d9ee0dca2bb33e,
3812            fidl::encoding::DynamicFlags::FLEXIBLE,
3813        )
3814    }
3815}
3816
3817#[must_use = "FIDL methods require a response to be sent"]
3818#[derive(Debug)]
3819pub struct OpenTargetStrictTwoWayResponder {
3820    control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
3821    tx_id: u32,
3822}
3823
3824/// Set the the channel to be shutdown (see [`OpenTargetControlHandle::shutdown`])
3825/// if the responder is dropped without sending a response, so that the client
3826/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3827impl std::ops::Drop for OpenTargetStrictTwoWayResponder {
3828    fn drop(&mut self) {
3829        self.control_handle.shutdown();
3830        // Safety: drops once, never accessed again
3831        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3832    }
3833}
3834
3835impl fidl::endpoints::Responder for OpenTargetStrictTwoWayResponder {
3836    type ControlHandle = OpenTargetControlHandle;
3837
3838    fn control_handle(&self) -> &OpenTargetControlHandle {
3839        &self.control_handle
3840    }
3841
3842    fn drop_without_shutdown(mut self) {
3843        // Safety: drops once, never accessed again due to mem::forget
3844        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3845        // Prevent Drop from running (which would shut down the channel)
3846        std::mem::forget(self);
3847    }
3848}
3849
3850impl OpenTargetStrictTwoWayResponder {
3851    /// Sends a response to the FIDL transaction.
3852    ///
3853    /// Sets the channel to shutdown if an error occurs.
3854    pub fn send(self) -> Result<(), fidl::Error> {
3855        let _result = self.send_raw();
3856        if _result.is_err() {
3857            self.control_handle.shutdown();
3858        }
3859        self.drop_without_shutdown();
3860        _result
3861    }
3862
3863    /// Similar to "send" but does not shutdown the channel if an error occurs.
3864    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
3865        let _result = self.send_raw();
3866        self.drop_without_shutdown();
3867        _result
3868    }
3869
3870    fn send_raw(&self) -> Result<(), fidl::Error> {
3871        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
3872            (),
3873            self.tx_id,
3874            0x70020c582a57ef03,
3875            fidl::encoding::DynamicFlags::empty(),
3876        )
3877    }
3878}
3879
3880#[must_use = "FIDL methods require a response to be sent"]
3881#[derive(Debug)]
3882pub struct OpenTargetStrictTwoWayFieldsResponder {
3883    control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
3884    tx_id: u32,
3885}
3886
3887/// Set the the channel to be shutdown (see [`OpenTargetControlHandle::shutdown`])
3888/// if the responder is dropped without sending a response, so that the client
3889/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3890impl std::ops::Drop for OpenTargetStrictTwoWayFieldsResponder {
3891    fn drop(&mut self) {
3892        self.control_handle.shutdown();
3893        // Safety: drops once, never accessed again
3894        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3895    }
3896}
3897
3898impl fidl::endpoints::Responder for OpenTargetStrictTwoWayFieldsResponder {
3899    type ControlHandle = OpenTargetControlHandle;
3900
3901    fn control_handle(&self) -> &OpenTargetControlHandle {
3902        &self.control_handle
3903    }
3904
3905    fn drop_without_shutdown(mut self) {
3906        // Safety: drops once, never accessed again due to mem::forget
3907        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3908        // Prevent Drop from running (which would shut down the channel)
3909        std::mem::forget(self);
3910    }
3911}
3912
3913impl OpenTargetStrictTwoWayFieldsResponder {
3914    /// Sends a response to the FIDL transaction.
3915    ///
3916    /// Sets the channel to shutdown if an error occurs.
3917    pub fn send(self, mut some_field: i32) -> Result<(), fidl::Error> {
3918        let _result = self.send_raw(some_field);
3919        if _result.is_err() {
3920            self.control_handle.shutdown();
3921        }
3922        self.drop_without_shutdown();
3923        _result
3924    }
3925
3926    /// Similar to "send" but does not shutdown the channel if an error occurs.
3927    pub fn send_no_shutdown_on_err(self, mut some_field: i32) -> Result<(), fidl::Error> {
3928        let _result = self.send_raw(some_field);
3929        self.drop_without_shutdown();
3930        _result
3931    }
3932
3933    fn send_raw(&self, mut some_field: i32) -> Result<(), fidl::Error> {
3934        self.control_handle.inner.send::<OpenTargetStrictTwoWayFieldsResponse>(
3935            (some_field,),
3936            self.tx_id,
3937            0x2be6e1cc40008010,
3938            fidl::encoding::DynamicFlags::empty(),
3939        )
3940    }
3941}
3942
3943#[must_use = "FIDL methods require a response to be sent"]
3944#[derive(Debug)]
3945pub struct OpenTargetStrictTwoWayErrResponder {
3946    control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
3947    tx_id: u32,
3948}
3949
3950/// Set the the channel to be shutdown (see [`OpenTargetControlHandle::shutdown`])
3951/// if the responder is dropped without sending a response, so that the client
3952/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3953impl std::ops::Drop for OpenTargetStrictTwoWayErrResponder {
3954    fn drop(&mut self) {
3955        self.control_handle.shutdown();
3956        // Safety: drops once, never accessed again
3957        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3958    }
3959}
3960
3961impl fidl::endpoints::Responder for OpenTargetStrictTwoWayErrResponder {
3962    type ControlHandle = OpenTargetControlHandle;
3963
3964    fn control_handle(&self) -> &OpenTargetControlHandle {
3965        &self.control_handle
3966    }
3967
3968    fn drop_without_shutdown(mut self) {
3969        // Safety: drops once, never accessed again due to mem::forget
3970        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3971        // Prevent Drop from running (which would shut down the channel)
3972        std::mem::forget(self);
3973    }
3974}
3975
3976impl OpenTargetStrictTwoWayErrResponder {
3977    /// Sends a response to the FIDL transaction.
3978    ///
3979    /// Sets the channel to shutdown if an error occurs.
3980    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3981        let _result = self.send_raw(result);
3982        if _result.is_err() {
3983            self.control_handle.shutdown();
3984        }
3985        self.drop_without_shutdown();
3986        _result
3987    }
3988
3989    /// Similar to "send" but does not shutdown the channel if an error occurs.
3990    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3991        let _result = self.send_raw(result);
3992        self.drop_without_shutdown();
3993        _result
3994    }
3995
3996    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3997        self.control_handle
3998            .inner
3999            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4000                result,
4001                self.tx_id,
4002                0x6efc16069ebd0b2c,
4003                fidl::encoding::DynamicFlags::empty(),
4004            )
4005    }
4006}
4007
4008#[must_use = "FIDL methods require a response to be sent"]
4009#[derive(Debug)]
4010pub struct OpenTargetStrictTwoWayFieldsErrResponder {
4011    control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
4012    tx_id: u32,
4013}
4014
4015/// Set the the channel to be shutdown (see [`OpenTargetControlHandle::shutdown`])
4016/// if the responder is dropped without sending a response, so that the client
4017/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4018impl std::ops::Drop for OpenTargetStrictTwoWayFieldsErrResponder {
4019    fn drop(&mut self) {
4020        self.control_handle.shutdown();
4021        // Safety: drops once, never accessed again
4022        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4023    }
4024}
4025
4026impl fidl::endpoints::Responder for OpenTargetStrictTwoWayFieldsErrResponder {
4027    type ControlHandle = OpenTargetControlHandle;
4028
4029    fn control_handle(&self) -> &OpenTargetControlHandle {
4030        &self.control_handle
4031    }
4032
4033    fn drop_without_shutdown(mut self) {
4034        // Safety: drops once, never accessed again due to mem::forget
4035        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4036        // Prevent Drop from running (which would shut down the channel)
4037        std::mem::forget(self);
4038    }
4039}
4040
4041impl OpenTargetStrictTwoWayFieldsErrResponder {
4042    /// Sends a response to the FIDL transaction.
4043    ///
4044    /// Sets the channel to shutdown if an error occurs.
4045    pub fn send(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
4046        let _result = self.send_raw(result);
4047        if _result.is_err() {
4048            self.control_handle.shutdown();
4049        }
4050        self.drop_without_shutdown();
4051        _result
4052    }
4053
4054    /// Similar to "send" but does not shutdown the channel if an error occurs.
4055    pub fn send_no_shutdown_on_err(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
4056        let _result = self.send_raw(result);
4057        self.drop_without_shutdown();
4058        _result
4059    }
4060
4061    fn send_raw(&self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
4062        self.control_handle.inner.send::<fidl::encoding::ResultType<
4063            OpenTargetStrictTwoWayFieldsErrResponse,
4064            i32,
4065        >>(
4066            result.map(|some_field| (some_field,)),
4067            self.tx_id,
4068            0x309c8adda770fcf0,
4069            fidl::encoding::DynamicFlags::empty(),
4070        )
4071    }
4072}
4073
4074#[must_use = "FIDL methods require a response to be sent"]
4075#[derive(Debug)]
4076pub struct OpenTargetFlexibleTwoWayResponder {
4077    control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
4078    tx_id: u32,
4079}
4080
4081/// Set the the channel to be shutdown (see [`OpenTargetControlHandle::shutdown`])
4082/// if the responder is dropped without sending a response, so that the client
4083/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4084impl std::ops::Drop for OpenTargetFlexibleTwoWayResponder {
4085    fn drop(&mut self) {
4086        self.control_handle.shutdown();
4087        // Safety: drops once, never accessed again
4088        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4089    }
4090}
4091
4092impl fidl::endpoints::Responder for OpenTargetFlexibleTwoWayResponder {
4093    type ControlHandle = OpenTargetControlHandle;
4094
4095    fn control_handle(&self) -> &OpenTargetControlHandle {
4096        &self.control_handle
4097    }
4098
4099    fn drop_without_shutdown(mut self) {
4100        // Safety: drops once, never accessed again due to mem::forget
4101        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4102        // Prevent Drop from running (which would shut down the channel)
4103        std::mem::forget(self);
4104    }
4105}
4106
4107impl OpenTargetFlexibleTwoWayResponder {
4108    /// Sends a response to the FIDL transaction.
4109    ///
4110    /// Sets the channel to shutdown if an error occurs.
4111    pub fn send(self) -> Result<(), fidl::Error> {
4112        let _result = self.send_raw();
4113        if _result.is_err() {
4114            self.control_handle.shutdown();
4115        }
4116        self.drop_without_shutdown();
4117        _result
4118    }
4119
4120    /// Similar to "send" but does not shutdown the channel if an error occurs.
4121    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
4122        let _result = self.send_raw();
4123        self.drop_without_shutdown();
4124        _result
4125    }
4126
4127    fn send_raw(&self) -> Result<(), fidl::Error> {
4128        self.control_handle.inner.send::<fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>>(
4129            fidl::encoding::Flexible::new(()),
4130            self.tx_id,
4131            0x19f932dac7810c71,
4132            fidl::encoding::DynamicFlags::FLEXIBLE,
4133        )
4134    }
4135}
4136
4137#[must_use = "FIDL methods require a response to be sent"]
4138#[derive(Debug)]
4139pub struct OpenTargetFlexibleTwoWayFieldsResponder {
4140    control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
4141    tx_id: u32,
4142}
4143
4144/// Set the the channel to be shutdown (see [`OpenTargetControlHandle::shutdown`])
4145/// if the responder is dropped without sending a response, so that the client
4146/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4147impl std::ops::Drop for OpenTargetFlexibleTwoWayFieldsResponder {
4148    fn drop(&mut self) {
4149        self.control_handle.shutdown();
4150        // Safety: drops once, never accessed again
4151        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4152    }
4153}
4154
4155impl fidl::endpoints::Responder for OpenTargetFlexibleTwoWayFieldsResponder {
4156    type ControlHandle = OpenTargetControlHandle;
4157
4158    fn control_handle(&self) -> &OpenTargetControlHandle {
4159        &self.control_handle
4160    }
4161
4162    fn drop_without_shutdown(mut self) {
4163        // Safety: drops once, never accessed again due to mem::forget
4164        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4165        // Prevent Drop from running (which would shut down the channel)
4166        std::mem::forget(self);
4167    }
4168}
4169
4170impl OpenTargetFlexibleTwoWayFieldsResponder {
4171    /// Sends a response to the FIDL transaction.
4172    ///
4173    /// Sets the channel to shutdown if an error occurs.
4174    pub fn send(self, mut some_field: i32) -> Result<(), fidl::Error> {
4175        let _result = self.send_raw(some_field);
4176        if _result.is_err() {
4177            self.control_handle.shutdown();
4178        }
4179        self.drop_without_shutdown();
4180        _result
4181    }
4182
4183    /// Similar to "send" but does not shutdown the channel if an error occurs.
4184    pub fn send_no_shutdown_on_err(self, mut some_field: i32) -> Result<(), fidl::Error> {
4185        let _result = self.send_raw(some_field);
4186        self.drop_without_shutdown();
4187        _result
4188    }
4189
4190    fn send_raw(&self, mut some_field: i32) -> Result<(), fidl::Error> {
4191        self.control_handle.inner.send::<fidl::encoding::FlexibleType<
4192            OpenTargetFlexibleTwoWayFieldsResponse,
4193        >>(
4194            fidl::encoding::Flexible::new((some_field,)),
4195            self.tx_id,
4196            0x47cca5ddb4207774,
4197            fidl::encoding::DynamicFlags::FLEXIBLE,
4198        )
4199    }
4200}
4201
4202#[must_use = "FIDL methods require a response to be sent"]
4203#[derive(Debug)]
4204pub struct OpenTargetFlexibleTwoWayErrResponder {
4205    control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
4206    tx_id: u32,
4207}
4208
4209/// Set the the channel to be shutdown (see [`OpenTargetControlHandle::shutdown`])
4210/// if the responder is dropped without sending a response, so that the client
4211/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4212impl std::ops::Drop for OpenTargetFlexibleTwoWayErrResponder {
4213    fn drop(&mut self) {
4214        self.control_handle.shutdown();
4215        // Safety: drops once, never accessed again
4216        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4217    }
4218}
4219
4220impl fidl::endpoints::Responder for OpenTargetFlexibleTwoWayErrResponder {
4221    type ControlHandle = OpenTargetControlHandle;
4222
4223    fn control_handle(&self) -> &OpenTargetControlHandle {
4224        &self.control_handle
4225    }
4226
4227    fn drop_without_shutdown(mut self) {
4228        // Safety: drops once, never accessed again due to mem::forget
4229        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4230        // Prevent Drop from running (which would shut down the channel)
4231        std::mem::forget(self);
4232    }
4233}
4234
4235impl OpenTargetFlexibleTwoWayErrResponder {
4236    /// Sends a response to the FIDL transaction.
4237    ///
4238    /// Sets the channel to shutdown if an error occurs.
4239    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4240        let _result = self.send_raw(result);
4241        if _result.is_err() {
4242            self.control_handle.shutdown();
4243        }
4244        self.drop_without_shutdown();
4245        _result
4246    }
4247
4248    /// Similar to "send" but does not shutdown the channel if an error occurs.
4249    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4250        let _result = self.send_raw(result);
4251        self.drop_without_shutdown();
4252        _result
4253    }
4254
4255    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4256        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4257            fidl::encoding::EmptyStruct,
4258            i32,
4259        >>(
4260            fidl::encoding::FlexibleResult::new(result),
4261            self.tx_id,
4262            0x52aa19681fea3a0,
4263            fidl::encoding::DynamicFlags::FLEXIBLE,
4264        )
4265    }
4266}
4267
4268#[must_use = "FIDL methods require a response to be sent"]
4269#[derive(Debug)]
4270pub struct OpenTargetFlexibleTwoWayFieldsErrResponder {
4271    control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
4272    tx_id: u32,
4273}
4274
4275/// Set the the channel to be shutdown (see [`OpenTargetControlHandle::shutdown`])
4276/// if the responder is dropped without sending a response, so that the client
4277/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4278impl std::ops::Drop for OpenTargetFlexibleTwoWayFieldsErrResponder {
4279    fn drop(&mut self) {
4280        self.control_handle.shutdown();
4281        // Safety: drops once, never accessed again
4282        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4283    }
4284}
4285
4286impl fidl::endpoints::Responder for OpenTargetFlexibleTwoWayFieldsErrResponder {
4287    type ControlHandle = OpenTargetControlHandle;
4288
4289    fn control_handle(&self) -> &OpenTargetControlHandle {
4290        &self.control_handle
4291    }
4292
4293    fn drop_without_shutdown(mut self) {
4294        // Safety: drops once, never accessed again due to mem::forget
4295        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4296        // Prevent Drop from running (which would shut down the channel)
4297        std::mem::forget(self);
4298    }
4299}
4300
4301impl OpenTargetFlexibleTwoWayFieldsErrResponder {
4302    /// Sends a response to the FIDL transaction.
4303    ///
4304    /// Sets the channel to shutdown if an error occurs.
4305    pub fn send(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
4306        let _result = self.send_raw(result);
4307        if _result.is_err() {
4308            self.control_handle.shutdown();
4309        }
4310        self.drop_without_shutdown();
4311        _result
4312    }
4313
4314    /// Similar to "send" but does not shutdown the channel if an error occurs.
4315    pub fn send_no_shutdown_on_err(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
4316        let _result = self.send_raw(result);
4317        self.drop_without_shutdown();
4318        _result
4319    }
4320
4321    fn send_raw(&self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
4322        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4323            OpenTargetFlexibleTwoWayFieldsErrResponse,
4324            i32,
4325        >>(
4326            fidl::encoding::FlexibleResult::new(result.map(|some_field| (some_field,))),
4327            self.tx_id,
4328            0x1ab7dd4c6a3650b6,
4329            fidl::encoding::DynamicFlags::FLEXIBLE,
4330        )
4331    }
4332}
4333
4334#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4335pub struct RunnerMarker;
4336
4337impl fidl::endpoints::ProtocolMarker for RunnerMarker {
4338    type Proxy = RunnerProxy;
4339    type RequestStream = RunnerRequestStream;
4340    #[cfg(target_os = "fuchsia")]
4341    type SynchronousProxy = RunnerSynchronousProxy;
4342
4343    const DEBUG_NAME: &'static str = "fidl.serversuite.Runner";
4344}
4345impl fidl::endpoints::DiscoverableProtocolMarker for RunnerMarker {}
4346pub type RunnerStartResult = Result<(), StartError>;
4347
4348pub trait RunnerProxyInterface: Send + Sync {
4349    type GetVersionResponseFut: std::future::Future<Output = Result<u64, fidl::Error>> + Send;
4350    fn r#get_version(&self) -> Self::GetVersionResponseFut;
4351    type CheckAliveResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
4352    fn r#check_alive(&self) -> Self::CheckAliveResponseFut;
4353    type StartResponseFut: std::future::Future<Output = Result<RunnerStartResult, fidl::Error>>
4354        + Send;
4355    fn r#start(&self, test: Test, any_target: AnyTarget) -> Self::StartResponseFut;
4356    type ShutdownWithEpitaphResponseFut: std::future::Future<Output = Result<(), fidl::Error>>
4357        + Send;
4358    fn r#shutdown_with_epitaph(&self, epitaph_status: i32) -> Self::ShutdownWithEpitaphResponseFut;
4359    type SendOpenTargetStrictEventResponseFut: std::future::Future<Output = Result<(), fidl::Error>>
4360        + Send;
4361    fn r#send_open_target_strict_event(&self) -> Self::SendOpenTargetStrictEventResponseFut;
4362    type SendOpenTargetFlexibleEventResponseFut: std::future::Future<Output = Result<(), fidl::Error>>
4363        + Send;
4364    fn r#send_open_target_flexible_event(&self) -> Self::SendOpenTargetFlexibleEventResponseFut;
4365}
4366#[derive(Debug)]
4367#[cfg(target_os = "fuchsia")]
4368pub struct RunnerSynchronousProxy {
4369    client: fidl::client::sync::Client,
4370}
4371
4372#[cfg(target_os = "fuchsia")]
4373impl fidl::endpoints::SynchronousProxy for RunnerSynchronousProxy {
4374    type Proxy = RunnerProxy;
4375    type Protocol = RunnerMarker;
4376
4377    fn from_channel(inner: fidl::Channel) -> Self {
4378        Self::new(inner)
4379    }
4380
4381    fn into_channel(self) -> fidl::Channel {
4382        self.client.into_channel()
4383    }
4384
4385    fn as_channel(&self) -> &fidl::Channel {
4386        self.client.as_channel()
4387    }
4388}
4389
4390#[cfg(target_os = "fuchsia")]
4391impl RunnerSynchronousProxy {
4392    pub fn new(channel: fidl::Channel) -> Self {
4393        Self { client: fidl::client::sync::Client::new(channel) }
4394    }
4395
4396    pub fn into_channel(self) -> fidl::Channel {
4397        self.client.into_channel()
4398    }
4399
4400    /// Waits until an event arrives and returns it. It is safe for other
4401    /// threads to make concurrent requests while waiting for an event.
4402    pub fn wait_for_event(
4403        &self,
4404        deadline: zx::MonotonicInstant,
4405    ) -> Result<RunnerEvent, fidl::Error> {
4406        RunnerEvent::decode(self.client.wait_for_event::<RunnerMarker>(deadline)?)
4407    }
4408
4409    pub fn r#get_version(&self, ___deadline: zx::MonotonicInstant) -> Result<u64, fidl::Error> {
4410        let _response = self
4411            .client
4412            .send_query::<fidl::encoding::EmptyPayload, RunnerGetVersionResponse, RunnerMarker>(
4413                (),
4414                0x3c70bef2e59d06a7,
4415                fidl::encoding::DynamicFlags::empty(),
4416                ___deadline,
4417            )?;
4418        Ok(_response.version)
4419    }
4420
4421    pub fn r#check_alive(&self, ___deadline: zx::MonotonicInstant) -> Result<(), fidl::Error> {
4422        let _response = self
4423            .client
4424            .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload, RunnerMarker>(
4425                (),
4426                0x2449c31d30d6f5b7,
4427                fidl::encoding::DynamicFlags::empty(),
4428                ___deadline,
4429            )?;
4430        Ok(_response)
4431    }
4432
4433    pub fn r#start(
4434        &self,
4435        mut test: Test,
4436        mut any_target: AnyTarget,
4437        ___deadline: zx::MonotonicInstant,
4438    ) -> Result<RunnerStartResult, fidl::Error> {
4439        let _response = self.client.send_query::<RunnerStartRequest, fidl::encoding::ResultType<
4440            fidl::encoding::EmptyStruct,
4441            StartError,
4442        >, RunnerMarker>(
4443            (test, &mut any_target),
4444            0x2d4735726d30a5b0,
4445            fidl::encoding::DynamicFlags::empty(),
4446            ___deadline,
4447        )?;
4448        Ok(_response.map(|x| x))
4449    }
4450
4451    pub fn r#shutdown_with_epitaph(
4452        &self,
4453        mut epitaph_status: i32,
4454        ___deadline: zx::MonotonicInstant,
4455    ) -> Result<(), fidl::Error> {
4456        let _response = self.client.send_query::<
4457            RunnerShutdownWithEpitaphRequest,
4458            fidl::encoding::EmptyPayload,
4459            RunnerMarker,
4460        >(
4461            (epitaph_status,),
4462            0x7a15369d88e1e8ec,
4463            fidl::encoding::DynamicFlags::empty(),
4464            ___deadline,
4465        )?;
4466        Ok(_response)
4467    }
4468
4469    pub fn r#send_open_target_strict_event(
4470        &self,
4471        ___deadline: zx::MonotonicInstant,
4472    ) -> Result<(), fidl::Error> {
4473        let _response = self
4474            .client
4475            .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload, RunnerMarker>(
4476                (),
4477                0x1c3e4452a20c9590,
4478                fidl::encoding::DynamicFlags::empty(),
4479                ___deadline,
4480            )?;
4481        Ok(_response)
4482    }
4483
4484    pub fn r#send_open_target_flexible_event(
4485        &self,
4486        ___deadline: zx::MonotonicInstant,
4487    ) -> Result<(), fidl::Error> {
4488        let _response = self
4489            .client
4490            .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload, RunnerMarker>(
4491                (),
4492                0x2d2c9446799baeb6,
4493                fidl::encoding::DynamicFlags::empty(),
4494                ___deadline,
4495            )?;
4496        Ok(_response)
4497    }
4498}
4499
4500#[cfg(target_os = "fuchsia")]
4501impl From<RunnerSynchronousProxy> for zx::NullableHandle {
4502    fn from(value: RunnerSynchronousProxy) -> Self {
4503        value.into_channel().into()
4504    }
4505}
4506
4507#[cfg(target_os = "fuchsia")]
4508impl From<fidl::Channel> for RunnerSynchronousProxy {
4509    fn from(value: fidl::Channel) -> Self {
4510        Self::new(value)
4511    }
4512}
4513
4514#[cfg(target_os = "fuchsia")]
4515impl fidl::endpoints::FromClient for RunnerSynchronousProxy {
4516    type Protocol = RunnerMarker;
4517
4518    fn from_client(value: fidl::endpoints::ClientEnd<RunnerMarker>) -> Self {
4519        Self::new(value.into_channel())
4520    }
4521}
4522
4523#[derive(Debug, Clone)]
4524pub struct RunnerProxy {
4525    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4526}
4527
4528impl fidl::endpoints::Proxy for RunnerProxy {
4529    type Protocol = RunnerMarker;
4530
4531    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4532        Self::new(inner)
4533    }
4534
4535    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4536        self.client.into_channel().map_err(|client| Self { client })
4537    }
4538
4539    fn as_channel(&self) -> &::fidl::AsyncChannel {
4540        self.client.as_channel()
4541    }
4542}
4543
4544impl RunnerProxy {
4545    /// Create a new Proxy for fidl.serversuite/Runner.
4546    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4547        let protocol_name = <RunnerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4548        Self { client: fidl::client::Client::new(channel, protocol_name) }
4549    }
4550
4551    /// Get a Stream of events from the remote end of the protocol.
4552    ///
4553    /// # Panics
4554    ///
4555    /// Panics if the event stream was already taken.
4556    pub fn take_event_stream(&self) -> RunnerEventStream {
4557        RunnerEventStream { event_receiver: self.client.take_event_receiver() }
4558    }
4559
4560    pub fn r#get_version(
4561        &self,
4562    ) -> fidl::client::QueryResponseFut<u64, fidl::encoding::DefaultFuchsiaResourceDialect> {
4563        RunnerProxyInterface::r#get_version(self)
4564    }
4565
4566    pub fn r#check_alive(
4567        &self,
4568    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
4569        RunnerProxyInterface::r#check_alive(self)
4570    }
4571
4572    pub fn r#start(
4573        &self,
4574        mut test: Test,
4575        mut any_target: AnyTarget,
4576    ) -> fidl::client::QueryResponseFut<
4577        RunnerStartResult,
4578        fidl::encoding::DefaultFuchsiaResourceDialect,
4579    > {
4580        RunnerProxyInterface::r#start(self, test, any_target)
4581    }
4582
4583    pub fn r#shutdown_with_epitaph(
4584        &self,
4585        mut epitaph_status: i32,
4586    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
4587        RunnerProxyInterface::r#shutdown_with_epitaph(self, epitaph_status)
4588    }
4589
4590    pub fn r#send_open_target_strict_event(
4591        &self,
4592    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
4593        RunnerProxyInterface::r#send_open_target_strict_event(self)
4594    }
4595
4596    pub fn r#send_open_target_flexible_event(
4597        &self,
4598    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
4599        RunnerProxyInterface::r#send_open_target_flexible_event(self)
4600    }
4601}
4602
4603impl RunnerProxyInterface for RunnerProxy {
4604    type GetVersionResponseFut =
4605        fidl::client::QueryResponseFut<u64, fidl::encoding::DefaultFuchsiaResourceDialect>;
4606    fn r#get_version(&self) -> Self::GetVersionResponseFut {
4607        fn _decode(
4608            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4609        ) -> Result<u64, fidl::Error> {
4610            let _response = fidl::client::decode_transaction_body::<
4611                RunnerGetVersionResponse,
4612                fidl::encoding::DefaultFuchsiaResourceDialect,
4613                0x3c70bef2e59d06a7,
4614            >(_buf?)?;
4615            Ok(_response.version)
4616        }
4617        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, u64>(
4618            (),
4619            0x3c70bef2e59d06a7,
4620            fidl::encoding::DynamicFlags::empty(),
4621            _decode,
4622        )
4623    }
4624
4625    type CheckAliveResponseFut =
4626        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
4627    fn r#check_alive(&self) -> Self::CheckAliveResponseFut {
4628        fn _decode(
4629            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4630        ) -> Result<(), fidl::Error> {
4631            let _response = fidl::client::decode_transaction_body::<
4632                fidl::encoding::EmptyPayload,
4633                fidl::encoding::DefaultFuchsiaResourceDialect,
4634                0x2449c31d30d6f5b7,
4635            >(_buf?)?;
4636            Ok(_response)
4637        }
4638        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
4639            (),
4640            0x2449c31d30d6f5b7,
4641            fidl::encoding::DynamicFlags::empty(),
4642            _decode,
4643        )
4644    }
4645
4646    type StartResponseFut = fidl::client::QueryResponseFut<
4647        RunnerStartResult,
4648        fidl::encoding::DefaultFuchsiaResourceDialect,
4649    >;
4650    fn r#start(&self, mut test: Test, mut any_target: AnyTarget) -> Self::StartResponseFut {
4651        fn _decode(
4652            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4653        ) -> Result<RunnerStartResult, fidl::Error> {
4654            let _response = fidl::client::decode_transaction_body::<
4655                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, StartError>,
4656                fidl::encoding::DefaultFuchsiaResourceDialect,
4657                0x2d4735726d30a5b0,
4658            >(_buf?)?;
4659            Ok(_response.map(|x| x))
4660        }
4661        self.client.send_query_and_decode::<RunnerStartRequest, RunnerStartResult>(
4662            (test, &mut any_target),
4663            0x2d4735726d30a5b0,
4664            fidl::encoding::DynamicFlags::empty(),
4665            _decode,
4666        )
4667    }
4668
4669    type ShutdownWithEpitaphResponseFut =
4670        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
4671    fn r#shutdown_with_epitaph(
4672        &self,
4673        mut epitaph_status: i32,
4674    ) -> Self::ShutdownWithEpitaphResponseFut {
4675        fn _decode(
4676            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4677        ) -> Result<(), fidl::Error> {
4678            let _response = fidl::client::decode_transaction_body::<
4679                fidl::encoding::EmptyPayload,
4680                fidl::encoding::DefaultFuchsiaResourceDialect,
4681                0x7a15369d88e1e8ec,
4682            >(_buf?)?;
4683            Ok(_response)
4684        }
4685        self.client.send_query_and_decode::<RunnerShutdownWithEpitaphRequest, ()>(
4686            (epitaph_status,),
4687            0x7a15369d88e1e8ec,
4688            fidl::encoding::DynamicFlags::empty(),
4689            _decode,
4690        )
4691    }
4692
4693    type SendOpenTargetStrictEventResponseFut =
4694        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
4695    fn r#send_open_target_strict_event(&self) -> Self::SendOpenTargetStrictEventResponseFut {
4696        fn _decode(
4697            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4698        ) -> Result<(), fidl::Error> {
4699            let _response = fidl::client::decode_transaction_body::<
4700                fidl::encoding::EmptyPayload,
4701                fidl::encoding::DefaultFuchsiaResourceDialect,
4702                0x1c3e4452a20c9590,
4703            >(_buf?)?;
4704            Ok(_response)
4705        }
4706        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
4707            (),
4708            0x1c3e4452a20c9590,
4709            fidl::encoding::DynamicFlags::empty(),
4710            _decode,
4711        )
4712    }
4713
4714    type SendOpenTargetFlexibleEventResponseFut =
4715        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
4716    fn r#send_open_target_flexible_event(&self) -> Self::SendOpenTargetFlexibleEventResponseFut {
4717        fn _decode(
4718            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4719        ) -> Result<(), fidl::Error> {
4720            let _response = fidl::client::decode_transaction_body::<
4721                fidl::encoding::EmptyPayload,
4722                fidl::encoding::DefaultFuchsiaResourceDialect,
4723                0x2d2c9446799baeb6,
4724            >(_buf?)?;
4725            Ok(_response)
4726        }
4727        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
4728            (),
4729            0x2d2c9446799baeb6,
4730            fidl::encoding::DynamicFlags::empty(),
4731            _decode,
4732        )
4733    }
4734}
4735
4736pub struct RunnerEventStream {
4737    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4738}
4739
4740impl std::marker::Unpin for RunnerEventStream {}
4741
4742impl futures::stream::FusedStream for RunnerEventStream {
4743    fn is_terminated(&self) -> bool {
4744        self.event_receiver.is_terminated()
4745    }
4746}
4747
4748impl futures::Stream for RunnerEventStream {
4749    type Item = Result<RunnerEvent, fidl::Error>;
4750
4751    fn poll_next(
4752        mut self: std::pin::Pin<&mut Self>,
4753        cx: &mut std::task::Context<'_>,
4754    ) -> std::task::Poll<Option<Self::Item>> {
4755        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4756            &mut self.event_receiver,
4757            cx
4758        )?) {
4759            Some(buf) => std::task::Poll::Ready(Some(RunnerEvent::decode(buf))),
4760            None => std::task::Poll::Ready(None),
4761        }
4762    }
4763}
4764
4765#[derive(Debug)]
4766pub enum RunnerEvent {
4767    OnTeardown { reason: TeardownReason },
4768    OnReceivedUnknownMethod { ordinal: u64, unknown_method_type: UnknownMethodType },
4769    OnReceivedClosedTargetOneWayNoPayload {},
4770    OnReceivedOpenTargetStrictOneWay {},
4771    OnReceivedOpenTargetFlexibleOneWay {},
4772}
4773
4774impl RunnerEvent {
4775    #[allow(irrefutable_let_patterns)]
4776    pub fn into_on_teardown(self) -> Option<TeardownReason> {
4777        if let RunnerEvent::OnTeardown { reason } = self { Some((reason)) } else { None }
4778    }
4779    #[allow(irrefutable_let_patterns)]
4780    pub fn into_on_received_unknown_method(self) -> Option<(u64, UnknownMethodType)> {
4781        if let RunnerEvent::OnReceivedUnknownMethod { ordinal, unknown_method_type } = self {
4782            Some((ordinal, unknown_method_type))
4783        } else {
4784            None
4785        }
4786    }
4787    #[allow(irrefutable_let_patterns)]
4788    pub fn into_on_received_closed_target_one_way_no_payload(self) -> Option<()> {
4789        if let RunnerEvent::OnReceivedClosedTargetOneWayNoPayload {} = self {
4790            Some(())
4791        } else {
4792            None
4793        }
4794    }
4795    #[allow(irrefutable_let_patterns)]
4796    pub fn into_on_received_open_target_strict_one_way(self) -> Option<()> {
4797        if let RunnerEvent::OnReceivedOpenTargetStrictOneWay {} = self { Some(()) } else { None }
4798    }
4799    #[allow(irrefutable_let_patterns)]
4800    pub fn into_on_received_open_target_flexible_one_way(self) -> Option<()> {
4801        if let RunnerEvent::OnReceivedOpenTargetFlexibleOneWay {} = self { Some(()) } else { None }
4802    }
4803
4804    /// Decodes a message buffer as a [`RunnerEvent`].
4805    fn decode(
4806        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4807    ) -> Result<RunnerEvent, fidl::Error> {
4808        let (bytes, _handles) = buf.split_mut();
4809        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4810        debug_assert_eq!(tx_header.tx_id, 0);
4811        match tx_header.ordinal {
4812            0x4472273866753acf => {
4813                let mut out = fidl::new_empty!(
4814                    RunnerOnTeardownRequest,
4815                    fidl::encoding::DefaultFuchsiaResourceDialect
4816                );
4817                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RunnerOnTeardownRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
4818                Ok((RunnerEvent::OnTeardown { reason: out.reason }))
4819            }
4820            0x3c7f8d66a4f4c0e4 => {
4821                let mut out = fidl::new_empty!(
4822                    UnknownMethodInfo,
4823                    fidl::encoding::DefaultFuchsiaResourceDialect
4824                );
4825                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<UnknownMethodInfo>(&tx_header, _body_bytes, _handles, &mut out)?;
4826                Ok((RunnerEvent::OnReceivedUnknownMethod {
4827                    ordinal: out.ordinal,
4828                    unknown_method_type: out.unknown_method_type,
4829                }))
4830            }
4831            0x56915f3fcde32b6f => {
4832                let mut out = fidl::new_empty!(
4833                    fidl::encoding::EmptyPayload,
4834                    fidl::encoding::DefaultFuchsiaResourceDialect
4835                );
4836                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
4837                Ok((RunnerEvent::OnReceivedClosedTargetOneWayNoPayload {}))
4838            }
4839            0x5b82db8b0ffe97c5 => {
4840                let mut out = fidl::new_empty!(
4841                    fidl::encoding::EmptyPayload,
4842                    fidl::encoding::DefaultFuchsiaResourceDialect
4843                );
4844                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
4845                Ok((RunnerEvent::OnReceivedOpenTargetStrictOneWay {}))
4846            }
4847            0x2428c34ecface889 => {
4848                let mut out = fidl::new_empty!(
4849                    fidl::encoding::EmptyPayload,
4850                    fidl::encoding::DefaultFuchsiaResourceDialect
4851                );
4852                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
4853                Ok((RunnerEvent::OnReceivedOpenTargetFlexibleOneWay {}))
4854            }
4855            _ => Err(fidl::Error::UnknownOrdinal {
4856                ordinal: tx_header.ordinal,
4857                protocol_name: <RunnerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4858            }),
4859        }
4860    }
4861}
4862
4863/// A Stream of incoming requests for fidl.serversuite/Runner.
4864pub struct RunnerRequestStream {
4865    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4866    is_terminated: bool,
4867}
4868
4869impl std::marker::Unpin for RunnerRequestStream {}
4870
4871impl futures::stream::FusedStream for RunnerRequestStream {
4872    fn is_terminated(&self) -> bool {
4873        self.is_terminated
4874    }
4875}
4876
4877impl fidl::endpoints::RequestStream for RunnerRequestStream {
4878    type Protocol = RunnerMarker;
4879    type ControlHandle = RunnerControlHandle;
4880
4881    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4882        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4883    }
4884
4885    fn control_handle(&self) -> Self::ControlHandle {
4886        RunnerControlHandle { inner: self.inner.clone() }
4887    }
4888
4889    fn into_inner(
4890        self,
4891    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4892    {
4893        (self.inner, self.is_terminated)
4894    }
4895
4896    fn from_inner(
4897        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4898        is_terminated: bool,
4899    ) -> Self {
4900        Self { inner, is_terminated }
4901    }
4902}
4903
4904impl futures::Stream for RunnerRequestStream {
4905    type Item = Result<RunnerRequest, fidl::Error>;
4906
4907    fn poll_next(
4908        mut self: std::pin::Pin<&mut Self>,
4909        cx: &mut std::task::Context<'_>,
4910    ) -> std::task::Poll<Option<Self::Item>> {
4911        let this = &mut *self;
4912        if this.inner.check_shutdown(cx) {
4913            this.is_terminated = true;
4914            return std::task::Poll::Ready(None);
4915        }
4916        if this.is_terminated {
4917            panic!("polled RunnerRequestStream after completion");
4918        }
4919        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4920            |bytes, handles| {
4921                match this.inner.channel().read_etc(cx, bytes, handles) {
4922                    std::task::Poll::Ready(Ok(())) => {}
4923                    std::task::Poll::Pending => return std::task::Poll::Pending,
4924                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4925                        this.is_terminated = true;
4926                        return std::task::Poll::Ready(None);
4927                    }
4928                    std::task::Poll::Ready(Err(e)) => {
4929                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4930                            e.into(),
4931                        ))));
4932                    }
4933                }
4934
4935                // A message has been received from the channel
4936                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4937
4938                std::task::Poll::Ready(Some(match header.ordinal {
4939                    0x3c70bef2e59d06a7 => {
4940                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4941                        let mut req = fidl::new_empty!(
4942                            fidl::encoding::EmptyPayload,
4943                            fidl::encoding::DefaultFuchsiaResourceDialect
4944                        );
4945                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4946                        let control_handle = RunnerControlHandle { inner: this.inner.clone() };
4947                        Ok(RunnerRequest::GetVersion {
4948                            responder: RunnerGetVersionResponder {
4949                                control_handle: std::mem::ManuallyDrop::new(control_handle),
4950                                tx_id: header.tx_id,
4951                            },
4952                        })
4953                    }
4954                    0x2449c31d30d6f5b7 => {
4955                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4956                        let mut req = fidl::new_empty!(
4957                            fidl::encoding::EmptyPayload,
4958                            fidl::encoding::DefaultFuchsiaResourceDialect
4959                        );
4960                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4961                        let control_handle = RunnerControlHandle { inner: this.inner.clone() };
4962                        Ok(RunnerRequest::CheckAlive {
4963                            responder: RunnerCheckAliveResponder {
4964                                control_handle: std::mem::ManuallyDrop::new(control_handle),
4965                                tx_id: header.tx_id,
4966                            },
4967                        })
4968                    }
4969                    0x2d4735726d30a5b0 => {
4970                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4971                        let mut req = fidl::new_empty!(
4972                            RunnerStartRequest,
4973                            fidl::encoding::DefaultFuchsiaResourceDialect
4974                        );
4975                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RunnerStartRequest>(&header, _body_bytes, handles, &mut req)?;
4976                        let control_handle = RunnerControlHandle { inner: this.inner.clone() };
4977                        Ok(RunnerRequest::Start {
4978                            test: req.test,
4979                            any_target: req.any_target,
4980
4981                            responder: RunnerStartResponder {
4982                                control_handle: std::mem::ManuallyDrop::new(control_handle),
4983                                tx_id: header.tx_id,
4984                            },
4985                        })
4986                    }
4987                    0x7a15369d88e1e8ec => {
4988                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4989                        let mut req = fidl::new_empty!(
4990                            RunnerShutdownWithEpitaphRequest,
4991                            fidl::encoding::DefaultFuchsiaResourceDialect
4992                        );
4993                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RunnerShutdownWithEpitaphRequest>(&header, _body_bytes, handles, &mut req)?;
4994                        let control_handle = RunnerControlHandle { inner: this.inner.clone() };
4995                        Ok(RunnerRequest::ShutdownWithEpitaph {
4996                            epitaph_status: req.epitaph_status,
4997
4998                            responder: RunnerShutdownWithEpitaphResponder {
4999                                control_handle: std::mem::ManuallyDrop::new(control_handle),
5000                                tx_id: header.tx_id,
5001                            },
5002                        })
5003                    }
5004                    0x1c3e4452a20c9590 => {
5005                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5006                        let mut req = fidl::new_empty!(
5007                            fidl::encoding::EmptyPayload,
5008                            fidl::encoding::DefaultFuchsiaResourceDialect
5009                        );
5010                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5011                        let control_handle = RunnerControlHandle { inner: this.inner.clone() };
5012                        Ok(RunnerRequest::SendOpenTargetStrictEvent {
5013                            responder: RunnerSendOpenTargetStrictEventResponder {
5014                                control_handle: std::mem::ManuallyDrop::new(control_handle),
5015                                tx_id: header.tx_id,
5016                            },
5017                        })
5018                    }
5019                    0x2d2c9446799baeb6 => {
5020                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5021                        let mut req = fidl::new_empty!(
5022                            fidl::encoding::EmptyPayload,
5023                            fidl::encoding::DefaultFuchsiaResourceDialect
5024                        );
5025                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5026                        let control_handle = RunnerControlHandle { inner: this.inner.clone() };
5027                        Ok(RunnerRequest::SendOpenTargetFlexibleEvent {
5028                            responder: RunnerSendOpenTargetFlexibleEventResponder {
5029                                control_handle: std::mem::ManuallyDrop::new(control_handle),
5030                                tx_id: header.tx_id,
5031                            },
5032                        })
5033                    }
5034                    _ => Err(fidl::Error::UnknownOrdinal {
5035                        ordinal: header.ordinal,
5036                        protocol_name:
5037                            <RunnerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5038                    }),
5039                }))
5040            },
5041        )
5042    }
5043}
5044
5045#[derive(Debug)]
5046pub enum RunnerRequest {
5047    GetVersion { responder: RunnerGetVersionResponder },
5048    CheckAlive { responder: RunnerCheckAliveResponder },
5049    Start { test: Test, any_target: AnyTarget, responder: RunnerStartResponder },
5050    ShutdownWithEpitaph { epitaph_status: i32, responder: RunnerShutdownWithEpitaphResponder },
5051    SendOpenTargetStrictEvent { responder: RunnerSendOpenTargetStrictEventResponder },
5052    SendOpenTargetFlexibleEvent { responder: RunnerSendOpenTargetFlexibleEventResponder },
5053}
5054
5055impl RunnerRequest {
5056    #[allow(irrefutable_let_patterns)]
5057    pub fn into_get_version(self) -> Option<(RunnerGetVersionResponder)> {
5058        if let RunnerRequest::GetVersion { responder } = self { Some((responder)) } else { None }
5059    }
5060
5061    #[allow(irrefutable_let_patterns)]
5062    pub fn into_check_alive(self) -> Option<(RunnerCheckAliveResponder)> {
5063        if let RunnerRequest::CheckAlive { responder } = self { Some((responder)) } else { None }
5064    }
5065
5066    #[allow(irrefutable_let_patterns)]
5067    pub fn into_start(self) -> Option<(Test, AnyTarget, RunnerStartResponder)> {
5068        if let RunnerRequest::Start { test, any_target, responder } = self {
5069            Some((test, any_target, responder))
5070        } else {
5071            None
5072        }
5073    }
5074
5075    #[allow(irrefutable_let_patterns)]
5076    pub fn into_shutdown_with_epitaph(self) -> Option<(i32, RunnerShutdownWithEpitaphResponder)> {
5077        if let RunnerRequest::ShutdownWithEpitaph { epitaph_status, responder } = self {
5078            Some((epitaph_status, responder))
5079        } else {
5080            None
5081        }
5082    }
5083
5084    #[allow(irrefutable_let_patterns)]
5085    pub fn into_send_open_target_strict_event(
5086        self,
5087    ) -> Option<(RunnerSendOpenTargetStrictEventResponder)> {
5088        if let RunnerRequest::SendOpenTargetStrictEvent { responder } = self {
5089            Some((responder))
5090        } else {
5091            None
5092        }
5093    }
5094
5095    #[allow(irrefutable_let_patterns)]
5096    pub fn into_send_open_target_flexible_event(
5097        self,
5098    ) -> Option<(RunnerSendOpenTargetFlexibleEventResponder)> {
5099        if let RunnerRequest::SendOpenTargetFlexibleEvent { responder } = self {
5100            Some((responder))
5101        } else {
5102            None
5103        }
5104    }
5105
5106    /// Name of the method defined in FIDL
5107    pub fn method_name(&self) -> &'static str {
5108        match *self {
5109            RunnerRequest::GetVersion { .. } => "get_version",
5110            RunnerRequest::CheckAlive { .. } => "check_alive",
5111            RunnerRequest::Start { .. } => "start",
5112            RunnerRequest::ShutdownWithEpitaph { .. } => "shutdown_with_epitaph",
5113            RunnerRequest::SendOpenTargetStrictEvent { .. } => "send_open_target_strict_event",
5114            RunnerRequest::SendOpenTargetFlexibleEvent { .. } => "send_open_target_flexible_event",
5115        }
5116    }
5117}
5118
5119#[derive(Debug, Clone)]
5120pub struct RunnerControlHandle {
5121    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5122}
5123
5124impl fidl::endpoints::ControlHandle for RunnerControlHandle {
5125    fn shutdown(&self) {
5126        self.inner.shutdown()
5127    }
5128
5129    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5130        self.inner.shutdown_with_epitaph(status)
5131    }
5132
5133    fn is_closed(&self) -> bool {
5134        self.inner.channel().is_closed()
5135    }
5136    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5137        self.inner.channel().on_closed()
5138    }
5139
5140    #[cfg(target_os = "fuchsia")]
5141    fn signal_peer(
5142        &self,
5143        clear_mask: zx::Signals,
5144        set_mask: zx::Signals,
5145    ) -> Result<(), zx_status::Status> {
5146        use fidl::Peered;
5147        self.inner.channel().signal_peer(clear_mask, set_mask)
5148    }
5149}
5150
5151impl RunnerControlHandle {
5152    pub fn send_on_teardown(&self, mut reason: TeardownReason) -> Result<(), fidl::Error> {
5153        self.inner.send::<RunnerOnTeardownRequest>(
5154            (reason,),
5155            0,
5156            0x4472273866753acf,
5157            fidl::encoding::DynamicFlags::empty(),
5158        )
5159    }
5160
5161    pub fn send_on_received_unknown_method(
5162        &self,
5163        mut ordinal: u64,
5164        mut unknown_method_type: UnknownMethodType,
5165    ) -> Result<(), fidl::Error> {
5166        self.inner.send::<UnknownMethodInfo>(
5167            (ordinal, unknown_method_type),
5168            0,
5169            0x3c7f8d66a4f4c0e4,
5170            fidl::encoding::DynamicFlags::empty(),
5171        )
5172    }
5173
5174    pub fn send_on_received_closed_target_one_way_no_payload(&self) -> Result<(), fidl::Error> {
5175        self.inner.send::<fidl::encoding::EmptyPayload>(
5176            (),
5177            0,
5178            0x56915f3fcde32b6f,
5179            fidl::encoding::DynamicFlags::empty(),
5180        )
5181    }
5182
5183    pub fn send_on_received_open_target_strict_one_way(&self) -> Result<(), fidl::Error> {
5184        self.inner.send::<fidl::encoding::EmptyPayload>(
5185            (),
5186            0,
5187            0x5b82db8b0ffe97c5,
5188            fidl::encoding::DynamicFlags::empty(),
5189        )
5190    }
5191
5192    pub fn send_on_received_open_target_flexible_one_way(&self) -> Result<(), fidl::Error> {
5193        self.inner.send::<fidl::encoding::EmptyPayload>(
5194            (),
5195            0,
5196            0x2428c34ecface889,
5197            fidl::encoding::DynamicFlags::empty(),
5198        )
5199    }
5200}
5201
5202#[must_use = "FIDL methods require a response to be sent"]
5203#[derive(Debug)]
5204pub struct RunnerGetVersionResponder {
5205    control_handle: std::mem::ManuallyDrop<RunnerControlHandle>,
5206    tx_id: u32,
5207}
5208
5209/// Set the the channel to be shutdown (see [`RunnerControlHandle::shutdown`])
5210/// if the responder is dropped without sending a response, so that the client
5211/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5212impl std::ops::Drop for RunnerGetVersionResponder {
5213    fn drop(&mut self) {
5214        self.control_handle.shutdown();
5215        // Safety: drops once, never accessed again
5216        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5217    }
5218}
5219
5220impl fidl::endpoints::Responder for RunnerGetVersionResponder {
5221    type ControlHandle = RunnerControlHandle;
5222
5223    fn control_handle(&self) -> &RunnerControlHandle {
5224        &self.control_handle
5225    }
5226
5227    fn drop_without_shutdown(mut self) {
5228        // Safety: drops once, never accessed again due to mem::forget
5229        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5230        // Prevent Drop from running (which would shut down the channel)
5231        std::mem::forget(self);
5232    }
5233}
5234
5235impl RunnerGetVersionResponder {
5236    /// Sends a response to the FIDL transaction.
5237    ///
5238    /// Sets the channel to shutdown if an error occurs.
5239    pub fn send(self, mut version: u64) -> Result<(), fidl::Error> {
5240        let _result = self.send_raw(version);
5241        if _result.is_err() {
5242            self.control_handle.shutdown();
5243        }
5244        self.drop_without_shutdown();
5245        _result
5246    }
5247
5248    /// Similar to "send" but does not shutdown the channel if an error occurs.
5249    pub fn send_no_shutdown_on_err(self, mut version: u64) -> Result<(), fidl::Error> {
5250        let _result = self.send_raw(version);
5251        self.drop_without_shutdown();
5252        _result
5253    }
5254
5255    fn send_raw(&self, mut version: u64) -> Result<(), fidl::Error> {
5256        self.control_handle.inner.send::<RunnerGetVersionResponse>(
5257            (version,),
5258            self.tx_id,
5259            0x3c70bef2e59d06a7,
5260            fidl::encoding::DynamicFlags::empty(),
5261        )
5262    }
5263}
5264
5265#[must_use = "FIDL methods require a response to be sent"]
5266#[derive(Debug)]
5267pub struct RunnerCheckAliveResponder {
5268    control_handle: std::mem::ManuallyDrop<RunnerControlHandle>,
5269    tx_id: u32,
5270}
5271
5272/// Set the the channel to be shutdown (see [`RunnerControlHandle::shutdown`])
5273/// if the responder is dropped without sending a response, so that the client
5274/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5275impl std::ops::Drop for RunnerCheckAliveResponder {
5276    fn drop(&mut self) {
5277        self.control_handle.shutdown();
5278        // Safety: drops once, never accessed again
5279        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5280    }
5281}
5282
5283impl fidl::endpoints::Responder for RunnerCheckAliveResponder {
5284    type ControlHandle = RunnerControlHandle;
5285
5286    fn control_handle(&self) -> &RunnerControlHandle {
5287        &self.control_handle
5288    }
5289
5290    fn drop_without_shutdown(mut self) {
5291        // Safety: drops once, never accessed again due to mem::forget
5292        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5293        // Prevent Drop from running (which would shut down the channel)
5294        std::mem::forget(self);
5295    }
5296}
5297
5298impl RunnerCheckAliveResponder {
5299    /// Sends a response to the FIDL transaction.
5300    ///
5301    /// Sets the channel to shutdown if an error occurs.
5302    pub fn send(self) -> Result<(), fidl::Error> {
5303        let _result = self.send_raw();
5304        if _result.is_err() {
5305            self.control_handle.shutdown();
5306        }
5307        self.drop_without_shutdown();
5308        _result
5309    }
5310
5311    /// Similar to "send" but does not shutdown the channel if an error occurs.
5312    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
5313        let _result = self.send_raw();
5314        self.drop_without_shutdown();
5315        _result
5316    }
5317
5318    fn send_raw(&self) -> Result<(), fidl::Error> {
5319        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
5320            (),
5321            self.tx_id,
5322            0x2449c31d30d6f5b7,
5323            fidl::encoding::DynamicFlags::empty(),
5324        )
5325    }
5326}
5327
5328#[must_use = "FIDL methods require a response to be sent"]
5329#[derive(Debug)]
5330pub struct RunnerStartResponder {
5331    control_handle: std::mem::ManuallyDrop<RunnerControlHandle>,
5332    tx_id: u32,
5333}
5334
5335/// Set the the channel to be shutdown (see [`RunnerControlHandle::shutdown`])
5336/// if the responder is dropped without sending a response, so that the client
5337/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5338impl std::ops::Drop for RunnerStartResponder {
5339    fn drop(&mut self) {
5340        self.control_handle.shutdown();
5341        // Safety: drops once, never accessed again
5342        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5343    }
5344}
5345
5346impl fidl::endpoints::Responder for RunnerStartResponder {
5347    type ControlHandle = RunnerControlHandle;
5348
5349    fn control_handle(&self) -> &RunnerControlHandle {
5350        &self.control_handle
5351    }
5352
5353    fn drop_without_shutdown(mut self) {
5354        // Safety: drops once, never accessed again due to mem::forget
5355        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5356        // Prevent Drop from running (which would shut down the channel)
5357        std::mem::forget(self);
5358    }
5359}
5360
5361impl RunnerStartResponder {
5362    /// Sends a response to the FIDL transaction.
5363    ///
5364    /// Sets the channel to shutdown if an error occurs.
5365    pub fn send(self, mut result: Result<(), StartError>) -> Result<(), fidl::Error> {
5366        let _result = self.send_raw(result);
5367        if _result.is_err() {
5368            self.control_handle.shutdown();
5369        }
5370        self.drop_without_shutdown();
5371        _result
5372    }
5373
5374    /// Similar to "send" but does not shutdown the channel if an error occurs.
5375    pub fn send_no_shutdown_on_err(
5376        self,
5377        mut result: Result<(), StartError>,
5378    ) -> Result<(), fidl::Error> {
5379        let _result = self.send_raw(result);
5380        self.drop_without_shutdown();
5381        _result
5382    }
5383
5384    fn send_raw(&self, mut result: Result<(), StartError>) -> Result<(), fidl::Error> {
5385        self.control_handle
5386            .inner
5387            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, StartError>>(
5388                result,
5389                self.tx_id,
5390                0x2d4735726d30a5b0,
5391                fidl::encoding::DynamicFlags::empty(),
5392            )
5393    }
5394}
5395
5396#[must_use = "FIDL methods require a response to be sent"]
5397#[derive(Debug)]
5398pub struct RunnerShutdownWithEpitaphResponder {
5399    control_handle: std::mem::ManuallyDrop<RunnerControlHandle>,
5400    tx_id: u32,
5401}
5402
5403/// Set the the channel to be shutdown (see [`RunnerControlHandle::shutdown`])
5404/// if the responder is dropped without sending a response, so that the client
5405/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5406impl std::ops::Drop for RunnerShutdownWithEpitaphResponder {
5407    fn drop(&mut self) {
5408        self.control_handle.shutdown();
5409        // Safety: drops once, never accessed again
5410        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5411    }
5412}
5413
5414impl fidl::endpoints::Responder for RunnerShutdownWithEpitaphResponder {
5415    type ControlHandle = RunnerControlHandle;
5416
5417    fn control_handle(&self) -> &RunnerControlHandle {
5418        &self.control_handle
5419    }
5420
5421    fn drop_without_shutdown(mut self) {
5422        // Safety: drops once, never accessed again due to mem::forget
5423        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5424        // Prevent Drop from running (which would shut down the channel)
5425        std::mem::forget(self);
5426    }
5427}
5428
5429impl RunnerShutdownWithEpitaphResponder {
5430    /// Sends a response to the FIDL transaction.
5431    ///
5432    /// Sets the channel to shutdown if an error occurs.
5433    pub fn send(self) -> Result<(), fidl::Error> {
5434        let _result = self.send_raw();
5435        if _result.is_err() {
5436            self.control_handle.shutdown();
5437        }
5438        self.drop_without_shutdown();
5439        _result
5440    }
5441
5442    /// Similar to "send" but does not shutdown the channel if an error occurs.
5443    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
5444        let _result = self.send_raw();
5445        self.drop_without_shutdown();
5446        _result
5447    }
5448
5449    fn send_raw(&self) -> Result<(), fidl::Error> {
5450        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
5451            (),
5452            self.tx_id,
5453            0x7a15369d88e1e8ec,
5454            fidl::encoding::DynamicFlags::empty(),
5455        )
5456    }
5457}
5458
5459#[must_use = "FIDL methods require a response to be sent"]
5460#[derive(Debug)]
5461pub struct RunnerSendOpenTargetStrictEventResponder {
5462    control_handle: std::mem::ManuallyDrop<RunnerControlHandle>,
5463    tx_id: u32,
5464}
5465
5466/// Set the the channel to be shutdown (see [`RunnerControlHandle::shutdown`])
5467/// if the responder is dropped without sending a response, so that the client
5468/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5469impl std::ops::Drop for RunnerSendOpenTargetStrictEventResponder {
5470    fn drop(&mut self) {
5471        self.control_handle.shutdown();
5472        // Safety: drops once, never accessed again
5473        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5474    }
5475}
5476
5477impl fidl::endpoints::Responder for RunnerSendOpenTargetStrictEventResponder {
5478    type ControlHandle = RunnerControlHandle;
5479
5480    fn control_handle(&self) -> &RunnerControlHandle {
5481        &self.control_handle
5482    }
5483
5484    fn drop_without_shutdown(mut self) {
5485        // Safety: drops once, never accessed again due to mem::forget
5486        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5487        // Prevent Drop from running (which would shut down the channel)
5488        std::mem::forget(self);
5489    }
5490}
5491
5492impl RunnerSendOpenTargetStrictEventResponder {
5493    /// Sends a response to the FIDL transaction.
5494    ///
5495    /// Sets the channel to shutdown if an error occurs.
5496    pub fn send(self) -> Result<(), fidl::Error> {
5497        let _result = self.send_raw();
5498        if _result.is_err() {
5499            self.control_handle.shutdown();
5500        }
5501        self.drop_without_shutdown();
5502        _result
5503    }
5504
5505    /// Similar to "send" but does not shutdown the channel if an error occurs.
5506    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
5507        let _result = self.send_raw();
5508        self.drop_without_shutdown();
5509        _result
5510    }
5511
5512    fn send_raw(&self) -> Result<(), fidl::Error> {
5513        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
5514            (),
5515            self.tx_id,
5516            0x1c3e4452a20c9590,
5517            fidl::encoding::DynamicFlags::empty(),
5518        )
5519    }
5520}
5521
5522#[must_use = "FIDL methods require a response to be sent"]
5523#[derive(Debug)]
5524pub struct RunnerSendOpenTargetFlexibleEventResponder {
5525    control_handle: std::mem::ManuallyDrop<RunnerControlHandle>,
5526    tx_id: u32,
5527}
5528
5529/// Set the the channel to be shutdown (see [`RunnerControlHandle::shutdown`])
5530/// if the responder is dropped without sending a response, so that the client
5531/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5532impl std::ops::Drop for RunnerSendOpenTargetFlexibleEventResponder {
5533    fn drop(&mut self) {
5534        self.control_handle.shutdown();
5535        // Safety: drops once, never accessed again
5536        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5537    }
5538}
5539
5540impl fidl::endpoints::Responder for RunnerSendOpenTargetFlexibleEventResponder {
5541    type ControlHandle = RunnerControlHandle;
5542
5543    fn control_handle(&self) -> &RunnerControlHandle {
5544        &self.control_handle
5545    }
5546
5547    fn drop_without_shutdown(mut self) {
5548        // Safety: drops once, never accessed again due to mem::forget
5549        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5550        // Prevent Drop from running (which would shut down the channel)
5551        std::mem::forget(self);
5552    }
5553}
5554
5555impl RunnerSendOpenTargetFlexibleEventResponder {
5556    /// Sends a response to the FIDL transaction.
5557    ///
5558    /// Sets the channel to shutdown if an error occurs.
5559    pub fn send(self) -> Result<(), fidl::Error> {
5560        let _result = self.send_raw();
5561        if _result.is_err() {
5562            self.control_handle.shutdown();
5563        }
5564        self.drop_without_shutdown();
5565        _result
5566    }
5567
5568    /// Similar to "send" but does not shutdown the channel if an error occurs.
5569    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
5570        let _result = self.send_raw();
5571        self.drop_without_shutdown();
5572        _result
5573    }
5574
5575    fn send_raw(&self) -> Result<(), fidl::Error> {
5576        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
5577            (),
5578            self.tx_id,
5579            0x2d2c9446799baeb6,
5580            fidl::encoding::DynamicFlags::empty(),
5581        )
5582    }
5583}
5584
5585mod internal {
5586    use super::*;
5587
5588    impl fidl::encoding::ResourceTypeMarker for ClosedTargetCreateNHandleVectorRequest {
5589        type Borrowed<'a> = &'a mut Self;
5590        fn take_or_borrow<'a>(
5591            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5592        ) -> Self::Borrowed<'a> {
5593            value
5594        }
5595    }
5596
5597    unsafe impl fidl::encoding::TypeMarker for ClosedTargetCreateNHandleVectorRequest {
5598        type Owned = Self;
5599
5600        #[inline(always)]
5601        fn inline_align(_context: fidl::encoding::Context) -> usize {
5602            4
5603        }
5604
5605        #[inline(always)]
5606        fn inline_size(_context: fidl::encoding::Context) -> usize {
5607            4
5608        }
5609        #[inline(always)]
5610        fn encode_is_copy() -> bool {
5611            true
5612        }
5613
5614        #[inline(always)]
5615        fn decode_is_copy() -> bool {
5616            true
5617        }
5618    }
5619
5620    unsafe impl
5621        fidl::encoding::Encode<
5622            ClosedTargetCreateNHandleVectorRequest,
5623            fidl::encoding::DefaultFuchsiaResourceDialect,
5624        > for &mut ClosedTargetCreateNHandleVectorRequest
5625    {
5626        #[inline]
5627        unsafe fn encode(
5628            self,
5629            encoder: &mut fidl::encoding::Encoder<
5630                '_,
5631                fidl::encoding::DefaultFuchsiaResourceDialect,
5632            >,
5633            offset: usize,
5634            _depth: fidl::encoding::Depth,
5635        ) -> fidl::Result<()> {
5636            encoder.debug_check_bounds::<ClosedTargetCreateNHandleVectorRequest>(offset);
5637            unsafe {
5638                // Copy the object into the buffer.
5639                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5640                (buf_ptr as *mut ClosedTargetCreateNHandleVectorRequest).write_unaligned(
5641                    (self as *const ClosedTargetCreateNHandleVectorRequest).read(),
5642                );
5643                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
5644                // done second because the memcpy will write garbage to these bytes.
5645            }
5646            Ok(())
5647        }
5648    }
5649    unsafe impl<T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>>
5650        fidl::encoding::Encode<
5651            ClosedTargetCreateNHandleVectorRequest,
5652            fidl::encoding::DefaultFuchsiaResourceDialect,
5653        > for (T0,)
5654    {
5655        #[inline]
5656        unsafe fn encode(
5657            self,
5658            encoder: &mut fidl::encoding::Encoder<
5659                '_,
5660                fidl::encoding::DefaultFuchsiaResourceDialect,
5661            >,
5662            offset: usize,
5663            depth: fidl::encoding::Depth,
5664        ) -> fidl::Result<()> {
5665            encoder.debug_check_bounds::<ClosedTargetCreateNHandleVectorRequest>(offset);
5666            // Zero out padding regions. There's no need to apply masks
5667            // because the unmasked parts will be overwritten by fields.
5668            // Write the fields.
5669            self.0.encode(encoder, offset + 0, depth)?;
5670            Ok(())
5671        }
5672    }
5673
5674    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5675        for ClosedTargetCreateNHandleVectorRequest
5676    {
5677        #[inline(always)]
5678        fn new_empty() -> Self {
5679            Self { n: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect) }
5680        }
5681
5682        #[inline]
5683        unsafe fn decode(
5684            &mut self,
5685            decoder: &mut fidl::encoding::Decoder<
5686                '_,
5687                fidl::encoding::DefaultFuchsiaResourceDialect,
5688            >,
5689            offset: usize,
5690            _depth: fidl::encoding::Depth,
5691        ) -> fidl::Result<()> {
5692            decoder.debug_check_bounds::<Self>(offset);
5693            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5694            // Verify that padding bytes are zero.
5695            // Copy from the buffer into the object.
5696            unsafe {
5697                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
5698            }
5699            Ok(())
5700        }
5701    }
5702
5703    impl fidl::encoding::ResourceTypeMarker for ClosedTargetCreateNHandleVectorResponse {
5704        type Borrowed<'a> = &'a mut Self;
5705        fn take_or_borrow<'a>(
5706            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5707        ) -> Self::Borrowed<'a> {
5708            value
5709        }
5710    }
5711
5712    unsafe impl fidl::encoding::TypeMarker for ClosedTargetCreateNHandleVectorResponse {
5713        type Owned = Self;
5714
5715        #[inline(always)]
5716        fn inline_align(_context: fidl::encoding::Context) -> usize {
5717            8
5718        }
5719
5720        #[inline(always)]
5721        fn inline_size(_context: fidl::encoding::Context) -> usize {
5722            16
5723        }
5724    }
5725
5726    unsafe impl
5727        fidl::encoding::Encode<
5728            ClosedTargetCreateNHandleVectorResponse,
5729            fidl::encoding::DefaultFuchsiaResourceDialect,
5730        > for &mut ClosedTargetCreateNHandleVectorResponse
5731    {
5732        #[inline]
5733        unsafe fn encode(
5734            self,
5735            encoder: &mut fidl::encoding::Encoder<
5736                '_,
5737                fidl::encoding::DefaultFuchsiaResourceDialect,
5738            >,
5739            offset: usize,
5740            _depth: fidl::encoding::Depth,
5741        ) -> fidl::Result<()> {
5742            encoder.debug_check_bounds::<ClosedTargetCreateNHandleVectorResponse>(offset);
5743            // Delegate to tuple encoding.
5744            fidl::encoding::Encode::<
5745                ClosedTargetCreateNHandleVectorResponse,
5746                fidl::encoding::DefaultFuchsiaResourceDialect,
5747            >::encode(
5748                (<fidl::encoding::UnboundedVector<
5749                    fidl::encoding::HandleType<
5750                        fidl::Event,
5751                        { fidl::ObjectType::EVENT.into_raw() },
5752                        2147483648,
5753                    >,
5754                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5755                    &mut self.vec
5756                ),),
5757                encoder,
5758                offset,
5759                _depth,
5760            )
5761        }
5762    }
5763    unsafe impl<
5764        T0: fidl::encoding::Encode<
5765                fidl::encoding::UnboundedVector<
5766                    fidl::encoding::HandleType<
5767                        fidl::Event,
5768                        { fidl::ObjectType::EVENT.into_raw() },
5769                        2147483648,
5770                    >,
5771                >,
5772                fidl::encoding::DefaultFuchsiaResourceDialect,
5773            >,
5774    >
5775        fidl::encoding::Encode<
5776            ClosedTargetCreateNHandleVectorResponse,
5777            fidl::encoding::DefaultFuchsiaResourceDialect,
5778        > for (T0,)
5779    {
5780        #[inline]
5781        unsafe fn encode(
5782            self,
5783            encoder: &mut fidl::encoding::Encoder<
5784                '_,
5785                fidl::encoding::DefaultFuchsiaResourceDialect,
5786            >,
5787            offset: usize,
5788            depth: fidl::encoding::Depth,
5789        ) -> fidl::Result<()> {
5790            encoder.debug_check_bounds::<ClosedTargetCreateNHandleVectorResponse>(offset);
5791            // Zero out padding regions. There's no need to apply masks
5792            // because the unmasked parts will be overwritten by fields.
5793            // Write the fields.
5794            self.0.encode(encoder, offset + 0, depth)?;
5795            Ok(())
5796        }
5797    }
5798
5799    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5800        for ClosedTargetCreateNHandleVectorResponse
5801    {
5802        #[inline(always)]
5803        fn new_empty() -> Self {
5804            Self {
5805                vec: fidl::new_empty!(
5806                    fidl::encoding::UnboundedVector<
5807                        fidl::encoding::HandleType<
5808                            fidl::Event,
5809                            { fidl::ObjectType::EVENT.into_raw() },
5810                            2147483648,
5811                        >,
5812                    >,
5813                    fidl::encoding::DefaultFuchsiaResourceDialect
5814                ),
5815            }
5816        }
5817
5818        #[inline]
5819        unsafe fn decode(
5820            &mut self,
5821            decoder: &mut fidl::encoding::Decoder<
5822                '_,
5823                fidl::encoding::DefaultFuchsiaResourceDialect,
5824            >,
5825            offset: usize,
5826            _depth: fidl::encoding::Depth,
5827        ) -> fidl::Result<()> {
5828            decoder.debug_check_bounds::<Self>(offset);
5829            // Verify that padding bytes are zero.
5830            fidl::decode!(
5831                fidl::encoding::UnboundedVector<
5832                    fidl::encoding::HandleType<
5833                        fidl::Event,
5834                        { fidl::ObjectType::EVENT.into_raw() },
5835                        2147483648,
5836                    >,
5837                >,
5838                fidl::encoding::DefaultFuchsiaResourceDialect,
5839                &mut self.vec,
5840                decoder,
5841                offset + 0,
5842                _depth
5843            )?;
5844            Ok(())
5845        }
5846    }
5847
5848    impl fidl::encoding::ResourceTypeMarker for ClosedTargetEchoAsTransferableSignalableEventRequest {
5849        type Borrowed<'a> = &'a mut Self;
5850        fn take_or_borrow<'a>(
5851            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5852        ) -> Self::Borrowed<'a> {
5853            value
5854        }
5855    }
5856
5857    unsafe impl fidl::encoding::TypeMarker for ClosedTargetEchoAsTransferableSignalableEventRequest {
5858        type Owned = Self;
5859
5860        #[inline(always)]
5861        fn inline_align(_context: fidl::encoding::Context) -> usize {
5862            4
5863        }
5864
5865        #[inline(always)]
5866        fn inline_size(_context: fidl::encoding::Context) -> usize {
5867            4
5868        }
5869    }
5870
5871    unsafe impl
5872        fidl::encoding::Encode<
5873            ClosedTargetEchoAsTransferableSignalableEventRequest,
5874            fidl::encoding::DefaultFuchsiaResourceDialect,
5875        > for &mut ClosedTargetEchoAsTransferableSignalableEventRequest
5876    {
5877        #[inline]
5878        unsafe fn encode(
5879            self,
5880            encoder: &mut fidl::encoding::Encoder<
5881                '_,
5882                fidl::encoding::DefaultFuchsiaResourceDialect,
5883            >,
5884            offset: usize,
5885            _depth: fidl::encoding::Depth,
5886        ) -> fidl::Result<()> {
5887            encoder
5888                .debug_check_bounds::<ClosedTargetEchoAsTransferableSignalableEventRequest>(offset);
5889            // Delegate to tuple encoding.
5890            fidl::encoding::Encode::<
5891                ClosedTargetEchoAsTransferableSignalableEventRequest,
5892                fidl::encoding::DefaultFuchsiaResourceDialect,
5893            >::encode(
5894                (<fidl::encoding::HandleType<
5895                    fidl::NullableHandle,
5896                    { fidl::ObjectType::NONE.into_raw() },
5897                    2147483648,
5898                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5899                    &mut self.handle
5900                ),),
5901                encoder,
5902                offset,
5903                _depth,
5904            )
5905        }
5906    }
5907    unsafe impl<
5908        T0: fidl::encoding::Encode<
5909                fidl::encoding::HandleType<
5910                    fidl::NullableHandle,
5911                    { fidl::ObjectType::NONE.into_raw() },
5912                    2147483648,
5913                >,
5914                fidl::encoding::DefaultFuchsiaResourceDialect,
5915            >,
5916    >
5917        fidl::encoding::Encode<
5918            ClosedTargetEchoAsTransferableSignalableEventRequest,
5919            fidl::encoding::DefaultFuchsiaResourceDialect,
5920        > for (T0,)
5921    {
5922        #[inline]
5923        unsafe fn encode(
5924            self,
5925            encoder: &mut fidl::encoding::Encoder<
5926                '_,
5927                fidl::encoding::DefaultFuchsiaResourceDialect,
5928            >,
5929            offset: usize,
5930            depth: fidl::encoding::Depth,
5931        ) -> fidl::Result<()> {
5932            encoder
5933                .debug_check_bounds::<ClosedTargetEchoAsTransferableSignalableEventRequest>(offset);
5934            // Zero out padding regions. There's no need to apply masks
5935            // because the unmasked parts will be overwritten by fields.
5936            // Write the fields.
5937            self.0.encode(encoder, offset + 0, depth)?;
5938            Ok(())
5939        }
5940    }
5941
5942    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5943        for ClosedTargetEchoAsTransferableSignalableEventRequest
5944    {
5945        #[inline(always)]
5946        fn new_empty() -> Self {
5947            Self {
5948                handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
5949            }
5950        }
5951
5952        #[inline]
5953        unsafe fn decode(
5954            &mut self,
5955            decoder: &mut fidl::encoding::Decoder<
5956                '_,
5957                fidl::encoding::DefaultFuchsiaResourceDialect,
5958            >,
5959            offset: usize,
5960            _depth: fidl::encoding::Depth,
5961        ) -> fidl::Result<()> {
5962            decoder.debug_check_bounds::<Self>(offset);
5963            // Verify that padding bytes are zero.
5964            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle, decoder, offset + 0, _depth)?;
5965            Ok(())
5966        }
5967    }
5968
5969    impl fidl::encoding::ResourceTypeMarker for ClosedTargetEchoAsTransferableSignalableEventResponse {
5970        type Borrowed<'a> = &'a mut Self;
5971        fn take_or_borrow<'a>(
5972            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5973        ) -> Self::Borrowed<'a> {
5974            value
5975        }
5976    }
5977
5978    unsafe impl fidl::encoding::TypeMarker for ClosedTargetEchoAsTransferableSignalableEventResponse {
5979        type Owned = Self;
5980
5981        #[inline(always)]
5982        fn inline_align(_context: fidl::encoding::Context) -> usize {
5983            4
5984        }
5985
5986        #[inline(always)]
5987        fn inline_size(_context: fidl::encoding::Context) -> usize {
5988            4
5989        }
5990    }
5991
5992    unsafe impl
5993        fidl::encoding::Encode<
5994            ClosedTargetEchoAsTransferableSignalableEventResponse,
5995            fidl::encoding::DefaultFuchsiaResourceDialect,
5996        > for &mut ClosedTargetEchoAsTransferableSignalableEventResponse
5997    {
5998        #[inline]
5999        unsafe fn encode(
6000            self,
6001            encoder: &mut fidl::encoding::Encoder<
6002                '_,
6003                fidl::encoding::DefaultFuchsiaResourceDialect,
6004            >,
6005            offset: usize,
6006            _depth: fidl::encoding::Depth,
6007        ) -> fidl::Result<()> {
6008            encoder.debug_check_bounds::<ClosedTargetEchoAsTransferableSignalableEventResponse>(
6009                offset,
6010            );
6011            // Delegate to tuple encoding.
6012            fidl::encoding::Encode::<
6013                ClosedTargetEchoAsTransferableSignalableEventResponse,
6014                fidl::encoding::DefaultFuchsiaResourceDialect,
6015            >::encode(
6016                (<fidl::encoding::HandleType<
6017                    fidl::Event,
6018                    { fidl::ObjectType::EVENT.into_raw() },
6019                    4098,
6020                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6021                    &mut self.handle
6022                ),),
6023                encoder,
6024                offset,
6025                _depth,
6026            )
6027        }
6028    }
6029    unsafe impl<
6030        T0: fidl::encoding::Encode<
6031                fidl::encoding::HandleType<
6032                    fidl::Event,
6033                    { fidl::ObjectType::EVENT.into_raw() },
6034                    4098,
6035                >,
6036                fidl::encoding::DefaultFuchsiaResourceDialect,
6037            >,
6038    >
6039        fidl::encoding::Encode<
6040            ClosedTargetEchoAsTransferableSignalableEventResponse,
6041            fidl::encoding::DefaultFuchsiaResourceDialect,
6042        > for (T0,)
6043    {
6044        #[inline]
6045        unsafe fn encode(
6046            self,
6047            encoder: &mut fidl::encoding::Encoder<
6048                '_,
6049                fidl::encoding::DefaultFuchsiaResourceDialect,
6050            >,
6051            offset: usize,
6052            depth: fidl::encoding::Depth,
6053        ) -> fidl::Result<()> {
6054            encoder.debug_check_bounds::<ClosedTargetEchoAsTransferableSignalableEventResponse>(
6055                offset,
6056            );
6057            // Zero out padding regions. There's no need to apply masks
6058            // because the unmasked parts will be overwritten by fields.
6059            // Write the fields.
6060            self.0.encode(encoder, offset + 0, depth)?;
6061            Ok(())
6062        }
6063    }
6064
6065    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6066        for ClosedTargetEchoAsTransferableSignalableEventResponse
6067    {
6068        #[inline(always)]
6069        fn new_empty() -> Self {
6070            Self {
6071                handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 4098>, fidl::encoding::DefaultFuchsiaResourceDialect),
6072            }
6073        }
6074
6075        #[inline]
6076        unsafe fn decode(
6077            &mut self,
6078            decoder: &mut fidl::encoding::Decoder<
6079                '_,
6080                fidl::encoding::DefaultFuchsiaResourceDialect,
6081            >,
6082            offset: usize,
6083            _depth: fidl::encoding::Depth,
6084        ) -> fidl::Result<()> {
6085            decoder.debug_check_bounds::<Self>(offset);
6086            // Verify that padding bytes are zero.
6087            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 4098>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle, decoder, offset + 0, _depth)?;
6088            Ok(())
6089        }
6090    }
6091
6092    impl fidl::encoding::ResourceTypeMarker for ClosedTargetGetHandleRightsRequest {
6093        type Borrowed<'a> = &'a mut Self;
6094        fn take_or_borrow<'a>(
6095            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6096        ) -> Self::Borrowed<'a> {
6097            value
6098        }
6099    }
6100
6101    unsafe impl fidl::encoding::TypeMarker for ClosedTargetGetHandleRightsRequest {
6102        type Owned = Self;
6103
6104        #[inline(always)]
6105        fn inline_align(_context: fidl::encoding::Context) -> usize {
6106            4
6107        }
6108
6109        #[inline(always)]
6110        fn inline_size(_context: fidl::encoding::Context) -> usize {
6111            4
6112        }
6113    }
6114
6115    unsafe impl
6116        fidl::encoding::Encode<
6117            ClosedTargetGetHandleRightsRequest,
6118            fidl::encoding::DefaultFuchsiaResourceDialect,
6119        > for &mut ClosedTargetGetHandleRightsRequest
6120    {
6121        #[inline]
6122        unsafe fn encode(
6123            self,
6124            encoder: &mut fidl::encoding::Encoder<
6125                '_,
6126                fidl::encoding::DefaultFuchsiaResourceDialect,
6127            >,
6128            offset: usize,
6129            _depth: fidl::encoding::Depth,
6130        ) -> fidl::Result<()> {
6131            encoder.debug_check_bounds::<ClosedTargetGetHandleRightsRequest>(offset);
6132            // Delegate to tuple encoding.
6133            fidl::encoding::Encode::<
6134                ClosedTargetGetHandleRightsRequest,
6135                fidl::encoding::DefaultFuchsiaResourceDialect,
6136            >::encode(
6137                (<fidl::encoding::HandleType<
6138                    fidl::NullableHandle,
6139                    { fidl::ObjectType::NONE.into_raw() },
6140                    2147483648,
6141                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6142                    &mut self.handle
6143                ),),
6144                encoder,
6145                offset,
6146                _depth,
6147            )
6148        }
6149    }
6150    unsafe impl<
6151        T0: fidl::encoding::Encode<
6152                fidl::encoding::HandleType<
6153                    fidl::NullableHandle,
6154                    { fidl::ObjectType::NONE.into_raw() },
6155                    2147483648,
6156                >,
6157                fidl::encoding::DefaultFuchsiaResourceDialect,
6158            >,
6159    >
6160        fidl::encoding::Encode<
6161            ClosedTargetGetHandleRightsRequest,
6162            fidl::encoding::DefaultFuchsiaResourceDialect,
6163        > for (T0,)
6164    {
6165        #[inline]
6166        unsafe fn encode(
6167            self,
6168            encoder: &mut fidl::encoding::Encoder<
6169                '_,
6170                fidl::encoding::DefaultFuchsiaResourceDialect,
6171            >,
6172            offset: usize,
6173            depth: fidl::encoding::Depth,
6174        ) -> fidl::Result<()> {
6175            encoder.debug_check_bounds::<ClosedTargetGetHandleRightsRequest>(offset);
6176            // Zero out padding regions. There's no need to apply masks
6177            // because the unmasked parts will be overwritten by fields.
6178            // Write the fields.
6179            self.0.encode(encoder, offset + 0, depth)?;
6180            Ok(())
6181        }
6182    }
6183
6184    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6185        for ClosedTargetGetHandleRightsRequest
6186    {
6187        #[inline(always)]
6188        fn new_empty() -> Self {
6189            Self {
6190                handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6191            }
6192        }
6193
6194        #[inline]
6195        unsafe fn decode(
6196            &mut self,
6197            decoder: &mut fidl::encoding::Decoder<
6198                '_,
6199                fidl::encoding::DefaultFuchsiaResourceDialect,
6200            >,
6201            offset: usize,
6202            _depth: fidl::encoding::Depth,
6203        ) -> fidl::Result<()> {
6204            decoder.debug_check_bounds::<Self>(offset);
6205            // Verify that padding bytes are zero.
6206            fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle, decoder, offset + 0, _depth)?;
6207            Ok(())
6208        }
6209    }
6210
6211    impl fidl::encoding::ResourceTypeMarker for ClosedTargetGetSignalableEventRightsRequest {
6212        type Borrowed<'a> = &'a mut Self;
6213        fn take_or_borrow<'a>(
6214            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6215        ) -> Self::Borrowed<'a> {
6216            value
6217        }
6218    }
6219
6220    unsafe impl fidl::encoding::TypeMarker for ClosedTargetGetSignalableEventRightsRequest {
6221        type Owned = Self;
6222
6223        #[inline(always)]
6224        fn inline_align(_context: fidl::encoding::Context) -> usize {
6225            4
6226        }
6227
6228        #[inline(always)]
6229        fn inline_size(_context: fidl::encoding::Context) -> usize {
6230            4
6231        }
6232    }
6233
6234    unsafe impl
6235        fidl::encoding::Encode<
6236            ClosedTargetGetSignalableEventRightsRequest,
6237            fidl::encoding::DefaultFuchsiaResourceDialect,
6238        > for &mut ClosedTargetGetSignalableEventRightsRequest
6239    {
6240        #[inline]
6241        unsafe fn encode(
6242            self,
6243            encoder: &mut fidl::encoding::Encoder<
6244                '_,
6245                fidl::encoding::DefaultFuchsiaResourceDialect,
6246            >,
6247            offset: usize,
6248            _depth: fidl::encoding::Depth,
6249        ) -> fidl::Result<()> {
6250            encoder.debug_check_bounds::<ClosedTargetGetSignalableEventRightsRequest>(offset);
6251            // Delegate to tuple encoding.
6252            fidl::encoding::Encode::<
6253                ClosedTargetGetSignalableEventRightsRequest,
6254                fidl::encoding::DefaultFuchsiaResourceDialect,
6255            >::encode(
6256                (<fidl::encoding::HandleType<
6257                    fidl::Event,
6258                    { fidl::ObjectType::EVENT.into_raw() },
6259                    4096,
6260                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6261                    &mut self.handle
6262                ),),
6263                encoder,
6264                offset,
6265                _depth,
6266            )
6267        }
6268    }
6269    unsafe impl<
6270        T0: fidl::encoding::Encode<
6271                fidl::encoding::HandleType<
6272                    fidl::Event,
6273                    { fidl::ObjectType::EVENT.into_raw() },
6274                    4096,
6275                >,
6276                fidl::encoding::DefaultFuchsiaResourceDialect,
6277            >,
6278    >
6279        fidl::encoding::Encode<
6280            ClosedTargetGetSignalableEventRightsRequest,
6281            fidl::encoding::DefaultFuchsiaResourceDialect,
6282        > for (T0,)
6283    {
6284        #[inline]
6285        unsafe fn encode(
6286            self,
6287            encoder: &mut fidl::encoding::Encoder<
6288                '_,
6289                fidl::encoding::DefaultFuchsiaResourceDialect,
6290            >,
6291            offset: usize,
6292            depth: fidl::encoding::Depth,
6293        ) -> fidl::Result<()> {
6294            encoder.debug_check_bounds::<ClosedTargetGetSignalableEventRightsRequest>(offset);
6295            // Zero out padding regions. There's no need to apply masks
6296            // because the unmasked parts will be overwritten by fields.
6297            // Write the fields.
6298            self.0.encode(encoder, offset + 0, depth)?;
6299            Ok(())
6300        }
6301    }
6302
6303    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6304        for ClosedTargetGetSignalableEventRightsRequest
6305    {
6306        #[inline(always)]
6307        fn new_empty() -> Self {
6308            Self {
6309                handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 4096>, fidl::encoding::DefaultFuchsiaResourceDialect),
6310            }
6311        }
6312
6313        #[inline]
6314        unsafe fn decode(
6315            &mut self,
6316            decoder: &mut fidl::encoding::Decoder<
6317                '_,
6318                fidl::encoding::DefaultFuchsiaResourceDialect,
6319            >,
6320            offset: usize,
6321            _depth: fidl::encoding::Depth,
6322        ) -> fidl::Result<()> {
6323            decoder.debug_check_bounds::<Self>(offset);
6324            // Verify that padding bytes are zero.
6325            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 4096>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle, decoder, offset + 0, _depth)?;
6326            Ok(())
6327        }
6328    }
6329
6330    impl fidl::encoding::ResourceTypeMarker for ClosedTargetHandleVectorSizeRequest {
6331        type Borrowed<'a> = &'a mut Self;
6332        fn take_or_borrow<'a>(
6333            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6334        ) -> Self::Borrowed<'a> {
6335            value
6336        }
6337    }
6338
6339    unsafe impl fidl::encoding::TypeMarker for ClosedTargetHandleVectorSizeRequest {
6340        type Owned = Self;
6341
6342        #[inline(always)]
6343        fn inline_align(_context: fidl::encoding::Context) -> usize {
6344            8
6345        }
6346
6347        #[inline(always)]
6348        fn inline_size(_context: fidl::encoding::Context) -> usize {
6349            16
6350        }
6351    }
6352
6353    unsafe impl
6354        fidl::encoding::Encode<
6355            ClosedTargetHandleVectorSizeRequest,
6356            fidl::encoding::DefaultFuchsiaResourceDialect,
6357        > for &mut ClosedTargetHandleVectorSizeRequest
6358    {
6359        #[inline]
6360        unsafe fn encode(
6361            self,
6362            encoder: &mut fidl::encoding::Encoder<
6363                '_,
6364                fidl::encoding::DefaultFuchsiaResourceDialect,
6365            >,
6366            offset: usize,
6367            _depth: fidl::encoding::Depth,
6368        ) -> fidl::Result<()> {
6369            encoder.debug_check_bounds::<ClosedTargetHandleVectorSizeRequest>(offset);
6370            // Delegate to tuple encoding.
6371            fidl::encoding::Encode::<
6372                ClosedTargetHandleVectorSizeRequest,
6373                fidl::encoding::DefaultFuchsiaResourceDialect,
6374            >::encode(
6375                (<fidl::encoding::UnboundedVector<
6376                    fidl::encoding::HandleType<
6377                        fidl::Event,
6378                        { fidl::ObjectType::EVENT.into_raw() },
6379                        2147483648,
6380                    >,
6381                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6382                    &mut self.vec
6383                ),),
6384                encoder,
6385                offset,
6386                _depth,
6387            )
6388        }
6389    }
6390    unsafe impl<
6391        T0: fidl::encoding::Encode<
6392                fidl::encoding::UnboundedVector<
6393                    fidl::encoding::HandleType<
6394                        fidl::Event,
6395                        { fidl::ObjectType::EVENT.into_raw() },
6396                        2147483648,
6397                    >,
6398                >,
6399                fidl::encoding::DefaultFuchsiaResourceDialect,
6400            >,
6401    >
6402        fidl::encoding::Encode<
6403            ClosedTargetHandleVectorSizeRequest,
6404            fidl::encoding::DefaultFuchsiaResourceDialect,
6405        > for (T0,)
6406    {
6407        #[inline]
6408        unsafe fn encode(
6409            self,
6410            encoder: &mut fidl::encoding::Encoder<
6411                '_,
6412                fidl::encoding::DefaultFuchsiaResourceDialect,
6413            >,
6414            offset: usize,
6415            depth: fidl::encoding::Depth,
6416        ) -> fidl::Result<()> {
6417            encoder.debug_check_bounds::<ClosedTargetHandleVectorSizeRequest>(offset);
6418            // Zero out padding regions. There's no need to apply masks
6419            // because the unmasked parts will be overwritten by fields.
6420            // Write the fields.
6421            self.0.encode(encoder, offset + 0, depth)?;
6422            Ok(())
6423        }
6424    }
6425
6426    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6427        for ClosedTargetHandleVectorSizeRequest
6428    {
6429        #[inline(always)]
6430        fn new_empty() -> Self {
6431            Self {
6432                vec: fidl::new_empty!(
6433                    fidl::encoding::UnboundedVector<
6434                        fidl::encoding::HandleType<
6435                            fidl::Event,
6436                            { fidl::ObjectType::EVENT.into_raw() },
6437                            2147483648,
6438                        >,
6439                    >,
6440                    fidl::encoding::DefaultFuchsiaResourceDialect
6441                ),
6442            }
6443        }
6444
6445        #[inline]
6446        unsafe fn decode(
6447            &mut self,
6448            decoder: &mut fidl::encoding::Decoder<
6449                '_,
6450                fidl::encoding::DefaultFuchsiaResourceDialect,
6451            >,
6452            offset: usize,
6453            _depth: fidl::encoding::Depth,
6454        ) -> fidl::Result<()> {
6455            decoder.debug_check_bounds::<Self>(offset);
6456            // Verify that padding bytes are zero.
6457            fidl::decode!(
6458                fidl::encoding::UnboundedVector<
6459                    fidl::encoding::HandleType<
6460                        fidl::Event,
6461                        { fidl::ObjectType::EVENT.into_raw() },
6462                        2147483648,
6463                    >,
6464                >,
6465                fidl::encoding::DefaultFuchsiaResourceDialect,
6466                &mut self.vec,
6467                decoder,
6468                offset + 0,
6469                _depth
6470            )?;
6471            Ok(())
6472        }
6473    }
6474
6475    impl fidl::encoding::ResourceTypeMarker for RunnerStartRequest {
6476        type Borrowed<'a> = &'a mut Self;
6477        fn take_or_borrow<'a>(
6478            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6479        ) -> Self::Borrowed<'a> {
6480            value
6481        }
6482    }
6483
6484    unsafe impl fidl::encoding::TypeMarker for RunnerStartRequest {
6485        type Owned = Self;
6486
6487        #[inline(always)]
6488        fn inline_align(_context: fidl::encoding::Context) -> usize {
6489            8
6490        }
6491
6492        #[inline(always)]
6493        fn inline_size(_context: fidl::encoding::Context) -> usize {
6494            24
6495        }
6496    }
6497
6498    unsafe impl
6499        fidl::encoding::Encode<RunnerStartRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
6500        for &mut RunnerStartRequest
6501    {
6502        #[inline]
6503        unsafe fn encode(
6504            self,
6505            encoder: &mut fidl::encoding::Encoder<
6506                '_,
6507                fidl::encoding::DefaultFuchsiaResourceDialect,
6508            >,
6509            offset: usize,
6510            _depth: fidl::encoding::Depth,
6511        ) -> fidl::Result<()> {
6512            encoder.debug_check_bounds::<RunnerStartRequest>(offset);
6513            // Delegate to tuple encoding.
6514            fidl::encoding::Encode::<
6515                RunnerStartRequest,
6516                fidl::encoding::DefaultFuchsiaResourceDialect,
6517            >::encode(
6518                (
6519                    <Test as fidl::encoding::ValueTypeMarker>::borrow(&self.test),
6520                    <AnyTarget as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6521                        &mut self.any_target,
6522                    ),
6523                ),
6524                encoder,
6525                offset,
6526                _depth,
6527            )
6528        }
6529    }
6530    unsafe impl<
6531        T0: fidl::encoding::Encode<Test, fidl::encoding::DefaultFuchsiaResourceDialect>,
6532        T1: fidl::encoding::Encode<AnyTarget, fidl::encoding::DefaultFuchsiaResourceDialect>,
6533    > fidl::encoding::Encode<RunnerStartRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
6534        for (T0, T1)
6535    {
6536        #[inline]
6537        unsafe fn encode(
6538            self,
6539            encoder: &mut fidl::encoding::Encoder<
6540                '_,
6541                fidl::encoding::DefaultFuchsiaResourceDialect,
6542            >,
6543            offset: usize,
6544            depth: fidl::encoding::Depth,
6545        ) -> fidl::Result<()> {
6546            encoder.debug_check_bounds::<RunnerStartRequest>(offset);
6547            // Zero out padding regions. There's no need to apply masks
6548            // because the unmasked parts will be overwritten by fields.
6549            unsafe {
6550                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
6551                (ptr as *mut u64).write_unaligned(0);
6552            }
6553            // Write the fields.
6554            self.0.encode(encoder, offset + 0, depth)?;
6555            self.1.encode(encoder, offset + 8, depth)?;
6556            Ok(())
6557        }
6558    }
6559
6560    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6561        for RunnerStartRequest
6562    {
6563        #[inline(always)]
6564        fn new_empty() -> Self {
6565            Self {
6566                test: fidl::new_empty!(Test, fidl::encoding::DefaultFuchsiaResourceDialect),
6567                any_target: fidl::new_empty!(
6568                    AnyTarget,
6569                    fidl::encoding::DefaultFuchsiaResourceDialect
6570                ),
6571            }
6572        }
6573
6574        #[inline]
6575        unsafe fn decode(
6576            &mut self,
6577            decoder: &mut fidl::encoding::Decoder<
6578                '_,
6579                fidl::encoding::DefaultFuchsiaResourceDialect,
6580            >,
6581            offset: usize,
6582            _depth: fidl::encoding::Depth,
6583        ) -> fidl::Result<()> {
6584            decoder.debug_check_bounds::<Self>(offset);
6585            // Verify that padding bytes are zero.
6586            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
6587            let padval = unsafe { (ptr as *const u64).read_unaligned() };
6588            let mask = 0xffffffff00000000u64;
6589            let maskedval = padval & mask;
6590            if maskedval != 0 {
6591                return Err(fidl::Error::NonZeroPadding {
6592                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
6593                });
6594            }
6595            fidl::decode!(
6596                Test,
6597                fidl::encoding::DefaultFuchsiaResourceDialect,
6598                &mut self.test,
6599                decoder,
6600                offset + 0,
6601                _depth
6602            )?;
6603            fidl::decode!(
6604                AnyTarget,
6605                fidl::encoding::DefaultFuchsiaResourceDialect,
6606                &mut self.any_target,
6607                decoder,
6608                offset + 8,
6609                _depth
6610            )?;
6611            Ok(())
6612        }
6613    }
6614
6615    impl fidl::encoding::ResourceTypeMarker for AnyTarget {
6616        type Borrowed<'a> = &'a mut Self;
6617        fn take_or_borrow<'a>(
6618            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6619        ) -> Self::Borrowed<'a> {
6620            value
6621        }
6622    }
6623
6624    unsafe impl fidl::encoding::TypeMarker for AnyTarget {
6625        type Owned = Self;
6626
6627        #[inline(always)]
6628        fn inline_align(_context: fidl::encoding::Context) -> usize {
6629            8
6630        }
6631
6632        #[inline(always)]
6633        fn inline_size(_context: fidl::encoding::Context) -> usize {
6634            16
6635        }
6636    }
6637
6638    unsafe impl fidl::encoding::Encode<AnyTarget, fidl::encoding::DefaultFuchsiaResourceDialect>
6639        for &mut AnyTarget
6640    {
6641        #[inline]
6642        unsafe fn encode(
6643            self,
6644            encoder: &mut fidl::encoding::Encoder<
6645                '_,
6646                fidl::encoding::DefaultFuchsiaResourceDialect,
6647            >,
6648            offset: usize,
6649            _depth: fidl::encoding::Depth,
6650        ) -> fidl::Result<()> {
6651            encoder.debug_check_bounds::<AnyTarget>(offset);
6652            encoder.write_num::<u64>(self.ordinal(), offset);
6653            match self {
6654            AnyTarget::Closed(ref mut val) => {
6655                fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClosedTargetMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
6656                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClosedTargetMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
6657                    encoder, offset + 8, _depth
6658                )
6659            }
6660            AnyTarget::Ajar(ref mut val) => {
6661                fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<AjarTargetMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
6662                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<AjarTargetMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
6663                    encoder, offset + 8, _depth
6664                )
6665            }
6666            AnyTarget::Open(ref mut val) => {
6667                fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<OpenTargetMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
6668                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<OpenTargetMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
6669                    encoder, offset + 8, _depth
6670                )
6671            }
6672        }
6673        }
6674    }
6675
6676    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for AnyTarget {
6677        #[inline(always)]
6678        fn new_empty() -> Self {
6679            Self::Closed(fidl::new_empty!(
6680                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClosedTargetMarker>>,
6681                fidl::encoding::DefaultFuchsiaResourceDialect
6682            ))
6683        }
6684
6685        #[inline]
6686        unsafe fn decode(
6687            &mut self,
6688            decoder: &mut fidl::encoding::Decoder<
6689                '_,
6690                fidl::encoding::DefaultFuchsiaResourceDialect,
6691            >,
6692            offset: usize,
6693            mut depth: fidl::encoding::Depth,
6694        ) -> fidl::Result<()> {
6695            decoder.debug_check_bounds::<Self>(offset);
6696            #[allow(unused_variables)]
6697            let next_out_of_line = decoder.next_out_of_line();
6698            let handles_before = decoder.remaining_handles();
6699            let (ordinal, inlined, num_bytes, num_handles) =
6700                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
6701
6702            let member_inline_size = match ordinal {
6703            1 => <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClosedTargetMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6704            2 => <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<AjarTargetMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6705            3 => <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<OpenTargetMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6706            _ => return Err(fidl::Error::UnknownUnionTag),
6707        };
6708
6709            if inlined != (member_inline_size <= 4) {
6710                return Err(fidl::Error::InvalidInlineBitInEnvelope);
6711            }
6712            let _inner_offset;
6713            if inlined {
6714                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
6715                _inner_offset = offset + 8;
6716            } else {
6717                depth.increment()?;
6718                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6719            }
6720            match ordinal {
6721                1 => {
6722                    #[allow(irrefutable_let_patterns)]
6723                    if let AnyTarget::Closed(_) = self {
6724                        // Do nothing, read the value into the object
6725                    } else {
6726                        // Initialize `self` to the right variant
6727                        *self = AnyTarget::Closed(fidl::new_empty!(
6728                            fidl::encoding::Endpoint<
6729                                fidl::endpoints::ServerEnd<ClosedTargetMarker>,
6730                            >,
6731                            fidl::encoding::DefaultFuchsiaResourceDialect
6732                        ));
6733                    }
6734                    #[allow(irrefutable_let_patterns)]
6735                    if let AnyTarget::Closed(ref mut val) = self {
6736                        fidl::decode!(
6737                            fidl::encoding::Endpoint<
6738                                fidl::endpoints::ServerEnd<ClosedTargetMarker>,
6739                            >,
6740                            fidl::encoding::DefaultFuchsiaResourceDialect,
6741                            val,
6742                            decoder,
6743                            _inner_offset,
6744                            depth
6745                        )?;
6746                    } else {
6747                        unreachable!()
6748                    }
6749                }
6750                2 => {
6751                    #[allow(irrefutable_let_patterns)]
6752                    if let AnyTarget::Ajar(_) = self {
6753                        // Do nothing, read the value into the object
6754                    } else {
6755                        // Initialize `self` to the right variant
6756                        *self = AnyTarget::Ajar(fidl::new_empty!(
6757                            fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<AjarTargetMarker>>,
6758                            fidl::encoding::DefaultFuchsiaResourceDialect
6759                        ));
6760                    }
6761                    #[allow(irrefutable_let_patterns)]
6762                    if let AnyTarget::Ajar(ref mut val) = self {
6763                        fidl::decode!(
6764                            fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<AjarTargetMarker>>,
6765                            fidl::encoding::DefaultFuchsiaResourceDialect,
6766                            val,
6767                            decoder,
6768                            _inner_offset,
6769                            depth
6770                        )?;
6771                    } else {
6772                        unreachable!()
6773                    }
6774                }
6775                3 => {
6776                    #[allow(irrefutable_let_patterns)]
6777                    if let AnyTarget::Open(_) = self {
6778                        // Do nothing, read the value into the object
6779                    } else {
6780                        // Initialize `self` to the right variant
6781                        *self = AnyTarget::Open(fidl::new_empty!(
6782                            fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<OpenTargetMarker>>,
6783                            fidl::encoding::DefaultFuchsiaResourceDialect
6784                        ));
6785                    }
6786                    #[allow(irrefutable_let_patterns)]
6787                    if let AnyTarget::Open(ref mut val) = self {
6788                        fidl::decode!(
6789                            fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<OpenTargetMarker>>,
6790                            fidl::encoding::DefaultFuchsiaResourceDialect,
6791                            val,
6792                            decoder,
6793                            _inner_offset,
6794                            depth
6795                        )?;
6796                    } else {
6797                        unreachable!()
6798                    }
6799                }
6800                ordinal => panic!("unexpected ordinal {:?}", ordinal),
6801            }
6802            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
6803                return Err(fidl::Error::InvalidNumBytesInEnvelope);
6804            }
6805            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6806                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6807            }
6808            Ok(())
6809        }
6810    }
6811}