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