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