fidl_fidl_serversuite/
fidl_fidl_serversuite.rs

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