Skip to main content

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