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