fidl_test_unknown_interactions/
fidl_test_unknown_interactions.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_test_unknown_interactions__common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
15pub struct UnknownInteractionsAjarProtocolMarker;
16
17impl fidl::endpoints::ProtocolMarker for UnknownInteractionsAjarProtocolMarker {
18    type Proxy = UnknownInteractionsAjarProtocolProxy;
19    type RequestStream = UnknownInteractionsAjarProtocolRequestStream;
20    #[cfg(target_os = "fuchsia")]
21    type SynchronousProxy = UnknownInteractionsAjarProtocolSynchronousProxy;
22
23    const DEBUG_NAME: &'static str = "(anonymous) UnknownInteractionsAjarProtocol";
24}
25
26pub trait UnknownInteractionsAjarProtocolProxyInterface: Send + Sync {}
27#[derive(Debug)]
28#[cfg(target_os = "fuchsia")]
29pub struct UnknownInteractionsAjarProtocolSynchronousProxy {
30    client: fidl::client::sync::Client,
31}
32
33#[cfg(target_os = "fuchsia")]
34impl fidl::endpoints::SynchronousProxy for UnknownInteractionsAjarProtocolSynchronousProxy {
35    type Proxy = UnknownInteractionsAjarProtocolProxy;
36    type Protocol = UnknownInteractionsAjarProtocolMarker;
37
38    fn from_channel(inner: fidl::Channel) -> Self {
39        Self::new(inner)
40    }
41
42    fn into_channel(self) -> fidl::Channel {
43        self.client.into_channel()
44    }
45
46    fn as_channel(&self) -> &fidl::Channel {
47        self.client.as_channel()
48    }
49}
50
51#[cfg(target_os = "fuchsia")]
52impl UnknownInteractionsAjarProtocolSynchronousProxy {
53    pub fn new(channel: fidl::Channel) -> Self {
54        let protocol_name =
55            <UnknownInteractionsAjarProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
56        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
57    }
58
59    pub fn into_channel(self) -> fidl::Channel {
60        self.client.into_channel()
61    }
62
63    /// Waits until an event arrives and returns it. It is safe for other
64    /// threads to make concurrent requests while waiting for an event.
65    pub fn wait_for_event(
66        &self,
67        deadline: zx::MonotonicInstant,
68    ) -> Result<UnknownInteractionsAjarProtocolEvent, fidl::Error> {
69        UnknownInteractionsAjarProtocolEvent::decode(self.client.wait_for_event(deadline)?)
70    }
71}
72
73#[cfg(target_os = "fuchsia")]
74impl From<UnknownInteractionsAjarProtocolSynchronousProxy> for zx::NullableHandle {
75    fn from(value: UnknownInteractionsAjarProtocolSynchronousProxy) -> Self {
76        value.into_channel().into()
77    }
78}
79
80#[cfg(target_os = "fuchsia")]
81impl From<fidl::Channel> for UnknownInteractionsAjarProtocolSynchronousProxy {
82    fn from(value: fidl::Channel) -> Self {
83        Self::new(value)
84    }
85}
86
87#[cfg(target_os = "fuchsia")]
88impl fidl::endpoints::FromClient for UnknownInteractionsAjarProtocolSynchronousProxy {
89    type Protocol = UnknownInteractionsAjarProtocolMarker;
90
91    fn from_client(
92        value: fidl::endpoints::ClientEnd<UnknownInteractionsAjarProtocolMarker>,
93    ) -> Self {
94        Self::new(value.into_channel())
95    }
96}
97
98#[derive(Debug, Clone)]
99pub struct UnknownInteractionsAjarProtocolProxy {
100    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
101}
102
103impl fidl::endpoints::Proxy for UnknownInteractionsAjarProtocolProxy {
104    type Protocol = UnknownInteractionsAjarProtocolMarker;
105
106    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
107        Self::new(inner)
108    }
109
110    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
111        self.client.into_channel().map_err(|client| Self { client })
112    }
113
114    fn as_channel(&self) -> &::fidl::AsyncChannel {
115        self.client.as_channel()
116    }
117}
118
119impl UnknownInteractionsAjarProtocolProxy {
120    /// Create a new Proxy for test.unknown.interactions/UnknownInteractionsAjarProtocol.
121    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
122        let protocol_name =
123            <UnknownInteractionsAjarProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
124        Self { client: fidl::client::Client::new(channel, protocol_name) }
125    }
126
127    /// Get a Stream of events from the remote end of the protocol.
128    ///
129    /// # Panics
130    ///
131    /// Panics if the event stream was already taken.
132    pub fn take_event_stream(&self) -> UnknownInteractionsAjarProtocolEventStream {
133        UnknownInteractionsAjarProtocolEventStream {
134            event_receiver: self.client.take_event_receiver(),
135        }
136    }
137}
138
139impl UnknownInteractionsAjarProtocolProxyInterface for UnknownInteractionsAjarProtocolProxy {}
140
141pub struct UnknownInteractionsAjarProtocolEventStream {
142    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
143}
144
145impl std::marker::Unpin for UnknownInteractionsAjarProtocolEventStream {}
146
147impl futures::stream::FusedStream for UnknownInteractionsAjarProtocolEventStream {
148    fn is_terminated(&self) -> bool {
149        self.event_receiver.is_terminated()
150    }
151}
152
153impl futures::Stream for UnknownInteractionsAjarProtocolEventStream {
154    type Item = Result<UnknownInteractionsAjarProtocolEvent, fidl::Error>;
155
156    fn poll_next(
157        mut self: std::pin::Pin<&mut Self>,
158        cx: &mut std::task::Context<'_>,
159    ) -> std::task::Poll<Option<Self::Item>> {
160        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
161            &mut self.event_receiver,
162            cx
163        )?) {
164            Some(buf) => {
165                std::task::Poll::Ready(Some(UnknownInteractionsAjarProtocolEvent::decode(buf)))
166            }
167            None => std::task::Poll::Ready(None),
168        }
169    }
170}
171
172#[derive(Debug)]
173pub enum UnknownInteractionsAjarProtocolEvent {
174    #[non_exhaustive]
175    _UnknownEvent {
176        /// Ordinal of the event that was sent.
177        ordinal: u64,
178    },
179}
180
181impl UnknownInteractionsAjarProtocolEvent {
182    /// Decodes a message buffer as a [`UnknownInteractionsAjarProtocolEvent`].
183    fn decode(
184        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
185    ) -> Result<UnknownInteractionsAjarProtocolEvent, fidl::Error> {
186        let (bytes, _handles) = buf.split_mut();
187        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
188        debug_assert_eq!(tx_header.tx_id, 0);
189        match tx_header.ordinal {
190            _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
191                Ok(UnknownInteractionsAjarProtocolEvent::_UnknownEvent {
192                    ordinal: tx_header.ordinal,
193                })
194            }
195            _ => Err(fidl::Error::UnknownOrdinal {
196                ordinal: tx_header.ordinal,
197                protocol_name: <UnknownInteractionsAjarProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
198            })
199        }
200    }
201}
202
203/// A Stream of incoming requests for test.unknown.interactions/UnknownInteractionsAjarProtocol.
204pub struct UnknownInteractionsAjarProtocolRequestStream {
205    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
206    is_terminated: bool,
207}
208
209impl std::marker::Unpin for UnknownInteractionsAjarProtocolRequestStream {}
210
211impl futures::stream::FusedStream for UnknownInteractionsAjarProtocolRequestStream {
212    fn is_terminated(&self) -> bool {
213        self.is_terminated
214    }
215}
216
217impl fidl::endpoints::RequestStream for UnknownInteractionsAjarProtocolRequestStream {
218    type Protocol = UnknownInteractionsAjarProtocolMarker;
219    type ControlHandle = UnknownInteractionsAjarProtocolControlHandle;
220
221    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
222        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
223    }
224
225    fn control_handle(&self) -> Self::ControlHandle {
226        UnknownInteractionsAjarProtocolControlHandle { inner: self.inner.clone() }
227    }
228
229    fn into_inner(
230        self,
231    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
232    {
233        (self.inner, self.is_terminated)
234    }
235
236    fn from_inner(
237        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
238        is_terminated: bool,
239    ) -> Self {
240        Self { inner, is_terminated }
241    }
242}
243
244impl futures::Stream for UnknownInteractionsAjarProtocolRequestStream {
245    type Item = Result<UnknownInteractionsAjarProtocolRequest, fidl::Error>;
246
247    fn poll_next(
248        mut self: std::pin::Pin<&mut Self>,
249        cx: &mut std::task::Context<'_>,
250    ) -> std::task::Poll<Option<Self::Item>> {
251        let this = &mut *self;
252        if this.inner.check_shutdown(cx) {
253            this.is_terminated = true;
254            return std::task::Poll::Ready(None);
255        }
256        if this.is_terminated {
257            panic!("polled UnknownInteractionsAjarProtocolRequestStream after completion");
258        }
259        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
260            |bytes, handles| {
261                match this.inner.channel().read_etc(cx, bytes, handles) {
262                    std::task::Poll::Ready(Ok(())) => {}
263                    std::task::Poll::Pending => return std::task::Poll::Pending,
264                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
265                        this.is_terminated = true;
266                        return std::task::Poll::Ready(None);
267                    }
268                    std::task::Poll::Ready(Err(e)) => {
269                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
270                            e.into(),
271                        ))));
272                    }
273                }
274
275                // A message has been received from the channel
276                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
277
278                std::task::Poll::Ready(Some(match header.ordinal {
279                _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
280                    Ok(UnknownInteractionsAjarProtocolRequest::_UnknownMethod {
281                        ordinal: header.ordinal,
282                        control_handle: UnknownInteractionsAjarProtocolControlHandle { inner: this.inner.clone() },
283                    })
284                }
285                _ => Err(fidl::Error::UnknownOrdinal {
286                    ordinal: header.ordinal,
287                    protocol_name: <UnknownInteractionsAjarProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
288                }),
289            }))
290            },
291        )
292    }
293}
294
295#[derive(Debug)]
296pub enum UnknownInteractionsAjarProtocolRequest {
297    /// An interaction was received which does not match any known method.
298    #[non_exhaustive]
299    _UnknownMethod {
300        /// Ordinal of the method that was called.
301        ordinal: u64,
302        control_handle: UnknownInteractionsAjarProtocolControlHandle,
303    },
304}
305
306impl UnknownInteractionsAjarProtocolRequest {
307    /// Name of the method defined in FIDL
308    pub fn method_name(&self) -> &'static str {
309        match *self {
310            UnknownInteractionsAjarProtocolRequest::_UnknownMethod { .. } => {
311                "unknown one-way method"
312            }
313        }
314    }
315}
316
317#[derive(Debug, Clone)]
318pub struct UnknownInteractionsAjarProtocolControlHandle {
319    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
320}
321
322impl fidl::endpoints::ControlHandle for UnknownInteractionsAjarProtocolControlHandle {
323    fn shutdown(&self) {
324        self.inner.shutdown()
325    }
326
327    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
328        self.inner.shutdown_with_epitaph(status)
329    }
330
331    fn is_closed(&self) -> bool {
332        self.inner.channel().is_closed()
333    }
334    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
335        self.inner.channel().on_closed()
336    }
337
338    #[cfg(target_os = "fuchsia")]
339    fn signal_peer(
340        &self,
341        clear_mask: zx::Signals,
342        set_mask: zx::Signals,
343    ) -> Result<(), zx_status::Status> {
344        use fidl::Peered;
345        self.inner.channel().signal_peer(clear_mask, set_mask)
346    }
347}
348
349impl UnknownInteractionsAjarProtocolControlHandle {}
350
351#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
352pub struct UnknownInteractionsClosedProtocolMarker;
353
354impl fidl::endpoints::ProtocolMarker for UnknownInteractionsClosedProtocolMarker {
355    type Proxy = UnknownInteractionsClosedProtocolProxy;
356    type RequestStream = UnknownInteractionsClosedProtocolRequestStream;
357    #[cfg(target_os = "fuchsia")]
358    type SynchronousProxy = UnknownInteractionsClosedProtocolSynchronousProxy;
359
360    const DEBUG_NAME: &'static str = "(anonymous) UnknownInteractionsClosedProtocol";
361}
362
363pub trait UnknownInteractionsClosedProtocolProxyInterface: Send + Sync {}
364#[derive(Debug)]
365#[cfg(target_os = "fuchsia")]
366pub struct UnknownInteractionsClosedProtocolSynchronousProxy {
367    client: fidl::client::sync::Client,
368}
369
370#[cfg(target_os = "fuchsia")]
371impl fidl::endpoints::SynchronousProxy for UnknownInteractionsClosedProtocolSynchronousProxy {
372    type Proxy = UnknownInteractionsClosedProtocolProxy;
373    type Protocol = UnknownInteractionsClosedProtocolMarker;
374
375    fn from_channel(inner: fidl::Channel) -> Self {
376        Self::new(inner)
377    }
378
379    fn into_channel(self) -> fidl::Channel {
380        self.client.into_channel()
381    }
382
383    fn as_channel(&self) -> &fidl::Channel {
384        self.client.as_channel()
385    }
386}
387
388#[cfg(target_os = "fuchsia")]
389impl UnknownInteractionsClosedProtocolSynchronousProxy {
390    pub fn new(channel: fidl::Channel) -> Self {
391        let protocol_name = <UnknownInteractionsClosedProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
392        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
393    }
394
395    pub fn into_channel(self) -> fidl::Channel {
396        self.client.into_channel()
397    }
398
399    /// Waits until an event arrives and returns it. It is safe for other
400    /// threads to make concurrent requests while waiting for an event.
401    pub fn wait_for_event(
402        &self,
403        deadline: zx::MonotonicInstant,
404    ) -> Result<UnknownInteractionsClosedProtocolEvent, fidl::Error> {
405        UnknownInteractionsClosedProtocolEvent::decode(self.client.wait_for_event(deadline)?)
406    }
407}
408
409#[cfg(target_os = "fuchsia")]
410impl From<UnknownInteractionsClosedProtocolSynchronousProxy> for zx::NullableHandle {
411    fn from(value: UnknownInteractionsClosedProtocolSynchronousProxy) -> Self {
412        value.into_channel().into()
413    }
414}
415
416#[cfg(target_os = "fuchsia")]
417impl From<fidl::Channel> for UnknownInteractionsClosedProtocolSynchronousProxy {
418    fn from(value: fidl::Channel) -> Self {
419        Self::new(value)
420    }
421}
422
423#[cfg(target_os = "fuchsia")]
424impl fidl::endpoints::FromClient for UnknownInteractionsClosedProtocolSynchronousProxy {
425    type Protocol = UnknownInteractionsClosedProtocolMarker;
426
427    fn from_client(
428        value: fidl::endpoints::ClientEnd<UnknownInteractionsClosedProtocolMarker>,
429    ) -> Self {
430        Self::new(value.into_channel())
431    }
432}
433
434#[derive(Debug, Clone)]
435pub struct UnknownInteractionsClosedProtocolProxy {
436    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
437}
438
439impl fidl::endpoints::Proxy for UnknownInteractionsClosedProtocolProxy {
440    type Protocol = UnknownInteractionsClosedProtocolMarker;
441
442    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
443        Self::new(inner)
444    }
445
446    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
447        self.client.into_channel().map_err(|client| Self { client })
448    }
449
450    fn as_channel(&self) -> &::fidl::AsyncChannel {
451        self.client.as_channel()
452    }
453}
454
455impl UnknownInteractionsClosedProtocolProxy {
456    /// Create a new Proxy for test.unknown.interactions/UnknownInteractionsClosedProtocol.
457    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
458        let protocol_name = <UnknownInteractionsClosedProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
459        Self { client: fidl::client::Client::new(channel, protocol_name) }
460    }
461
462    /// Get a Stream of events from the remote end of the protocol.
463    ///
464    /// # Panics
465    ///
466    /// Panics if the event stream was already taken.
467    pub fn take_event_stream(&self) -> UnknownInteractionsClosedProtocolEventStream {
468        UnknownInteractionsClosedProtocolEventStream {
469            event_receiver: self.client.take_event_receiver(),
470        }
471    }
472}
473
474impl UnknownInteractionsClosedProtocolProxyInterface for UnknownInteractionsClosedProtocolProxy {}
475
476pub struct UnknownInteractionsClosedProtocolEventStream {
477    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
478}
479
480impl std::marker::Unpin for UnknownInteractionsClosedProtocolEventStream {}
481
482impl futures::stream::FusedStream for UnknownInteractionsClosedProtocolEventStream {
483    fn is_terminated(&self) -> bool {
484        self.event_receiver.is_terminated()
485    }
486}
487
488impl futures::Stream for UnknownInteractionsClosedProtocolEventStream {
489    type Item = Result<UnknownInteractionsClosedProtocolEvent, fidl::Error>;
490
491    fn poll_next(
492        mut self: std::pin::Pin<&mut Self>,
493        cx: &mut std::task::Context<'_>,
494    ) -> std::task::Poll<Option<Self::Item>> {
495        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
496            &mut self.event_receiver,
497            cx
498        )?) {
499            Some(buf) => {
500                std::task::Poll::Ready(Some(UnknownInteractionsClosedProtocolEvent::decode(buf)))
501            }
502            None => std::task::Poll::Ready(None),
503        }
504    }
505}
506
507#[derive(Debug)]
508pub enum UnknownInteractionsClosedProtocolEvent {}
509
510impl UnknownInteractionsClosedProtocolEvent {
511    /// Decodes a message buffer as a [`UnknownInteractionsClosedProtocolEvent`].
512    fn decode(
513        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
514    ) -> Result<UnknownInteractionsClosedProtocolEvent, fidl::Error> {
515        let (bytes, _handles) = buf.split_mut();
516        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
517        debug_assert_eq!(tx_header.tx_id, 0);
518        match tx_header.ordinal {
519            _ => Err(fidl::Error::UnknownOrdinal {
520                ordinal: tx_header.ordinal,
521                protocol_name: <UnknownInteractionsClosedProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
522            })
523        }
524    }
525}
526
527/// A Stream of incoming requests for test.unknown.interactions/UnknownInteractionsClosedProtocol.
528pub struct UnknownInteractionsClosedProtocolRequestStream {
529    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
530    is_terminated: bool,
531}
532
533impl std::marker::Unpin for UnknownInteractionsClosedProtocolRequestStream {}
534
535impl futures::stream::FusedStream for UnknownInteractionsClosedProtocolRequestStream {
536    fn is_terminated(&self) -> bool {
537        self.is_terminated
538    }
539}
540
541impl fidl::endpoints::RequestStream for UnknownInteractionsClosedProtocolRequestStream {
542    type Protocol = UnknownInteractionsClosedProtocolMarker;
543    type ControlHandle = UnknownInteractionsClosedProtocolControlHandle;
544
545    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
546        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
547    }
548
549    fn control_handle(&self) -> Self::ControlHandle {
550        UnknownInteractionsClosedProtocolControlHandle { inner: self.inner.clone() }
551    }
552
553    fn into_inner(
554        self,
555    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
556    {
557        (self.inner, self.is_terminated)
558    }
559
560    fn from_inner(
561        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
562        is_terminated: bool,
563    ) -> Self {
564        Self { inner, is_terminated }
565    }
566}
567
568impl futures::Stream for UnknownInteractionsClosedProtocolRequestStream {
569    type Item = Result<UnknownInteractionsClosedProtocolRequest, fidl::Error>;
570
571    fn poll_next(
572        mut self: std::pin::Pin<&mut Self>,
573        cx: &mut std::task::Context<'_>,
574    ) -> std::task::Poll<Option<Self::Item>> {
575        let this = &mut *self;
576        if this.inner.check_shutdown(cx) {
577            this.is_terminated = true;
578            return std::task::Poll::Ready(None);
579        }
580        if this.is_terminated {
581            panic!("polled UnknownInteractionsClosedProtocolRequestStream after completion");
582        }
583        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
584            |bytes, handles| {
585                match this.inner.channel().read_etc(cx, bytes, handles) {
586                    std::task::Poll::Ready(Ok(())) => {}
587                    std::task::Poll::Pending => return std::task::Poll::Pending,
588                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
589                        this.is_terminated = true;
590                        return std::task::Poll::Ready(None);
591                    }
592                    std::task::Poll::Ready(Err(e)) => {
593                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
594                            e.into(),
595                        ))));
596                    }
597                }
598
599                // A message has been received from the channel
600                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
601
602                std::task::Poll::Ready(Some(match header.ordinal {
603                _ => Err(fidl::Error::UnknownOrdinal {
604                    ordinal: header.ordinal,
605                    protocol_name: <UnknownInteractionsClosedProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
606                }),
607            }))
608            },
609        )
610    }
611}
612
613#[derive(Debug)]
614pub enum UnknownInteractionsClosedProtocolRequest {}
615
616impl UnknownInteractionsClosedProtocolRequest {
617    /// Name of the method defined in FIDL
618    pub fn method_name(&self) -> &'static str {
619        match *self {}
620    }
621}
622
623#[derive(Debug, Clone)]
624pub struct UnknownInteractionsClosedProtocolControlHandle {
625    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
626}
627
628impl fidl::endpoints::ControlHandle for UnknownInteractionsClosedProtocolControlHandle {
629    fn shutdown(&self) {
630        self.inner.shutdown()
631    }
632
633    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
634        self.inner.shutdown_with_epitaph(status)
635    }
636
637    fn is_closed(&self) -> bool {
638        self.inner.channel().is_closed()
639    }
640    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
641        self.inner.channel().on_closed()
642    }
643
644    #[cfg(target_os = "fuchsia")]
645    fn signal_peer(
646        &self,
647        clear_mask: zx::Signals,
648        set_mask: zx::Signals,
649    ) -> Result<(), zx_status::Status> {
650        use fidl::Peered;
651        self.inner.channel().signal_peer(clear_mask, set_mask)
652    }
653}
654
655impl UnknownInteractionsClosedProtocolControlHandle {}
656
657#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
658pub struct UnknownInteractionsProtocolMarker;
659
660impl fidl::endpoints::ProtocolMarker for UnknownInteractionsProtocolMarker {
661    type Proxy = UnknownInteractionsProtocolProxy;
662    type RequestStream = UnknownInteractionsProtocolRequestStream;
663    #[cfg(target_os = "fuchsia")]
664    type SynchronousProxy = UnknownInteractionsProtocolSynchronousProxy;
665
666    const DEBUG_NAME: &'static str = "(anonymous) UnknownInteractionsProtocol";
667}
668pub type UnknownInteractionsProtocolStrictTwoWayErrResult = Result<(), i32>;
669pub type UnknownInteractionsProtocolStrictTwoWayFieldsErrResult = Result<i32, i32>;
670pub type UnknownInteractionsProtocolFlexibleTwoWayErrResult = Result<(), i32>;
671pub type UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResult = Result<i32, i32>;
672
673pub trait UnknownInteractionsProtocolProxyInterface: Send + Sync {
674    fn r#strict_one_way(&self) -> Result<(), fidl::Error>;
675    fn r#flexible_one_way(&self) -> Result<(), fidl::Error>;
676    type StrictTwoWayResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
677    fn r#strict_two_way(&self) -> Self::StrictTwoWayResponseFut;
678    type StrictTwoWayFieldsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
679        + Send;
680    fn r#strict_two_way_fields(&self) -> Self::StrictTwoWayFieldsResponseFut;
681    type StrictTwoWayErrResponseFut: std::future::Future<
682            Output = Result<UnknownInteractionsProtocolStrictTwoWayErrResult, fidl::Error>,
683        > + Send;
684    fn r#strict_two_way_err(&self) -> Self::StrictTwoWayErrResponseFut;
685    type StrictTwoWayFieldsErrResponseFut: std::future::Future<
686            Output = Result<UnknownInteractionsProtocolStrictTwoWayFieldsErrResult, fidl::Error>,
687        > + Send;
688    fn r#strict_two_way_fields_err(&self) -> Self::StrictTwoWayFieldsErrResponseFut;
689    type FlexibleTwoWayResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
690    fn r#flexible_two_way(&self) -> Self::FlexibleTwoWayResponseFut;
691    type FlexibleTwoWayFieldsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
692        + Send;
693    fn r#flexible_two_way_fields(&self) -> Self::FlexibleTwoWayFieldsResponseFut;
694    type FlexibleTwoWayErrResponseFut: std::future::Future<
695            Output = Result<UnknownInteractionsProtocolFlexibleTwoWayErrResult, fidl::Error>,
696        > + Send;
697    fn r#flexible_two_way_err(&self) -> Self::FlexibleTwoWayErrResponseFut;
698    type FlexibleTwoWayFieldsErrResponseFut: std::future::Future<
699            Output = Result<UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResult, fidl::Error>,
700        > + Send;
701    fn r#flexible_two_way_fields_err(&self) -> Self::FlexibleTwoWayFieldsErrResponseFut;
702}
703#[derive(Debug)]
704#[cfg(target_os = "fuchsia")]
705pub struct UnknownInteractionsProtocolSynchronousProxy {
706    client: fidl::client::sync::Client,
707}
708
709#[cfg(target_os = "fuchsia")]
710impl fidl::endpoints::SynchronousProxy for UnknownInteractionsProtocolSynchronousProxy {
711    type Proxy = UnknownInteractionsProtocolProxy;
712    type Protocol = UnknownInteractionsProtocolMarker;
713
714    fn from_channel(inner: fidl::Channel) -> Self {
715        Self::new(inner)
716    }
717
718    fn into_channel(self) -> fidl::Channel {
719        self.client.into_channel()
720    }
721
722    fn as_channel(&self) -> &fidl::Channel {
723        self.client.as_channel()
724    }
725}
726
727#[cfg(target_os = "fuchsia")]
728impl UnknownInteractionsProtocolSynchronousProxy {
729    pub fn new(channel: fidl::Channel) -> Self {
730        let protocol_name =
731            <UnknownInteractionsProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
732        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
733    }
734
735    pub fn into_channel(self) -> fidl::Channel {
736        self.client.into_channel()
737    }
738
739    /// Waits until an event arrives and returns it. It is safe for other
740    /// threads to make concurrent requests while waiting for an event.
741    pub fn wait_for_event(
742        &self,
743        deadline: zx::MonotonicInstant,
744    ) -> Result<UnknownInteractionsProtocolEvent, fidl::Error> {
745        UnknownInteractionsProtocolEvent::decode(self.client.wait_for_event(deadline)?)
746    }
747
748    pub fn r#strict_one_way(&self) -> Result<(), fidl::Error> {
749        self.client.send::<fidl::encoding::EmptyPayload>(
750            (),
751            0x1fa581504cb382d5,
752            fidl::encoding::DynamicFlags::empty(),
753        )
754    }
755
756    pub fn r#flexible_one_way(&self) -> Result<(), fidl::Error> {
757        self.client.send::<fidl::encoding::EmptyPayload>(
758            (),
759            0x2793277ae2bb90fc,
760            fidl::encoding::DynamicFlags::FLEXIBLE,
761        )
762    }
763
764    pub fn r#strict_two_way(&self, ___deadline: zx::MonotonicInstant) -> Result<(), fidl::Error> {
765        let _response =
766            self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
767                (),
768                0x73ba6f957055b0dc,
769                fidl::encoding::DynamicFlags::empty(),
770                ___deadline,
771            )?;
772        Ok(_response)
773    }
774
775    pub fn r#strict_two_way_fields(
776        &self,
777        ___deadline: zx::MonotonicInstant,
778    ) -> Result<i32, fidl::Error> {
779        let _response = self.client.send_query::<
780            fidl::encoding::EmptyPayload,
781            UnknownInteractionsProtocolStrictTwoWayFieldsResponse,
782        >(
783            (),
784            0x21513db78c6597f7,
785            fidl::encoding::DynamicFlags::empty(),
786            ___deadline,
787        )?;
788        Ok(_response.some_field)
789    }
790
791    pub fn r#strict_two_way_err(
792        &self,
793        ___deadline: zx::MonotonicInstant,
794    ) -> Result<UnknownInteractionsProtocolStrictTwoWayErrResult, fidl::Error> {
795        let _response = self.client.send_query::<
796            fidl::encoding::EmptyPayload,
797            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
798        >(
799            (),
800            0x2e9beb4e08e058bb,
801            fidl::encoding::DynamicFlags::empty(),
802            ___deadline,
803        )?;
804        Ok(_response.map(|x| x))
805    }
806
807    pub fn r#strict_two_way_fields_err(
808        &self,
809        ___deadline: zx::MonotonicInstant,
810    ) -> Result<UnknownInteractionsProtocolStrictTwoWayFieldsErrResult, fidl::Error> {
811        let _response = self
812            .client
813            .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
814                UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse,
815                i32,
816            >>(
817                (), 0x6dd97948e8f69be4, fidl::encoding::DynamicFlags::empty(), ___deadline
818            )?;
819        Ok(_response.map(|x| x.some_field))
820    }
821
822    pub fn r#flexible_two_way(&self, ___deadline: zx::MonotonicInstant) -> Result<(), fidl::Error> {
823        let _response = self.client.send_query::<
824            fidl::encoding::EmptyPayload,
825            fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
826        >(
827            (),
828            0x1f33517a0395609d,
829            fidl::encoding::DynamicFlags::FLEXIBLE,
830            ___deadline,
831        )?
832        .into_result::<UnknownInteractionsProtocolMarker>("flexible_two_way")?;
833        Ok(_response)
834    }
835
836    pub fn r#flexible_two_way_fields(
837        &self,
838        ___deadline: zx::MonotonicInstant,
839    ) -> Result<i32, fidl::Error> {
840        let _response =
841            self.client
842                .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::FlexibleType<
843                    UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse,
844                >>(
845                    (), 0x58ed18873e28b84d, fidl::encoding::DynamicFlags::FLEXIBLE, ___deadline
846                )?
847                .into_result::<UnknownInteractionsProtocolMarker>("flexible_two_way_fields")?;
848        Ok(_response.some_field)
849    }
850
851    pub fn r#flexible_two_way_err(
852        &self,
853        ___deadline: zx::MonotonicInstant,
854    ) -> Result<UnknownInteractionsProtocolFlexibleTwoWayErrResult, fidl::Error> {
855        let _response = self.client.send_query::<
856            fidl::encoding::EmptyPayload,
857            fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
858        >(
859            (),
860            0x706905decb20bd62,
861            fidl::encoding::DynamicFlags::FLEXIBLE,
862            ___deadline,
863        )?
864        .into_result::<UnknownInteractionsProtocolMarker>("flexible_two_way_err")?;
865        Ok(_response.map(|x| x))
866    }
867
868    pub fn r#flexible_two_way_fields_err(
869        &self,
870        ___deadline: zx::MonotonicInstant,
871    ) -> Result<UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResult, fidl::Error> {
872        let _response = self
873            .client
874            .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::FlexibleResultType<
875                UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse,
876                i32,
877            >>(
878                (), 0x681fcbbead668390, fidl::encoding::DynamicFlags::FLEXIBLE, ___deadline
879            )?
880            .into_result::<UnknownInteractionsProtocolMarker>("flexible_two_way_fields_err")?;
881        Ok(_response.map(|x| x.some_field))
882    }
883}
884
885#[cfg(target_os = "fuchsia")]
886impl From<UnknownInteractionsProtocolSynchronousProxy> for zx::NullableHandle {
887    fn from(value: UnknownInteractionsProtocolSynchronousProxy) -> Self {
888        value.into_channel().into()
889    }
890}
891
892#[cfg(target_os = "fuchsia")]
893impl From<fidl::Channel> for UnknownInteractionsProtocolSynchronousProxy {
894    fn from(value: fidl::Channel) -> Self {
895        Self::new(value)
896    }
897}
898
899#[cfg(target_os = "fuchsia")]
900impl fidl::endpoints::FromClient for UnknownInteractionsProtocolSynchronousProxy {
901    type Protocol = UnknownInteractionsProtocolMarker;
902
903    fn from_client(value: fidl::endpoints::ClientEnd<UnknownInteractionsProtocolMarker>) -> Self {
904        Self::new(value.into_channel())
905    }
906}
907
908#[derive(Debug, Clone)]
909pub struct UnknownInteractionsProtocolProxy {
910    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
911}
912
913impl fidl::endpoints::Proxy for UnknownInteractionsProtocolProxy {
914    type Protocol = UnknownInteractionsProtocolMarker;
915
916    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
917        Self::new(inner)
918    }
919
920    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
921        self.client.into_channel().map_err(|client| Self { client })
922    }
923
924    fn as_channel(&self) -> &::fidl::AsyncChannel {
925        self.client.as_channel()
926    }
927}
928
929impl UnknownInteractionsProtocolProxy {
930    /// Create a new Proxy for test.unknown.interactions/UnknownInteractionsProtocol.
931    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
932        let protocol_name =
933            <UnknownInteractionsProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
934        Self { client: fidl::client::Client::new(channel, protocol_name) }
935    }
936
937    /// Get a Stream of events from the remote end of the protocol.
938    ///
939    /// # Panics
940    ///
941    /// Panics if the event stream was already taken.
942    pub fn take_event_stream(&self) -> UnknownInteractionsProtocolEventStream {
943        UnknownInteractionsProtocolEventStream { event_receiver: self.client.take_event_receiver() }
944    }
945
946    pub fn r#strict_one_way(&self) -> Result<(), fidl::Error> {
947        UnknownInteractionsProtocolProxyInterface::r#strict_one_way(self)
948    }
949
950    pub fn r#flexible_one_way(&self) -> Result<(), fidl::Error> {
951        UnknownInteractionsProtocolProxyInterface::r#flexible_one_way(self)
952    }
953
954    pub fn r#strict_two_way(
955        &self,
956    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
957        UnknownInteractionsProtocolProxyInterface::r#strict_two_way(self)
958    }
959
960    pub fn r#strict_two_way_fields(
961        &self,
962    ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
963        UnknownInteractionsProtocolProxyInterface::r#strict_two_way_fields(self)
964    }
965
966    pub fn r#strict_two_way_err(
967        &self,
968    ) -> fidl::client::QueryResponseFut<
969        UnknownInteractionsProtocolStrictTwoWayErrResult,
970        fidl::encoding::DefaultFuchsiaResourceDialect,
971    > {
972        UnknownInteractionsProtocolProxyInterface::r#strict_two_way_err(self)
973    }
974
975    pub fn r#strict_two_way_fields_err(
976        &self,
977    ) -> fidl::client::QueryResponseFut<
978        UnknownInteractionsProtocolStrictTwoWayFieldsErrResult,
979        fidl::encoding::DefaultFuchsiaResourceDialect,
980    > {
981        UnknownInteractionsProtocolProxyInterface::r#strict_two_way_fields_err(self)
982    }
983
984    pub fn r#flexible_two_way(
985        &self,
986    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
987        UnknownInteractionsProtocolProxyInterface::r#flexible_two_way(self)
988    }
989
990    pub fn r#flexible_two_way_fields(
991        &self,
992    ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
993        UnknownInteractionsProtocolProxyInterface::r#flexible_two_way_fields(self)
994    }
995
996    pub fn r#flexible_two_way_err(
997        &self,
998    ) -> fidl::client::QueryResponseFut<
999        UnknownInteractionsProtocolFlexibleTwoWayErrResult,
1000        fidl::encoding::DefaultFuchsiaResourceDialect,
1001    > {
1002        UnknownInteractionsProtocolProxyInterface::r#flexible_two_way_err(self)
1003    }
1004
1005    pub fn r#flexible_two_way_fields_err(
1006        &self,
1007    ) -> fidl::client::QueryResponseFut<
1008        UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResult,
1009        fidl::encoding::DefaultFuchsiaResourceDialect,
1010    > {
1011        UnknownInteractionsProtocolProxyInterface::r#flexible_two_way_fields_err(self)
1012    }
1013}
1014
1015impl UnknownInteractionsProtocolProxyInterface for UnknownInteractionsProtocolProxy {
1016    fn r#strict_one_way(&self) -> Result<(), fidl::Error> {
1017        self.client.send::<fidl::encoding::EmptyPayload>(
1018            (),
1019            0x1fa581504cb382d5,
1020            fidl::encoding::DynamicFlags::empty(),
1021        )
1022    }
1023
1024    fn r#flexible_one_way(&self) -> Result<(), fidl::Error> {
1025        self.client.send::<fidl::encoding::EmptyPayload>(
1026            (),
1027            0x2793277ae2bb90fc,
1028            fidl::encoding::DynamicFlags::FLEXIBLE,
1029        )
1030    }
1031
1032    type StrictTwoWayResponseFut =
1033        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
1034    fn r#strict_two_way(&self) -> Self::StrictTwoWayResponseFut {
1035        fn _decode(
1036            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1037        ) -> Result<(), fidl::Error> {
1038            let _response = fidl::client::decode_transaction_body::<
1039                fidl::encoding::EmptyPayload,
1040                fidl::encoding::DefaultFuchsiaResourceDialect,
1041                0x73ba6f957055b0dc,
1042            >(_buf?)?;
1043            Ok(_response)
1044        }
1045        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
1046            (),
1047            0x73ba6f957055b0dc,
1048            fidl::encoding::DynamicFlags::empty(),
1049            _decode,
1050        )
1051    }
1052
1053    type StrictTwoWayFieldsResponseFut =
1054        fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
1055    fn r#strict_two_way_fields(&self) -> Self::StrictTwoWayFieldsResponseFut {
1056        fn _decode(
1057            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1058        ) -> Result<i32, fidl::Error> {
1059            let _response = fidl::client::decode_transaction_body::<
1060                UnknownInteractionsProtocolStrictTwoWayFieldsResponse,
1061                fidl::encoding::DefaultFuchsiaResourceDialect,
1062                0x21513db78c6597f7,
1063            >(_buf?)?;
1064            Ok(_response.some_field)
1065        }
1066        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
1067            (),
1068            0x21513db78c6597f7,
1069            fidl::encoding::DynamicFlags::empty(),
1070            _decode,
1071        )
1072    }
1073
1074    type StrictTwoWayErrResponseFut = fidl::client::QueryResponseFut<
1075        UnknownInteractionsProtocolStrictTwoWayErrResult,
1076        fidl::encoding::DefaultFuchsiaResourceDialect,
1077    >;
1078    fn r#strict_two_way_err(&self) -> Self::StrictTwoWayErrResponseFut {
1079        fn _decode(
1080            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1081        ) -> Result<UnknownInteractionsProtocolStrictTwoWayErrResult, fidl::Error> {
1082            let _response = fidl::client::decode_transaction_body::<
1083                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1084                fidl::encoding::DefaultFuchsiaResourceDialect,
1085                0x2e9beb4e08e058bb,
1086            >(_buf?)?;
1087            Ok(_response.map(|x| x))
1088        }
1089        self.client.send_query_and_decode::<
1090            fidl::encoding::EmptyPayload,
1091            UnknownInteractionsProtocolStrictTwoWayErrResult,
1092        >(
1093            (),
1094            0x2e9beb4e08e058bb,
1095            fidl::encoding::DynamicFlags::empty(),
1096            _decode,
1097        )
1098    }
1099
1100    type StrictTwoWayFieldsErrResponseFut = fidl::client::QueryResponseFut<
1101        UnknownInteractionsProtocolStrictTwoWayFieldsErrResult,
1102        fidl::encoding::DefaultFuchsiaResourceDialect,
1103    >;
1104    fn r#strict_two_way_fields_err(&self) -> Self::StrictTwoWayFieldsErrResponseFut {
1105        fn _decode(
1106            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1107        ) -> Result<UnknownInteractionsProtocolStrictTwoWayFieldsErrResult, fidl::Error> {
1108            let _response = fidl::client::decode_transaction_body::<
1109                fidl::encoding::ResultType<
1110                    UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse,
1111                    i32,
1112                >,
1113                fidl::encoding::DefaultFuchsiaResourceDialect,
1114                0x6dd97948e8f69be4,
1115            >(_buf?)?;
1116            Ok(_response.map(|x| x.some_field))
1117        }
1118        self.client.send_query_and_decode::<
1119            fidl::encoding::EmptyPayload,
1120            UnknownInteractionsProtocolStrictTwoWayFieldsErrResult,
1121        >(
1122            (),
1123            0x6dd97948e8f69be4,
1124            fidl::encoding::DynamicFlags::empty(),
1125            _decode,
1126        )
1127    }
1128
1129    type FlexibleTwoWayResponseFut =
1130        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
1131    fn r#flexible_two_way(&self) -> Self::FlexibleTwoWayResponseFut {
1132        fn _decode(
1133            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1134        ) -> Result<(), fidl::Error> {
1135            let _response = fidl::client::decode_transaction_body::<
1136                fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
1137                fidl::encoding::DefaultFuchsiaResourceDialect,
1138                0x1f33517a0395609d,
1139            >(_buf?)?
1140            .into_result::<UnknownInteractionsProtocolMarker>("flexible_two_way")?;
1141            Ok(_response)
1142        }
1143        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
1144            (),
1145            0x1f33517a0395609d,
1146            fidl::encoding::DynamicFlags::FLEXIBLE,
1147            _decode,
1148        )
1149    }
1150
1151    type FlexibleTwoWayFieldsResponseFut =
1152        fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
1153    fn r#flexible_two_way_fields(&self) -> Self::FlexibleTwoWayFieldsResponseFut {
1154        fn _decode(
1155            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1156        ) -> Result<i32, fidl::Error> {
1157            let _response = fidl::client::decode_transaction_body::<
1158                fidl::encoding::FlexibleType<
1159                    UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse,
1160                >,
1161                fidl::encoding::DefaultFuchsiaResourceDialect,
1162                0x58ed18873e28b84d,
1163            >(_buf?)?
1164            .into_result::<UnknownInteractionsProtocolMarker>("flexible_two_way_fields")?;
1165            Ok(_response.some_field)
1166        }
1167        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
1168            (),
1169            0x58ed18873e28b84d,
1170            fidl::encoding::DynamicFlags::FLEXIBLE,
1171            _decode,
1172        )
1173    }
1174
1175    type FlexibleTwoWayErrResponseFut = fidl::client::QueryResponseFut<
1176        UnknownInteractionsProtocolFlexibleTwoWayErrResult,
1177        fidl::encoding::DefaultFuchsiaResourceDialect,
1178    >;
1179    fn r#flexible_two_way_err(&self) -> Self::FlexibleTwoWayErrResponseFut {
1180        fn _decode(
1181            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1182        ) -> Result<UnknownInteractionsProtocolFlexibleTwoWayErrResult, fidl::Error> {
1183            let _response = fidl::client::decode_transaction_body::<
1184                fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
1185                fidl::encoding::DefaultFuchsiaResourceDialect,
1186                0x706905decb20bd62,
1187            >(_buf?)?
1188            .into_result::<UnknownInteractionsProtocolMarker>("flexible_two_way_err")?;
1189            Ok(_response.map(|x| x))
1190        }
1191        self.client.send_query_and_decode::<
1192            fidl::encoding::EmptyPayload,
1193            UnknownInteractionsProtocolFlexibleTwoWayErrResult,
1194        >(
1195            (),
1196            0x706905decb20bd62,
1197            fidl::encoding::DynamicFlags::FLEXIBLE,
1198            _decode,
1199        )
1200    }
1201
1202    type FlexibleTwoWayFieldsErrResponseFut = fidl::client::QueryResponseFut<
1203        UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResult,
1204        fidl::encoding::DefaultFuchsiaResourceDialect,
1205    >;
1206    fn r#flexible_two_way_fields_err(&self) -> Self::FlexibleTwoWayFieldsErrResponseFut {
1207        fn _decode(
1208            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1209        ) -> Result<UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResult, fidl::Error> {
1210            let _response = fidl::client::decode_transaction_body::<
1211                fidl::encoding::FlexibleResultType<
1212                    UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse,
1213                    i32,
1214                >,
1215                fidl::encoding::DefaultFuchsiaResourceDialect,
1216                0x681fcbbead668390,
1217            >(_buf?)?
1218            .into_result::<UnknownInteractionsProtocolMarker>("flexible_two_way_fields_err")?;
1219            Ok(_response.map(|x| x.some_field))
1220        }
1221        self.client.send_query_and_decode::<
1222            fidl::encoding::EmptyPayload,
1223            UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResult,
1224        >(
1225            (),
1226            0x681fcbbead668390,
1227            fidl::encoding::DynamicFlags::FLEXIBLE,
1228            _decode,
1229        )
1230    }
1231}
1232
1233pub struct UnknownInteractionsProtocolEventStream {
1234    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1235}
1236
1237impl std::marker::Unpin for UnknownInteractionsProtocolEventStream {}
1238
1239impl futures::stream::FusedStream for UnknownInteractionsProtocolEventStream {
1240    fn is_terminated(&self) -> bool {
1241        self.event_receiver.is_terminated()
1242    }
1243}
1244
1245impl futures::Stream for UnknownInteractionsProtocolEventStream {
1246    type Item = Result<UnknownInteractionsProtocolEvent, fidl::Error>;
1247
1248    fn poll_next(
1249        mut self: std::pin::Pin<&mut Self>,
1250        cx: &mut std::task::Context<'_>,
1251    ) -> std::task::Poll<Option<Self::Item>> {
1252        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1253            &mut self.event_receiver,
1254            cx
1255        )?) {
1256            Some(buf) => {
1257                std::task::Poll::Ready(Some(UnknownInteractionsProtocolEvent::decode(buf)))
1258            }
1259            None => std::task::Poll::Ready(None),
1260        }
1261    }
1262}
1263
1264#[derive(Debug)]
1265pub enum UnknownInteractionsProtocolEvent {
1266    StrictEvent {},
1267    StrictEventFields {
1268        some_field: i32,
1269    },
1270    FlexibleEvent {},
1271    FlexibleEventFields {
1272        some_field: i32,
1273    },
1274    #[non_exhaustive]
1275    _UnknownEvent {
1276        /// Ordinal of the event that was sent.
1277        ordinal: u64,
1278    },
1279}
1280
1281impl UnknownInteractionsProtocolEvent {
1282    #[allow(irrefutable_let_patterns)]
1283    pub fn into_strict_event(self) -> Option<()> {
1284        if let UnknownInteractionsProtocolEvent::StrictEvent {} = self { Some(()) } else { None }
1285    }
1286    #[allow(irrefutable_let_patterns)]
1287    pub fn into_strict_event_fields(self) -> Option<i32> {
1288        if let UnknownInteractionsProtocolEvent::StrictEventFields { some_field } = self {
1289            Some((some_field))
1290        } else {
1291            None
1292        }
1293    }
1294    #[allow(irrefutable_let_patterns)]
1295    pub fn into_flexible_event(self) -> Option<()> {
1296        if let UnknownInteractionsProtocolEvent::FlexibleEvent {} = self { Some(()) } else { None }
1297    }
1298    #[allow(irrefutable_let_patterns)]
1299    pub fn into_flexible_event_fields(self) -> Option<i32> {
1300        if let UnknownInteractionsProtocolEvent::FlexibleEventFields { some_field } = self {
1301            Some((some_field))
1302        } else {
1303            None
1304        }
1305    }
1306
1307    /// Decodes a message buffer as a [`UnknownInteractionsProtocolEvent`].
1308    fn decode(
1309        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1310    ) -> Result<UnknownInteractionsProtocolEvent, fidl::Error> {
1311        let (bytes, _handles) = buf.split_mut();
1312        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1313        debug_assert_eq!(tx_header.tx_id, 0);
1314        match tx_header.ordinal {
1315            0x584b419891a32738 => {
1316                let mut out = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
1317                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
1318                Ok((
1319                    UnknownInteractionsProtocolEvent::StrictEvent {
1320                    }
1321                ))
1322            }
1323            0x4c622afb12e4a13b => {
1324                let mut out = fidl::new_empty!(UnknownInteractionsProtocolStrictEventFieldsRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
1325                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<UnknownInteractionsProtocolStrictEventFieldsRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1326                Ok((
1327                    UnknownInteractionsProtocolEvent::StrictEventFields {some_field: out.some_field,
1328
1329                    }
1330                ))
1331            }
1332            0x317a1a8e0b802c6c => {
1333                let mut out = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
1334                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
1335                Ok((
1336                    UnknownInteractionsProtocolEvent::FlexibleEvent {
1337                    }
1338                ))
1339            }
1340            0x40620b164591af9e => {
1341                let mut out = fidl::new_empty!(UnknownInteractionsProtocolFlexibleEventFieldsRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
1342                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<UnknownInteractionsProtocolFlexibleEventFieldsRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1343                Ok((
1344                    UnknownInteractionsProtocolEvent::FlexibleEventFields {some_field: out.some_field,
1345
1346                    }
1347                ))
1348            }
1349            _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
1350                Ok(UnknownInteractionsProtocolEvent::_UnknownEvent {
1351                    ordinal: tx_header.ordinal,
1352                })
1353            }
1354            _ => Err(fidl::Error::UnknownOrdinal {
1355                ordinal: tx_header.ordinal,
1356                protocol_name: <UnknownInteractionsProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1357            })
1358        }
1359    }
1360}
1361
1362/// A Stream of incoming requests for test.unknown.interactions/UnknownInteractionsProtocol.
1363pub struct UnknownInteractionsProtocolRequestStream {
1364    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1365    is_terminated: bool,
1366}
1367
1368impl std::marker::Unpin for UnknownInteractionsProtocolRequestStream {}
1369
1370impl futures::stream::FusedStream for UnknownInteractionsProtocolRequestStream {
1371    fn is_terminated(&self) -> bool {
1372        self.is_terminated
1373    }
1374}
1375
1376impl fidl::endpoints::RequestStream for UnknownInteractionsProtocolRequestStream {
1377    type Protocol = UnknownInteractionsProtocolMarker;
1378    type ControlHandle = UnknownInteractionsProtocolControlHandle;
1379
1380    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1381        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1382    }
1383
1384    fn control_handle(&self) -> Self::ControlHandle {
1385        UnknownInteractionsProtocolControlHandle { inner: self.inner.clone() }
1386    }
1387
1388    fn into_inner(
1389        self,
1390    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1391    {
1392        (self.inner, self.is_terminated)
1393    }
1394
1395    fn from_inner(
1396        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1397        is_terminated: bool,
1398    ) -> Self {
1399        Self { inner, is_terminated }
1400    }
1401}
1402
1403impl futures::Stream for UnknownInteractionsProtocolRequestStream {
1404    type Item = Result<UnknownInteractionsProtocolRequest, fidl::Error>;
1405
1406    fn poll_next(
1407        mut self: std::pin::Pin<&mut Self>,
1408        cx: &mut std::task::Context<'_>,
1409    ) -> std::task::Poll<Option<Self::Item>> {
1410        let this = &mut *self;
1411        if this.inner.check_shutdown(cx) {
1412            this.is_terminated = true;
1413            return std::task::Poll::Ready(None);
1414        }
1415        if this.is_terminated {
1416            panic!("polled UnknownInteractionsProtocolRequestStream after completion");
1417        }
1418        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1419            |bytes, handles| {
1420                match this.inner.channel().read_etc(cx, bytes, handles) {
1421                    std::task::Poll::Ready(Ok(())) => {}
1422                    std::task::Poll::Pending => return std::task::Poll::Pending,
1423                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1424                        this.is_terminated = true;
1425                        return std::task::Poll::Ready(None);
1426                    }
1427                    std::task::Poll::Ready(Err(e)) => {
1428                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1429                            e.into(),
1430                        ))));
1431                    }
1432                }
1433
1434                // A message has been received from the channel
1435                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1436
1437                std::task::Poll::Ready(Some(match header.ordinal {
1438                0x1fa581504cb382d5 => {
1439                    header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1440                    let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
1441                    fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1442                    let control_handle = UnknownInteractionsProtocolControlHandle {
1443                        inner: this.inner.clone(),
1444                    };
1445                    Ok(UnknownInteractionsProtocolRequest::StrictOneWay {
1446                        control_handle,
1447                    })
1448                }
1449                0x2793277ae2bb90fc => {
1450                    header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1451                    let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
1452                    fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1453                    let control_handle = UnknownInteractionsProtocolControlHandle {
1454                        inner: this.inner.clone(),
1455                    };
1456                    Ok(UnknownInteractionsProtocolRequest::FlexibleOneWay {
1457                        control_handle,
1458                    })
1459                }
1460                0x73ba6f957055b0dc => {
1461                    header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1462                    let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
1463                    fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1464                    let control_handle = UnknownInteractionsProtocolControlHandle {
1465                        inner: this.inner.clone(),
1466                    };
1467                    Ok(UnknownInteractionsProtocolRequest::StrictTwoWay {
1468                        responder: UnknownInteractionsProtocolStrictTwoWayResponder {
1469                            control_handle: std::mem::ManuallyDrop::new(control_handle),
1470                            tx_id: header.tx_id,
1471                        },
1472                    })
1473                }
1474                0x21513db78c6597f7 => {
1475                    header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1476                    let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
1477                    fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1478                    let control_handle = UnknownInteractionsProtocolControlHandle {
1479                        inner: this.inner.clone(),
1480                    };
1481                    Ok(UnknownInteractionsProtocolRequest::StrictTwoWayFields {
1482                        responder: UnknownInteractionsProtocolStrictTwoWayFieldsResponder {
1483                            control_handle: std::mem::ManuallyDrop::new(control_handle),
1484                            tx_id: header.tx_id,
1485                        },
1486                    })
1487                }
1488                0x2e9beb4e08e058bb => {
1489                    header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1490                    let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
1491                    fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1492                    let control_handle = UnknownInteractionsProtocolControlHandle {
1493                        inner: this.inner.clone(),
1494                    };
1495                    Ok(UnknownInteractionsProtocolRequest::StrictTwoWayErr {
1496                        responder: UnknownInteractionsProtocolStrictTwoWayErrResponder {
1497                            control_handle: std::mem::ManuallyDrop::new(control_handle),
1498                            tx_id: header.tx_id,
1499                        },
1500                    })
1501                }
1502                0x6dd97948e8f69be4 => {
1503                    header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1504                    let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
1505                    fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1506                    let control_handle = UnknownInteractionsProtocolControlHandle {
1507                        inner: this.inner.clone(),
1508                    };
1509                    Ok(UnknownInteractionsProtocolRequest::StrictTwoWayFieldsErr {
1510                        responder: UnknownInteractionsProtocolStrictTwoWayFieldsErrResponder {
1511                            control_handle: std::mem::ManuallyDrop::new(control_handle),
1512                            tx_id: header.tx_id,
1513                        },
1514                    })
1515                }
1516                0x1f33517a0395609d => {
1517                    header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1518                    let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
1519                    fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1520                    let control_handle = UnknownInteractionsProtocolControlHandle {
1521                        inner: this.inner.clone(),
1522                    };
1523                    Ok(UnknownInteractionsProtocolRequest::FlexibleTwoWay {
1524                        responder: UnknownInteractionsProtocolFlexibleTwoWayResponder {
1525                            control_handle: std::mem::ManuallyDrop::new(control_handle),
1526                            tx_id: header.tx_id,
1527                        },
1528                    })
1529                }
1530                0x58ed18873e28b84d => {
1531                    header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1532                    let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
1533                    fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1534                    let control_handle = UnknownInteractionsProtocolControlHandle {
1535                        inner: this.inner.clone(),
1536                    };
1537                    Ok(UnknownInteractionsProtocolRequest::FlexibleTwoWayFields {
1538                        responder: UnknownInteractionsProtocolFlexibleTwoWayFieldsResponder {
1539                            control_handle: std::mem::ManuallyDrop::new(control_handle),
1540                            tx_id: header.tx_id,
1541                        },
1542                    })
1543                }
1544                0x706905decb20bd62 => {
1545                    header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1546                    let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
1547                    fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1548                    let control_handle = UnknownInteractionsProtocolControlHandle {
1549                        inner: this.inner.clone(),
1550                    };
1551                    Ok(UnknownInteractionsProtocolRequest::FlexibleTwoWayErr {
1552                        responder: UnknownInteractionsProtocolFlexibleTwoWayErrResponder {
1553                            control_handle: std::mem::ManuallyDrop::new(control_handle),
1554                            tx_id: header.tx_id,
1555                        },
1556                    })
1557                }
1558                0x681fcbbead668390 => {
1559                    header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1560                    let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
1561                    fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1562                    let control_handle = UnknownInteractionsProtocolControlHandle {
1563                        inner: this.inner.clone(),
1564                    };
1565                    Ok(UnknownInteractionsProtocolRequest::FlexibleTwoWayFieldsErr {
1566                        responder: UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponder {
1567                            control_handle: std::mem::ManuallyDrop::new(control_handle),
1568                            tx_id: header.tx_id,
1569                        },
1570                    })
1571                }
1572                _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
1573                    Ok(UnknownInteractionsProtocolRequest::_UnknownMethod {
1574                        ordinal: header.ordinal,
1575                        control_handle: UnknownInteractionsProtocolControlHandle { inner: this.inner.clone() },
1576                        method_type: fidl::MethodType::OneWay,
1577                    })
1578                }
1579                _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
1580                    this.inner.send_framework_err(
1581                        fidl::encoding::FrameworkErr::UnknownMethod,
1582                        header.tx_id,
1583                        header.ordinal,
1584                        header.dynamic_flags(),
1585                        (bytes, handles),
1586                    )?;
1587                    Ok(UnknownInteractionsProtocolRequest::_UnknownMethod {
1588                        ordinal: header.ordinal,
1589                        control_handle: UnknownInteractionsProtocolControlHandle { inner: this.inner.clone() },
1590                        method_type: fidl::MethodType::TwoWay,
1591                    })
1592                }
1593                _ => Err(fidl::Error::UnknownOrdinal {
1594                    ordinal: header.ordinal,
1595                    protocol_name: <UnknownInteractionsProtocolMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1596                }),
1597            }))
1598            },
1599        )
1600    }
1601}
1602
1603#[derive(Debug)]
1604pub enum UnknownInteractionsProtocolRequest {
1605    StrictOneWay {
1606        control_handle: UnknownInteractionsProtocolControlHandle,
1607    },
1608    FlexibleOneWay {
1609        control_handle: UnknownInteractionsProtocolControlHandle,
1610    },
1611    StrictTwoWay {
1612        responder: UnknownInteractionsProtocolStrictTwoWayResponder,
1613    },
1614    StrictTwoWayFields {
1615        responder: UnknownInteractionsProtocolStrictTwoWayFieldsResponder,
1616    },
1617    StrictTwoWayErr {
1618        responder: UnknownInteractionsProtocolStrictTwoWayErrResponder,
1619    },
1620    StrictTwoWayFieldsErr {
1621        responder: UnknownInteractionsProtocolStrictTwoWayFieldsErrResponder,
1622    },
1623    FlexibleTwoWay {
1624        responder: UnknownInteractionsProtocolFlexibleTwoWayResponder,
1625    },
1626    FlexibleTwoWayFields {
1627        responder: UnknownInteractionsProtocolFlexibleTwoWayFieldsResponder,
1628    },
1629    FlexibleTwoWayErr {
1630        responder: UnknownInteractionsProtocolFlexibleTwoWayErrResponder,
1631    },
1632    FlexibleTwoWayFieldsErr {
1633        responder: UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponder,
1634    },
1635    /// An interaction was received which does not match any known method.
1636    #[non_exhaustive]
1637    _UnknownMethod {
1638        /// Ordinal of the method that was called.
1639        ordinal: u64,
1640        control_handle: UnknownInteractionsProtocolControlHandle,
1641        method_type: fidl::MethodType,
1642    },
1643}
1644
1645impl UnknownInteractionsProtocolRequest {
1646    #[allow(irrefutable_let_patterns)]
1647    pub fn into_strict_one_way(self) -> Option<(UnknownInteractionsProtocolControlHandle)> {
1648        if let UnknownInteractionsProtocolRequest::StrictOneWay { control_handle } = self {
1649            Some((control_handle))
1650        } else {
1651            None
1652        }
1653    }
1654
1655    #[allow(irrefutable_let_patterns)]
1656    pub fn into_flexible_one_way(self) -> Option<(UnknownInteractionsProtocolControlHandle)> {
1657        if let UnknownInteractionsProtocolRequest::FlexibleOneWay { control_handle } = self {
1658            Some((control_handle))
1659        } else {
1660            None
1661        }
1662    }
1663
1664    #[allow(irrefutable_let_patterns)]
1665    pub fn into_strict_two_way(self) -> Option<(UnknownInteractionsProtocolStrictTwoWayResponder)> {
1666        if let UnknownInteractionsProtocolRequest::StrictTwoWay { responder } = self {
1667            Some((responder))
1668        } else {
1669            None
1670        }
1671    }
1672
1673    #[allow(irrefutable_let_patterns)]
1674    pub fn into_strict_two_way_fields(
1675        self,
1676    ) -> Option<(UnknownInteractionsProtocolStrictTwoWayFieldsResponder)> {
1677        if let UnknownInteractionsProtocolRequest::StrictTwoWayFields { responder } = self {
1678            Some((responder))
1679        } else {
1680            None
1681        }
1682    }
1683
1684    #[allow(irrefutable_let_patterns)]
1685    pub fn into_strict_two_way_err(
1686        self,
1687    ) -> Option<(UnknownInteractionsProtocolStrictTwoWayErrResponder)> {
1688        if let UnknownInteractionsProtocolRequest::StrictTwoWayErr { responder } = self {
1689            Some((responder))
1690        } else {
1691            None
1692        }
1693    }
1694
1695    #[allow(irrefutable_let_patterns)]
1696    pub fn into_strict_two_way_fields_err(
1697        self,
1698    ) -> Option<(UnknownInteractionsProtocolStrictTwoWayFieldsErrResponder)> {
1699        if let UnknownInteractionsProtocolRequest::StrictTwoWayFieldsErr { responder } = self {
1700            Some((responder))
1701        } else {
1702            None
1703        }
1704    }
1705
1706    #[allow(irrefutable_let_patterns)]
1707    pub fn into_flexible_two_way(
1708        self,
1709    ) -> Option<(UnknownInteractionsProtocolFlexibleTwoWayResponder)> {
1710        if let UnknownInteractionsProtocolRequest::FlexibleTwoWay { responder } = self {
1711            Some((responder))
1712        } else {
1713            None
1714        }
1715    }
1716
1717    #[allow(irrefutable_let_patterns)]
1718    pub fn into_flexible_two_way_fields(
1719        self,
1720    ) -> Option<(UnknownInteractionsProtocolFlexibleTwoWayFieldsResponder)> {
1721        if let UnknownInteractionsProtocolRequest::FlexibleTwoWayFields { responder } = self {
1722            Some((responder))
1723        } else {
1724            None
1725        }
1726    }
1727
1728    #[allow(irrefutable_let_patterns)]
1729    pub fn into_flexible_two_way_err(
1730        self,
1731    ) -> Option<(UnknownInteractionsProtocolFlexibleTwoWayErrResponder)> {
1732        if let UnknownInteractionsProtocolRequest::FlexibleTwoWayErr { responder } = self {
1733            Some((responder))
1734        } else {
1735            None
1736        }
1737    }
1738
1739    #[allow(irrefutable_let_patterns)]
1740    pub fn into_flexible_two_way_fields_err(
1741        self,
1742    ) -> Option<(UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponder)> {
1743        if let UnknownInteractionsProtocolRequest::FlexibleTwoWayFieldsErr { responder } = self {
1744            Some((responder))
1745        } else {
1746            None
1747        }
1748    }
1749
1750    /// Name of the method defined in FIDL
1751    pub fn method_name(&self) -> &'static str {
1752        match *self {
1753            UnknownInteractionsProtocolRequest::StrictOneWay { .. } => "strict_one_way",
1754            UnknownInteractionsProtocolRequest::FlexibleOneWay { .. } => "flexible_one_way",
1755            UnknownInteractionsProtocolRequest::StrictTwoWay { .. } => "strict_two_way",
1756            UnknownInteractionsProtocolRequest::StrictTwoWayFields { .. } => {
1757                "strict_two_way_fields"
1758            }
1759            UnknownInteractionsProtocolRequest::StrictTwoWayErr { .. } => "strict_two_way_err",
1760            UnknownInteractionsProtocolRequest::StrictTwoWayFieldsErr { .. } => {
1761                "strict_two_way_fields_err"
1762            }
1763            UnknownInteractionsProtocolRequest::FlexibleTwoWay { .. } => "flexible_two_way",
1764            UnknownInteractionsProtocolRequest::FlexibleTwoWayFields { .. } => {
1765                "flexible_two_way_fields"
1766            }
1767            UnknownInteractionsProtocolRequest::FlexibleTwoWayErr { .. } => "flexible_two_way_err",
1768            UnknownInteractionsProtocolRequest::FlexibleTwoWayFieldsErr { .. } => {
1769                "flexible_two_way_fields_err"
1770            }
1771            UnknownInteractionsProtocolRequest::_UnknownMethod {
1772                method_type: fidl::MethodType::OneWay,
1773                ..
1774            } => "unknown one-way method",
1775            UnknownInteractionsProtocolRequest::_UnknownMethod {
1776                method_type: fidl::MethodType::TwoWay,
1777                ..
1778            } => "unknown two-way method",
1779        }
1780    }
1781}
1782
1783#[derive(Debug, Clone)]
1784pub struct UnknownInteractionsProtocolControlHandle {
1785    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1786}
1787
1788impl fidl::endpoints::ControlHandle for UnknownInteractionsProtocolControlHandle {
1789    fn shutdown(&self) {
1790        self.inner.shutdown()
1791    }
1792
1793    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1794        self.inner.shutdown_with_epitaph(status)
1795    }
1796
1797    fn is_closed(&self) -> bool {
1798        self.inner.channel().is_closed()
1799    }
1800    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1801        self.inner.channel().on_closed()
1802    }
1803
1804    #[cfg(target_os = "fuchsia")]
1805    fn signal_peer(
1806        &self,
1807        clear_mask: zx::Signals,
1808        set_mask: zx::Signals,
1809    ) -> Result<(), zx_status::Status> {
1810        use fidl::Peered;
1811        self.inner.channel().signal_peer(clear_mask, set_mask)
1812    }
1813}
1814
1815impl UnknownInteractionsProtocolControlHandle {
1816    pub fn send_strict_event(&self) -> Result<(), fidl::Error> {
1817        self.inner.send::<fidl::encoding::EmptyPayload>(
1818            (),
1819            0,
1820            0x584b419891a32738,
1821            fidl::encoding::DynamicFlags::empty(),
1822        )
1823    }
1824
1825    pub fn send_strict_event_fields(&self, mut some_field: i32) -> Result<(), fidl::Error> {
1826        self.inner.send::<UnknownInteractionsProtocolStrictEventFieldsRequest>(
1827            (some_field,),
1828            0,
1829            0x4c622afb12e4a13b,
1830            fidl::encoding::DynamicFlags::empty(),
1831        )
1832    }
1833
1834    pub fn send_flexible_event(&self) -> Result<(), fidl::Error> {
1835        self.inner.send::<fidl::encoding::EmptyPayload>(
1836            (),
1837            0,
1838            0x317a1a8e0b802c6c,
1839            fidl::encoding::DynamicFlags::FLEXIBLE,
1840        )
1841    }
1842
1843    pub fn send_flexible_event_fields(&self, mut some_field: i32) -> Result<(), fidl::Error> {
1844        self.inner.send::<UnknownInteractionsProtocolFlexibleEventFieldsRequest>(
1845            (some_field,),
1846            0,
1847            0x40620b164591af9e,
1848            fidl::encoding::DynamicFlags::FLEXIBLE,
1849        )
1850    }
1851}
1852
1853#[must_use = "FIDL methods require a response to be sent"]
1854#[derive(Debug)]
1855pub struct UnknownInteractionsProtocolStrictTwoWayResponder {
1856    control_handle: std::mem::ManuallyDrop<UnknownInteractionsProtocolControlHandle>,
1857    tx_id: u32,
1858}
1859
1860/// Set the the channel to be shutdown (see [`UnknownInteractionsProtocolControlHandle::shutdown`])
1861/// if the responder is dropped without sending a response, so that the client
1862/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
1863impl std::ops::Drop for UnknownInteractionsProtocolStrictTwoWayResponder {
1864    fn drop(&mut self) {
1865        self.control_handle.shutdown();
1866        // Safety: drops once, never accessed again
1867        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1868    }
1869}
1870
1871impl fidl::endpoints::Responder for UnknownInteractionsProtocolStrictTwoWayResponder {
1872    type ControlHandle = UnknownInteractionsProtocolControlHandle;
1873
1874    fn control_handle(&self) -> &UnknownInteractionsProtocolControlHandle {
1875        &self.control_handle
1876    }
1877
1878    fn drop_without_shutdown(mut self) {
1879        // Safety: drops once, never accessed again due to mem::forget
1880        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1881        // Prevent Drop from running (which would shut down the channel)
1882        std::mem::forget(self);
1883    }
1884}
1885
1886impl UnknownInteractionsProtocolStrictTwoWayResponder {
1887    /// Sends a response to the FIDL transaction.
1888    ///
1889    /// Sets the channel to shutdown if an error occurs.
1890    pub fn send(self) -> Result<(), fidl::Error> {
1891        let _result = self.send_raw();
1892        if _result.is_err() {
1893            self.control_handle.shutdown();
1894        }
1895        self.drop_without_shutdown();
1896        _result
1897    }
1898
1899    /// Similar to "send" but does not shutdown the channel if an error occurs.
1900    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
1901        let _result = self.send_raw();
1902        self.drop_without_shutdown();
1903        _result
1904    }
1905
1906    fn send_raw(&self) -> Result<(), fidl::Error> {
1907        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
1908            (),
1909            self.tx_id,
1910            0x73ba6f957055b0dc,
1911            fidl::encoding::DynamicFlags::empty(),
1912        )
1913    }
1914}
1915
1916#[must_use = "FIDL methods require a response to be sent"]
1917#[derive(Debug)]
1918pub struct UnknownInteractionsProtocolStrictTwoWayFieldsResponder {
1919    control_handle: std::mem::ManuallyDrop<UnknownInteractionsProtocolControlHandle>,
1920    tx_id: u32,
1921}
1922
1923/// Set the the channel to be shutdown (see [`UnknownInteractionsProtocolControlHandle::shutdown`])
1924/// if the responder is dropped without sending a response, so that the client
1925/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
1926impl std::ops::Drop for UnknownInteractionsProtocolStrictTwoWayFieldsResponder {
1927    fn drop(&mut self) {
1928        self.control_handle.shutdown();
1929        // Safety: drops once, never accessed again
1930        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1931    }
1932}
1933
1934impl fidl::endpoints::Responder for UnknownInteractionsProtocolStrictTwoWayFieldsResponder {
1935    type ControlHandle = UnknownInteractionsProtocolControlHandle;
1936
1937    fn control_handle(&self) -> &UnknownInteractionsProtocolControlHandle {
1938        &self.control_handle
1939    }
1940
1941    fn drop_without_shutdown(mut self) {
1942        // Safety: drops once, never accessed again due to mem::forget
1943        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1944        // Prevent Drop from running (which would shut down the channel)
1945        std::mem::forget(self);
1946    }
1947}
1948
1949impl UnknownInteractionsProtocolStrictTwoWayFieldsResponder {
1950    /// Sends a response to the FIDL transaction.
1951    ///
1952    /// Sets the channel to shutdown if an error occurs.
1953    pub fn send(self, mut some_field: i32) -> Result<(), fidl::Error> {
1954        let _result = self.send_raw(some_field);
1955        if _result.is_err() {
1956            self.control_handle.shutdown();
1957        }
1958        self.drop_without_shutdown();
1959        _result
1960    }
1961
1962    /// Similar to "send" but does not shutdown the channel if an error occurs.
1963    pub fn send_no_shutdown_on_err(self, mut some_field: i32) -> Result<(), fidl::Error> {
1964        let _result = self.send_raw(some_field);
1965        self.drop_without_shutdown();
1966        _result
1967    }
1968
1969    fn send_raw(&self, mut some_field: i32) -> Result<(), fidl::Error> {
1970        self.control_handle.inner.send::<UnknownInteractionsProtocolStrictTwoWayFieldsResponse>(
1971            (some_field,),
1972            self.tx_id,
1973            0x21513db78c6597f7,
1974            fidl::encoding::DynamicFlags::empty(),
1975        )
1976    }
1977}
1978
1979#[must_use = "FIDL methods require a response to be sent"]
1980#[derive(Debug)]
1981pub struct UnknownInteractionsProtocolStrictTwoWayErrResponder {
1982    control_handle: std::mem::ManuallyDrop<UnknownInteractionsProtocolControlHandle>,
1983    tx_id: u32,
1984}
1985
1986/// Set the the channel to be shutdown (see [`UnknownInteractionsProtocolControlHandle::shutdown`])
1987/// if the responder is dropped without sending a response, so that the client
1988/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
1989impl std::ops::Drop for UnknownInteractionsProtocolStrictTwoWayErrResponder {
1990    fn drop(&mut self) {
1991        self.control_handle.shutdown();
1992        // Safety: drops once, never accessed again
1993        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1994    }
1995}
1996
1997impl fidl::endpoints::Responder for UnknownInteractionsProtocolStrictTwoWayErrResponder {
1998    type ControlHandle = UnknownInteractionsProtocolControlHandle;
1999
2000    fn control_handle(&self) -> &UnknownInteractionsProtocolControlHandle {
2001        &self.control_handle
2002    }
2003
2004    fn drop_without_shutdown(mut self) {
2005        // Safety: drops once, never accessed again due to mem::forget
2006        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2007        // Prevent Drop from running (which would shut down the channel)
2008        std::mem::forget(self);
2009    }
2010}
2011
2012impl UnknownInteractionsProtocolStrictTwoWayErrResponder {
2013    /// Sends a response to the FIDL transaction.
2014    ///
2015    /// Sets the channel to shutdown if an error occurs.
2016    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2017        let _result = self.send_raw(result);
2018        if _result.is_err() {
2019            self.control_handle.shutdown();
2020        }
2021        self.drop_without_shutdown();
2022        _result
2023    }
2024
2025    /// Similar to "send" but does not shutdown the channel if an error occurs.
2026    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2027        let _result = self.send_raw(result);
2028        self.drop_without_shutdown();
2029        _result
2030    }
2031
2032    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2033        self.control_handle
2034            .inner
2035            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2036                result,
2037                self.tx_id,
2038                0x2e9beb4e08e058bb,
2039                fidl::encoding::DynamicFlags::empty(),
2040            )
2041    }
2042}
2043
2044#[must_use = "FIDL methods require a response to be sent"]
2045#[derive(Debug)]
2046pub struct UnknownInteractionsProtocolStrictTwoWayFieldsErrResponder {
2047    control_handle: std::mem::ManuallyDrop<UnknownInteractionsProtocolControlHandle>,
2048    tx_id: u32,
2049}
2050
2051/// Set the the channel to be shutdown (see [`UnknownInteractionsProtocolControlHandle::shutdown`])
2052/// if the responder is dropped without sending a response, so that the client
2053/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2054impl std::ops::Drop for UnknownInteractionsProtocolStrictTwoWayFieldsErrResponder {
2055    fn drop(&mut self) {
2056        self.control_handle.shutdown();
2057        // Safety: drops once, never accessed again
2058        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2059    }
2060}
2061
2062impl fidl::endpoints::Responder for UnknownInteractionsProtocolStrictTwoWayFieldsErrResponder {
2063    type ControlHandle = UnknownInteractionsProtocolControlHandle;
2064
2065    fn control_handle(&self) -> &UnknownInteractionsProtocolControlHandle {
2066        &self.control_handle
2067    }
2068
2069    fn drop_without_shutdown(mut self) {
2070        // Safety: drops once, never accessed again due to mem::forget
2071        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2072        // Prevent Drop from running (which would shut down the channel)
2073        std::mem::forget(self);
2074    }
2075}
2076
2077impl UnknownInteractionsProtocolStrictTwoWayFieldsErrResponder {
2078    /// Sends a response to the FIDL transaction.
2079    ///
2080    /// Sets the channel to shutdown if an error occurs.
2081    pub fn send(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
2082        let _result = self.send_raw(result);
2083        if _result.is_err() {
2084            self.control_handle.shutdown();
2085        }
2086        self.drop_without_shutdown();
2087        _result
2088    }
2089
2090    /// Similar to "send" but does not shutdown the channel if an error occurs.
2091    pub fn send_no_shutdown_on_err(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
2092        let _result = self.send_raw(result);
2093        self.drop_without_shutdown();
2094        _result
2095    }
2096
2097    fn send_raw(&self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
2098        self.control_handle.inner.send::<fidl::encoding::ResultType<
2099            UnknownInteractionsProtocolStrictTwoWayFieldsErrResponse,
2100            i32,
2101        >>(
2102            result.map(|some_field| (some_field,)),
2103            self.tx_id,
2104            0x6dd97948e8f69be4,
2105            fidl::encoding::DynamicFlags::empty(),
2106        )
2107    }
2108}
2109
2110#[must_use = "FIDL methods require a response to be sent"]
2111#[derive(Debug)]
2112pub struct UnknownInteractionsProtocolFlexibleTwoWayResponder {
2113    control_handle: std::mem::ManuallyDrop<UnknownInteractionsProtocolControlHandle>,
2114    tx_id: u32,
2115}
2116
2117/// Set the the channel to be shutdown (see [`UnknownInteractionsProtocolControlHandle::shutdown`])
2118/// if the responder is dropped without sending a response, so that the client
2119/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2120impl std::ops::Drop for UnknownInteractionsProtocolFlexibleTwoWayResponder {
2121    fn drop(&mut self) {
2122        self.control_handle.shutdown();
2123        // Safety: drops once, never accessed again
2124        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2125    }
2126}
2127
2128impl fidl::endpoints::Responder for UnknownInteractionsProtocolFlexibleTwoWayResponder {
2129    type ControlHandle = UnknownInteractionsProtocolControlHandle;
2130
2131    fn control_handle(&self) -> &UnknownInteractionsProtocolControlHandle {
2132        &self.control_handle
2133    }
2134
2135    fn drop_without_shutdown(mut self) {
2136        // Safety: drops once, never accessed again due to mem::forget
2137        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2138        // Prevent Drop from running (which would shut down the channel)
2139        std::mem::forget(self);
2140    }
2141}
2142
2143impl UnknownInteractionsProtocolFlexibleTwoWayResponder {
2144    /// Sends a response to the FIDL transaction.
2145    ///
2146    /// Sets the channel to shutdown if an error occurs.
2147    pub fn send(self) -> Result<(), fidl::Error> {
2148        let _result = self.send_raw();
2149        if _result.is_err() {
2150            self.control_handle.shutdown();
2151        }
2152        self.drop_without_shutdown();
2153        _result
2154    }
2155
2156    /// Similar to "send" but does not shutdown the channel if an error occurs.
2157    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
2158        let _result = self.send_raw();
2159        self.drop_without_shutdown();
2160        _result
2161    }
2162
2163    fn send_raw(&self) -> Result<(), fidl::Error> {
2164        self.control_handle.inner.send::<fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>>(
2165            fidl::encoding::Flexible::new(()),
2166            self.tx_id,
2167            0x1f33517a0395609d,
2168            fidl::encoding::DynamicFlags::FLEXIBLE,
2169        )
2170    }
2171}
2172
2173#[must_use = "FIDL methods require a response to be sent"]
2174#[derive(Debug)]
2175pub struct UnknownInteractionsProtocolFlexibleTwoWayFieldsResponder {
2176    control_handle: std::mem::ManuallyDrop<UnknownInteractionsProtocolControlHandle>,
2177    tx_id: u32,
2178}
2179
2180/// Set the the channel to be shutdown (see [`UnknownInteractionsProtocolControlHandle::shutdown`])
2181/// if the responder is dropped without sending a response, so that the client
2182/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2183impl std::ops::Drop for UnknownInteractionsProtocolFlexibleTwoWayFieldsResponder {
2184    fn drop(&mut self) {
2185        self.control_handle.shutdown();
2186        // Safety: drops once, never accessed again
2187        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2188    }
2189}
2190
2191impl fidl::endpoints::Responder for UnknownInteractionsProtocolFlexibleTwoWayFieldsResponder {
2192    type ControlHandle = UnknownInteractionsProtocolControlHandle;
2193
2194    fn control_handle(&self) -> &UnknownInteractionsProtocolControlHandle {
2195        &self.control_handle
2196    }
2197
2198    fn drop_without_shutdown(mut self) {
2199        // Safety: drops once, never accessed again due to mem::forget
2200        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2201        // Prevent Drop from running (which would shut down the channel)
2202        std::mem::forget(self);
2203    }
2204}
2205
2206impl UnknownInteractionsProtocolFlexibleTwoWayFieldsResponder {
2207    /// Sends a response to the FIDL transaction.
2208    ///
2209    /// Sets the channel to shutdown if an error occurs.
2210    pub fn send(self, mut some_field: i32) -> Result<(), fidl::Error> {
2211        let _result = self.send_raw(some_field);
2212        if _result.is_err() {
2213            self.control_handle.shutdown();
2214        }
2215        self.drop_without_shutdown();
2216        _result
2217    }
2218
2219    /// Similar to "send" but does not shutdown the channel if an error occurs.
2220    pub fn send_no_shutdown_on_err(self, mut some_field: i32) -> Result<(), fidl::Error> {
2221        let _result = self.send_raw(some_field);
2222        self.drop_without_shutdown();
2223        _result
2224    }
2225
2226    fn send_raw(&self, mut some_field: i32) -> Result<(), fidl::Error> {
2227        self.control_handle.inner.send::<fidl::encoding::FlexibleType<
2228            UnknownInteractionsProtocolFlexibleTwoWayFieldsResponse,
2229        >>(
2230            fidl::encoding::Flexible::new((some_field,)),
2231            self.tx_id,
2232            0x58ed18873e28b84d,
2233            fidl::encoding::DynamicFlags::FLEXIBLE,
2234        )
2235    }
2236}
2237
2238#[must_use = "FIDL methods require a response to be sent"]
2239#[derive(Debug)]
2240pub struct UnknownInteractionsProtocolFlexibleTwoWayErrResponder {
2241    control_handle: std::mem::ManuallyDrop<UnknownInteractionsProtocolControlHandle>,
2242    tx_id: u32,
2243}
2244
2245/// Set the the channel to be shutdown (see [`UnknownInteractionsProtocolControlHandle::shutdown`])
2246/// if the responder is dropped without sending a response, so that the client
2247/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2248impl std::ops::Drop for UnknownInteractionsProtocolFlexibleTwoWayErrResponder {
2249    fn drop(&mut self) {
2250        self.control_handle.shutdown();
2251        // Safety: drops once, never accessed again
2252        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2253    }
2254}
2255
2256impl fidl::endpoints::Responder for UnknownInteractionsProtocolFlexibleTwoWayErrResponder {
2257    type ControlHandle = UnknownInteractionsProtocolControlHandle;
2258
2259    fn control_handle(&self) -> &UnknownInteractionsProtocolControlHandle {
2260        &self.control_handle
2261    }
2262
2263    fn drop_without_shutdown(mut self) {
2264        // Safety: drops once, never accessed again due to mem::forget
2265        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2266        // Prevent Drop from running (which would shut down the channel)
2267        std::mem::forget(self);
2268    }
2269}
2270
2271impl UnknownInteractionsProtocolFlexibleTwoWayErrResponder {
2272    /// Sends a response to the FIDL transaction.
2273    ///
2274    /// Sets the channel to shutdown if an error occurs.
2275    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2276        let _result = self.send_raw(result);
2277        if _result.is_err() {
2278            self.control_handle.shutdown();
2279        }
2280        self.drop_without_shutdown();
2281        _result
2282    }
2283
2284    /// Similar to "send" but does not shutdown the channel if an error occurs.
2285    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2286        let _result = self.send_raw(result);
2287        self.drop_without_shutdown();
2288        _result
2289    }
2290
2291    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2292        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2293            fidl::encoding::EmptyStruct,
2294            i32,
2295        >>(
2296            fidl::encoding::FlexibleResult::new(result),
2297            self.tx_id,
2298            0x706905decb20bd62,
2299            fidl::encoding::DynamicFlags::FLEXIBLE,
2300        )
2301    }
2302}
2303
2304#[must_use = "FIDL methods require a response to be sent"]
2305#[derive(Debug)]
2306pub struct UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponder {
2307    control_handle: std::mem::ManuallyDrop<UnknownInteractionsProtocolControlHandle>,
2308    tx_id: u32,
2309}
2310
2311/// Set the the channel to be shutdown (see [`UnknownInteractionsProtocolControlHandle::shutdown`])
2312/// if the responder is dropped without sending a response, so that the client
2313/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2314impl std::ops::Drop for UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponder {
2315    fn drop(&mut self) {
2316        self.control_handle.shutdown();
2317        // Safety: drops once, never accessed again
2318        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2319    }
2320}
2321
2322impl fidl::endpoints::Responder for UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponder {
2323    type ControlHandle = UnknownInteractionsProtocolControlHandle;
2324
2325    fn control_handle(&self) -> &UnknownInteractionsProtocolControlHandle {
2326        &self.control_handle
2327    }
2328
2329    fn drop_without_shutdown(mut self) {
2330        // Safety: drops once, never accessed again due to mem::forget
2331        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2332        // Prevent Drop from running (which would shut down the channel)
2333        std::mem::forget(self);
2334    }
2335}
2336
2337impl UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponder {
2338    /// Sends a response to the FIDL transaction.
2339    ///
2340    /// Sets the channel to shutdown if an error occurs.
2341    pub fn send(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
2342        let _result = self.send_raw(result);
2343        if _result.is_err() {
2344            self.control_handle.shutdown();
2345        }
2346        self.drop_without_shutdown();
2347        _result
2348    }
2349
2350    /// Similar to "send" but does not shutdown the channel if an error occurs.
2351    pub fn send_no_shutdown_on_err(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
2352        let _result = self.send_raw(result);
2353        self.drop_without_shutdown();
2354        _result
2355    }
2356
2357    fn send_raw(&self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
2358        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2359            UnknownInteractionsProtocolFlexibleTwoWayFieldsErrResponse,
2360            i32,
2361        >>(
2362            fidl::encoding::FlexibleResult::new(result.map(|some_field| (some_field,))),
2363            self.tx_id,
2364            0x681fcbbead668390,
2365            fidl::encoding::DynamicFlags::FLEXIBLE,
2366        )
2367    }
2368}
2369
2370mod internal {
2371    use super::*;
2372}