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