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