fidl_fidl_serversuite/
fidl_fidl_serversuite.rs

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