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_fidl_serversuite_common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15#[repr(C)]
16pub struct ClosedTargetCreateNHandleVectorRequest {
17 pub n: u32,
18}
19
20impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
21 for ClosedTargetCreateNHandleVectorRequest
22{
23}
24
25#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
26pub struct ClosedTargetCreateNHandleVectorResponse {
27 pub vec: Vec<fidl::Event>,
28}
29
30impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
31 for ClosedTargetCreateNHandleVectorResponse
32{
33}
34
35#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36pub struct ClosedTargetEchoAsTransferableSignalableEventRequest {
37 pub handle: fidl::Handle,
38}
39
40impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
41 for ClosedTargetEchoAsTransferableSignalableEventRequest
42{
43}
44
45#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
46pub struct ClosedTargetEchoAsTransferableSignalableEventResponse {
47 pub handle: fidl::Event,
48}
49
50impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
51 for ClosedTargetEchoAsTransferableSignalableEventResponse
52{
53}
54
55#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
56pub struct ClosedTargetGetHandleRightsRequest {
57 pub handle: fidl::Handle,
58}
59
60impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
61 for ClosedTargetGetHandleRightsRequest
62{
63}
64
65#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
66pub struct ClosedTargetGetSignalableEventRightsRequest {
67 pub handle: fidl::Event,
68}
69
70impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
71 for ClosedTargetGetSignalableEventRightsRequest
72{
73}
74
75#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
76pub struct ClosedTargetHandleVectorSizeRequest {
77 pub vec: Vec<fidl::Event>,
78}
79
80impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
81 for ClosedTargetHandleVectorSizeRequest
82{
83}
84
85#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
86pub struct RunnerStartRequest {
87 pub test: Test,
88 pub any_target: AnyTarget,
89}
90
91impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for RunnerStartRequest {}
92
93#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
94pub enum AnyTarget {
95 Closed(fidl::endpoints::ServerEnd<ClosedTargetMarker>),
96 Ajar(fidl::endpoints::ServerEnd<AjarTargetMarker>),
97 Open(fidl::endpoints::ServerEnd<OpenTargetMarker>),
98}
99
100impl AnyTarget {
101 #[inline]
102 pub fn ordinal(&self) -> u64 {
103 match *self {
104 Self::Closed(_) => 1,
105 Self::Ajar(_) => 2,
106 Self::Open(_) => 3,
107 }
108 }
109
110 #[deprecated = "Strict unions should not use `is_unknown`"]
111 #[inline]
112 pub fn is_unknown(&self) -> bool {
113 false
114 }
115}
116
117impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for AnyTarget {}
118
119#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
120pub struct AjarTargetMarker;
121
122impl fidl::endpoints::ProtocolMarker for AjarTargetMarker {
123 type Proxy = AjarTargetProxy;
124 type RequestStream = AjarTargetRequestStream;
125 #[cfg(target_os = "fuchsia")]
126 type SynchronousProxy = AjarTargetSynchronousProxy;
127
128 const DEBUG_NAME: &'static str = "(anonymous) AjarTarget";
129}
130
131pub trait AjarTargetProxyInterface: Send + Sync {}
132#[derive(Debug)]
133#[cfg(target_os = "fuchsia")]
134pub struct AjarTargetSynchronousProxy {
135 client: fidl::client::sync::Client,
136}
137
138#[cfg(target_os = "fuchsia")]
139impl fidl::endpoints::SynchronousProxy for AjarTargetSynchronousProxy {
140 type Proxy = AjarTargetProxy;
141 type Protocol = AjarTargetMarker;
142
143 fn from_channel(inner: fidl::Channel) -> Self {
144 Self::new(inner)
145 }
146
147 fn into_channel(self) -> fidl::Channel {
148 self.client.into_channel()
149 }
150
151 fn as_channel(&self) -> &fidl::Channel {
152 self.client.as_channel()
153 }
154}
155
156#[cfg(target_os = "fuchsia")]
157impl AjarTargetSynchronousProxy {
158 pub fn new(channel: fidl::Channel) -> Self {
159 let protocol_name = <AjarTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
160 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
161 }
162
163 pub fn into_channel(self) -> fidl::Channel {
164 self.client.into_channel()
165 }
166
167 pub fn wait_for_event(
170 &self,
171 deadline: zx::MonotonicInstant,
172 ) -> Result<AjarTargetEvent, fidl::Error> {
173 AjarTargetEvent::decode(self.client.wait_for_event(deadline)?)
174 }
175}
176
177#[cfg(target_os = "fuchsia")]
178impl From<AjarTargetSynchronousProxy> for zx::Handle {
179 fn from(value: AjarTargetSynchronousProxy) -> Self {
180 value.into_channel().into()
181 }
182}
183
184#[cfg(target_os = "fuchsia")]
185impl From<fidl::Channel> for AjarTargetSynchronousProxy {
186 fn from(value: fidl::Channel) -> Self {
187 Self::new(value)
188 }
189}
190
191#[derive(Debug, Clone)]
192pub struct AjarTargetProxy {
193 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
194}
195
196impl fidl::endpoints::Proxy for AjarTargetProxy {
197 type Protocol = AjarTargetMarker;
198
199 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
200 Self::new(inner)
201 }
202
203 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
204 self.client.into_channel().map_err(|client| Self { client })
205 }
206
207 fn as_channel(&self) -> &::fidl::AsyncChannel {
208 self.client.as_channel()
209 }
210}
211
212impl AjarTargetProxy {
213 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
215 let protocol_name = <AjarTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
216 Self { client: fidl::client::Client::new(channel, protocol_name) }
217 }
218
219 pub fn take_event_stream(&self) -> AjarTargetEventStream {
225 AjarTargetEventStream { event_receiver: self.client.take_event_receiver() }
226 }
227}
228
229impl AjarTargetProxyInterface for AjarTargetProxy {}
230
231pub struct AjarTargetEventStream {
232 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
233}
234
235impl std::marker::Unpin for AjarTargetEventStream {}
236
237impl futures::stream::FusedStream for AjarTargetEventStream {
238 fn is_terminated(&self) -> bool {
239 self.event_receiver.is_terminated()
240 }
241}
242
243impl futures::Stream for AjarTargetEventStream {
244 type Item = Result<AjarTargetEvent, fidl::Error>;
245
246 fn poll_next(
247 mut self: std::pin::Pin<&mut Self>,
248 cx: &mut std::task::Context<'_>,
249 ) -> std::task::Poll<Option<Self::Item>> {
250 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
251 &mut self.event_receiver,
252 cx
253 )?) {
254 Some(buf) => std::task::Poll::Ready(Some(AjarTargetEvent::decode(buf))),
255 None => std::task::Poll::Ready(None),
256 }
257 }
258}
259
260#[derive(Debug)]
261pub enum AjarTargetEvent {
262 #[non_exhaustive]
263 _UnknownEvent {
264 ordinal: u64,
266 },
267}
268
269impl AjarTargetEvent {
270 fn decode(
272 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
273 ) -> Result<AjarTargetEvent, fidl::Error> {
274 let (bytes, _handles) = buf.split_mut();
275 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
276 debug_assert_eq!(tx_header.tx_id, 0);
277 match tx_header.ordinal {
278 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
279 Ok(AjarTargetEvent::_UnknownEvent { ordinal: tx_header.ordinal })
280 }
281 _ => Err(fidl::Error::UnknownOrdinal {
282 ordinal: tx_header.ordinal,
283 protocol_name: <AjarTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
284 }),
285 }
286 }
287}
288
289pub struct AjarTargetRequestStream {
291 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
292 is_terminated: bool,
293}
294
295impl std::marker::Unpin for AjarTargetRequestStream {}
296
297impl futures::stream::FusedStream for AjarTargetRequestStream {
298 fn is_terminated(&self) -> bool {
299 self.is_terminated
300 }
301}
302
303impl fidl::endpoints::RequestStream for AjarTargetRequestStream {
304 type Protocol = AjarTargetMarker;
305 type ControlHandle = AjarTargetControlHandle;
306
307 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
308 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
309 }
310
311 fn control_handle(&self) -> Self::ControlHandle {
312 AjarTargetControlHandle { inner: self.inner.clone() }
313 }
314
315 fn into_inner(
316 self,
317 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
318 {
319 (self.inner, self.is_terminated)
320 }
321
322 fn from_inner(
323 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
324 is_terminated: bool,
325 ) -> Self {
326 Self { inner, is_terminated }
327 }
328}
329
330impl futures::Stream for AjarTargetRequestStream {
331 type Item = Result<AjarTargetRequest, fidl::Error>;
332
333 fn poll_next(
334 mut self: std::pin::Pin<&mut Self>,
335 cx: &mut std::task::Context<'_>,
336 ) -> std::task::Poll<Option<Self::Item>> {
337 let this = &mut *self;
338 if this.inner.check_shutdown(cx) {
339 this.is_terminated = true;
340 return std::task::Poll::Ready(None);
341 }
342 if this.is_terminated {
343 panic!("polled AjarTargetRequestStream after completion");
344 }
345 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
346 |bytes, handles| {
347 match this.inner.channel().read_etc(cx, bytes, handles) {
348 std::task::Poll::Ready(Ok(())) => {}
349 std::task::Poll::Pending => return std::task::Poll::Pending,
350 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
351 this.is_terminated = true;
352 return std::task::Poll::Ready(None);
353 }
354 std::task::Poll::Ready(Err(e)) => {
355 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
356 e.into(),
357 ))))
358 }
359 }
360
361 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
363
364 std::task::Poll::Ready(Some(match header.ordinal {
365 _ if header.tx_id == 0
366 && header
367 .dynamic_flags()
368 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
369 {
370 Ok(AjarTargetRequest::_UnknownMethod {
371 ordinal: header.ordinal,
372 control_handle: AjarTargetControlHandle { inner: this.inner.clone() },
373 })
374 }
375 _ => Err(fidl::Error::UnknownOrdinal {
376 ordinal: header.ordinal,
377 protocol_name:
378 <AjarTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
379 }),
380 }))
381 },
382 )
383 }
384}
385
386#[derive(Debug)]
387pub enum AjarTargetRequest {
388 #[non_exhaustive]
390 _UnknownMethod {
391 ordinal: u64,
393 control_handle: AjarTargetControlHandle,
394 },
395}
396
397impl AjarTargetRequest {
398 pub fn method_name(&self) -> &'static str {
400 match *self {
401 AjarTargetRequest::_UnknownMethod { .. } => "unknown one-way method",
402 }
403 }
404}
405
406#[derive(Debug, Clone)]
407pub struct AjarTargetControlHandle {
408 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
409}
410
411impl fidl::endpoints::ControlHandle for AjarTargetControlHandle {
412 fn shutdown(&self) {
413 self.inner.shutdown()
414 }
415 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
416 self.inner.shutdown_with_epitaph(status)
417 }
418
419 fn is_closed(&self) -> bool {
420 self.inner.channel().is_closed()
421 }
422 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
423 self.inner.channel().on_closed()
424 }
425
426 #[cfg(target_os = "fuchsia")]
427 fn signal_peer(
428 &self,
429 clear_mask: zx::Signals,
430 set_mask: zx::Signals,
431 ) -> Result<(), zx_status::Status> {
432 use fidl::Peered;
433 self.inner.channel().signal_peer(clear_mask, set_mask)
434 }
435}
436
437impl AjarTargetControlHandle {}
438
439#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
440pub struct ClosedTargetMarker;
441
442impl fidl::endpoints::ProtocolMarker for ClosedTargetMarker {
443 type Proxy = ClosedTargetProxy;
444 type RequestStream = ClosedTargetRequestStream;
445 #[cfg(target_os = "fuchsia")]
446 type SynchronousProxy = ClosedTargetSynchronousProxy;
447
448 const DEBUG_NAME: &'static str = "(anonymous) ClosedTarget";
449}
450pub type ClosedTargetTwoWayResultResult = Result<String, u32>;
451
452pub trait ClosedTargetProxyInterface: Send + Sync {
453 fn r#one_way_no_payload(&self) -> Result<(), fidl::Error>;
454 type TwoWayNoPayloadResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
455 fn r#two_way_no_payload(&self) -> Self::TwoWayNoPayloadResponseFut;
456 type TwoWayStructPayloadResponseFut: std::future::Future<Output = Result<i8, fidl::Error>>
457 + Send;
458 fn r#two_way_struct_payload(&self, v: i8) -> Self::TwoWayStructPayloadResponseFut;
459 type TwoWayTablePayloadResponseFut: std::future::Future<Output = Result<ClosedTargetTwoWayTablePayloadResponse, fidl::Error>>
460 + Send;
461 fn r#two_way_table_payload(
462 &self,
463 payload: &ClosedTargetTwoWayTablePayloadRequest,
464 ) -> Self::TwoWayTablePayloadResponseFut;
465 type TwoWayUnionPayloadResponseFut: std::future::Future<Output = Result<ClosedTargetTwoWayUnionPayloadResponse, fidl::Error>>
466 + Send;
467 fn r#two_way_union_payload(
468 &self,
469 payload: &ClosedTargetTwoWayUnionPayloadRequest,
470 ) -> Self::TwoWayUnionPayloadResponseFut;
471 type TwoWayResultResponseFut: std::future::Future<Output = Result<ClosedTargetTwoWayResultResult, fidl::Error>>
472 + Send;
473 fn r#two_way_result(
474 &self,
475 payload: &ClosedTargetTwoWayResultRequest,
476 ) -> Self::TwoWayResultResponseFut;
477 type GetHandleRightsResponseFut: std::future::Future<Output = Result<fidl::Rights, fidl::Error>>
478 + Send;
479 fn r#get_handle_rights(&self, handle: fidl::Handle) -> Self::GetHandleRightsResponseFut;
480 type GetSignalableEventRightsResponseFut: std::future::Future<Output = Result<fidl::Rights, fidl::Error>>
481 + Send;
482 fn r#get_signalable_event_rights(
483 &self,
484 handle: fidl::Event,
485 ) -> Self::GetSignalableEventRightsResponseFut;
486 type EchoAsTransferableSignalableEventResponseFut: std::future::Future<Output = Result<fidl::Event, fidl::Error>>
487 + Send;
488 fn r#echo_as_transferable_signalable_event(
489 &self,
490 handle: fidl::Handle,
491 ) -> Self::EchoAsTransferableSignalableEventResponseFut;
492 type ByteVectorSizeResponseFut: std::future::Future<Output = Result<u32, fidl::Error>> + Send;
493 fn r#byte_vector_size(&self, vec: &[u8]) -> Self::ByteVectorSizeResponseFut;
494 type HandleVectorSizeResponseFut: std::future::Future<Output = Result<u32, fidl::Error>> + Send;
495 fn r#handle_vector_size(&self, vec: Vec<fidl::Event>) -> Self::HandleVectorSizeResponseFut;
496 type CreateNByteVectorResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>>
497 + Send;
498 fn r#create_n_byte_vector(&self, n: u32) -> Self::CreateNByteVectorResponseFut;
499 type CreateNHandleVectorResponseFut: std::future::Future<Output = Result<Vec<fidl::Event>, fidl::Error>>
500 + Send;
501 fn r#create_n_handle_vector(&self, n: u32) -> Self::CreateNHandleVectorResponseFut;
502}
503#[derive(Debug)]
504#[cfg(target_os = "fuchsia")]
505pub struct ClosedTargetSynchronousProxy {
506 client: fidl::client::sync::Client,
507}
508
509#[cfg(target_os = "fuchsia")]
510impl fidl::endpoints::SynchronousProxy for ClosedTargetSynchronousProxy {
511 type Proxy = ClosedTargetProxy;
512 type Protocol = ClosedTargetMarker;
513
514 fn from_channel(inner: fidl::Channel) -> Self {
515 Self::new(inner)
516 }
517
518 fn into_channel(self) -> fidl::Channel {
519 self.client.into_channel()
520 }
521
522 fn as_channel(&self) -> &fidl::Channel {
523 self.client.as_channel()
524 }
525}
526
527#[cfg(target_os = "fuchsia")]
528impl ClosedTargetSynchronousProxy {
529 pub fn new(channel: fidl::Channel) -> Self {
530 let protocol_name = <ClosedTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
531 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
532 }
533
534 pub fn into_channel(self) -> fidl::Channel {
535 self.client.into_channel()
536 }
537
538 pub fn wait_for_event(
541 &self,
542 deadline: zx::MonotonicInstant,
543 ) -> Result<ClosedTargetEvent, fidl::Error> {
544 ClosedTargetEvent::decode(self.client.wait_for_event(deadline)?)
545 }
546
547 pub fn r#one_way_no_payload(&self) -> Result<(), fidl::Error> {
548 self.client.send::<fidl::encoding::EmptyPayload>(
549 (),
550 0x66bd5fe1d4c019e,
551 fidl::encoding::DynamicFlags::empty(),
552 )
553 }
554
555 pub fn r#two_way_no_payload(
556 &self,
557 ___deadline: zx::MonotonicInstant,
558 ) -> Result<(), fidl::Error> {
559 let _response =
560 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
561 (),
562 0x5bda1d1c46a5ae5f,
563 fidl::encoding::DynamicFlags::empty(),
564 ___deadline,
565 )?;
566 Ok(_response)
567 }
568
569 pub fn r#two_way_struct_payload(
570 &self,
571 mut v: i8,
572 ___deadline: zx::MonotonicInstant,
573 ) -> Result<i8, fidl::Error> {
574 let _response = self.client.send_query::<
575 ClosedTargetTwoWayStructPayloadRequest,
576 ClosedTargetTwoWayStructPayloadResponse,
577 >(
578 (v,),
579 0x313769ab1b770c90,
580 fidl::encoding::DynamicFlags::empty(),
581 ___deadline,
582 )?;
583 Ok(_response.v)
584 }
585
586 pub fn r#two_way_table_payload(
587 &self,
588 mut payload: &ClosedTargetTwoWayTablePayloadRequest,
589 ___deadline: zx::MonotonicInstant,
590 ) -> Result<ClosedTargetTwoWayTablePayloadResponse, fidl::Error> {
591 let _response = self.client.send_query::<
592 ClosedTargetTwoWayTablePayloadRequest,
593 ClosedTargetTwoWayTablePayloadResponse,
594 >(
595 payload,
596 0x631f7f27b6872baa,
597 fidl::encoding::DynamicFlags::empty(),
598 ___deadline,
599 )?;
600 Ok(_response)
601 }
602
603 pub fn r#two_way_union_payload(
604 &self,
605 mut payload: &ClosedTargetTwoWayUnionPayloadRequest,
606 ___deadline: zx::MonotonicInstant,
607 ) -> Result<ClosedTargetTwoWayUnionPayloadResponse, fidl::Error> {
608 let _response = self.client.send_query::<
609 ClosedTargetTwoWayUnionPayloadRequest,
610 ClosedTargetTwoWayUnionPayloadResponse,
611 >(
612 payload,
613 0x77d0365370536dba,
614 fidl::encoding::DynamicFlags::empty(),
615 ___deadline,
616 )?;
617 Ok(_response)
618 }
619
620 pub fn r#two_way_result(
621 &self,
622 mut payload: &ClosedTargetTwoWayResultRequest,
623 ___deadline: zx::MonotonicInstant,
624 ) -> Result<ClosedTargetTwoWayResultResult, fidl::Error> {
625 let _response = self.client.send_query::<
626 ClosedTargetTwoWayResultRequest,
627 fidl::encoding::ResultType<ClosedTargetTwoWayResultResponse, u32>,
628 >(
629 payload,
630 0xb32549e6f50894c,
631 fidl::encoding::DynamicFlags::empty(),
632 ___deadline,
633 )?;
634 Ok(_response.map(|x| x.payload))
635 }
636
637 pub fn r#get_handle_rights(
638 &self,
639 mut handle: fidl::Handle,
640 ___deadline: zx::MonotonicInstant,
641 ) -> Result<fidl::Rights, fidl::Error> {
642 let _response = self
643 .client
644 .send_query::<ClosedTargetGetHandleRightsRequest, ClosedTargetGetHandleRightsResponse>(
645 (handle,),
646 0x1098d82f79effbe8,
647 fidl::encoding::DynamicFlags::empty(),
648 ___deadline,
649 )?;
650 Ok(_response.rights)
651 }
652
653 pub fn r#get_signalable_event_rights(
654 &self,
655 mut handle: fidl::Event,
656 ___deadline: zx::MonotonicInstant,
657 ) -> Result<fidl::Rights, fidl::Error> {
658 let _response = self.client.send_query::<
659 ClosedTargetGetSignalableEventRightsRequest,
660 ClosedTargetGetSignalableEventRightsResponse,
661 >(
662 (handle,),
663 0x698c31448fd5daf,
664 fidl::encoding::DynamicFlags::empty(),
665 ___deadline,
666 )?;
667 Ok(_response.rights)
668 }
669
670 pub fn r#echo_as_transferable_signalable_event(
671 &self,
672 mut handle: fidl::Handle,
673 ___deadline: zx::MonotonicInstant,
674 ) -> Result<fidl::Event, fidl::Error> {
675 let _response = self.client.send_query::<
676 ClosedTargetEchoAsTransferableSignalableEventRequest,
677 ClosedTargetEchoAsTransferableSignalableEventResponse,
678 >(
679 (handle,),
680 0x5ec627bdc2e02ca0,
681 fidl::encoding::DynamicFlags::empty(),
682 ___deadline,
683 )?;
684 Ok(_response.handle)
685 }
686
687 pub fn r#byte_vector_size(
688 &self,
689 mut vec: &[u8],
690 ___deadline: zx::MonotonicInstant,
691 ) -> Result<u32, fidl::Error> {
692 let _response = self
693 .client
694 .send_query::<ClosedTargetByteVectorSizeRequest, ClosedTargetByteVectorSizeResponse>(
695 (vec,),
696 0x104b2f9aa8b7fe25,
697 fidl::encoding::DynamicFlags::empty(),
698 ___deadline,
699 )?;
700 Ok(_response.n)
701 }
702
703 pub fn r#handle_vector_size(
704 &self,
705 mut vec: Vec<fidl::Event>,
706 ___deadline: zx::MonotonicInstant,
707 ) -> Result<u32, fidl::Error> {
708 let _response = self.client.send_query::<
709 ClosedTargetHandleVectorSizeRequest,
710 ClosedTargetHandleVectorSizeResponse,
711 >(
712 (vec.as_mut(),),
713 0x4c1ac83570a98537,
714 fidl::encoding::DynamicFlags::empty(),
715 ___deadline,
716 )?;
717 Ok(_response.n)
718 }
719
720 pub fn r#create_n_byte_vector(
721 &self,
722 mut n: u32,
723 ___deadline: zx::MonotonicInstant,
724 ) -> Result<Vec<u8>, fidl::Error> {
725 let _response = self.client.send_query::<
726 ClosedTargetCreateNByteVectorRequest,
727 ClosedTargetCreateNByteVectorResponse,
728 >(
729 (n,),
730 0x1ecd88ef664e9c61,
731 fidl::encoding::DynamicFlags::empty(),
732 ___deadline,
733 )?;
734 Ok(_response.vec)
735 }
736
737 pub fn r#create_n_handle_vector(
738 &self,
739 mut n: u32,
740 ___deadline: zx::MonotonicInstant,
741 ) -> Result<Vec<fidl::Event>, fidl::Error> {
742 let _response = self.client.send_query::<
743 ClosedTargetCreateNHandleVectorRequest,
744 ClosedTargetCreateNHandleVectorResponse,
745 >(
746 (n,),
747 0x26341ba1fa66813d,
748 fidl::encoding::DynamicFlags::empty(),
749 ___deadline,
750 )?;
751 Ok(_response.vec)
752 }
753}
754
755#[cfg(target_os = "fuchsia")]
756impl From<ClosedTargetSynchronousProxy> for zx::Handle {
757 fn from(value: ClosedTargetSynchronousProxy) -> Self {
758 value.into_channel().into()
759 }
760}
761
762#[cfg(target_os = "fuchsia")]
763impl From<fidl::Channel> for ClosedTargetSynchronousProxy {
764 fn from(value: fidl::Channel) -> Self {
765 Self::new(value)
766 }
767}
768
769#[derive(Debug, Clone)]
770pub struct ClosedTargetProxy {
771 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
772}
773
774impl fidl::endpoints::Proxy for ClosedTargetProxy {
775 type Protocol = ClosedTargetMarker;
776
777 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
778 Self::new(inner)
779 }
780
781 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
782 self.client.into_channel().map_err(|client| Self { client })
783 }
784
785 fn as_channel(&self) -> &::fidl::AsyncChannel {
786 self.client.as_channel()
787 }
788}
789
790impl ClosedTargetProxy {
791 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
793 let protocol_name = <ClosedTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
794 Self { client: fidl::client::Client::new(channel, protocol_name) }
795 }
796
797 pub fn take_event_stream(&self) -> ClosedTargetEventStream {
803 ClosedTargetEventStream { event_receiver: self.client.take_event_receiver() }
804 }
805
806 pub fn r#one_way_no_payload(&self) -> Result<(), fidl::Error> {
807 ClosedTargetProxyInterface::r#one_way_no_payload(self)
808 }
809
810 pub fn r#two_way_no_payload(
811 &self,
812 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
813 ClosedTargetProxyInterface::r#two_way_no_payload(self)
814 }
815
816 pub fn r#two_way_struct_payload(
817 &self,
818 mut v: i8,
819 ) -> fidl::client::QueryResponseFut<i8, fidl::encoding::DefaultFuchsiaResourceDialect> {
820 ClosedTargetProxyInterface::r#two_way_struct_payload(self, v)
821 }
822
823 pub fn r#two_way_table_payload(
824 &self,
825 mut payload: &ClosedTargetTwoWayTablePayloadRequest,
826 ) -> fidl::client::QueryResponseFut<
827 ClosedTargetTwoWayTablePayloadResponse,
828 fidl::encoding::DefaultFuchsiaResourceDialect,
829 > {
830 ClosedTargetProxyInterface::r#two_way_table_payload(self, payload)
831 }
832
833 pub fn r#two_way_union_payload(
834 &self,
835 mut payload: &ClosedTargetTwoWayUnionPayloadRequest,
836 ) -> fidl::client::QueryResponseFut<
837 ClosedTargetTwoWayUnionPayloadResponse,
838 fidl::encoding::DefaultFuchsiaResourceDialect,
839 > {
840 ClosedTargetProxyInterface::r#two_way_union_payload(self, payload)
841 }
842
843 pub fn r#two_way_result(
844 &self,
845 mut payload: &ClosedTargetTwoWayResultRequest,
846 ) -> fidl::client::QueryResponseFut<
847 ClosedTargetTwoWayResultResult,
848 fidl::encoding::DefaultFuchsiaResourceDialect,
849 > {
850 ClosedTargetProxyInterface::r#two_way_result(self, payload)
851 }
852
853 pub fn r#get_handle_rights(
854 &self,
855 mut handle: fidl::Handle,
856 ) -> fidl::client::QueryResponseFut<fidl::Rights, fidl::encoding::DefaultFuchsiaResourceDialect>
857 {
858 ClosedTargetProxyInterface::r#get_handle_rights(self, handle)
859 }
860
861 pub fn r#get_signalable_event_rights(
862 &self,
863 mut handle: fidl::Event,
864 ) -> fidl::client::QueryResponseFut<fidl::Rights, fidl::encoding::DefaultFuchsiaResourceDialect>
865 {
866 ClosedTargetProxyInterface::r#get_signalable_event_rights(self, handle)
867 }
868
869 pub fn r#echo_as_transferable_signalable_event(
870 &self,
871 mut handle: fidl::Handle,
872 ) -> fidl::client::QueryResponseFut<fidl::Event, fidl::encoding::DefaultFuchsiaResourceDialect>
873 {
874 ClosedTargetProxyInterface::r#echo_as_transferable_signalable_event(self, handle)
875 }
876
877 pub fn r#byte_vector_size(
878 &self,
879 mut vec: &[u8],
880 ) -> fidl::client::QueryResponseFut<u32, fidl::encoding::DefaultFuchsiaResourceDialect> {
881 ClosedTargetProxyInterface::r#byte_vector_size(self, vec)
882 }
883
884 pub fn r#handle_vector_size(
885 &self,
886 mut vec: Vec<fidl::Event>,
887 ) -> fidl::client::QueryResponseFut<u32, fidl::encoding::DefaultFuchsiaResourceDialect> {
888 ClosedTargetProxyInterface::r#handle_vector_size(self, vec)
889 }
890
891 pub fn r#create_n_byte_vector(
892 &self,
893 mut n: u32,
894 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
895 {
896 ClosedTargetProxyInterface::r#create_n_byte_vector(self, n)
897 }
898
899 pub fn r#create_n_handle_vector(
900 &self,
901 mut n: u32,
902 ) -> fidl::client::QueryResponseFut<
903 Vec<fidl::Event>,
904 fidl::encoding::DefaultFuchsiaResourceDialect,
905 > {
906 ClosedTargetProxyInterface::r#create_n_handle_vector(self, n)
907 }
908}
909
910impl ClosedTargetProxyInterface for ClosedTargetProxy {
911 fn r#one_way_no_payload(&self) -> Result<(), fidl::Error> {
912 self.client.send::<fidl::encoding::EmptyPayload>(
913 (),
914 0x66bd5fe1d4c019e,
915 fidl::encoding::DynamicFlags::empty(),
916 )
917 }
918
919 type TwoWayNoPayloadResponseFut =
920 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
921 fn r#two_way_no_payload(&self) -> Self::TwoWayNoPayloadResponseFut {
922 fn _decode(
923 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
924 ) -> Result<(), fidl::Error> {
925 let _response = fidl::client::decode_transaction_body::<
926 fidl::encoding::EmptyPayload,
927 fidl::encoding::DefaultFuchsiaResourceDialect,
928 0x5bda1d1c46a5ae5f,
929 >(_buf?)?;
930 Ok(_response)
931 }
932 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
933 (),
934 0x5bda1d1c46a5ae5f,
935 fidl::encoding::DynamicFlags::empty(),
936 _decode,
937 )
938 }
939
940 type TwoWayStructPayloadResponseFut =
941 fidl::client::QueryResponseFut<i8, fidl::encoding::DefaultFuchsiaResourceDialect>;
942 fn r#two_way_struct_payload(&self, mut v: i8) -> Self::TwoWayStructPayloadResponseFut {
943 fn _decode(
944 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
945 ) -> Result<i8, fidl::Error> {
946 let _response = fidl::client::decode_transaction_body::<
947 ClosedTargetTwoWayStructPayloadResponse,
948 fidl::encoding::DefaultFuchsiaResourceDialect,
949 0x313769ab1b770c90,
950 >(_buf?)?;
951 Ok(_response.v)
952 }
953 self.client.send_query_and_decode::<ClosedTargetTwoWayStructPayloadRequest, i8>(
954 (v,),
955 0x313769ab1b770c90,
956 fidl::encoding::DynamicFlags::empty(),
957 _decode,
958 )
959 }
960
961 type TwoWayTablePayloadResponseFut = fidl::client::QueryResponseFut<
962 ClosedTargetTwoWayTablePayloadResponse,
963 fidl::encoding::DefaultFuchsiaResourceDialect,
964 >;
965 fn r#two_way_table_payload(
966 &self,
967 mut payload: &ClosedTargetTwoWayTablePayloadRequest,
968 ) -> Self::TwoWayTablePayloadResponseFut {
969 fn _decode(
970 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
971 ) -> Result<ClosedTargetTwoWayTablePayloadResponse, fidl::Error> {
972 let _response = fidl::client::decode_transaction_body::<
973 ClosedTargetTwoWayTablePayloadResponse,
974 fidl::encoding::DefaultFuchsiaResourceDialect,
975 0x631f7f27b6872baa,
976 >(_buf?)?;
977 Ok(_response)
978 }
979 self.client.send_query_and_decode::<
980 ClosedTargetTwoWayTablePayloadRequest,
981 ClosedTargetTwoWayTablePayloadResponse,
982 >(
983 payload,
984 0x631f7f27b6872baa,
985 fidl::encoding::DynamicFlags::empty(),
986 _decode,
987 )
988 }
989
990 type TwoWayUnionPayloadResponseFut = fidl::client::QueryResponseFut<
991 ClosedTargetTwoWayUnionPayloadResponse,
992 fidl::encoding::DefaultFuchsiaResourceDialect,
993 >;
994 fn r#two_way_union_payload(
995 &self,
996 mut payload: &ClosedTargetTwoWayUnionPayloadRequest,
997 ) -> Self::TwoWayUnionPayloadResponseFut {
998 fn _decode(
999 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1000 ) -> Result<ClosedTargetTwoWayUnionPayloadResponse, fidl::Error> {
1001 let _response = fidl::client::decode_transaction_body::<
1002 ClosedTargetTwoWayUnionPayloadResponse,
1003 fidl::encoding::DefaultFuchsiaResourceDialect,
1004 0x77d0365370536dba,
1005 >(_buf?)?;
1006 Ok(_response)
1007 }
1008 self.client.send_query_and_decode::<
1009 ClosedTargetTwoWayUnionPayloadRequest,
1010 ClosedTargetTwoWayUnionPayloadResponse,
1011 >(
1012 payload,
1013 0x77d0365370536dba,
1014 fidl::encoding::DynamicFlags::empty(),
1015 _decode,
1016 )
1017 }
1018
1019 type TwoWayResultResponseFut = fidl::client::QueryResponseFut<
1020 ClosedTargetTwoWayResultResult,
1021 fidl::encoding::DefaultFuchsiaResourceDialect,
1022 >;
1023 fn r#two_way_result(
1024 &self,
1025 mut payload: &ClosedTargetTwoWayResultRequest,
1026 ) -> Self::TwoWayResultResponseFut {
1027 fn _decode(
1028 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1029 ) -> Result<ClosedTargetTwoWayResultResult, fidl::Error> {
1030 let _response = fidl::client::decode_transaction_body::<
1031 fidl::encoding::ResultType<ClosedTargetTwoWayResultResponse, u32>,
1032 fidl::encoding::DefaultFuchsiaResourceDialect,
1033 0xb32549e6f50894c,
1034 >(_buf?)?;
1035 Ok(_response.map(|x| x.payload))
1036 }
1037 self.client.send_query_and_decode::<
1038 ClosedTargetTwoWayResultRequest,
1039 ClosedTargetTwoWayResultResult,
1040 >(
1041 payload,
1042 0xb32549e6f50894c,
1043 fidl::encoding::DynamicFlags::empty(),
1044 _decode,
1045 )
1046 }
1047
1048 type GetHandleRightsResponseFut =
1049 fidl::client::QueryResponseFut<fidl::Rights, fidl::encoding::DefaultFuchsiaResourceDialect>;
1050 fn r#get_handle_rights(&self, mut handle: fidl::Handle) -> Self::GetHandleRightsResponseFut {
1051 fn _decode(
1052 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1053 ) -> Result<fidl::Rights, fidl::Error> {
1054 let _response = fidl::client::decode_transaction_body::<
1055 ClosedTargetGetHandleRightsResponse,
1056 fidl::encoding::DefaultFuchsiaResourceDialect,
1057 0x1098d82f79effbe8,
1058 >(_buf?)?;
1059 Ok(_response.rights)
1060 }
1061 self.client.send_query_and_decode::<ClosedTargetGetHandleRightsRequest, fidl::Rights>(
1062 (handle,),
1063 0x1098d82f79effbe8,
1064 fidl::encoding::DynamicFlags::empty(),
1065 _decode,
1066 )
1067 }
1068
1069 type GetSignalableEventRightsResponseFut =
1070 fidl::client::QueryResponseFut<fidl::Rights, fidl::encoding::DefaultFuchsiaResourceDialect>;
1071 fn r#get_signalable_event_rights(
1072 &self,
1073 mut handle: fidl::Event,
1074 ) -> Self::GetSignalableEventRightsResponseFut {
1075 fn _decode(
1076 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1077 ) -> Result<fidl::Rights, fidl::Error> {
1078 let _response = fidl::client::decode_transaction_body::<
1079 ClosedTargetGetSignalableEventRightsResponse,
1080 fidl::encoding::DefaultFuchsiaResourceDialect,
1081 0x698c31448fd5daf,
1082 >(_buf?)?;
1083 Ok(_response.rights)
1084 }
1085 self.client
1086 .send_query_and_decode::<ClosedTargetGetSignalableEventRightsRequest, fidl::Rights>(
1087 (handle,),
1088 0x698c31448fd5daf,
1089 fidl::encoding::DynamicFlags::empty(),
1090 _decode,
1091 )
1092 }
1093
1094 type EchoAsTransferableSignalableEventResponseFut =
1095 fidl::client::QueryResponseFut<fidl::Event, fidl::encoding::DefaultFuchsiaResourceDialect>;
1096 fn r#echo_as_transferable_signalable_event(
1097 &self,
1098 mut handle: fidl::Handle,
1099 ) -> Self::EchoAsTransferableSignalableEventResponseFut {
1100 fn _decode(
1101 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1102 ) -> Result<fidl::Event, fidl::Error> {
1103 let _response = fidl::client::decode_transaction_body::<
1104 ClosedTargetEchoAsTransferableSignalableEventResponse,
1105 fidl::encoding::DefaultFuchsiaResourceDialect,
1106 0x5ec627bdc2e02ca0,
1107 >(_buf?)?;
1108 Ok(_response.handle)
1109 }
1110 self.client.send_query_and_decode::<
1111 ClosedTargetEchoAsTransferableSignalableEventRequest,
1112 fidl::Event,
1113 >(
1114 (handle,),
1115 0x5ec627bdc2e02ca0,
1116 fidl::encoding::DynamicFlags::empty(),
1117 _decode,
1118 )
1119 }
1120
1121 type ByteVectorSizeResponseFut =
1122 fidl::client::QueryResponseFut<u32, fidl::encoding::DefaultFuchsiaResourceDialect>;
1123 fn r#byte_vector_size(&self, mut vec: &[u8]) -> Self::ByteVectorSizeResponseFut {
1124 fn _decode(
1125 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1126 ) -> Result<u32, fidl::Error> {
1127 let _response = fidl::client::decode_transaction_body::<
1128 ClosedTargetByteVectorSizeResponse,
1129 fidl::encoding::DefaultFuchsiaResourceDialect,
1130 0x104b2f9aa8b7fe25,
1131 >(_buf?)?;
1132 Ok(_response.n)
1133 }
1134 self.client.send_query_and_decode::<ClosedTargetByteVectorSizeRequest, u32>(
1135 (vec,),
1136 0x104b2f9aa8b7fe25,
1137 fidl::encoding::DynamicFlags::empty(),
1138 _decode,
1139 )
1140 }
1141
1142 type HandleVectorSizeResponseFut =
1143 fidl::client::QueryResponseFut<u32, fidl::encoding::DefaultFuchsiaResourceDialect>;
1144 fn r#handle_vector_size(&self, mut vec: Vec<fidl::Event>) -> Self::HandleVectorSizeResponseFut {
1145 fn _decode(
1146 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1147 ) -> Result<u32, fidl::Error> {
1148 let _response = fidl::client::decode_transaction_body::<
1149 ClosedTargetHandleVectorSizeResponse,
1150 fidl::encoding::DefaultFuchsiaResourceDialect,
1151 0x4c1ac83570a98537,
1152 >(_buf?)?;
1153 Ok(_response.n)
1154 }
1155 self.client.send_query_and_decode::<ClosedTargetHandleVectorSizeRequest, u32>(
1156 (vec.as_mut(),),
1157 0x4c1ac83570a98537,
1158 fidl::encoding::DynamicFlags::empty(),
1159 _decode,
1160 )
1161 }
1162
1163 type CreateNByteVectorResponseFut =
1164 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
1165 fn r#create_n_byte_vector(&self, mut n: u32) -> Self::CreateNByteVectorResponseFut {
1166 fn _decode(
1167 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1168 ) -> Result<Vec<u8>, fidl::Error> {
1169 let _response = fidl::client::decode_transaction_body::<
1170 ClosedTargetCreateNByteVectorResponse,
1171 fidl::encoding::DefaultFuchsiaResourceDialect,
1172 0x1ecd88ef664e9c61,
1173 >(_buf?)?;
1174 Ok(_response.vec)
1175 }
1176 self.client.send_query_and_decode::<ClosedTargetCreateNByteVectorRequest, Vec<u8>>(
1177 (n,),
1178 0x1ecd88ef664e9c61,
1179 fidl::encoding::DynamicFlags::empty(),
1180 _decode,
1181 )
1182 }
1183
1184 type CreateNHandleVectorResponseFut = fidl::client::QueryResponseFut<
1185 Vec<fidl::Event>,
1186 fidl::encoding::DefaultFuchsiaResourceDialect,
1187 >;
1188 fn r#create_n_handle_vector(&self, mut n: u32) -> Self::CreateNHandleVectorResponseFut {
1189 fn _decode(
1190 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1191 ) -> Result<Vec<fidl::Event>, fidl::Error> {
1192 let _response = fidl::client::decode_transaction_body::<
1193 ClosedTargetCreateNHandleVectorResponse,
1194 fidl::encoding::DefaultFuchsiaResourceDialect,
1195 0x26341ba1fa66813d,
1196 >(_buf?)?;
1197 Ok(_response.vec)
1198 }
1199 self.client
1200 .send_query_and_decode::<ClosedTargetCreateNHandleVectorRequest, Vec<fidl::Event>>(
1201 (n,),
1202 0x26341ba1fa66813d,
1203 fidl::encoding::DynamicFlags::empty(),
1204 _decode,
1205 )
1206 }
1207}
1208
1209pub struct ClosedTargetEventStream {
1210 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1211}
1212
1213impl std::marker::Unpin for ClosedTargetEventStream {}
1214
1215impl futures::stream::FusedStream for ClosedTargetEventStream {
1216 fn is_terminated(&self) -> bool {
1217 self.event_receiver.is_terminated()
1218 }
1219}
1220
1221impl futures::Stream for ClosedTargetEventStream {
1222 type Item = Result<ClosedTargetEvent, fidl::Error>;
1223
1224 fn poll_next(
1225 mut self: std::pin::Pin<&mut Self>,
1226 cx: &mut std::task::Context<'_>,
1227 ) -> std::task::Poll<Option<Self::Item>> {
1228 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1229 &mut self.event_receiver,
1230 cx
1231 )?) {
1232 Some(buf) => std::task::Poll::Ready(Some(ClosedTargetEvent::decode(buf))),
1233 None => std::task::Poll::Ready(None),
1234 }
1235 }
1236}
1237
1238#[derive(Debug)]
1239pub enum ClosedTargetEvent {}
1240
1241impl ClosedTargetEvent {
1242 fn decode(
1244 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1245 ) -> Result<ClosedTargetEvent, fidl::Error> {
1246 let (bytes, _handles) = buf.split_mut();
1247 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1248 debug_assert_eq!(tx_header.tx_id, 0);
1249 match tx_header.ordinal {
1250 _ => Err(fidl::Error::UnknownOrdinal {
1251 ordinal: tx_header.ordinal,
1252 protocol_name: <ClosedTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1253 }),
1254 }
1255 }
1256}
1257
1258pub struct ClosedTargetRequestStream {
1260 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1261 is_terminated: bool,
1262}
1263
1264impl std::marker::Unpin for ClosedTargetRequestStream {}
1265
1266impl futures::stream::FusedStream for ClosedTargetRequestStream {
1267 fn is_terminated(&self) -> bool {
1268 self.is_terminated
1269 }
1270}
1271
1272impl fidl::endpoints::RequestStream for ClosedTargetRequestStream {
1273 type Protocol = ClosedTargetMarker;
1274 type ControlHandle = ClosedTargetControlHandle;
1275
1276 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1277 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1278 }
1279
1280 fn control_handle(&self) -> Self::ControlHandle {
1281 ClosedTargetControlHandle { inner: self.inner.clone() }
1282 }
1283
1284 fn into_inner(
1285 self,
1286 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1287 {
1288 (self.inner, self.is_terminated)
1289 }
1290
1291 fn from_inner(
1292 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1293 is_terminated: bool,
1294 ) -> Self {
1295 Self { inner, is_terminated }
1296 }
1297}
1298
1299impl futures::Stream for ClosedTargetRequestStream {
1300 type Item = Result<ClosedTargetRequest, fidl::Error>;
1301
1302 fn poll_next(
1303 mut self: std::pin::Pin<&mut Self>,
1304 cx: &mut std::task::Context<'_>,
1305 ) -> std::task::Poll<Option<Self::Item>> {
1306 let this = &mut *self;
1307 if this.inner.check_shutdown(cx) {
1308 this.is_terminated = true;
1309 return std::task::Poll::Ready(None);
1310 }
1311 if this.is_terminated {
1312 panic!("polled ClosedTargetRequestStream after completion");
1313 }
1314 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1315 |bytes, handles| {
1316 match this.inner.channel().read_etc(cx, bytes, handles) {
1317 std::task::Poll::Ready(Ok(())) => {}
1318 std::task::Poll::Pending => return std::task::Poll::Pending,
1319 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1320 this.is_terminated = true;
1321 return std::task::Poll::Ready(None);
1322 }
1323 std::task::Poll::Ready(Err(e)) => {
1324 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1325 e.into(),
1326 ))))
1327 }
1328 }
1329
1330 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1332
1333 std::task::Poll::Ready(Some(match header.ordinal {
1334 0x66bd5fe1d4c019e => {
1335 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1336 let mut req = fidl::new_empty!(
1337 fidl::encoding::EmptyPayload,
1338 fidl::encoding::DefaultFuchsiaResourceDialect
1339 );
1340 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1341 let control_handle =
1342 ClosedTargetControlHandle { inner: this.inner.clone() };
1343 Ok(ClosedTargetRequest::OneWayNoPayload { control_handle })
1344 }
1345 0x5bda1d1c46a5ae5f => {
1346 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1347 let mut req = fidl::new_empty!(
1348 fidl::encoding::EmptyPayload,
1349 fidl::encoding::DefaultFuchsiaResourceDialect
1350 );
1351 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1352 let control_handle =
1353 ClosedTargetControlHandle { inner: this.inner.clone() };
1354 Ok(ClosedTargetRequest::TwoWayNoPayload {
1355 responder: ClosedTargetTwoWayNoPayloadResponder {
1356 control_handle: std::mem::ManuallyDrop::new(control_handle),
1357 tx_id: header.tx_id,
1358 },
1359 })
1360 }
1361 0x313769ab1b770c90 => {
1362 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1363 let mut req = fidl::new_empty!(
1364 ClosedTargetTwoWayStructPayloadRequest,
1365 fidl::encoding::DefaultFuchsiaResourceDialect
1366 );
1367 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetTwoWayStructPayloadRequest>(&header, _body_bytes, handles, &mut req)?;
1368 let control_handle =
1369 ClosedTargetControlHandle { inner: this.inner.clone() };
1370 Ok(ClosedTargetRequest::TwoWayStructPayload {
1371 v: req.v,
1372
1373 responder: ClosedTargetTwoWayStructPayloadResponder {
1374 control_handle: std::mem::ManuallyDrop::new(control_handle),
1375 tx_id: header.tx_id,
1376 },
1377 })
1378 }
1379 0x631f7f27b6872baa => {
1380 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1381 let mut req = fidl::new_empty!(
1382 ClosedTargetTwoWayTablePayloadRequest,
1383 fidl::encoding::DefaultFuchsiaResourceDialect
1384 );
1385 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetTwoWayTablePayloadRequest>(&header, _body_bytes, handles, &mut req)?;
1386 let control_handle =
1387 ClosedTargetControlHandle { inner: this.inner.clone() };
1388 Ok(ClosedTargetRequest::TwoWayTablePayload {
1389 payload: req,
1390 responder: ClosedTargetTwoWayTablePayloadResponder {
1391 control_handle: std::mem::ManuallyDrop::new(control_handle),
1392 tx_id: header.tx_id,
1393 },
1394 })
1395 }
1396 0x77d0365370536dba => {
1397 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1398 let mut req = fidl::new_empty!(
1399 ClosedTargetTwoWayUnionPayloadRequest,
1400 fidl::encoding::DefaultFuchsiaResourceDialect
1401 );
1402 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetTwoWayUnionPayloadRequest>(&header, _body_bytes, handles, &mut req)?;
1403 let control_handle =
1404 ClosedTargetControlHandle { inner: this.inner.clone() };
1405 Ok(ClosedTargetRequest::TwoWayUnionPayload {
1406 payload: req,
1407 responder: ClosedTargetTwoWayUnionPayloadResponder {
1408 control_handle: std::mem::ManuallyDrop::new(control_handle),
1409 tx_id: header.tx_id,
1410 },
1411 })
1412 }
1413 0xb32549e6f50894c => {
1414 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1415 let mut req = fidl::new_empty!(
1416 ClosedTargetTwoWayResultRequest,
1417 fidl::encoding::DefaultFuchsiaResourceDialect
1418 );
1419 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetTwoWayResultRequest>(&header, _body_bytes, handles, &mut req)?;
1420 let control_handle =
1421 ClosedTargetControlHandle { inner: this.inner.clone() };
1422 Ok(ClosedTargetRequest::TwoWayResult {
1423 payload: req,
1424 responder: ClosedTargetTwoWayResultResponder {
1425 control_handle: std::mem::ManuallyDrop::new(control_handle),
1426 tx_id: header.tx_id,
1427 },
1428 })
1429 }
1430 0x1098d82f79effbe8 => {
1431 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1432 let mut req = fidl::new_empty!(
1433 ClosedTargetGetHandleRightsRequest,
1434 fidl::encoding::DefaultFuchsiaResourceDialect
1435 );
1436 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetGetHandleRightsRequest>(&header, _body_bytes, handles, &mut req)?;
1437 let control_handle =
1438 ClosedTargetControlHandle { inner: this.inner.clone() };
1439 Ok(ClosedTargetRequest::GetHandleRights {
1440 handle: req.handle,
1441
1442 responder: ClosedTargetGetHandleRightsResponder {
1443 control_handle: std::mem::ManuallyDrop::new(control_handle),
1444 tx_id: header.tx_id,
1445 },
1446 })
1447 }
1448 0x698c31448fd5daf => {
1449 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1450 let mut req = fidl::new_empty!(
1451 ClosedTargetGetSignalableEventRightsRequest,
1452 fidl::encoding::DefaultFuchsiaResourceDialect
1453 );
1454 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetGetSignalableEventRightsRequest>(&header, _body_bytes, handles, &mut req)?;
1455 let control_handle =
1456 ClosedTargetControlHandle { inner: this.inner.clone() };
1457 Ok(ClosedTargetRequest::GetSignalableEventRights {
1458 handle: req.handle,
1459
1460 responder: ClosedTargetGetSignalableEventRightsResponder {
1461 control_handle: std::mem::ManuallyDrop::new(control_handle),
1462 tx_id: header.tx_id,
1463 },
1464 })
1465 }
1466 0x5ec627bdc2e02ca0 => {
1467 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1468 let mut req = fidl::new_empty!(
1469 ClosedTargetEchoAsTransferableSignalableEventRequest,
1470 fidl::encoding::DefaultFuchsiaResourceDialect
1471 );
1472 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetEchoAsTransferableSignalableEventRequest>(&header, _body_bytes, handles, &mut req)?;
1473 let control_handle =
1474 ClosedTargetControlHandle { inner: this.inner.clone() };
1475 Ok(ClosedTargetRequest::EchoAsTransferableSignalableEvent {
1476 handle: req.handle,
1477
1478 responder: ClosedTargetEchoAsTransferableSignalableEventResponder {
1479 control_handle: std::mem::ManuallyDrop::new(control_handle),
1480 tx_id: header.tx_id,
1481 },
1482 })
1483 }
1484 0x104b2f9aa8b7fe25 => {
1485 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1486 let mut req = fidl::new_empty!(
1487 ClosedTargetByteVectorSizeRequest,
1488 fidl::encoding::DefaultFuchsiaResourceDialect
1489 );
1490 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetByteVectorSizeRequest>(&header, _body_bytes, handles, &mut req)?;
1491 let control_handle =
1492 ClosedTargetControlHandle { inner: this.inner.clone() };
1493 Ok(ClosedTargetRequest::ByteVectorSize {
1494 vec: req.vec,
1495
1496 responder: ClosedTargetByteVectorSizeResponder {
1497 control_handle: std::mem::ManuallyDrop::new(control_handle),
1498 tx_id: header.tx_id,
1499 },
1500 })
1501 }
1502 0x4c1ac83570a98537 => {
1503 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1504 let mut req = fidl::new_empty!(
1505 ClosedTargetHandleVectorSizeRequest,
1506 fidl::encoding::DefaultFuchsiaResourceDialect
1507 );
1508 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetHandleVectorSizeRequest>(&header, _body_bytes, handles, &mut req)?;
1509 let control_handle =
1510 ClosedTargetControlHandle { inner: this.inner.clone() };
1511 Ok(ClosedTargetRequest::HandleVectorSize {
1512 vec: req.vec,
1513
1514 responder: ClosedTargetHandleVectorSizeResponder {
1515 control_handle: std::mem::ManuallyDrop::new(control_handle),
1516 tx_id: header.tx_id,
1517 },
1518 })
1519 }
1520 0x1ecd88ef664e9c61 => {
1521 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1522 let mut req = fidl::new_empty!(
1523 ClosedTargetCreateNByteVectorRequest,
1524 fidl::encoding::DefaultFuchsiaResourceDialect
1525 );
1526 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetCreateNByteVectorRequest>(&header, _body_bytes, handles, &mut req)?;
1527 let control_handle =
1528 ClosedTargetControlHandle { inner: this.inner.clone() };
1529 Ok(ClosedTargetRequest::CreateNByteVector {
1530 n: req.n,
1531
1532 responder: ClosedTargetCreateNByteVectorResponder {
1533 control_handle: std::mem::ManuallyDrop::new(control_handle),
1534 tx_id: header.tx_id,
1535 },
1536 })
1537 }
1538 0x26341ba1fa66813d => {
1539 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1540 let mut req = fidl::new_empty!(
1541 ClosedTargetCreateNHandleVectorRequest,
1542 fidl::encoding::DefaultFuchsiaResourceDialect
1543 );
1544 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClosedTargetCreateNHandleVectorRequest>(&header, _body_bytes, handles, &mut req)?;
1545 let control_handle =
1546 ClosedTargetControlHandle { inner: this.inner.clone() };
1547 Ok(ClosedTargetRequest::CreateNHandleVector {
1548 n: req.n,
1549
1550 responder: ClosedTargetCreateNHandleVectorResponder {
1551 control_handle: std::mem::ManuallyDrop::new(control_handle),
1552 tx_id: header.tx_id,
1553 },
1554 })
1555 }
1556 _ => Err(fidl::Error::UnknownOrdinal {
1557 ordinal: header.ordinal,
1558 protocol_name:
1559 <ClosedTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1560 }),
1561 }))
1562 },
1563 )
1564 }
1565}
1566
1567#[derive(Debug)]
1568pub enum ClosedTargetRequest {
1569 OneWayNoPayload {
1570 control_handle: ClosedTargetControlHandle,
1571 },
1572 TwoWayNoPayload {
1573 responder: ClosedTargetTwoWayNoPayloadResponder,
1574 },
1575 TwoWayStructPayload {
1576 v: i8,
1577 responder: ClosedTargetTwoWayStructPayloadResponder,
1578 },
1579 TwoWayTablePayload {
1580 payload: ClosedTargetTwoWayTablePayloadRequest,
1581 responder: ClosedTargetTwoWayTablePayloadResponder,
1582 },
1583 TwoWayUnionPayload {
1584 payload: ClosedTargetTwoWayUnionPayloadRequest,
1585 responder: ClosedTargetTwoWayUnionPayloadResponder,
1586 },
1587 TwoWayResult {
1588 payload: ClosedTargetTwoWayResultRequest,
1589 responder: ClosedTargetTwoWayResultResponder,
1590 },
1591 GetHandleRights {
1592 handle: fidl::Handle,
1593 responder: ClosedTargetGetHandleRightsResponder,
1594 },
1595 GetSignalableEventRights {
1596 handle: fidl::Event,
1597 responder: ClosedTargetGetSignalableEventRightsResponder,
1598 },
1599 EchoAsTransferableSignalableEvent {
1600 handle: fidl::Handle,
1601 responder: ClosedTargetEchoAsTransferableSignalableEventResponder,
1602 },
1603 ByteVectorSize {
1604 vec: Vec<u8>,
1605 responder: ClosedTargetByteVectorSizeResponder,
1606 },
1607 HandleVectorSize {
1608 vec: Vec<fidl::Event>,
1609 responder: ClosedTargetHandleVectorSizeResponder,
1610 },
1611 CreateNByteVector {
1612 n: u32,
1613 responder: ClosedTargetCreateNByteVectorResponder,
1614 },
1615 CreateNHandleVector {
1616 n: u32,
1617 responder: ClosedTargetCreateNHandleVectorResponder,
1618 },
1619}
1620
1621impl ClosedTargetRequest {
1622 #[allow(irrefutable_let_patterns)]
1623 pub fn into_one_way_no_payload(self) -> Option<(ClosedTargetControlHandle)> {
1624 if let ClosedTargetRequest::OneWayNoPayload { control_handle } = self {
1625 Some((control_handle))
1626 } else {
1627 None
1628 }
1629 }
1630
1631 #[allow(irrefutable_let_patterns)]
1632 pub fn into_two_way_no_payload(self) -> Option<(ClosedTargetTwoWayNoPayloadResponder)> {
1633 if let ClosedTargetRequest::TwoWayNoPayload { responder } = self {
1634 Some((responder))
1635 } else {
1636 None
1637 }
1638 }
1639
1640 #[allow(irrefutable_let_patterns)]
1641 pub fn into_two_way_struct_payload(
1642 self,
1643 ) -> Option<(i8, ClosedTargetTwoWayStructPayloadResponder)> {
1644 if let ClosedTargetRequest::TwoWayStructPayload { v, responder } = self {
1645 Some((v, responder))
1646 } else {
1647 None
1648 }
1649 }
1650
1651 #[allow(irrefutable_let_patterns)]
1652 pub fn into_two_way_table_payload(
1653 self,
1654 ) -> Option<(ClosedTargetTwoWayTablePayloadRequest, ClosedTargetTwoWayTablePayloadResponder)>
1655 {
1656 if let ClosedTargetRequest::TwoWayTablePayload { payload, responder } = self {
1657 Some((payload, responder))
1658 } else {
1659 None
1660 }
1661 }
1662
1663 #[allow(irrefutable_let_patterns)]
1664 pub fn into_two_way_union_payload(
1665 self,
1666 ) -> Option<(ClosedTargetTwoWayUnionPayloadRequest, ClosedTargetTwoWayUnionPayloadResponder)>
1667 {
1668 if let ClosedTargetRequest::TwoWayUnionPayload { payload, responder } = self {
1669 Some((payload, responder))
1670 } else {
1671 None
1672 }
1673 }
1674
1675 #[allow(irrefutable_let_patterns)]
1676 pub fn into_two_way_result(
1677 self,
1678 ) -> Option<(ClosedTargetTwoWayResultRequest, ClosedTargetTwoWayResultResponder)> {
1679 if let ClosedTargetRequest::TwoWayResult { payload, responder } = self {
1680 Some((payload, responder))
1681 } else {
1682 None
1683 }
1684 }
1685
1686 #[allow(irrefutable_let_patterns)]
1687 pub fn into_get_handle_rights(
1688 self,
1689 ) -> Option<(fidl::Handle, ClosedTargetGetHandleRightsResponder)> {
1690 if let ClosedTargetRequest::GetHandleRights { handle, responder } = self {
1691 Some((handle, responder))
1692 } else {
1693 None
1694 }
1695 }
1696
1697 #[allow(irrefutable_let_patterns)]
1698 pub fn into_get_signalable_event_rights(
1699 self,
1700 ) -> Option<(fidl::Event, ClosedTargetGetSignalableEventRightsResponder)> {
1701 if let ClosedTargetRequest::GetSignalableEventRights { handle, responder } = self {
1702 Some((handle, responder))
1703 } else {
1704 None
1705 }
1706 }
1707
1708 #[allow(irrefutable_let_patterns)]
1709 pub fn into_echo_as_transferable_signalable_event(
1710 self,
1711 ) -> Option<(fidl::Handle, ClosedTargetEchoAsTransferableSignalableEventResponder)> {
1712 if let ClosedTargetRequest::EchoAsTransferableSignalableEvent { handle, responder } = self {
1713 Some((handle, responder))
1714 } else {
1715 None
1716 }
1717 }
1718
1719 #[allow(irrefutable_let_patterns)]
1720 pub fn into_byte_vector_size(self) -> Option<(Vec<u8>, ClosedTargetByteVectorSizeResponder)> {
1721 if let ClosedTargetRequest::ByteVectorSize { vec, responder } = self {
1722 Some((vec, responder))
1723 } else {
1724 None
1725 }
1726 }
1727
1728 #[allow(irrefutable_let_patterns)]
1729 pub fn into_handle_vector_size(
1730 self,
1731 ) -> Option<(Vec<fidl::Event>, ClosedTargetHandleVectorSizeResponder)> {
1732 if let ClosedTargetRequest::HandleVectorSize { vec, responder } = self {
1733 Some((vec, responder))
1734 } else {
1735 None
1736 }
1737 }
1738
1739 #[allow(irrefutable_let_patterns)]
1740 pub fn into_create_n_byte_vector(
1741 self,
1742 ) -> Option<(u32, ClosedTargetCreateNByteVectorResponder)> {
1743 if let ClosedTargetRequest::CreateNByteVector { n, responder } = self {
1744 Some((n, responder))
1745 } else {
1746 None
1747 }
1748 }
1749
1750 #[allow(irrefutable_let_patterns)]
1751 pub fn into_create_n_handle_vector(
1752 self,
1753 ) -> Option<(u32, ClosedTargetCreateNHandleVectorResponder)> {
1754 if let ClosedTargetRequest::CreateNHandleVector { n, responder } = self {
1755 Some((n, responder))
1756 } else {
1757 None
1758 }
1759 }
1760
1761 pub fn method_name(&self) -> &'static str {
1763 match *self {
1764 ClosedTargetRequest::OneWayNoPayload { .. } => "one_way_no_payload",
1765 ClosedTargetRequest::TwoWayNoPayload { .. } => "two_way_no_payload",
1766 ClosedTargetRequest::TwoWayStructPayload { .. } => "two_way_struct_payload",
1767 ClosedTargetRequest::TwoWayTablePayload { .. } => "two_way_table_payload",
1768 ClosedTargetRequest::TwoWayUnionPayload { .. } => "two_way_union_payload",
1769 ClosedTargetRequest::TwoWayResult { .. } => "two_way_result",
1770 ClosedTargetRequest::GetHandleRights { .. } => "get_handle_rights",
1771 ClosedTargetRequest::GetSignalableEventRights { .. } => "get_signalable_event_rights",
1772 ClosedTargetRequest::EchoAsTransferableSignalableEvent { .. } => {
1773 "echo_as_transferable_signalable_event"
1774 }
1775 ClosedTargetRequest::ByteVectorSize { .. } => "byte_vector_size",
1776 ClosedTargetRequest::HandleVectorSize { .. } => "handle_vector_size",
1777 ClosedTargetRequest::CreateNByteVector { .. } => "create_n_byte_vector",
1778 ClosedTargetRequest::CreateNHandleVector { .. } => "create_n_handle_vector",
1779 }
1780 }
1781}
1782
1783#[derive(Debug, Clone)]
1784pub struct ClosedTargetControlHandle {
1785 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1786}
1787
1788impl fidl::endpoints::ControlHandle for ClosedTargetControlHandle {
1789 fn shutdown(&self) {
1790 self.inner.shutdown()
1791 }
1792 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1793 self.inner.shutdown_with_epitaph(status)
1794 }
1795
1796 fn is_closed(&self) -> bool {
1797 self.inner.channel().is_closed()
1798 }
1799 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1800 self.inner.channel().on_closed()
1801 }
1802
1803 #[cfg(target_os = "fuchsia")]
1804 fn signal_peer(
1805 &self,
1806 clear_mask: zx::Signals,
1807 set_mask: zx::Signals,
1808 ) -> Result<(), zx_status::Status> {
1809 use fidl::Peered;
1810 self.inner.channel().signal_peer(clear_mask, set_mask)
1811 }
1812}
1813
1814impl ClosedTargetControlHandle {}
1815
1816#[must_use = "FIDL methods require a response to be sent"]
1817#[derive(Debug)]
1818pub struct ClosedTargetTwoWayNoPayloadResponder {
1819 control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
1820 tx_id: u32,
1821}
1822
1823impl std::ops::Drop for ClosedTargetTwoWayNoPayloadResponder {
1827 fn drop(&mut self) {
1828 self.control_handle.shutdown();
1829 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1831 }
1832}
1833
1834impl fidl::endpoints::Responder for ClosedTargetTwoWayNoPayloadResponder {
1835 type ControlHandle = ClosedTargetControlHandle;
1836
1837 fn control_handle(&self) -> &ClosedTargetControlHandle {
1838 &self.control_handle
1839 }
1840
1841 fn drop_without_shutdown(mut self) {
1842 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1844 std::mem::forget(self);
1846 }
1847}
1848
1849impl ClosedTargetTwoWayNoPayloadResponder {
1850 pub fn send(self) -> Result<(), fidl::Error> {
1854 let _result = self.send_raw();
1855 if _result.is_err() {
1856 self.control_handle.shutdown();
1857 }
1858 self.drop_without_shutdown();
1859 _result
1860 }
1861
1862 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
1864 let _result = self.send_raw();
1865 self.drop_without_shutdown();
1866 _result
1867 }
1868
1869 fn send_raw(&self) -> Result<(), fidl::Error> {
1870 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
1871 (),
1872 self.tx_id,
1873 0x5bda1d1c46a5ae5f,
1874 fidl::encoding::DynamicFlags::empty(),
1875 )
1876 }
1877}
1878
1879#[must_use = "FIDL methods require a response to be sent"]
1880#[derive(Debug)]
1881pub struct ClosedTargetTwoWayStructPayloadResponder {
1882 control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
1883 tx_id: u32,
1884}
1885
1886impl std::ops::Drop for ClosedTargetTwoWayStructPayloadResponder {
1890 fn drop(&mut self) {
1891 self.control_handle.shutdown();
1892 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1894 }
1895}
1896
1897impl fidl::endpoints::Responder for ClosedTargetTwoWayStructPayloadResponder {
1898 type ControlHandle = ClosedTargetControlHandle;
1899
1900 fn control_handle(&self) -> &ClosedTargetControlHandle {
1901 &self.control_handle
1902 }
1903
1904 fn drop_without_shutdown(mut self) {
1905 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1907 std::mem::forget(self);
1909 }
1910}
1911
1912impl ClosedTargetTwoWayStructPayloadResponder {
1913 pub fn send(self, mut v: i8) -> Result<(), fidl::Error> {
1917 let _result = self.send_raw(v);
1918 if _result.is_err() {
1919 self.control_handle.shutdown();
1920 }
1921 self.drop_without_shutdown();
1922 _result
1923 }
1924
1925 pub fn send_no_shutdown_on_err(self, mut v: i8) -> Result<(), fidl::Error> {
1927 let _result = self.send_raw(v);
1928 self.drop_without_shutdown();
1929 _result
1930 }
1931
1932 fn send_raw(&self, mut v: i8) -> Result<(), fidl::Error> {
1933 self.control_handle.inner.send::<ClosedTargetTwoWayStructPayloadResponse>(
1934 (v,),
1935 self.tx_id,
1936 0x313769ab1b770c90,
1937 fidl::encoding::DynamicFlags::empty(),
1938 )
1939 }
1940}
1941
1942#[must_use = "FIDL methods require a response to be sent"]
1943#[derive(Debug)]
1944pub struct ClosedTargetTwoWayTablePayloadResponder {
1945 control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
1946 tx_id: u32,
1947}
1948
1949impl std::ops::Drop for ClosedTargetTwoWayTablePayloadResponder {
1953 fn drop(&mut self) {
1954 self.control_handle.shutdown();
1955 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1957 }
1958}
1959
1960impl fidl::endpoints::Responder for ClosedTargetTwoWayTablePayloadResponder {
1961 type ControlHandle = ClosedTargetControlHandle;
1962
1963 fn control_handle(&self) -> &ClosedTargetControlHandle {
1964 &self.control_handle
1965 }
1966
1967 fn drop_without_shutdown(mut self) {
1968 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1970 std::mem::forget(self);
1972 }
1973}
1974
1975impl ClosedTargetTwoWayTablePayloadResponder {
1976 pub fn send(
1980 self,
1981 mut payload: &ClosedTargetTwoWayTablePayloadResponse,
1982 ) -> Result<(), fidl::Error> {
1983 let _result = self.send_raw(payload);
1984 if _result.is_err() {
1985 self.control_handle.shutdown();
1986 }
1987 self.drop_without_shutdown();
1988 _result
1989 }
1990
1991 pub fn send_no_shutdown_on_err(
1993 self,
1994 mut payload: &ClosedTargetTwoWayTablePayloadResponse,
1995 ) -> Result<(), fidl::Error> {
1996 let _result = self.send_raw(payload);
1997 self.drop_without_shutdown();
1998 _result
1999 }
2000
2001 fn send_raw(
2002 &self,
2003 mut payload: &ClosedTargetTwoWayTablePayloadResponse,
2004 ) -> Result<(), fidl::Error> {
2005 self.control_handle.inner.send::<ClosedTargetTwoWayTablePayloadResponse>(
2006 payload,
2007 self.tx_id,
2008 0x631f7f27b6872baa,
2009 fidl::encoding::DynamicFlags::empty(),
2010 )
2011 }
2012}
2013
2014#[must_use = "FIDL methods require a response to be sent"]
2015#[derive(Debug)]
2016pub struct ClosedTargetTwoWayUnionPayloadResponder {
2017 control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2018 tx_id: u32,
2019}
2020
2021impl std::ops::Drop for ClosedTargetTwoWayUnionPayloadResponder {
2025 fn drop(&mut self) {
2026 self.control_handle.shutdown();
2027 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2029 }
2030}
2031
2032impl fidl::endpoints::Responder for ClosedTargetTwoWayUnionPayloadResponder {
2033 type ControlHandle = ClosedTargetControlHandle;
2034
2035 fn control_handle(&self) -> &ClosedTargetControlHandle {
2036 &self.control_handle
2037 }
2038
2039 fn drop_without_shutdown(mut self) {
2040 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2042 std::mem::forget(self);
2044 }
2045}
2046
2047impl ClosedTargetTwoWayUnionPayloadResponder {
2048 pub fn send(
2052 self,
2053 mut payload: &ClosedTargetTwoWayUnionPayloadResponse,
2054 ) -> Result<(), fidl::Error> {
2055 let _result = self.send_raw(payload);
2056 if _result.is_err() {
2057 self.control_handle.shutdown();
2058 }
2059 self.drop_without_shutdown();
2060 _result
2061 }
2062
2063 pub fn send_no_shutdown_on_err(
2065 self,
2066 mut payload: &ClosedTargetTwoWayUnionPayloadResponse,
2067 ) -> Result<(), fidl::Error> {
2068 let _result = self.send_raw(payload);
2069 self.drop_without_shutdown();
2070 _result
2071 }
2072
2073 fn send_raw(
2074 &self,
2075 mut payload: &ClosedTargetTwoWayUnionPayloadResponse,
2076 ) -> Result<(), fidl::Error> {
2077 self.control_handle.inner.send::<ClosedTargetTwoWayUnionPayloadResponse>(
2078 payload,
2079 self.tx_id,
2080 0x77d0365370536dba,
2081 fidl::encoding::DynamicFlags::empty(),
2082 )
2083 }
2084}
2085
2086#[must_use = "FIDL methods require a response to be sent"]
2087#[derive(Debug)]
2088pub struct ClosedTargetTwoWayResultResponder {
2089 control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2090 tx_id: u32,
2091}
2092
2093impl std::ops::Drop for ClosedTargetTwoWayResultResponder {
2097 fn drop(&mut self) {
2098 self.control_handle.shutdown();
2099 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2101 }
2102}
2103
2104impl fidl::endpoints::Responder for ClosedTargetTwoWayResultResponder {
2105 type ControlHandle = ClosedTargetControlHandle;
2106
2107 fn control_handle(&self) -> &ClosedTargetControlHandle {
2108 &self.control_handle
2109 }
2110
2111 fn drop_without_shutdown(mut self) {
2112 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2114 std::mem::forget(self);
2116 }
2117}
2118
2119impl ClosedTargetTwoWayResultResponder {
2120 pub fn send(self, mut result: Result<&str, u32>) -> Result<(), fidl::Error> {
2124 let _result = self.send_raw(result);
2125 if _result.is_err() {
2126 self.control_handle.shutdown();
2127 }
2128 self.drop_without_shutdown();
2129 _result
2130 }
2131
2132 pub fn send_no_shutdown_on_err(self, mut result: Result<&str, u32>) -> Result<(), fidl::Error> {
2134 let _result = self.send_raw(result);
2135 self.drop_without_shutdown();
2136 _result
2137 }
2138
2139 fn send_raw(&self, mut result: Result<&str, u32>) -> Result<(), fidl::Error> {
2140 self.control_handle
2141 .inner
2142 .send::<fidl::encoding::ResultType<ClosedTargetTwoWayResultResponse, u32>>(
2143 result.map(|payload| (payload,)),
2144 self.tx_id,
2145 0xb32549e6f50894c,
2146 fidl::encoding::DynamicFlags::empty(),
2147 )
2148 }
2149}
2150
2151#[must_use = "FIDL methods require a response to be sent"]
2152#[derive(Debug)]
2153pub struct ClosedTargetGetHandleRightsResponder {
2154 control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2155 tx_id: u32,
2156}
2157
2158impl std::ops::Drop for ClosedTargetGetHandleRightsResponder {
2162 fn drop(&mut self) {
2163 self.control_handle.shutdown();
2164 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2166 }
2167}
2168
2169impl fidl::endpoints::Responder for ClosedTargetGetHandleRightsResponder {
2170 type ControlHandle = ClosedTargetControlHandle;
2171
2172 fn control_handle(&self) -> &ClosedTargetControlHandle {
2173 &self.control_handle
2174 }
2175
2176 fn drop_without_shutdown(mut self) {
2177 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2179 std::mem::forget(self);
2181 }
2182}
2183
2184impl ClosedTargetGetHandleRightsResponder {
2185 pub fn send(self, mut rights: fidl::Rights) -> Result<(), fidl::Error> {
2189 let _result = self.send_raw(rights);
2190 if _result.is_err() {
2191 self.control_handle.shutdown();
2192 }
2193 self.drop_without_shutdown();
2194 _result
2195 }
2196
2197 pub fn send_no_shutdown_on_err(self, mut rights: fidl::Rights) -> Result<(), fidl::Error> {
2199 let _result = self.send_raw(rights);
2200 self.drop_without_shutdown();
2201 _result
2202 }
2203
2204 fn send_raw(&self, mut rights: fidl::Rights) -> Result<(), fidl::Error> {
2205 self.control_handle.inner.send::<ClosedTargetGetHandleRightsResponse>(
2206 (rights,),
2207 self.tx_id,
2208 0x1098d82f79effbe8,
2209 fidl::encoding::DynamicFlags::empty(),
2210 )
2211 }
2212}
2213
2214#[must_use = "FIDL methods require a response to be sent"]
2215#[derive(Debug)]
2216pub struct ClosedTargetGetSignalableEventRightsResponder {
2217 control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2218 tx_id: u32,
2219}
2220
2221impl std::ops::Drop for ClosedTargetGetSignalableEventRightsResponder {
2225 fn drop(&mut self) {
2226 self.control_handle.shutdown();
2227 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2229 }
2230}
2231
2232impl fidl::endpoints::Responder for ClosedTargetGetSignalableEventRightsResponder {
2233 type ControlHandle = ClosedTargetControlHandle;
2234
2235 fn control_handle(&self) -> &ClosedTargetControlHandle {
2236 &self.control_handle
2237 }
2238
2239 fn drop_without_shutdown(mut self) {
2240 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2242 std::mem::forget(self);
2244 }
2245}
2246
2247impl ClosedTargetGetSignalableEventRightsResponder {
2248 pub fn send(self, mut rights: fidl::Rights) -> Result<(), fidl::Error> {
2252 let _result = self.send_raw(rights);
2253 if _result.is_err() {
2254 self.control_handle.shutdown();
2255 }
2256 self.drop_without_shutdown();
2257 _result
2258 }
2259
2260 pub fn send_no_shutdown_on_err(self, mut rights: fidl::Rights) -> Result<(), fidl::Error> {
2262 let _result = self.send_raw(rights);
2263 self.drop_without_shutdown();
2264 _result
2265 }
2266
2267 fn send_raw(&self, mut rights: fidl::Rights) -> Result<(), fidl::Error> {
2268 self.control_handle.inner.send::<ClosedTargetGetSignalableEventRightsResponse>(
2269 (rights,),
2270 self.tx_id,
2271 0x698c31448fd5daf,
2272 fidl::encoding::DynamicFlags::empty(),
2273 )
2274 }
2275}
2276
2277#[must_use = "FIDL methods require a response to be sent"]
2278#[derive(Debug)]
2279pub struct ClosedTargetEchoAsTransferableSignalableEventResponder {
2280 control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2281 tx_id: u32,
2282}
2283
2284impl std::ops::Drop for ClosedTargetEchoAsTransferableSignalableEventResponder {
2288 fn drop(&mut self) {
2289 self.control_handle.shutdown();
2290 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2292 }
2293}
2294
2295impl fidl::endpoints::Responder for ClosedTargetEchoAsTransferableSignalableEventResponder {
2296 type ControlHandle = ClosedTargetControlHandle;
2297
2298 fn control_handle(&self) -> &ClosedTargetControlHandle {
2299 &self.control_handle
2300 }
2301
2302 fn drop_without_shutdown(mut self) {
2303 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2305 std::mem::forget(self);
2307 }
2308}
2309
2310impl ClosedTargetEchoAsTransferableSignalableEventResponder {
2311 pub fn send(self, mut handle: fidl::Event) -> Result<(), fidl::Error> {
2315 let _result = self.send_raw(handle);
2316 if _result.is_err() {
2317 self.control_handle.shutdown();
2318 }
2319 self.drop_without_shutdown();
2320 _result
2321 }
2322
2323 pub fn send_no_shutdown_on_err(self, mut handle: fidl::Event) -> Result<(), fidl::Error> {
2325 let _result = self.send_raw(handle);
2326 self.drop_without_shutdown();
2327 _result
2328 }
2329
2330 fn send_raw(&self, mut handle: fidl::Event) -> Result<(), fidl::Error> {
2331 self.control_handle.inner.send::<ClosedTargetEchoAsTransferableSignalableEventResponse>(
2332 (handle,),
2333 self.tx_id,
2334 0x5ec627bdc2e02ca0,
2335 fidl::encoding::DynamicFlags::empty(),
2336 )
2337 }
2338}
2339
2340#[must_use = "FIDL methods require a response to be sent"]
2341#[derive(Debug)]
2342pub struct ClosedTargetByteVectorSizeResponder {
2343 control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2344 tx_id: u32,
2345}
2346
2347impl std::ops::Drop for ClosedTargetByteVectorSizeResponder {
2351 fn drop(&mut self) {
2352 self.control_handle.shutdown();
2353 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2355 }
2356}
2357
2358impl fidl::endpoints::Responder for ClosedTargetByteVectorSizeResponder {
2359 type ControlHandle = ClosedTargetControlHandle;
2360
2361 fn control_handle(&self) -> &ClosedTargetControlHandle {
2362 &self.control_handle
2363 }
2364
2365 fn drop_without_shutdown(mut self) {
2366 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2368 std::mem::forget(self);
2370 }
2371}
2372
2373impl ClosedTargetByteVectorSizeResponder {
2374 pub fn send(self, mut n: u32) -> Result<(), fidl::Error> {
2378 let _result = self.send_raw(n);
2379 if _result.is_err() {
2380 self.control_handle.shutdown();
2381 }
2382 self.drop_without_shutdown();
2383 _result
2384 }
2385
2386 pub fn send_no_shutdown_on_err(self, mut n: u32) -> Result<(), fidl::Error> {
2388 let _result = self.send_raw(n);
2389 self.drop_without_shutdown();
2390 _result
2391 }
2392
2393 fn send_raw(&self, mut n: u32) -> Result<(), fidl::Error> {
2394 self.control_handle.inner.send::<ClosedTargetByteVectorSizeResponse>(
2395 (n,),
2396 self.tx_id,
2397 0x104b2f9aa8b7fe25,
2398 fidl::encoding::DynamicFlags::empty(),
2399 )
2400 }
2401}
2402
2403#[must_use = "FIDL methods require a response to be sent"]
2404#[derive(Debug)]
2405pub struct ClosedTargetHandleVectorSizeResponder {
2406 control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2407 tx_id: u32,
2408}
2409
2410impl std::ops::Drop for ClosedTargetHandleVectorSizeResponder {
2414 fn drop(&mut self) {
2415 self.control_handle.shutdown();
2416 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2418 }
2419}
2420
2421impl fidl::endpoints::Responder for ClosedTargetHandleVectorSizeResponder {
2422 type ControlHandle = ClosedTargetControlHandle;
2423
2424 fn control_handle(&self) -> &ClosedTargetControlHandle {
2425 &self.control_handle
2426 }
2427
2428 fn drop_without_shutdown(mut self) {
2429 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2431 std::mem::forget(self);
2433 }
2434}
2435
2436impl ClosedTargetHandleVectorSizeResponder {
2437 pub fn send(self, mut n: u32) -> Result<(), fidl::Error> {
2441 let _result = self.send_raw(n);
2442 if _result.is_err() {
2443 self.control_handle.shutdown();
2444 }
2445 self.drop_without_shutdown();
2446 _result
2447 }
2448
2449 pub fn send_no_shutdown_on_err(self, mut n: u32) -> Result<(), fidl::Error> {
2451 let _result = self.send_raw(n);
2452 self.drop_without_shutdown();
2453 _result
2454 }
2455
2456 fn send_raw(&self, mut n: u32) -> Result<(), fidl::Error> {
2457 self.control_handle.inner.send::<ClosedTargetHandleVectorSizeResponse>(
2458 (n,),
2459 self.tx_id,
2460 0x4c1ac83570a98537,
2461 fidl::encoding::DynamicFlags::empty(),
2462 )
2463 }
2464}
2465
2466#[must_use = "FIDL methods require a response to be sent"]
2467#[derive(Debug)]
2468pub struct ClosedTargetCreateNByteVectorResponder {
2469 control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2470 tx_id: u32,
2471}
2472
2473impl std::ops::Drop for ClosedTargetCreateNByteVectorResponder {
2477 fn drop(&mut self) {
2478 self.control_handle.shutdown();
2479 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2481 }
2482}
2483
2484impl fidl::endpoints::Responder for ClosedTargetCreateNByteVectorResponder {
2485 type ControlHandle = ClosedTargetControlHandle;
2486
2487 fn control_handle(&self) -> &ClosedTargetControlHandle {
2488 &self.control_handle
2489 }
2490
2491 fn drop_without_shutdown(mut self) {
2492 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2494 std::mem::forget(self);
2496 }
2497}
2498
2499impl ClosedTargetCreateNByteVectorResponder {
2500 pub fn send(self, mut vec: &[u8]) -> Result<(), fidl::Error> {
2504 let _result = self.send_raw(vec);
2505 if _result.is_err() {
2506 self.control_handle.shutdown();
2507 }
2508 self.drop_without_shutdown();
2509 _result
2510 }
2511
2512 pub fn send_no_shutdown_on_err(self, mut vec: &[u8]) -> Result<(), fidl::Error> {
2514 let _result = self.send_raw(vec);
2515 self.drop_without_shutdown();
2516 _result
2517 }
2518
2519 fn send_raw(&self, mut vec: &[u8]) -> Result<(), fidl::Error> {
2520 self.control_handle.inner.send::<ClosedTargetCreateNByteVectorResponse>(
2521 (vec,),
2522 self.tx_id,
2523 0x1ecd88ef664e9c61,
2524 fidl::encoding::DynamicFlags::empty(),
2525 )
2526 }
2527}
2528
2529#[must_use = "FIDL methods require a response to be sent"]
2530#[derive(Debug)]
2531pub struct ClosedTargetCreateNHandleVectorResponder {
2532 control_handle: std::mem::ManuallyDrop<ClosedTargetControlHandle>,
2533 tx_id: u32,
2534}
2535
2536impl std::ops::Drop for ClosedTargetCreateNHandleVectorResponder {
2540 fn drop(&mut self) {
2541 self.control_handle.shutdown();
2542 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2544 }
2545}
2546
2547impl fidl::endpoints::Responder for ClosedTargetCreateNHandleVectorResponder {
2548 type ControlHandle = ClosedTargetControlHandle;
2549
2550 fn control_handle(&self) -> &ClosedTargetControlHandle {
2551 &self.control_handle
2552 }
2553
2554 fn drop_without_shutdown(mut self) {
2555 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2557 std::mem::forget(self);
2559 }
2560}
2561
2562impl ClosedTargetCreateNHandleVectorResponder {
2563 pub fn send(self, mut vec: Vec<fidl::Event>) -> Result<(), fidl::Error> {
2567 let _result = self.send_raw(vec);
2568 if _result.is_err() {
2569 self.control_handle.shutdown();
2570 }
2571 self.drop_without_shutdown();
2572 _result
2573 }
2574
2575 pub fn send_no_shutdown_on_err(self, mut vec: Vec<fidl::Event>) -> Result<(), fidl::Error> {
2577 let _result = self.send_raw(vec);
2578 self.drop_without_shutdown();
2579 _result
2580 }
2581
2582 fn send_raw(&self, mut vec: Vec<fidl::Event>) -> Result<(), fidl::Error> {
2583 self.control_handle.inner.send::<ClosedTargetCreateNHandleVectorResponse>(
2584 (vec.as_mut(),),
2585 self.tx_id,
2586 0x26341ba1fa66813d,
2587 fidl::encoding::DynamicFlags::empty(),
2588 )
2589 }
2590}
2591
2592#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2593pub struct OpenTargetMarker;
2594
2595impl fidl::endpoints::ProtocolMarker for OpenTargetMarker {
2596 type Proxy = OpenTargetProxy;
2597 type RequestStream = OpenTargetRequestStream;
2598 #[cfg(target_os = "fuchsia")]
2599 type SynchronousProxy = OpenTargetSynchronousProxy;
2600
2601 const DEBUG_NAME: &'static str = "(anonymous) OpenTarget";
2602}
2603pub type OpenTargetStrictTwoWayErrResult = Result<(), i32>;
2604pub type OpenTargetStrictTwoWayFieldsErrResult = Result<i32, i32>;
2605pub type OpenTargetFlexibleTwoWayErrResult = Result<(), i32>;
2606pub type OpenTargetFlexibleTwoWayFieldsErrResult = Result<i32, i32>;
2607
2608pub trait OpenTargetProxyInterface: Send + Sync {
2609 fn r#strict_one_way(&self) -> Result<(), fidl::Error>;
2610 fn r#flexible_one_way(&self) -> Result<(), fidl::Error>;
2611 type StrictTwoWayResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
2612 fn r#strict_two_way(&self) -> Self::StrictTwoWayResponseFut;
2613 type StrictTwoWayFieldsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
2614 + Send;
2615 fn r#strict_two_way_fields(&self, reply_with: i32) -> Self::StrictTwoWayFieldsResponseFut;
2616 type StrictTwoWayErrResponseFut: std::future::Future<Output = Result<OpenTargetStrictTwoWayErrResult, fidl::Error>>
2617 + Send;
2618 fn r#strict_two_way_err(
2619 &self,
2620 payload: &OpenTargetStrictTwoWayErrRequest,
2621 ) -> Self::StrictTwoWayErrResponseFut;
2622 type StrictTwoWayFieldsErrResponseFut: std::future::Future<Output = Result<OpenTargetStrictTwoWayFieldsErrResult, fidl::Error>>
2623 + Send;
2624 fn r#strict_two_way_fields_err(
2625 &self,
2626 payload: &OpenTargetStrictTwoWayFieldsErrRequest,
2627 ) -> Self::StrictTwoWayFieldsErrResponseFut;
2628 type FlexibleTwoWayResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
2629 fn r#flexible_two_way(&self) -> Self::FlexibleTwoWayResponseFut;
2630 type FlexibleTwoWayFieldsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
2631 + Send;
2632 fn r#flexible_two_way_fields(&self, reply_with: i32) -> Self::FlexibleTwoWayFieldsResponseFut;
2633 type FlexibleTwoWayErrResponseFut: std::future::Future<Output = Result<OpenTargetFlexibleTwoWayErrResult, fidl::Error>>
2634 + Send;
2635 fn r#flexible_two_way_err(
2636 &self,
2637 payload: &OpenTargetFlexibleTwoWayErrRequest,
2638 ) -> Self::FlexibleTwoWayErrResponseFut;
2639 type FlexibleTwoWayFieldsErrResponseFut: std::future::Future<Output = Result<OpenTargetFlexibleTwoWayFieldsErrResult, fidl::Error>>
2640 + Send;
2641 fn r#flexible_two_way_fields_err(
2642 &self,
2643 payload: &OpenTargetFlexibleTwoWayFieldsErrRequest,
2644 ) -> Self::FlexibleTwoWayFieldsErrResponseFut;
2645}
2646#[derive(Debug)]
2647#[cfg(target_os = "fuchsia")]
2648pub struct OpenTargetSynchronousProxy {
2649 client: fidl::client::sync::Client,
2650}
2651
2652#[cfg(target_os = "fuchsia")]
2653impl fidl::endpoints::SynchronousProxy for OpenTargetSynchronousProxy {
2654 type Proxy = OpenTargetProxy;
2655 type Protocol = OpenTargetMarker;
2656
2657 fn from_channel(inner: fidl::Channel) -> Self {
2658 Self::new(inner)
2659 }
2660
2661 fn into_channel(self) -> fidl::Channel {
2662 self.client.into_channel()
2663 }
2664
2665 fn as_channel(&self) -> &fidl::Channel {
2666 self.client.as_channel()
2667 }
2668}
2669
2670#[cfg(target_os = "fuchsia")]
2671impl OpenTargetSynchronousProxy {
2672 pub fn new(channel: fidl::Channel) -> Self {
2673 let protocol_name = <OpenTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2674 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
2675 }
2676
2677 pub fn into_channel(self) -> fidl::Channel {
2678 self.client.into_channel()
2679 }
2680
2681 pub fn wait_for_event(
2684 &self,
2685 deadline: zx::MonotonicInstant,
2686 ) -> Result<OpenTargetEvent, fidl::Error> {
2687 OpenTargetEvent::decode(self.client.wait_for_event(deadline)?)
2688 }
2689
2690 pub fn r#strict_one_way(&self) -> Result<(), fidl::Error> {
2691 self.client.send::<fidl::encoding::EmptyPayload>(
2692 (),
2693 0x24dd8be3750aba9b,
2694 fidl::encoding::DynamicFlags::empty(),
2695 )
2696 }
2697
2698 pub fn r#flexible_one_way(&self) -> Result<(), fidl::Error> {
2699 self.client.send::<fidl::encoding::EmptyPayload>(
2700 (),
2701 0x421bbeb2bbc84a58,
2702 fidl::encoding::DynamicFlags::FLEXIBLE,
2703 )
2704 }
2705
2706 pub fn r#strict_two_way(&self, ___deadline: zx::MonotonicInstant) -> Result<(), fidl::Error> {
2707 let _response =
2708 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
2709 (),
2710 0x70020c582a57ef03,
2711 fidl::encoding::DynamicFlags::empty(),
2712 ___deadline,
2713 )?;
2714 Ok(_response)
2715 }
2716
2717 pub fn r#strict_two_way_fields(
2718 &self,
2719 mut reply_with: i32,
2720 ___deadline: zx::MonotonicInstant,
2721 ) -> Result<i32, fidl::Error> {
2722 let _response = self.client.send_query::<
2723 OpenTargetStrictTwoWayFieldsRequest,
2724 OpenTargetStrictTwoWayFieldsResponse,
2725 >(
2726 (reply_with,),
2727 0x2be6e1cc40008010,
2728 fidl::encoding::DynamicFlags::empty(),
2729 ___deadline,
2730 )?;
2731 Ok(_response.some_field)
2732 }
2733
2734 pub fn r#strict_two_way_err(
2735 &self,
2736 mut payload: &OpenTargetStrictTwoWayErrRequest,
2737 ___deadline: zx::MonotonicInstant,
2738 ) -> Result<OpenTargetStrictTwoWayErrResult, fidl::Error> {
2739 let _response = self.client.send_query::<
2740 OpenTargetStrictTwoWayErrRequest,
2741 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2742 >(
2743 payload,
2744 0x6efc16069ebd0b2c,
2745 fidl::encoding::DynamicFlags::empty(),
2746 ___deadline,
2747 )?;
2748 Ok(_response.map(|x| x))
2749 }
2750
2751 pub fn r#strict_two_way_fields_err(
2752 &self,
2753 mut payload: &OpenTargetStrictTwoWayFieldsErrRequest,
2754 ___deadline: zx::MonotonicInstant,
2755 ) -> Result<OpenTargetStrictTwoWayFieldsErrResult, fidl::Error> {
2756 let _response = self.client.send_query::<
2757 OpenTargetStrictTwoWayFieldsErrRequest,
2758 fidl::encoding::ResultType<OpenTargetStrictTwoWayFieldsErrResponse, i32>,
2759 >(
2760 payload,
2761 0x309c8adda770fcf0,
2762 fidl::encoding::DynamicFlags::empty(),
2763 ___deadline,
2764 )?;
2765 Ok(_response.map(|x| x.some_field))
2766 }
2767
2768 pub fn r#flexible_two_way(&self, ___deadline: zx::MonotonicInstant) -> Result<(), fidl::Error> {
2769 let _response = self.client.send_query::<
2770 fidl::encoding::EmptyPayload,
2771 fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
2772 >(
2773 (),
2774 0x19f932dac7810c71,
2775 fidl::encoding::DynamicFlags::FLEXIBLE,
2776 ___deadline,
2777 )?
2778 .into_result::<OpenTargetMarker>("flexible_two_way")?;
2779 Ok(_response)
2780 }
2781
2782 pub fn r#flexible_two_way_fields(
2783 &self,
2784 mut reply_with: i32,
2785 ___deadline: zx::MonotonicInstant,
2786 ) -> Result<i32, fidl::Error> {
2787 let _response = self.client.send_query::<
2788 OpenTargetFlexibleTwoWayFieldsRequest,
2789 fidl::encoding::FlexibleType<OpenTargetFlexibleTwoWayFieldsResponse>,
2790 >(
2791 (reply_with,),
2792 0x47cca5ddb4207774,
2793 fidl::encoding::DynamicFlags::FLEXIBLE,
2794 ___deadline,
2795 )?
2796 .into_result::<OpenTargetMarker>("flexible_two_way_fields")?;
2797 Ok(_response.some_field)
2798 }
2799
2800 pub fn r#flexible_two_way_err(
2801 &self,
2802 mut payload: &OpenTargetFlexibleTwoWayErrRequest,
2803 ___deadline: zx::MonotonicInstant,
2804 ) -> Result<OpenTargetFlexibleTwoWayErrResult, fidl::Error> {
2805 let _response = self.client.send_query::<
2806 OpenTargetFlexibleTwoWayErrRequest,
2807 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
2808 >(
2809 payload,
2810 0x52aa19681fea3a0,
2811 fidl::encoding::DynamicFlags::FLEXIBLE,
2812 ___deadline,
2813 )?
2814 .into_result::<OpenTargetMarker>("flexible_two_way_err")?;
2815 Ok(_response.map(|x| x))
2816 }
2817
2818 pub fn r#flexible_two_way_fields_err(
2819 &self,
2820 mut payload: &OpenTargetFlexibleTwoWayFieldsErrRequest,
2821 ___deadline: zx::MonotonicInstant,
2822 ) -> Result<OpenTargetFlexibleTwoWayFieldsErrResult, fidl::Error> {
2823 let _response = self.client.send_query::<
2824 OpenTargetFlexibleTwoWayFieldsErrRequest,
2825 fidl::encoding::FlexibleResultType<OpenTargetFlexibleTwoWayFieldsErrResponse, i32>,
2826 >(
2827 payload,
2828 0x1ab7dd4c6a3650b6,
2829 fidl::encoding::DynamicFlags::FLEXIBLE,
2830 ___deadline,
2831 )?
2832 .into_result::<OpenTargetMarker>("flexible_two_way_fields_err")?;
2833 Ok(_response.map(|x| x.some_field))
2834 }
2835}
2836
2837#[cfg(target_os = "fuchsia")]
2838impl From<OpenTargetSynchronousProxy> for zx::Handle {
2839 fn from(value: OpenTargetSynchronousProxy) -> Self {
2840 value.into_channel().into()
2841 }
2842}
2843
2844#[cfg(target_os = "fuchsia")]
2845impl From<fidl::Channel> for OpenTargetSynchronousProxy {
2846 fn from(value: fidl::Channel) -> Self {
2847 Self::new(value)
2848 }
2849}
2850
2851#[derive(Debug, Clone)]
2852pub struct OpenTargetProxy {
2853 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2854}
2855
2856impl fidl::endpoints::Proxy for OpenTargetProxy {
2857 type Protocol = OpenTargetMarker;
2858
2859 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2860 Self::new(inner)
2861 }
2862
2863 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2864 self.client.into_channel().map_err(|client| Self { client })
2865 }
2866
2867 fn as_channel(&self) -> &::fidl::AsyncChannel {
2868 self.client.as_channel()
2869 }
2870}
2871
2872impl OpenTargetProxy {
2873 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2875 let protocol_name = <OpenTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2876 Self { client: fidl::client::Client::new(channel, protocol_name) }
2877 }
2878
2879 pub fn take_event_stream(&self) -> OpenTargetEventStream {
2885 OpenTargetEventStream { event_receiver: self.client.take_event_receiver() }
2886 }
2887
2888 pub fn r#strict_one_way(&self) -> Result<(), fidl::Error> {
2889 OpenTargetProxyInterface::r#strict_one_way(self)
2890 }
2891
2892 pub fn r#flexible_one_way(&self) -> Result<(), fidl::Error> {
2893 OpenTargetProxyInterface::r#flexible_one_way(self)
2894 }
2895
2896 pub fn r#strict_two_way(
2897 &self,
2898 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
2899 OpenTargetProxyInterface::r#strict_two_way(self)
2900 }
2901
2902 pub fn r#strict_two_way_fields(
2903 &self,
2904 mut reply_with: i32,
2905 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2906 OpenTargetProxyInterface::r#strict_two_way_fields(self, reply_with)
2907 }
2908
2909 pub fn r#strict_two_way_err(
2910 &self,
2911 mut payload: &OpenTargetStrictTwoWayErrRequest,
2912 ) -> fidl::client::QueryResponseFut<
2913 OpenTargetStrictTwoWayErrResult,
2914 fidl::encoding::DefaultFuchsiaResourceDialect,
2915 > {
2916 OpenTargetProxyInterface::r#strict_two_way_err(self, payload)
2917 }
2918
2919 pub fn r#strict_two_way_fields_err(
2920 &self,
2921 mut payload: &OpenTargetStrictTwoWayFieldsErrRequest,
2922 ) -> fidl::client::QueryResponseFut<
2923 OpenTargetStrictTwoWayFieldsErrResult,
2924 fidl::encoding::DefaultFuchsiaResourceDialect,
2925 > {
2926 OpenTargetProxyInterface::r#strict_two_way_fields_err(self, payload)
2927 }
2928
2929 pub fn r#flexible_two_way(
2930 &self,
2931 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
2932 OpenTargetProxyInterface::r#flexible_two_way(self)
2933 }
2934
2935 pub fn r#flexible_two_way_fields(
2936 &self,
2937 mut reply_with: i32,
2938 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2939 OpenTargetProxyInterface::r#flexible_two_way_fields(self, reply_with)
2940 }
2941
2942 pub fn r#flexible_two_way_err(
2943 &self,
2944 mut payload: &OpenTargetFlexibleTwoWayErrRequest,
2945 ) -> fidl::client::QueryResponseFut<
2946 OpenTargetFlexibleTwoWayErrResult,
2947 fidl::encoding::DefaultFuchsiaResourceDialect,
2948 > {
2949 OpenTargetProxyInterface::r#flexible_two_way_err(self, payload)
2950 }
2951
2952 pub fn r#flexible_two_way_fields_err(
2953 &self,
2954 mut payload: &OpenTargetFlexibleTwoWayFieldsErrRequest,
2955 ) -> fidl::client::QueryResponseFut<
2956 OpenTargetFlexibleTwoWayFieldsErrResult,
2957 fidl::encoding::DefaultFuchsiaResourceDialect,
2958 > {
2959 OpenTargetProxyInterface::r#flexible_two_way_fields_err(self, payload)
2960 }
2961}
2962
2963impl OpenTargetProxyInterface for OpenTargetProxy {
2964 fn r#strict_one_way(&self) -> Result<(), fidl::Error> {
2965 self.client.send::<fidl::encoding::EmptyPayload>(
2966 (),
2967 0x24dd8be3750aba9b,
2968 fidl::encoding::DynamicFlags::empty(),
2969 )
2970 }
2971
2972 fn r#flexible_one_way(&self) -> Result<(), fidl::Error> {
2973 self.client.send::<fidl::encoding::EmptyPayload>(
2974 (),
2975 0x421bbeb2bbc84a58,
2976 fidl::encoding::DynamicFlags::FLEXIBLE,
2977 )
2978 }
2979
2980 type StrictTwoWayResponseFut =
2981 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
2982 fn r#strict_two_way(&self) -> Self::StrictTwoWayResponseFut {
2983 fn _decode(
2984 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2985 ) -> Result<(), fidl::Error> {
2986 let _response = fidl::client::decode_transaction_body::<
2987 fidl::encoding::EmptyPayload,
2988 fidl::encoding::DefaultFuchsiaResourceDialect,
2989 0x70020c582a57ef03,
2990 >(_buf?)?;
2991 Ok(_response)
2992 }
2993 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
2994 (),
2995 0x70020c582a57ef03,
2996 fidl::encoding::DynamicFlags::empty(),
2997 _decode,
2998 )
2999 }
3000
3001 type StrictTwoWayFieldsResponseFut =
3002 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
3003 fn r#strict_two_way_fields(&self, mut reply_with: i32) -> Self::StrictTwoWayFieldsResponseFut {
3004 fn _decode(
3005 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3006 ) -> Result<i32, fidl::Error> {
3007 let _response = fidl::client::decode_transaction_body::<
3008 OpenTargetStrictTwoWayFieldsResponse,
3009 fidl::encoding::DefaultFuchsiaResourceDialect,
3010 0x2be6e1cc40008010,
3011 >(_buf?)?;
3012 Ok(_response.some_field)
3013 }
3014 self.client.send_query_and_decode::<OpenTargetStrictTwoWayFieldsRequest, i32>(
3015 (reply_with,),
3016 0x2be6e1cc40008010,
3017 fidl::encoding::DynamicFlags::empty(),
3018 _decode,
3019 )
3020 }
3021
3022 type StrictTwoWayErrResponseFut = fidl::client::QueryResponseFut<
3023 OpenTargetStrictTwoWayErrResult,
3024 fidl::encoding::DefaultFuchsiaResourceDialect,
3025 >;
3026 fn r#strict_two_way_err(
3027 &self,
3028 mut payload: &OpenTargetStrictTwoWayErrRequest,
3029 ) -> Self::StrictTwoWayErrResponseFut {
3030 fn _decode(
3031 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3032 ) -> Result<OpenTargetStrictTwoWayErrResult, fidl::Error> {
3033 let _response = fidl::client::decode_transaction_body::<
3034 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3035 fidl::encoding::DefaultFuchsiaResourceDialect,
3036 0x6efc16069ebd0b2c,
3037 >(_buf?)?;
3038 Ok(_response.map(|x| x))
3039 }
3040 self.client.send_query_and_decode::<
3041 OpenTargetStrictTwoWayErrRequest,
3042 OpenTargetStrictTwoWayErrResult,
3043 >(
3044 payload,
3045 0x6efc16069ebd0b2c,
3046 fidl::encoding::DynamicFlags::empty(),
3047 _decode,
3048 )
3049 }
3050
3051 type StrictTwoWayFieldsErrResponseFut = fidl::client::QueryResponseFut<
3052 OpenTargetStrictTwoWayFieldsErrResult,
3053 fidl::encoding::DefaultFuchsiaResourceDialect,
3054 >;
3055 fn r#strict_two_way_fields_err(
3056 &self,
3057 mut payload: &OpenTargetStrictTwoWayFieldsErrRequest,
3058 ) -> Self::StrictTwoWayFieldsErrResponseFut {
3059 fn _decode(
3060 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3061 ) -> Result<OpenTargetStrictTwoWayFieldsErrResult, fidl::Error> {
3062 let _response = fidl::client::decode_transaction_body::<
3063 fidl::encoding::ResultType<OpenTargetStrictTwoWayFieldsErrResponse, i32>,
3064 fidl::encoding::DefaultFuchsiaResourceDialect,
3065 0x309c8adda770fcf0,
3066 >(_buf?)?;
3067 Ok(_response.map(|x| x.some_field))
3068 }
3069 self.client.send_query_and_decode::<
3070 OpenTargetStrictTwoWayFieldsErrRequest,
3071 OpenTargetStrictTwoWayFieldsErrResult,
3072 >(
3073 payload,
3074 0x309c8adda770fcf0,
3075 fidl::encoding::DynamicFlags::empty(),
3076 _decode,
3077 )
3078 }
3079
3080 type FlexibleTwoWayResponseFut =
3081 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
3082 fn r#flexible_two_way(&self) -> Self::FlexibleTwoWayResponseFut {
3083 fn _decode(
3084 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3085 ) -> Result<(), fidl::Error> {
3086 let _response = fidl::client::decode_transaction_body::<
3087 fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
3088 fidl::encoding::DefaultFuchsiaResourceDialect,
3089 0x19f932dac7810c71,
3090 >(_buf?)?
3091 .into_result::<OpenTargetMarker>("flexible_two_way")?;
3092 Ok(_response)
3093 }
3094 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
3095 (),
3096 0x19f932dac7810c71,
3097 fidl::encoding::DynamicFlags::FLEXIBLE,
3098 _decode,
3099 )
3100 }
3101
3102 type FlexibleTwoWayFieldsResponseFut =
3103 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
3104 fn r#flexible_two_way_fields(
3105 &self,
3106 mut reply_with: i32,
3107 ) -> Self::FlexibleTwoWayFieldsResponseFut {
3108 fn _decode(
3109 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3110 ) -> Result<i32, fidl::Error> {
3111 let _response = fidl::client::decode_transaction_body::<
3112 fidl::encoding::FlexibleType<OpenTargetFlexibleTwoWayFieldsResponse>,
3113 fidl::encoding::DefaultFuchsiaResourceDialect,
3114 0x47cca5ddb4207774,
3115 >(_buf?)?
3116 .into_result::<OpenTargetMarker>("flexible_two_way_fields")?;
3117 Ok(_response.some_field)
3118 }
3119 self.client.send_query_and_decode::<OpenTargetFlexibleTwoWayFieldsRequest, i32>(
3120 (reply_with,),
3121 0x47cca5ddb4207774,
3122 fidl::encoding::DynamicFlags::FLEXIBLE,
3123 _decode,
3124 )
3125 }
3126
3127 type FlexibleTwoWayErrResponseFut = fidl::client::QueryResponseFut<
3128 OpenTargetFlexibleTwoWayErrResult,
3129 fidl::encoding::DefaultFuchsiaResourceDialect,
3130 >;
3131 fn r#flexible_two_way_err(
3132 &self,
3133 mut payload: &OpenTargetFlexibleTwoWayErrRequest,
3134 ) -> Self::FlexibleTwoWayErrResponseFut {
3135 fn _decode(
3136 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3137 ) -> Result<OpenTargetFlexibleTwoWayErrResult, fidl::Error> {
3138 let _response = fidl::client::decode_transaction_body::<
3139 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
3140 fidl::encoding::DefaultFuchsiaResourceDialect,
3141 0x52aa19681fea3a0,
3142 >(_buf?)?
3143 .into_result::<OpenTargetMarker>("flexible_two_way_err")?;
3144 Ok(_response.map(|x| x))
3145 }
3146 self.client.send_query_and_decode::<
3147 OpenTargetFlexibleTwoWayErrRequest,
3148 OpenTargetFlexibleTwoWayErrResult,
3149 >(
3150 payload,
3151 0x52aa19681fea3a0,
3152 fidl::encoding::DynamicFlags::FLEXIBLE,
3153 _decode,
3154 )
3155 }
3156
3157 type FlexibleTwoWayFieldsErrResponseFut = fidl::client::QueryResponseFut<
3158 OpenTargetFlexibleTwoWayFieldsErrResult,
3159 fidl::encoding::DefaultFuchsiaResourceDialect,
3160 >;
3161 fn r#flexible_two_way_fields_err(
3162 &self,
3163 mut payload: &OpenTargetFlexibleTwoWayFieldsErrRequest,
3164 ) -> Self::FlexibleTwoWayFieldsErrResponseFut {
3165 fn _decode(
3166 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3167 ) -> Result<OpenTargetFlexibleTwoWayFieldsErrResult, fidl::Error> {
3168 let _response = fidl::client::decode_transaction_body::<
3169 fidl::encoding::FlexibleResultType<OpenTargetFlexibleTwoWayFieldsErrResponse, i32>,
3170 fidl::encoding::DefaultFuchsiaResourceDialect,
3171 0x1ab7dd4c6a3650b6,
3172 >(_buf?)?
3173 .into_result::<OpenTargetMarker>("flexible_two_way_fields_err")?;
3174 Ok(_response.map(|x| x.some_field))
3175 }
3176 self.client.send_query_and_decode::<
3177 OpenTargetFlexibleTwoWayFieldsErrRequest,
3178 OpenTargetFlexibleTwoWayFieldsErrResult,
3179 >(
3180 payload,
3181 0x1ab7dd4c6a3650b6,
3182 fidl::encoding::DynamicFlags::FLEXIBLE,
3183 _decode,
3184 )
3185 }
3186}
3187
3188pub struct OpenTargetEventStream {
3189 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3190}
3191
3192impl std::marker::Unpin for OpenTargetEventStream {}
3193
3194impl futures::stream::FusedStream for OpenTargetEventStream {
3195 fn is_terminated(&self) -> bool {
3196 self.event_receiver.is_terminated()
3197 }
3198}
3199
3200impl futures::Stream for OpenTargetEventStream {
3201 type Item = Result<OpenTargetEvent, fidl::Error>;
3202
3203 fn poll_next(
3204 mut self: std::pin::Pin<&mut Self>,
3205 cx: &mut std::task::Context<'_>,
3206 ) -> std::task::Poll<Option<Self::Item>> {
3207 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3208 &mut self.event_receiver,
3209 cx
3210 )?) {
3211 Some(buf) => std::task::Poll::Ready(Some(OpenTargetEvent::decode(buf))),
3212 None => std::task::Poll::Ready(None),
3213 }
3214 }
3215}
3216
3217#[derive(Debug)]
3218pub enum OpenTargetEvent {
3219 StrictEvent {},
3220 FlexibleEvent {},
3221 #[non_exhaustive]
3222 _UnknownEvent {
3223 ordinal: u64,
3225 },
3226}
3227
3228impl OpenTargetEvent {
3229 #[allow(irrefutable_let_patterns)]
3230 pub fn into_strict_event(self) -> Option<()> {
3231 if let OpenTargetEvent::StrictEvent {} = self {
3232 Some(())
3233 } else {
3234 None
3235 }
3236 }
3237 #[allow(irrefutable_let_patterns)]
3238 pub fn into_flexible_event(self) -> Option<()> {
3239 if let OpenTargetEvent::FlexibleEvent {} = self {
3240 Some(())
3241 } else {
3242 None
3243 }
3244 }
3245
3246 fn decode(
3248 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3249 ) -> Result<OpenTargetEvent, fidl::Error> {
3250 let (bytes, _handles) = buf.split_mut();
3251 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3252 debug_assert_eq!(tx_header.tx_id, 0);
3253 match tx_header.ordinal {
3254 0x778f95d421c0685 => {
3255 let mut out = fidl::new_empty!(
3256 fidl::encoding::EmptyPayload,
3257 fidl::encoding::DefaultFuchsiaResourceDialect
3258 );
3259 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
3260 Ok((OpenTargetEvent::StrictEvent {}))
3261 }
3262 0x43d9ee0dca2bb33e => {
3263 let mut out = fidl::new_empty!(
3264 fidl::encoding::EmptyPayload,
3265 fidl::encoding::DefaultFuchsiaResourceDialect
3266 );
3267 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
3268 Ok((OpenTargetEvent::FlexibleEvent {}))
3269 }
3270 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
3271 Ok(OpenTargetEvent::_UnknownEvent { ordinal: tx_header.ordinal })
3272 }
3273 _ => Err(fidl::Error::UnknownOrdinal {
3274 ordinal: tx_header.ordinal,
3275 protocol_name: <OpenTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3276 }),
3277 }
3278 }
3279}
3280
3281pub struct OpenTargetRequestStream {
3283 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3284 is_terminated: bool,
3285}
3286
3287impl std::marker::Unpin for OpenTargetRequestStream {}
3288
3289impl futures::stream::FusedStream for OpenTargetRequestStream {
3290 fn is_terminated(&self) -> bool {
3291 self.is_terminated
3292 }
3293}
3294
3295impl fidl::endpoints::RequestStream for OpenTargetRequestStream {
3296 type Protocol = OpenTargetMarker;
3297 type ControlHandle = OpenTargetControlHandle;
3298
3299 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3300 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3301 }
3302
3303 fn control_handle(&self) -> Self::ControlHandle {
3304 OpenTargetControlHandle { inner: self.inner.clone() }
3305 }
3306
3307 fn into_inner(
3308 self,
3309 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3310 {
3311 (self.inner, self.is_terminated)
3312 }
3313
3314 fn from_inner(
3315 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3316 is_terminated: bool,
3317 ) -> Self {
3318 Self { inner, is_terminated }
3319 }
3320}
3321
3322impl futures::Stream for OpenTargetRequestStream {
3323 type Item = Result<OpenTargetRequest, fidl::Error>;
3324
3325 fn poll_next(
3326 mut self: std::pin::Pin<&mut Self>,
3327 cx: &mut std::task::Context<'_>,
3328 ) -> std::task::Poll<Option<Self::Item>> {
3329 let this = &mut *self;
3330 if this.inner.check_shutdown(cx) {
3331 this.is_terminated = true;
3332 return std::task::Poll::Ready(None);
3333 }
3334 if this.is_terminated {
3335 panic!("polled OpenTargetRequestStream after completion");
3336 }
3337 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3338 |bytes, handles| {
3339 match this.inner.channel().read_etc(cx, bytes, handles) {
3340 std::task::Poll::Ready(Ok(())) => {}
3341 std::task::Poll::Pending => return std::task::Poll::Pending,
3342 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3343 this.is_terminated = true;
3344 return std::task::Poll::Ready(None);
3345 }
3346 std::task::Poll::Ready(Err(e)) => {
3347 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3348 e.into(),
3349 ))))
3350 }
3351 }
3352
3353 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3355
3356 std::task::Poll::Ready(Some(match header.ordinal {
3357 0x24dd8be3750aba9b => {
3358 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3359 let mut req = fidl::new_empty!(
3360 fidl::encoding::EmptyPayload,
3361 fidl::encoding::DefaultFuchsiaResourceDialect
3362 );
3363 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3364 let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
3365 Ok(OpenTargetRequest::StrictOneWay { control_handle })
3366 }
3367 0x421bbeb2bbc84a58 => {
3368 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3369 let mut req = fidl::new_empty!(
3370 fidl::encoding::EmptyPayload,
3371 fidl::encoding::DefaultFuchsiaResourceDialect
3372 );
3373 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3374 let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
3375 Ok(OpenTargetRequest::FlexibleOneWay { control_handle })
3376 }
3377 0x70020c582a57ef03 => {
3378 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3379 let mut req = fidl::new_empty!(
3380 fidl::encoding::EmptyPayload,
3381 fidl::encoding::DefaultFuchsiaResourceDialect
3382 );
3383 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3384 let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
3385 Ok(OpenTargetRequest::StrictTwoWay {
3386 responder: OpenTargetStrictTwoWayResponder {
3387 control_handle: std::mem::ManuallyDrop::new(control_handle),
3388 tx_id: header.tx_id,
3389 },
3390 })
3391 }
3392 0x2be6e1cc40008010 => {
3393 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3394 let mut req = fidl::new_empty!(
3395 OpenTargetStrictTwoWayFieldsRequest,
3396 fidl::encoding::DefaultFuchsiaResourceDialect
3397 );
3398 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenTargetStrictTwoWayFieldsRequest>(&header, _body_bytes, handles, &mut req)?;
3399 let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
3400 Ok(OpenTargetRequest::StrictTwoWayFields {
3401 reply_with: req.reply_with,
3402
3403 responder: OpenTargetStrictTwoWayFieldsResponder {
3404 control_handle: std::mem::ManuallyDrop::new(control_handle),
3405 tx_id: header.tx_id,
3406 },
3407 })
3408 }
3409 0x6efc16069ebd0b2c => {
3410 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3411 let mut req = fidl::new_empty!(
3412 OpenTargetStrictTwoWayErrRequest,
3413 fidl::encoding::DefaultFuchsiaResourceDialect
3414 );
3415 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenTargetStrictTwoWayErrRequest>(&header, _body_bytes, handles, &mut req)?;
3416 let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
3417 Ok(OpenTargetRequest::StrictTwoWayErr {
3418 payload: req,
3419 responder: OpenTargetStrictTwoWayErrResponder {
3420 control_handle: std::mem::ManuallyDrop::new(control_handle),
3421 tx_id: header.tx_id,
3422 },
3423 })
3424 }
3425 0x309c8adda770fcf0 => {
3426 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3427 let mut req = fidl::new_empty!(
3428 OpenTargetStrictTwoWayFieldsErrRequest,
3429 fidl::encoding::DefaultFuchsiaResourceDialect
3430 );
3431 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenTargetStrictTwoWayFieldsErrRequest>(&header, _body_bytes, handles, &mut req)?;
3432 let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
3433 Ok(OpenTargetRequest::StrictTwoWayFieldsErr {
3434 payload: req,
3435 responder: OpenTargetStrictTwoWayFieldsErrResponder {
3436 control_handle: std::mem::ManuallyDrop::new(control_handle),
3437 tx_id: header.tx_id,
3438 },
3439 })
3440 }
3441 0x19f932dac7810c71 => {
3442 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3443 let mut req = fidl::new_empty!(
3444 fidl::encoding::EmptyPayload,
3445 fidl::encoding::DefaultFuchsiaResourceDialect
3446 );
3447 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3448 let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
3449 Ok(OpenTargetRequest::FlexibleTwoWay {
3450 responder: OpenTargetFlexibleTwoWayResponder {
3451 control_handle: std::mem::ManuallyDrop::new(control_handle),
3452 tx_id: header.tx_id,
3453 },
3454 })
3455 }
3456 0x47cca5ddb4207774 => {
3457 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3458 let mut req = fidl::new_empty!(
3459 OpenTargetFlexibleTwoWayFieldsRequest,
3460 fidl::encoding::DefaultFuchsiaResourceDialect
3461 );
3462 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenTargetFlexibleTwoWayFieldsRequest>(&header, _body_bytes, handles, &mut req)?;
3463 let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
3464 Ok(OpenTargetRequest::FlexibleTwoWayFields {
3465 reply_with: req.reply_with,
3466
3467 responder: OpenTargetFlexibleTwoWayFieldsResponder {
3468 control_handle: std::mem::ManuallyDrop::new(control_handle),
3469 tx_id: header.tx_id,
3470 },
3471 })
3472 }
3473 0x52aa19681fea3a0 => {
3474 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3475 let mut req = fidl::new_empty!(
3476 OpenTargetFlexibleTwoWayErrRequest,
3477 fidl::encoding::DefaultFuchsiaResourceDialect
3478 );
3479 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenTargetFlexibleTwoWayErrRequest>(&header, _body_bytes, handles, &mut req)?;
3480 let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
3481 Ok(OpenTargetRequest::FlexibleTwoWayErr {
3482 payload: req,
3483 responder: OpenTargetFlexibleTwoWayErrResponder {
3484 control_handle: std::mem::ManuallyDrop::new(control_handle),
3485 tx_id: header.tx_id,
3486 },
3487 })
3488 }
3489 0x1ab7dd4c6a3650b6 => {
3490 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3491 let mut req = fidl::new_empty!(
3492 OpenTargetFlexibleTwoWayFieldsErrRequest,
3493 fidl::encoding::DefaultFuchsiaResourceDialect
3494 );
3495 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenTargetFlexibleTwoWayFieldsErrRequest>(&header, _body_bytes, handles, &mut req)?;
3496 let control_handle = OpenTargetControlHandle { inner: this.inner.clone() };
3497 Ok(OpenTargetRequest::FlexibleTwoWayFieldsErr {
3498 payload: req,
3499 responder: OpenTargetFlexibleTwoWayFieldsErrResponder {
3500 control_handle: std::mem::ManuallyDrop::new(control_handle),
3501 tx_id: header.tx_id,
3502 },
3503 })
3504 }
3505 _ if header.tx_id == 0
3506 && header
3507 .dynamic_flags()
3508 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3509 {
3510 Ok(OpenTargetRequest::_UnknownMethod {
3511 ordinal: header.ordinal,
3512 control_handle: OpenTargetControlHandle { inner: this.inner.clone() },
3513 method_type: fidl::MethodType::OneWay,
3514 })
3515 }
3516 _ if header
3517 .dynamic_flags()
3518 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3519 {
3520 this.inner.send_framework_err(
3521 fidl::encoding::FrameworkErr::UnknownMethod,
3522 header.tx_id,
3523 header.ordinal,
3524 header.dynamic_flags(),
3525 (bytes, handles),
3526 )?;
3527 Ok(OpenTargetRequest::_UnknownMethod {
3528 ordinal: header.ordinal,
3529 control_handle: OpenTargetControlHandle { inner: this.inner.clone() },
3530 method_type: fidl::MethodType::TwoWay,
3531 })
3532 }
3533 _ => Err(fidl::Error::UnknownOrdinal {
3534 ordinal: header.ordinal,
3535 protocol_name:
3536 <OpenTargetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3537 }),
3538 }))
3539 },
3540 )
3541 }
3542}
3543
3544#[derive(Debug)]
3545pub enum OpenTargetRequest {
3546 StrictOneWay {
3547 control_handle: OpenTargetControlHandle,
3548 },
3549 FlexibleOneWay {
3550 control_handle: OpenTargetControlHandle,
3551 },
3552 StrictTwoWay {
3553 responder: OpenTargetStrictTwoWayResponder,
3554 },
3555 StrictTwoWayFields {
3556 reply_with: i32,
3557 responder: OpenTargetStrictTwoWayFieldsResponder,
3558 },
3559 StrictTwoWayErr {
3560 payload: OpenTargetStrictTwoWayErrRequest,
3561 responder: OpenTargetStrictTwoWayErrResponder,
3562 },
3563 StrictTwoWayFieldsErr {
3564 payload: OpenTargetStrictTwoWayFieldsErrRequest,
3565 responder: OpenTargetStrictTwoWayFieldsErrResponder,
3566 },
3567 FlexibleTwoWay {
3568 responder: OpenTargetFlexibleTwoWayResponder,
3569 },
3570 FlexibleTwoWayFields {
3571 reply_with: i32,
3572 responder: OpenTargetFlexibleTwoWayFieldsResponder,
3573 },
3574 FlexibleTwoWayErr {
3575 payload: OpenTargetFlexibleTwoWayErrRequest,
3576 responder: OpenTargetFlexibleTwoWayErrResponder,
3577 },
3578 FlexibleTwoWayFieldsErr {
3579 payload: OpenTargetFlexibleTwoWayFieldsErrRequest,
3580 responder: OpenTargetFlexibleTwoWayFieldsErrResponder,
3581 },
3582 #[non_exhaustive]
3584 _UnknownMethod {
3585 ordinal: u64,
3587 control_handle: OpenTargetControlHandle,
3588 method_type: fidl::MethodType,
3589 },
3590}
3591
3592impl OpenTargetRequest {
3593 #[allow(irrefutable_let_patterns)]
3594 pub fn into_strict_one_way(self) -> Option<(OpenTargetControlHandle)> {
3595 if let OpenTargetRequest::StrictOneWay { control_handle } = self {
3596 Some((control_handle))
3597 } else {
3598 None
3599 }
3600 }
3601
3602 #[allow(irrefutable_let_patterns)]
3603 pub fn into_flexible_one_way(self) -> Option<(OpenTargetControlHandle)> {
3604 if let OpenTargetRequest::FlexibleOneWay { control_handle } = self {
3605 Some((control_handle))
3606 } else {
3607 None
3608 }
3609 }
3610
3611 #[allow(irrefutable_let_patterns)]
3612 pub fn into_strict_two_way(self) -> Option<(OpenTargetStrictTwoWayResponder)> {
3613 if let OpenTargetRequest::StrictTwoWay { responder } = self {
3614 Some((responder))
3615 } else {
3616 None
3617 }
3618 }
3619
3620 #[allow(irrefutable_let_patterns)]
3621 pub fn into_strict_two_way_fields(
3622 self,
3623 ) -> Option<(i32, OpenTargetStrictTwoWayFieldsResponder)> {
3624 if let OpenTargetRequest::StrictTwoWayFields { reply_with, responder } = self {
3625 Some((reply_with, responder))
3626 } else {
3627 None
3628 }
3629 }
3630
3631 #[allow(irrefutable_let_patterns)]
3632 pub fn into_strict_two_way_err(
3633 self,
3634 ) -> Option<(OpenTargetStrictTwoWayErrRequest, OpenTargetStrictTwoWayErrResponder)> {
3635 if let OpenTargetRequest::StrictTwoWayErr { payload, responder } = self {
3636 Some((payload, responder))
3637 } else {
3638 None
3639 }
3640 }
3641
3642 #[allow(irrefutable_let_patterns)]
3643 pub fn into_strict_two_way_fields_err(
3644 self,
3645 ) -> Option<(OpenTargetStrictTwoWayFieldsErrRequest, OpenTargetStrictTwoWayFieldsErrResponder)>
3646 {
3647 if let OpenTargetRequest::StrictTwoWayFieldsErr { payload, responder } = self {
3648 Some((payload, responder))
3649 } else {
3650 None
3651 }
3652 }
3653
3654 #[allow(irrefutable_let_patterns)]
3655 pub fn into_flexible_two_way(self) -> Option<(OpenTargetFlexibleTwoWayResponder)> {
3656 if let OpenTargetRequest::FlexibleTwoWay { responder } = self {
3657 Some((responder))
3658 } else {
3659 None
3660 }
3661 }
3662
3663 #[allow(irrefutable_let_patterns)]
3664 pub fn into_flexible_two_way_fields(
3665 self,
3666 ) -> Option<(i32, OpenTargetFlexibleTwoWayFieldsResponder)> {
3667 if let OpenTargetRequest::FlexibleTwoWayFields { reply_with, responder } = self {
3668 Some((reply_with, responder))
3669 } else {
3670 None
3671 }
3672 }
3673
3674 #[allow(irrefutable_let_patterns)]
3675 pub fn into_flexible_two_way_err(
3676 self,
3677 ) -> Option<(OpenTargetFlexibleTwoWayErrRequest, OpenTargetFlexibleTwoWayErrResponder)> {
3678 if let OpenTargetRequest::FlexibleTwoWayErr { payload, responder } = self {
3679 Some((payload, responder))
3680 } else {
3681 None
3682 }
3683 }
3684
3685 #[allow(irrefutable_let_patterns)]
3686 pub fn into_flexible_two_way_fields_err(
3687 self,
3688 ) -> Option<(
3689 OpenTargetFlexibleTwoWayFieldsErrRequest,
3690 OpenTargetFlexibleTwoWayFieldsErrResponder,
3691 )> {
3692 if let OpenTargetRequest::FlexibleTwoWayFieldsErr { payload, responder } = self {
3693 Some((payload, responder))
3694 } else {
3695 None
3696 }
3697 }
3698
3699 pub fn method_name(&self) -> &'static str {
3701 match *self {
3702 OpenTargetRequest::StrictOneWay { .. } => "strict_one_way",
3703 OpenTargetRequest::FlexibleOneWay { .. } => "flexible_one_way",
3704 OpenTargetRequest::StrictTwoWay { .. } => "strict_two_way",
3705 OpenTargetRequest::StrictTwoWayFields { .. } => "strict_two_way_fields",
3706 OpenTargetRequest::StrictTwoWayErr { .. } => "strict_two_way_err",
3707 OpenTargetRequest::StrictTwoWayFieldsErr { .. } => "strict_two_way_fields_err",
3708 OpenTargetRequest::FlexibleTwoWay { .. } => "flexible_two_way",
3709 OpenTargetRequest::FlexibleTwoWayFields { .. } => "flexible_two_way_fields",
3710 OpenTargetRequest::FlexibleTwoWayErr { .. } => "flexible_two_way_err",
3711 OpenTargetRequest::FlexibleTwoWayFieldsErr { .. } => "flexible_two_way_fields_err",
3712 OpenTargetRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
3713 "unknown one-way method"
3714 }
3715 OpenTargetRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
3716 "unknown two-way method"
3717 }
3718 }
3719 }
3720}
3721
3722#[derive(Debug, Clone)]
3723pub struct OpenTargetControlHandle {
3724 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3725}
3726
3727impl fidl::endpoints::ControlHandle for OpenTargetControlHandle {
3728 fn shutdown(&self) {
3729 self.inner.shutdown()
3730 }
3731 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3732 self.inner.shutdown_with_epitaph(status)
3733 }
3734
3735 fn is_closed(&self) -> bool {
3736 self.inner.channel().is_closed()
3737 }
3738 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3739 self.inner.channel().on_closed()
3740 }
3741
3742 #[cfg(target_os = "fuchsia")]
3743 fn signal_peer(
3744 &self,
3745 clear_mask: zx::Signals,
3746 set_mask: zx::Signals,
3747 ) -> Result<(), zx_status::Status> {
3748 use fidl::Peered;
3749 self.inner.channel().signal_peer(clear_mask, set_mask)
3750 }
3751}
3752
3753impl OpenTargetControlHandle {
3754 pub fn send_strict_event(&self) -> Result<(), fidl::Error> {
3755 self.inner.send::<fidl::encoding::EmptyPayload>(
3756 (),
3757 0,
3758 0x778f95d421c0685,
3759 fidl::encoding::DynamicFlags::empty(),
3760 )
3761 }
3762
3763 pub fn send_flexible_event(&self) -> Result<(), fidl::Error> {
3764 self.inner.send::<fidl::encoding::EmptyPayload>(
3765 (),
3766 0,
3767 0x43d9ee0dca2bb33e,
3768 fidl::encoding::DynamicFlags::FLEXIBLE,
3769 )
3770 }
3771}
3772
3773#[must_use = "FIDL methods require a response to be sent"]
3774#[derive(Debug)]
3775pub struct OpenTargetStrictTwoWayResponder {
3776 control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
3777 tx_id: u32,
3778}
3779
3780impl std::ops::Drop for OpenTargetStrictTwoWayResponder {
3784 fn drop(&mut self) {
3785 self.control_handle.shutdown();
3786 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3788 }
3789}
3790
3791impl fidl::endpoints::Responder for OpenTargetStrictTwoWayResponder {
3792 type ControlHandle = OpenTargetControlHandle;
3793
3794 fn control_handle(&self) -> &OpenTargetControlHandle {
3795 &self.control_handle
3796 }
3797
3798 fn drop_without_shutdown(mut self) {
3799 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3801 std::mem::forget(self);
3803 }
3804}
3805
3806impl OpenTargetStrictTwoWayResponder {
3807 pub fn send(self) -> Result<(), fidl::Error> {
3811 let _result = self.send_raw();
3812 if _result.is_err() {
3813 self.control_handle.shutdown();
3814 }
3815 self.drop_without_shutdown();
3816 _result
3817 }
3818
3819 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
3821 let _result = self.send_raw();
3822 self.drop_without_shutdown();
3823 _result
3824 }
3825
3826 fn send_raw(&self) -> Result<(), fidl::Error> {
3827 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
3828 (),
3829 self.tx_id,
3830 0x70020c582a57ef03,
3831 fidl::encoding::DynamicFlags::empty(),
3832 )
3833 }
3834}
3835
3836#[must_use = "FIDL methods require a response to be sent"]
3837#[derive(Debug)]
3838pub struct OpenTargetStrictTwoWayFieldsResponder {
3839 control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
3840 tx_id: u32,
3841}
3842
3843impl std::ops::Drop for OpenTargetStrictTwoWayFieldsResponder {
3847 fn drop(&mut self) {
3848 self.control_handle.shutdown();
3849 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3851 }
3852}
3853
3854impl fidl::endpoints::Responder for OpenTargetStrictTwoWayFieldsResponder {
3855 type ControlHandle = OpenTargetControlHandle;
3856
3857 fn control_handle(&self) -> &OpenTargetControlHandle {
3858 &self.control_handle
3859 }
3860
3861 fn drop_without_shutdown(mut self) {
3862 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3864 std::mem::forget(self);
3866 }
3867}
3868
3869impl OpenTargetStrictTwoWayFieldsResponder {
3870 pub fn send(self, mut some_field: i32) -> Result<(), fidl::Error> {
3874 let _result = self.send_raw(some_field);
3875 if _result.is_err() {
3876 self.control_handle.shutdown();
3877 }
3878 self.drop_without_shutdown();
3879 _result
3880 }
3881
3882 pub fn send_no_shutdown_on_err(self, mut some_field: i32) -> Result<(), fidl::Error> {
3884 let _result = self.send_raw(some_field);
3885 self.drop_without_shutdown();
3886 _result
3887 }
3888
3889 fn send_raw(&self, mut some_field: i32) -> Result<(), fidl::Error> {
3890 self.control_handle.inner.send::<OpenTargetStrictTwoWayFieldsResponse>(
3891 (some_field,),
3892 self.tx_id,
3893 0x2be6e1cc40008010,
3894 fidl::encoding::DynamicFlags::empty(),
3895 )
3896 }
3897}
3898
3899#[must_use = "FIDL methods require a response to be sent"]
3900#[derive(Debug)]
3901pub struct OpenTargetStrictTwoWayErrResponder {
3902 control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
3903 tx_id: u32,
3904}
3905
3906impl std::ops::Drop for OpenTargetStrictTwoWayErrResponder {
3910 fn drop(&mut self) {
3911 self.control_handle.shutdown();
3912 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3914 }
3915}
3916
3917impl fidl::endpoints::Responder for OpenTargetStrictTwoWayErrResponder {
3918 type ControlHandle = OpenTargetControlHandle;
3919
3920 fn control_handle(&self) -> &OpenTargetControlHandle {
3921 &self.control_handle
3922 }
3923
3924 fn drop_without_shutdown(mut self) {
3925 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3927 std::mem::forget(self);
3929 }
3930}
3931
3932impl OpenTargetStrictTwoWayErrResponder {
3933 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3937 let _result = self.send_raw(result);
3938 if _result.is_err() {
3939 self.control_handle.shutdown();
3940 }
3941 self.drop_without_shutdown();
3942 _result
3943 }
3944
3945 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3947 let _result = self.send_raw(result);
3948 self.drop_without_shutdown();
3949 _result
3950 }
3951
3952 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3953 self.control_handle
3954 .inner
3955 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3956 result,
3957 self.tx_id,
3958 0x6efc16069ebd0b2c,
3959 fidl::encoding::DynamicFlags::empty(),
3960 )
3961 }
3962}
3963
3964#[must_use = "FIDL methods require a response to be sent"]
3965#[derive(Debug)]
3966pub struct OpenTargetStrictTwoWayFieldsErrResponder {
3967 control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
3968 tx_id: u32,
3969}
3970
3971impl std::ops::Drop for OpenTargetStrictTwoWayFieldsErrResponder {
3975 fn drop(&mut self) {
3976 self.control_handle.shutdown();
3977 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3979 }
3980}
3981
3982impl fidl::endpoints::Responder for OpenTargetStrictTwoWayFieldsErrResponder {
3983 type ControlHandle = OpenTargetControlHandle;
3984
3985 fn control_handle(&self) -> &OpenTargetControlHandle {
3986 &self.control_handle
3987 }
3988
3989 fn drop_without_shutdown(mut self) {
3990 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3992 std::mem::forget(self);
3994 }
3995}
3996
3997impl OpenTargetStrictTwoWayFieldsErrResponder {
3998 pub fn send(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
4002 let _result = self.send_raw(result);
4003 if _result.is_err() {
4004 self.control_handle.shutdown();
4005 }
4006 self.drop_without_shutdown();
4007 _result
4008 }
4009
4010 pub fn send_no_shutdown_on_err(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
4012 let _result = self.send_raw(result);
4013 self.drop_without_shutdown();
4014 _result
4015 }
4016
4017 fn send_raw(&self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
4018 self.control_handle.inner.send::<fidl::encoding::ResultType<
4019 OpenTargetStrictTwoWayFieldsErrResponse,
4020 i32,
4021 >>(
4022 result.map(|some_field| (some_field,)),
4023 self.tx_id,
4024 0x309c8adda770fcf0,
4025 fidl::encoding::DynamicFlags::empty(),
4026 )
4027 }
4028}
4029
4030#[must_use = "FIDL methods require a response to be sent"]
4031#[derive(Debug)]
4032pub struct OpenTargetFlexibleTwoWayResponder {
4033 control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
4034 tx_id: u32,
4035}
4036
4037impl std::ops::Drop for OpenTargetFlexibleTwoWayResponder {
4041 fn drop(&mut self) {
4042 self.control_handle.shutdown();
4043 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4045 }
4046}
4047
4048impl fidl::endpoints::Responder for OpenTargetFlexibleTwoWayResponder {
4049 type ControlHandle = OpenTargetControlHandle;
4050
4051 fn control_handle(&self) -> &OpenTargetControlHandle {
4052 &self.control_handle
4053 }
4054
4055 fn drop_without_shutdown(mut self) {
4056 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4058 std::mem::forget(self);
4060 }
4061}
4062
4063impl OpenTargetFlexibleTwoWayResponder {
4064 pub fn send(self) -> Result<(), fidl::Error> {
4068 let _result = self.send_raw();
4069 if _result.is_err() {
4070 self.control_handle.shutdown();
4071 }
4072 self.drop_without_shutdown();
4073 _result
4074 }
4075
4076 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
4078 let _result = self.send_raw();
4079 self.drop_without_shutdown();
4080 _result
4081 }
4082
4083 fn send_raw(&self) -> Result<(), fidl::Error> {
4084 self.control_handle.inner.send::<fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>>(
4085 fidl::encoding::Flexible::new(()),
4086 self.tx_id,
4087 0x19f932dac7810c71,
4088 fidl::encoding::DynamicFlags::FLEXIBLE,
4089 )
4090 }
4091}
4092
4093#[must_use = "FIDL methods require a response to be sent"]
4094#[derive(Debug)]
4095pub struct OpenTargetFlexibleTwoWayFieldsResponder {
4096 control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
4097 tx_id: u32,
4098}
4099
4100impl std::ops::Drop for OpenTargetFlexibleTwoWayFieldsResponder {
4104 fn drop(&mut self) {
4105 self.control_handle.shutdown();
4106 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4108 }
4109}
4110
4111impl fidl::endpoints::Responder for OpenTargetFlexibleTwoWayFieldsResponder {
4112 type ControlHandle = OpenTargetControlHandle;
4113
4114 fn control_handle(&self) -> &OpenTargetControlHandle {
4115 &self.control_handle
4116 }
4117
4118 fn drop_without_shutdown(mut self) {
4119 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4121 std::mem::forget(self);
4123 }
4124}
4125
4126impl OpenTargetFlexibleTwoWayFieldsResponder {
4127 pub fn send(self, mut some_field: i32) -> Result<(), fidl::Error> {
4131 let _result = self.send_raw(some_field);
4132 if _result.is_err() {
4133 self.control_handle.shutdown();
4134 }
4135 self.drop_without_shutdown();
4136 _result
4137 }
4138
4139 pub fn send_no_shutdown_on_err(self, mut some_field: i32) -> Result<(), fidl::Error> {
4141 let _result = self.send_raw(some_field);
4142 self.drop_without_shutdown();
4143 _result
4144 }
4145
4146 fn send_raw(&self, mut some_field: i32) -> Result<(), fidl::Error> {
4147 self.control_handle.inner.send::<fidl::encoding::FlexibleType<
4148 OpenTargetFlexibleTwoWayFieldsResponse,
4149 >>(
4150 fidl::encoding::Flexible::new((some_field,)),
4151 self.tx_id,
4152 0x47cca5ddb4207774,
4153 fidl::encoding::DynamicFlags::FLEXIBLE,
4154 )
4155 }
4156}
4157
4158#[must_use = "FIDL methods require a response to be sent"]
4159#[derive(Debug)]
4160pub struct OpenTargetFlexibleTwoWayErrResponder {
4161 control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
4162 tx_id: u32,
4163}
4164
4165impl std::ops::Drop for OpenTargetFlexibleTwoWayErrResponder {
4169 fn drop(&mut self) {
4170 self.control_handle.shutdown();
4171 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4173 }
4174}
4175
4176impl fidl::endpoints::Responder for OpenTargetFlexibleTwoWayErrResponder {
4177 type ControlHandle = OpenTargetControlHandle;
4178
4179 fn control_handle(&self) -> &OpenTargetControlHandle {
4180 &self.control_handle
4181 }
4182
4183 fn drop_without_shutdown(mut self) {
4184 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4186 std::mem::forget(self);
4188 }
4189}
4190
4191impl OpenTargetFlexibleTwoWayErrResponder {
4192 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4196 let _result = self.send_raw(result);
4197 if _result.is_err() {
4198 self.control_handle.shutdown();
4199 }
4200 self.drop_without_shutdown();
4201 _result
4202 }
4203
4204 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4206 let _result = self.send_raw(result);
4207 self.drop_without_shutdown();
4208 _result
4209 }
4210
4211 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4212 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4213 fidl::encoding::EmptyStruct,
4214 i32,
4215 >>(
4216 fidl::encoding::FlexibleResult::new(result),
4217 self.tx_id,
4218 0x52aa19681fea3a0,
4219 fidl::encoding::DynamicFlags::FLEXIBLE,
4220 )
4221 }
4222}
4223
4224#[must_use = "FIDL methods require a response to be sent"]
4225#[derive(Debug)]
4226pub struct OpenTargetFlexibleTwoWayFieldsErrResponder {
4227 control_handle: std::mem::ManuallyDrop<OpenTargetControlHandle>,
4228 tx_id: u32,
4229}
4230
4231impl std::ops::Drop for OpenTargetFlexibleTwoWayFieldsErrResponder {
4235 fn drop(&mut self) {
4236 self.control_handle.shutdown();
4237 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4239 }
4240}
4241
4242impl fidl::endpoints::Responder for OpenTargetFlexibleTwoWayFieldsErrResponder {
4243 type ControlHandle = OpenTargetControlHandle;
4244
4245 fn control_handle(&self) -> &OpenTargetControlHandle {
4246 &self.control_handle
4247 }
4248
4249 fn drop_without_shutdown(mut self) {
4250 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4252 std::mem::forget(self);
4254 }
4255}
4256
4257impl OpenTargetFlexibleTwoWayFieldsErrResponder {
4258 pub fn send(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
4262 let _result = self.send_raw(result);
4263 if _result.is_err() {
4264 self.control_handle.shutdown();
4265 }
4266 self.drop_without_shutdown();
4267 _result
4268 }
4269
4270 pub fn send_no_shutdown_on_err(self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
4272 let _result = self.send_raw(result);
4273 self.drop_without_shutdown();
4274 _result
4275 }
4276
4277 fn send_raw(&self, mut result: Result<i32, i32>) -> Result<(), fidl::Error> {
4278 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4279 OpenTargetFlexibleTwoWayFieldsErrResponse,
4280 i32,
4281 >>(
4282 fidl::encoding::FlexibleResult::new(result.map(|some_field| (some_field,))),
4283 self.tx_id,
4284 0x1ab7dd4c6a3650b6,
4285 fidl::encoding::DynamicFlags::FLEXIBLE,
4286 )
4287 }
4288}
4289
4290#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4291pub struct RunnerMarker;
4292
4293impl fidl::endpoints::ProtocolMarker for RunnerMarker {
4294 type Proxy = RunnerProxy;
4295 type RequestStream = RunnerRequestStream;
4296 #[cfg(target_os = "fuchsia")]
4297 type SynchronousProxy = RunnerSynchronousProxy;
4298
4299 const DEBUG_NAME: &'static str = "fidl.serversuite.Runner";
4300}
4301impl fidl::endpoints::DiscoverableProtocolMarker for RunnerMarker {}
4302pub type RunnerStartResult = Result<(), StartError>;
4303
4304pub trait RunnerProxyInterface: Send + Sync {
4305 type GetVersionResponseFut: std::future::Future<Output = Result<u64, fidl::Error>> + Send;
4306 fn r#get_version(&self) -> Self::GetVersionResponseFut;
4307 type CheckAliveResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
4308 fn r#check_alive(&self) -> Self::CheckAliveResponseFut;
4309 type StartResponseFut: std::future::Future<Output = Result<RunnerStartResult, fidl::Error>>
4310 + Send;
4311 fn r#start(&self, test: Test, any_target: AnyTarget) -> Self::StartResponseFut;
4312 type ShutdownWithEpitaphResponseFut: std::future::Future<Output = Result<(), fidl::Error>>
4313 + Send;
4314 fn r#shutdown_with_epitaph(&self, epitaph_status: i32) -> Self::ShutdownWithEpitaphResponseFut;
4315 type SendOpenTargetStrictEventResponseFut: std::future::Future<Output = Result<(), fidl::Error>>
4316 + Send;
4317 fn r#send_open_target_strict_event(&self) -> Self::SendOpenTargetStrictEventResponseFut;
4318 type SendOpenTargetFlexibleEventResponseFut: std::future::Future<Output = Result<(), fidl::Error>>
4319 + Send;
4320 fn r#send_open_target_flexible_event(&self) -> Self::SendOpenTargetFlexibleEventResponseFut;
4321}
4322#[derive(Debug)]
4323#[cfg(target_os = "fuchsia")]
4324pub struct RunnerSynchronousProxy {
4325 client: fidl::client::sync::Client,
4326}
4327
4328#[cfg(target_os = "fuchsia")]
4329impl fidl::endpoints::SynchronousProxy for RunnerSynchronousProxy {
4330 type Proxy = RunnerProxy;
4331 type Protocol = RunnerMarker;
4332
4333 fn from_channel(inner: fidl::Channel) -> Self {
4334 Self::new(inner)
4335 }
4336
4337 fn into_channel(self) -> fidl::Channel {
4338 self.client.into_channel()
4339 }
4340
4341 fn as_channel(&self) -> &fidl::Channel {
4342 self.client.as_channel()
4343 }
4344}
4345
4346#[cfg(target_os = "fuchsia")]
4347impl RunnerSynchronousProxy {
4348 pub fn new(channel: fidl::Channel) -> Self {
4349 let protocol_name = <RunnerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4350 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
4351 }
4352
4353 pub fn into_channel(self) -> fidl::Channel {
4354 self.client.into_channel()
4355 }
4356
4357 pub fn wait_for_event(
4360 &self,
4361 deadline: zx::MonotonicInstant,
4362 ) -> Result<RunnerEvent, fidl::Error> {
4363 RunnerEvent::decode(self.client.wait_for_event(deadline)?)
4364 }
4365
4366 pub fn r#get_version(&self, ___deadline: zx::MonotonicInstant) -> Result<u64, fidl::Error> {
4367 let _response =
4368 self.client.send_query::<fidl::encoding::EmptyPayload, RunnerGetVersionResponse>(
4369 (),
4370 0x3c70bef2e59d06a7,
4371 fidl::encoding::DynamicFlags::empty(),
4372 ___deadline,
4373 )?;
4374 Ok(_response.version)
4375 }
4376
4377 pub fn r#check_alive(&self, ___deadline: zx::MonotonicInstant) -> Result<(), fidl::Error> {
4378 let _response =
4379 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
4380 (),
4381 0x2449c31d30d6f5b7,
4382 fidl::encoding::DynamicFlags::empty(),
4383 ___deadline,
4384 )?;
4385 Ok(_response)
4386 }
4387
4388 pub fn r#start(
4389 &self,
4390 mut test: Test,
4391 mut any_target: AnyTarget,
4392 ___deadline: zx::MonotonicInstant,
4393 ) -> Result<RunnerStartResult, fidl::Error> {
4394 let _response = self.client.send_query::<RunnerStartRequest, fidl::encoding::ResultType<
4395 fidl::encoding::EmptyStruct,
4396 StartError,
4397 >>(
4398 (test, &mut any_target),
4399 0x2d4735726d30a5b0,
4400 fidl::encoding::DynamicFlags::empty(),
4401 ___deadline,
4402 )?;
4403 Ok(_response.map(|x| x))
4404 }
4405
4406 pub fn r#shutdown_with_epitaph(
4407 &self,
4408 mut epitaph_status: i32,
4409 ___deadline: zx::MonotonicInstant,
4410 ) -> Result<(), fidl::Error> {
4411 let _response = self
4412 .client
4413 .send_query::<RunnerShutdownWithEpitaphRequest, fidl::encoding::EmptyPayload>(
4414 (epitaph_status,),
4415 0x7a15369d88e1e8ec,
4416 fidl::encoding::DynamicFlags::empty(),
4417 ___deadline,
4418 )?;
4419 Ok(_response)
4420 }
4421
4422 pub fn r#send_open_target_strict_event(
4423 &self,
4424 ___deadline: zx::MonotonicInstant,
4425 ) -> Result<(), fidl::Error> {
4426 let _response =
4427 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
4428 (),
4429 0x1c3e4452a20c9590,
4430 fidl::encoding::DynamicFlags::empty(),
4431 ___deadline,
4432 )?;
4433 Ok(_response)
4434 }
4435
4436 pub fn r#send_open_target_flexible_event(
4437 &self,
4438 ___deadline: zx::MonotonicInstant,
4439 ) -> Result<(), fidl::Error> {
4440 let _response =
4441 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
4442 (),
4443 0x2d2c9446799baeb6,
4444 fidl::encoding::DynamicFlags::empty(),
4445 ___deadline,
4446 )?;
4447 Ok(_response)
4448 }
4449}
4450
4451#[cfg(target_os = "fuchsia")]
4452impl From<RunnerSynchronousProxy> for zx::Handle {
4453 fn from(value: RunnerSynchronousProxy) -> Self {
4454 value.into_channel().into()
4455 }
4456}
4457
4458#[cfg(target_os = "fuchsia")]
4459impl From<fidl::Channel> for RunnerSynchronousProxy {
4460 fn from(value: fidl::Channel) -> Self {
4461 Self::new(value)
4462 }
4463}
4464
4465#[derive(Debug, Clone)]
4466pub struct RunnerProxy {
4467 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4468}
4469
4470impl fidl::endpoints::Proxy for RunnerProxy {
4471 type Protocol = RunnerMarker;
4472
4473 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4474 Self::new(inner)
4475 }
4476
4477 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4478 self.client.into_channel().map_err(|client| Self { client })
4479 }
4480
4481 fn as_channel(&self) -> &::fidl::AsyncChannel {
4482 self.client.as_channel()
4483 }
4484}
4485
4486impl RunnerProxy {
4487 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4489 let protocol_name = <RunnerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4490 Self { client: fidl::client::Client::new(channel, protocol_name) }
4491 }
4492
4493 pub fn take_event_stream(&self) -> RunnerEventStream {
4499 RunnerEventStream { event_receiver: self.client.take_event_receiver() }
4500 }
4501
4502 pub fn r#get_version(
4503 &self,
4504 ) -> fidl::client::QueryResponseFut<u64, fidl::encoding::DefaultFuchsiaResourceDialect> {
4505 RunnerProxyInterface::r#get_version(self)
4506 }
4507
4508 pub fn r#check_alive(
4509 &self,
4510 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
4511 RunnerProxyInterface::r#check_alive(self)
4512 }
4513
4514 pub fn r#start(
4515 &self,
4516 mut test: Test,
4517 mut any_target: AnyTarget,
4518 ) -> fidl::client::QueryResponseFut<
4519 RunnerStartResult,
4520 fidl::encoding::DefaultFuchsiaResourceDialect,
4521 > {
4522 RunnerProxyInterface::r#start(self, test, any_target)
4523 }
4524
4525 pub fn r#shutdown_with_epitaph(
4526 &self,
4527 mut epitaph_status: i32,
4528 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
4529 RunnerProxyInterface::r#shutdown_with_epitaph(self, epitaph_status)
4530 }
4531
4532 pub fn r#send_open_target_strict_event(
4533 &self,
4534 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
4535 RunnerProxyInterface::r#send_open_target_strict_event(self)
4536 }
4537
4538 pub fn r#send_open_target_flexible_event(
4539 &self,
4540 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
4541 RunnerProxyInterface::r#send_open_target_flexible_event(self)
4542 }
4543}
4544
4545impl RunnerProxyInterface for RunnerProxy {
4546 type GetVersionResponseFut =
4547 fidl::client::QueryResponseFut<u64, fidl::encoding::DefaultFuchsiaResourceDialect>;
4548 fn r#get_version(&self) -> Self::GetVersionResponseFut {
4549 fn _decode(
4550 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4551 ) -> Result<u64, fidl::Error> {
4552 let _response = fidl::client::decode_transaction_body::<
4553 RunnerGetVersionResponse,
4554 fidl::encoding::DefaultFuchsiaResourceDialect,
4555 0x3c70bef2e59d06a7,
4556 >(_buf?)?;
4557 Ok(_response.version)
4558 }
4559 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, u64>(
4560 (),
4561 0x3c70bef2e59d06a7,
4562 fidl::encoding::DynamicFlags::empty(),
4563 _decode,
4564 )
4565 }
4566
4567 type CheckAliveResponseFut =
4568 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
4569 fn r#check_alive(&self) -> Self::CheckAliveResponseFut {
4570 fn _decode(
4571 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4572 ) -> Result<(), fidl::Error> {
4573 let _response = fidl::client::decode_transaction_body::<
4574 fidl::encoding::EmptyPayload,
4575 fidl::encoding::DefaultFuchsiaResourceDialect,
4576 0x2449c31d30d6f5b7,
4577 >(_buf?)?;
4578 Ok(_response)
4579 }
4580 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
4581 (),
4582 0x2449c31d30d6f5b7,
4583 fidl::encoding::DynamicFlags::empty(),
4584 _decode,
4585 )
4586 }
4587
4588 type StartResponseFut = fidl::client::QueryResponseFut<
4589 RunnerStartResult,
4590 fidl::encoding::DefaultFuchsiaResourceDialect,
4591 >;
4592 fn r#start(&self, mut test: Test, mut any_target: AnyTarget) -> Self::StartResponseFut {
4593 fn _decode(
4594 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4595 ) -> Result<RunnerStartResult, fidl::Error> {
4596 let _response = fidl::client::decode_transaction_body::<
4597 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, StartError>,
4598 fidl::encoding::DefaultFuchsiaResourceDialect,
4599 0x2d4735726d30a5b0,
4600 >(_buf?)?;
4601 Ok(_response.map(|x| x))
4602 }
4603 self.client.send_query_and_decode::<RunnerStartRequest, RunnerStartResult>(
4604 (test, &mut any_target),
4605 0x2d4735726d30a5b0,
4606 fidl::encoding::DynamicFlags::empty(),
4607 _decode,
4608 )
4609 }
4610
4611 type ShutdownWithEpitaphResponseFut =
4612 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
4613 fn r#shutdown_with_epitaph(
4614 &self,
4615 mut epitaph_status: i32,
4616 ) -> Self::ShutdownWithEpitaphResponseFut {
4617 fn _decode(
4618 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4619 ) -> Result<(), fidl::Error> {
4620 let _response = fidl::client::decode_transaction_body::<
4621 fidl::encoding::EmptyPayload,
4622 fidl::encoding::DefaultFuchsiaResourceDialect,
4623 0x7a15369d88e1e8ec,
4624 >(_buf?)?;
4625 Ok(_response)
4626 }
4627 self.client.send_query_and_decode::<RunnerShutdownWithEpitaphRequest, ()>(
4628 (epitaph_status,),
4629 0x7a15369d88e1e8ec,
4630 fidl::encoding::DynamicFlags::empty(),
4631 _decode,
4632 )
4633 }
4634
4635 type SendOpenTargetStrictEventResponseFut =
4636 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
4637 fn r#send_open_target_strict_event(&self) -> Self::SendOpenTargetStrictEventResponseFut {
4638 fn _decode(
4639 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4640 ) -> Result<(), fidl::Error> {
4641 let _response = fidl::client::decode_transaction_body::<
4642 fidl::encoding::EmptyPayload,
4643 fidl::encoding::DefaultFuchsiaResourceDialect,
4644 0x1c3e4452a20c9590,
4645 >(_buf?)?;
4646 Ok(_response)
4647 }
4648 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
4649 (),
4650 0x1c3e4452a20c9590,
4651 fidl::encoding::DynamicFlags::empty(),
4652 _decode,
4653 )
4654 }
4655
4656 type SendOpenTargetFlexibleEventResponseFut =
4657 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
4658 fn r#send_open_target_flexible_event(&self) -> Self::SendOpenTargetFlexibleEventResponseFut {
4659 fn _decode(
4660 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4661 ) -> Result<(), fidl::Error> {
4662 let _response = fidl::client::decode_transaction_body::<
4663 fidl::encoding::EmptyPayload,
4664 fidl::encoding::DefaultFuchsiaResourceDialect,
4665 0x2d2c9446799baeb6,
4666 >(_buf?)?;
4667 Ok(_response)
4668 }
4669 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
4670 (),
4671 0x2d2c9446799baeb6,
4672 fidl::encoding::DynamicFlags::empty(),
4673 _decode,
4674 )
4675 }
4676}
4677
4678pub struct RunnerEventStream {
4679 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4680}
4681
4682impl std::marker::Unpin for RunnerEventStream {}
4683
4684impl futures::stream::FusedStream for RunnerEventStream {
4685 fn is_terminated(&self) -> bool {
4686 self.event_receiver.is_terminated()
4687 }
4688}
4689
4690impl futures::Stream for RunnerEventStream {
4691 type Item = Result<RunnerEvent, fidl::Error>;
4692
4693 fn poll_next(
4694 mut self: std::pin::Pin<&mut Self>,
4695 cx: &mut std::task::Context<'_>,
4696 ) -> std::task::Poll<Option<Self::Item>> {
4697 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4698 &mut self.event_receiver,
4699 cx
4700 )?) {
4701 Some(buf) => std::task::Poll::Ready(Some(RunnerEvent::decode(buf))),
4702 None => std::task::Poll::Ready(None),
4703 }
4704 }
4705}
4706
4707#[derive(Debug)]
4708pub enum RunnerEvent {
4709 OnTeardown { reason: TeardownReason },
4710 OnReceivedUnknownMethod { ordinal: u64, unknown_method_type: UnknownMethodType },
4711 OnReceivedClosedTargetOneWayNoPayload {},
4712 OnReceivedOpenTargetStrictOneWay {},
4713 OnReceivedOpenTargetFlexibleOneWay {},
4714}
4715
4716impl RunnerEvent {
4717 #[allow(irrefutable_let_patterns)]
4718 pub fn into_on_teardown(self) -> Option<TeardownReason> {
4719 if let RunnerEvent::OnTeardown { reason } = self {
4720 Some((reason))
4721 } else {
4722 None
4723 }
4724 }
4725 #[allow(irrefutable_let_patterns)]
4726 pub fn into_on_received_unknown_method(self) -> Option<(u64, UnknownMethodType)> {
4727 if let RunnerEvent::OnReceivedUnknownMethod { ordinal, unknown_method_type } = self {
4728 Some((ordinal, unknown_method_type))
4729 } else {
4730 None
4731 }
4732 }
4733 #[allow(irrefutable_let_patterns)]
4734 pub fn into_on_received_closed_target_one_way_no_payload(self) -> Option<()> {
4735 if let RunnerEvent::OnReceivedClosedTargetOneWayNoPayload {} = self {
4736 Some(())
4737 } else {
4738 None
4739 }
4740 }
4741 #[allow(irrefutable_let_patterns)]
4742 pub fn into_on_received_open_target_strict_one_way(self) -> Option<()> {
4743 if let RunnerEvent::OnReceivedOpenTargetStrictOneWay {} = self {
4744 Some(())
4745 } else {
4746 None
4747 }
4748 }
4749 #[allow(irrefutable_let_patterns)]
4750 pub fn into_on_received_open_target_flexible_one_way(self) -> Option<()> {
4751 if let RunnerEvent::OnReceivedOpenTargetFlexibleOneWay {} = self {
4752 Some(())
4753 } else {
4754 None
4755 }
4756 }
4757
4758 fn decode(
4760 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4761 ) -> Result<RunnerEvent, fidl::Error> {
4762 let (bytes, _handles) = buf.split_mut();
4763 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4764 debug_assert_eq!(tx_header.tx_id, 0);
4765 match tx_header.ordinal {
4766 0x4472273866753acf => {
4767 let mut out = fidl::new_empty!(
4768 RunnerOnTeardownRequest,
4769 fidl::encoding::DefaultFuchsiaResourceDialect
4770 );
4771 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RunnerOnTeardownRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
4772 Ok((RunnerEvent::OnTeardown { reason: out.reason }))
4773 }
4774 0x3c7f8d66a4f4c0e4 => {
4775 let mut out = fidl::new_empty!(
4776 UnknownMethodInfo,
4777 fidl::encoding::DefaultFuchsiaResourceDialect
4778 );
4779 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<UnknownMethodInfo>(&tx_header, _body_bytes, _handles, &mut out)?;
4780 Ok((RunnerEvent::OnReceivedUnknownMethod {
4781 ordinal: out.ordinal,
4782 unknown_method_type: out.unknown_method_type,
4783 }))
4784 }
4785 0x56915f3fcde32b6f => {
4786 let mut out = fidl::new_empty!(
4787 fidl::encoding::EmptyPayload,
4788 fidl::encoding::DefaultFuchsiaResourceDialect
4789 );
4790 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
4791 Ok((RunnerEvent::OnReceivedClosedTargetOneWayNoPayload {}))
4792 }
4793 0x5b82db8b0ffe97c5 => {
4794 let mut out = fidl::new_empty!(
4795 fidl::encoding::EmptyPayload,
4796 fidl::encoding::DefaultFuchsiaResourceDialect
4797 );
4798 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
4799 Ok((RunnerEvent::OnReceivedOpenTargetStrictOneWay {}))
4800 }
4801 0x2428c34ecface889 => {
4802 let mut out = fidl::new_empty!(
4803 fidl::encoding::EmptyPayload,
4804 fidl::encoding::DefaultFuchsiaResourceDialect
4805 );
4806 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&tx_header, _body_bytes, _handles, &mut out)?;
4807 Ok((RunnerEvent::OnReceivedOpenTargetFlexibleOneWay {}))
4808 }
4809 _ => Err(fidl::Error::UnknownOrdinal {
4810 ordinal: tx_header.ordinal,
4811 protocol_name: <RunnerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4812 }),
4813 }
4814 }
4815}
4816
4817pub struct RunnerRequestStream {
4819 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4820 is_terminated: bool,
4821}
4822
4823impl std::marker::Unpin for RunnerRequestStream {}
4824
4825impl futures::stream::FusedStream for RunnerRequestStream {
4826 fn is_terminated(&self) -> bool {
4827 self.is_terminated
4828 }
4829}
4830
4831impl fidl::endpoints::RequestStream for RunnerRequestStream {
4832 type Protocol = RunnerMarker;
4833 type ControlHandle = RunnerControlHandle;
4834
4835 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4836 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4837 }
4838
4839 fn control_handle(&self) -> Self::ControlHandle {
4840 RunnerControlHandle { inner: self.inner.clone() }
4841 }
4842
4843 fn into_inner(
4844 self,
4845 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4846 {
4847 (self.inner, self.is_terminated)
4848 }
4849
4850 fn from_inner(
4851 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4852 is_terminated: bool,
4853 ) -> Self {
4854 Self { inner, is_terminated }
4855 }
4856}
4857
4858impl futures::Stream for RunnerRequestStream {
4859 type Item = Result<RunnerRequest, fidl::Error>;
4860
4861 fn poll_next(
4862 mut self: std::pin::Pin<&mut Self>,
4863 cx: &mut std::task::Context<'_>,
4864 ) -> std::task::Poll<Option<Self::Item>> {
4865 let this = &mut *self;
4866 if this.inner.check_shutdown(cx) {
4867 this.is_terminated = true;
4868 return std::task::Poll::Ready(None);
4869 }
4870 if this.is_terminated {
4871 panic!("polled RunnerRequestStream after completion");
4872 }
4873 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4874 |bytes, handles| {
4875 match this.inner.channel().read_etc(cx, bytes, handles) {
4876 std::task::Poll::Ready(Ok(())) => {}
4877 std::task::Poll::Pending => return std::task::Poll::Pending,
4878 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4879 this.is_terminated = true;
4880 return std::task::Poll::Ready(None);
4881 }
4882 std::task::Poll::Ready(Err(e)) => {
4883 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4884 e.into(),
4885 ))))
4886 }
4887 }
4888
4889 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4891
4892 std::task::Poll::Ready(Some(match header.ordinal {
4893 0x3c70bef2e59d06a7 => {
4894 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4895 let mut req = fidl::new_empty!(
4896 fidl::encoding::EmptyPayload,
4897 fidl::encoding::DefaultFuchsiaResourceDialect
4898 );
4899 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4900 let control_handle = RunnerControlHandle { inner: this.inner.clone() };
4901 Ok(RunnerRequest::GetVersion {
4902 responder: RunnerGetVersionResponder {
4903 control_handle: std::mem::ManuallyDrop::new(control_handle),
4904 tx_id: header.tx_id,
4905 },
4906 })
4907 }
4908 0x2449c31d30d6f5b7 => {
4909 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4910 let mut req = fidl::new_empty!(
4911 fidl::encoding::EmptyPayload,
4912 fidl::encoding::DefaultFuchsiaResourceDialect
4913 );
4914 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4915 let control_handle = RunnerControlHandle { inner: this.inner.clone() };
4916 Ok(RunnerRequest::CheckAlive {
4917 responder: RunnerCheckAliveResponder {
4918 control_handle: std::mem::ManuallyDrop::new(control_handle),
4919 tx_id: header.tx_id,
4920 },
4921 })
4922 }
4923 0x2d4735726d30a5b0 => {
4924 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4925 let mut req = fidl::new_empty!(
4926 RunnerStartRequest,
4927 fidl::encoding::DefaultFuchsiaResourceDialect
4928 );
4929 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RunnerStartRequest>(&header, _body_bytes, handles, &mut req)?;
4930 let control_handle = RunnerControlHandle { inner: this.inner.clone() };
4931 Ok(RunnerRequest::Start {
4932 test: req.test,
4933 any_target: req.any_target,
4934
4935 responder: RunnerStartResponder {
4936 control_handle: std::mem::ManuallyDrop::new(control_handle),
4937 tx_id: header.tx_id,
4938 },
4939 })
4940 }
4941 0x7a15369d88e1e8ec => {
4942 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4943 let mut req = fidl::new_empty!(
4944 RunnerShutdownWithEpitaphRequest,
4945 fidl::encoding::DefaultFuchsiaResourceDialect
4946 );
4947 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RunnerShutdownWithEpitaphRequest>(&header, _body_bytes, handles, &mut req)?;
4948 let control_handle = RunnerControlHandle { inner: this.inner.clone() };
4949 Ok(RunnerRequest::ShutdownWithEpitaph {
4950 epitaph_status: req.epitaph_status,
4951
4952 responder: RunnerShutdownWithEpitaphResponder {
4953 control_handle: std::mem::ManuallyDrop::new(control_handle),
4954 tx_id: header.tx_id,
4955 },
4956 })
4957 }
4958 0x1c3e4452a20c9590 => {
4959 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4960 let mut req = fidl::new_empty!(
4961 fidl::encoding::EmptyPayload,
4962 fidl::encoding::DefaultFuchsiaResourceDialect
4963 );
4964 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4965 let control_handle = RunnerControlHandle { inner: this.inner.clone() };
4966 Ok(RunnerRequest::SendOpenTargetStrictEvent {
4967 responder: RunnerSendOpenTargetStrictEventResponder {
4968 control_handle: std::mem::ManuallyDrop::new(control_handle),
4969 tx_id: header.tx_id,
4970 },
4971 })
4972 }
4973 0x2d2c9446799baeb6 => {
4974 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4975 let mut req = fidl::new_empty!(
4976 fidl::encoding::EmptyPayload,
4977 fidl::encoding::DefaultFuchsiaResourceDialect
4978 );
4979 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4980 let control_handle = RunnerControlHandle { inner: this.inner.clone() };
4981 Ok(RunnerRequest::SendOpenTargetFlexibleEvent {
4982 responder: RunnerSendOpenTargetFlexibleEventResponder {
4983 control_handle: std::mem::ManuallyDrop::new(control_handle),
4984 tx_id: header.tx_id,
4985 },
4986 })
4987 }
4988 _ => Err(fidl::Error::UnknownOrdinal {
4989 ordinal: header.ordinal,
4990 protocol_name:
4991 <RunnerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4992 }),
4993 }))
4994 },
4995 )
4996 }
4997}
4998
4999#[derive(Debug)]
5000pub enum RunnerRequest {
5001 GetVersion { responder: RunnerGetVersionResponder },
5002 CheckAlive { responder: RunnerCheckAliveResponder },
5003 Start { test: Test, any_target: AnyTarget, responder: RunnerStartResponder },
5004 ShutdownWithEpitaph { epitaph_status: i32, responder: RunnerShutdownWithEpitaphResponder },
5005 SendOpenTargetStrictEvent { responder: RunnerSendOpenTargetStrictEventResponder },
5006 SendOpenTargetFlexibleEvent { responder: RunnerSendOpenTargetFlexibleEventResponder },
5007}
5008
5009impl RunnerRequest {
5010 #[allow(irrefutable_let_patterns)]
5011 pub fn into_get_version(self) -> Option<(RunnerGetVersionResponder)> {
5012 if let RunnerRequest::GetVersion { responder } = self {
5013 Some((responder))
5014 } else {
5015 None
5016 }
5017 }
5018
5019 #[allow(irrefutable_let_patterns)]
5020 pub fn into_check_alive(self) -> Option<(RunnerCheckAliveResponder)> {
5021 if let RunnerRequest::CheckAlive { responder } = self {
5022 Some((responder))
5023 } else {
5024 None
5025 }
5026 }
5027
5028 #[allow(irrefutable_let_patterns)]
5029 pub fn into_start(self) -> Option<(Test, AnyTarget, RunnerStartResponder)> {
5030 if let RunnerRequest::Start { test, any_target, responder } = self {
5031 Some((test, any_target, responder))
5032 } else {
5033 None
5034 }
5035 }
5036
5037 #[allow(irrefutable_let_patterns)]
5038 pub fn into_shutdown_with_epitaph(self) -> Option<(i32, RunnerShutdownWithEpitaphResponder)> {
5039 if let RunnerRequest::ShutdownWithEpitaph { epitaph_status, responder } = self {
5040 Some((epitaph_status, responder))
5041 } else {
5042 None
5043 }
5044 }
5045
5046 #[allow(irrefutable_let_patterns)]
5047 pub fn into_send_open_target_strict_event(
5048 self,
5049 ) -> Option<(RunnerSendOpenTargetStrictEventResponder)> {
5050 if let RunnerRequest::SendOpenTargetStrictEvent { responder } = self {
5051 Some((responder))
5052 } else {
5053 None
5054 }
5055 }
5056
5057 #[allow(irrefutable_let_patterns)]
5058 pub fn into_send_open_target_flexible_event(
5059 self,
5060 ) -> Option<(RunnerSendOpenTargetFlexibleEventResponder)> {
5061 if let RunnerRequest::SendOpenTargetFlexibleEvent { responder } = self {
5062 Some((responder))
5063 } else {
5064 None
5065 }
5066 }
5067
5068 pub fn method_name(&self) -> &'static str {
5070 match *self {
5071 RunnerRequest::GetVersion { .. } => "get_version",
5072 RunnerRequest::CheckAlive { .. } => "check_alive",
5073 RunnerRequest::Start { .. } => "start",
5074 RunnerRequest::ShutdownWithEpitaph { .. } => "shutdown_with_epitaph",
5075 RunnerRequest::SendOpenTargetStrictEvent { .. } => "send_open_target_strict_event",
5076 RunnerRequest::SendOpenTargetFlexibleEvent { .. } => "send_open_target_flexible_event",
5077 }
5078 }
5079}
5080
5081#[derive(Debug, Clone)]
5082pub struct RunnerControlHandle {
5083 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5084}
5085
5086impl fidl::endpoints::ControlHandle for RunnerControlHandle {
5087 fn shutdown(&self) {
5088 self.inner.shutdown()
5089 }
5090 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5091 self.inner.shutdown_with_epitaph(status)
5092 }
5093
5094 fn is_closed(&self) -> bool {
5095 self.inner.channel().is_closed()
5096 }
5097 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5098 self.inner.channel().on_closed()
5099 }
5100
5101 #[cfg(target_os = "fuchsia")]
5102 fn signal_peer(
5103 &self,
5104 clear_mask: zx::Signals,
5105 set_mask: zx::Signals,
5106 ) -> Result<(), zx_status::Status> {
5107 use fidl::Peered;
5108 self.inner.channel().signal_peer(clear_mask, set_mask)
5109 }
5110}
5111
5112impl RunnerControlHandle {
5113 pub fn send_on_teardown(&self, mut reason: TeardownReason) -> Result<(), fidl::Error> {
5114 self.inner.send::<RunnerOnTeardownRequest>(
5115 (reason,),
5116 0,
5117 0x4472273866753acf,
5118 fidl::encoding::DynamicFlags::empty(),
5119 )
5120 }
5121
5122 pub fn send_on_received_unknown_method(
5123 &self,
5124 mut ordinal: u64,
5125 mut unknown_method_type: UnknownMethodType,
5126 ) -> Result<(), fidl::Error> {
5127 self.inner.send::<UnknownMethodInfo>(
5128 (ordinal, unknown_method_type),
5129 0,
5130 0x3c7f8d66a4f4c0e4,
5131 fidl::encoding::DynamicFlags::empty(),
5132 )
5133 }
5134
5135 pub fn send_on_received_closed_target_one_way_no_payload(&self) -> Result<(), fidl::Error> {
5136 self.inner.send::<fidl::encoding::EmptyPayload>(
5137 (),
5138 0,
5139 0x56915f3fcde32b6f,
5140 fidl::encoding::DynamicFlags::empty(),
5141 )
5142 }
5143
5144 pub fn send_on_received_open_target_strict_one_way(&self) -> Result<(), fidl::Error> {
5145 self.inner.send::<fidl::encoding::EmptyPayload>(
5146 (),
5147 0,
5148 0x5b82db8b0ffe97c5,
5149 fidl::encoding::DynamicFlags::empty(),
5150 )
5151 }
5152
5153 pub fn send_on_received_open_target_flexible_one_way(&self) -> Result<(), fidl::Error> {
5154 self.inner.send::<fidl::encoding::EmptyPayload>(
5155 (),
5156 0,
5157 0x2428c34ecface889,
5158 fidl::encoding::DynamicFlags::empty(),
5159 )
5160 }
5161}
5162
5163#[must_use = "FIDL methods require a response to be sent"]
5164#[derive(Debug)]
5165pub struct RunnerGetVersionResponder {
5166 control_handle: std::mem::ManuallyDrop<RunnerControlHandle>,
5167 tx_id: u32,
5168}
5169
5170impl std::ops::Drop for RunnerGetVersionResponder {
5174 fn drop(&mut self) {
5175 self.control_handle.shutdown();
5176 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5178 }
5179}
5180
5181impl fidl::endpoints::Responder for RunnerGetVersionResponder {
5182 type ControlHandle = RunnerControlHandle;
5183
5184 fn control_handle(&self) -> &RunnerControlHandle {
5185 &self.control_handle
5186 }
5187
5188 fn drop_without_shutdown(mut self) {
5189 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5191 std::mem::forget(self);
5193 }
5194}
5195
5196impl RunnerGetVersionResponder {
5197 pub fn send(self, mut version: u64) -> Result<(), fidl::Error> {
5201 let _result = self.send_raw(version);
5202 if _result.is_err() {
5203 self.control_handle.shutdown();
5204 }
5205 self.drop_without_shutdown();
5206 _result
5207 }
5208
5209 pub fn send_no_shutdown_on_err(self, mut version: u64) -> Result<(), fidl::Error> {
5211 let _result = self.send_raw(version);
5212 self.drop_without_shutdown();
5213 _result
5214 }
5215
5216 fn send_raw(&self, mut version: u64) -> Result<(), fidl::Error> {
5217 self.control_handle.inner.send::<RunnerGetVersionResponse>(
5218 (version,),
5219 self.tx_id,
5220 0x3c70bef2e59d06a7,
5221 fidl::encoding::DynamicFlags::empty(),
5222 )
5223 }
5224}
5225
5226#[must_use = "FIDL methods require a response to be sent"]
5227#[derive(Debug)]
5228pub struct RunnerCheckAliveResponder {
5229 control_handle: std::mem::ManuallyDrop<RunnerControlHandle>,
5230 tx_id: u32,
5231}
5232
5233impl std::ops::Drop for RunnerCheckAliveResponder {
5237 fn drop(&mut self) {
5238 self.control_handle.shutdown();
5239 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5241 }
5242}
5243
5244impl fidl::endpoints::Responder for RunnerCheckAliveResponder {
5245 type ControlHandle = RunnerControlHandle;
5246
5247 fn control_handle(&self) -> &RunnerControlHandle {
5248 &self.control_handle
5249 }
5250
5251 fn drop_without_shutdown(mut self) {
5252 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5254 std::mem::forget(self);
5256 }
5257}
5258
5259impl RunnerCheckAliveResponder {
5260 pub fn send(self) -> Result<(), fidl::Error> {
5264 let _result = self.send_raw();
5265 if _result.is_err() {
5266 self.control_handle.shutdown();
5267 }
5268 self.drop_without_shutdown();
5269 _result
5270 }
5271
5272 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
5274 let _result = self.send_raw();
5275 self.drop_without_shutdown();
5276 _result
5277 }
5278
5279 fn send_raw(&self) -> Result<(), fidl::Error> {
5280 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
5281 (),
5282 self.tx_id,
5283 0x2449c31d30d6f5b7,
5284 fidl::encoding::DynamicFlags::empty(),
5285 )
5286 }
5287}
5288
5289#[must_use = "FIDL methods require a response to be sent"]
5290#[derive(Debug)]
5291pub struct RunnerStartResponder {
5292 control_handle: std::mem::ManuallyDrop<RunnerControlHandle>,
5293 tx_id: u32,
5294}
5295
5296impl std::ops::Drop for RunnerStartResponder {
5300 fn drop(&mut self) {
5301 self.control_handle.shutdown();
5302 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5304 }
5305}
5306
5307impl fidl::endpoints::Responder for RunnerStartResponder {
5308 type ControlHandle = RunnerControlHandle;
5309
5310 fn control_handle(&self) -> &RunnerControlHandle {
5311 &self.control_handle
5312 }
5313
5314 fn drop_without_shutdown(mut self) {
5315 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5317 std::mem::forget(self);
5319 }
5320}
5321
5322impl RunnerStartResponder {
5323 pub fn send(self, mut result: Result<(), StartError>) -> Result<(), fidl::Error> {
5327 let _result = self.send_raw(result);
5328 if _result.is_err() {
5329 self.control_handle.shutdown();
5330 }
5331 self.drop_without_shutdown();
5332 _result
5333 }
5334
5335 pub fn send_no_shutdown_on_err(
5337 self,
5338 mut result: Result<(), StartError>,
5339 ) -> Result<(), fidl::Error> {
5340 let _result = self.send_raw(result);
5341 self.drop_without_shutdown();
5342 _result
5343 }
5344
5345 fn send_raw(&self, mut result: Result<(), StartError>) -> Result<(), fidl::Error> {
5346 self.control_handle
5347 .inner
5348 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, StartError>>(
5349 result,
5350 self.tx_id,
5351 0x2d4735726d30a5b0,
5352 fidl::encoding::DynamicFlags::empty(),
5353 )
5354 }
5355}
5356
5357#[must_use = "FIDL methods require a response to be sent"]
5358#[derive(Debug)]
5359pub struct RunnerShutdownWithEpitaphResponder {
5360 control_handle: std::mem::ManuallyDrop<RunnerControlHandle>,
5361 tx_id: u32,
5362}
5363
5364impl std::ops::Drop for RunnerShutdownWithEpitaphResponder {
5368 fn drop(&mut self) {
5369 self.control_handle.shutdown();
5370 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5372 }
5373}
5374
5375impl fidl::endpoints::Responder for RunnerShutdownWithEpitaphResponder {
5376 type ControlHandle = RunnerControlHandle;
5377
5378 fn control_handle(&self) -> &RunnerControlHandle {
5379 &self.control_handle
5380 }
5381
5382 fn drop_without_shutdown(mut self) {
5383 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5385 std::mem::forget(self);
5387 }
5388}
5389
5390impl RunnerShutdownWithEpitaphResponder {
5391 pub fn send(self) -> Result<(), fidl::Error> {
5395 let _result = self.send_raw();
5396 if _result.is_err() {
5397 self.control_handle.shutdown();
5398 }
5399 self.drop_without_shutdown();
5400 _result
5401 }
5402
5403 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
5405 let _result = self.send_raw();
5406 self.drop_without_shutdown();
5407 _result
5408 }
5409
5410 fn send_raw(&self) -> Result<(), fidl::Error> {
5411 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
5412 (),
5413 self.tx_id,
5414 0x7a15369d88e1e8ec,
5415 fidl::encoding::DynamicFlags::empty(),
5416 )
5417 }
5418}
5419
5420#[must_use = "FIDL methods require a response to be sent"]
5421#[derive(Debug)]
5422pub struct RunnerSendOpenTargetStrictEventResponder {
5423 control_handle: std::mem::ManuallyDrop<RunnerControlHandle>,
5424 tx_id: u32,
5425}
5426
5427impl std::ops::Drop for RunnerSendOpenTargetStrictEventResponder {
5431 fn drop(&mut self) {
5432 self.control_handle.shutdown();
5433 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5435 }
5436}
5437
5438impl fidl::endpoints::Responder for RunnerSendOpenTargetStrictEventResponder {
5439 type ControlHandle = RunnerControlHandle;
5440
5441 fn control_handle(&self) -> &RunnerControlHandle {
5442 &self.control_handle
5443 }
5444
5445 fn drop_without_shutdown(mut self) {
5446 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5448 std::mem::forget(self);
5450 }
5451}
5452
5453impl RunnerSendOpenTargetStrictEventResponder {
5454 pub fn send(self) -> Result<(), fidl::Error> {
5458 let _result = self.send_raw();
5459 if _result.is_err() {
5460 self.control_handle.shutdown();
5461 }
5462 self.drop_without_shutdown();
5463 _result
5464 }
5465
5466 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
5468 let _result = self.send_raw();
5469 self.drop_without_shutdown();
5470 _result
5471 }
5472
5473 fn send_raw(&self) -> Result<(), fidl::Error> {
5474 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
5475 (),
5476 self.tx_id,
5477 0x1c3e4452a20c9590,
5478 fidl::encoding::DynamicFlags::empty(),
5479 )
5480 }
5481}
5482
5483#[must_use = "FIDL methods require a response to be sent"]
5484#[derive(Debug)]
5485pub struct RunnerSendOpenTargetFlexibleEventResponder {
5486 control_handle: std::mem::ManuallyDrop<RunnerControlHandle>,
5487 tx_id: u32,
5488}
5489
5490impl std::ops::Drop for RunnerSendOpenTargetFlexibleEventResponder {
5494 fn drop(&mut self) {
5495 self.control_handle.shutdown();
5496 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5498 }
5499}
5500
5501impl fidl::endpoints::Responder for RunnerSendOpenTargetFlexibleEventResponder {
5502 type ControlHandle = RunnerControlHandle;
5503
5504 fn control_handle(&self) -> &RunnerControlHandle {
5505 &self.control_handle
5506 }
5507
5508 fn drop_without_shutdown(mut self) {
5509 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5511 std::mem::forget(self);
5513 }
5514}
5515
5516impl RunnerSendOpenTargetFlexibleEventResponder {
5517 pub fn send(self) -> Result<(), fidl::Error> {
5521 let _result = self.send_raw();
5522 if _result.is_err() {
5523 self.control_handle.shutdown();
5524 }
5525 self.drop_without_shutdown();
5526 _result
5527 }
5528
5529 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
5531 let _result = self.send_raw();
5532 self.drop_without_shutdown();
5533 _result
5534 }
5535
5536 fn send_raw(&self) -> Result<(), fidl::Error> {
5537 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
5538 (),
5539 self.tx_id,
5540 0x2d2c9446799baeb6,
5541 fidl::encoding::DynamicFlags::empty(),
5542 )
5543 }
5544}
5545
5546mod internal {
5547 use super::*;
5548
5549 impl fidl::encoding::ResourceTypeMarker for ClosedTargetCreateNHandleVectorRequest {
5550 type Borrowed<'a> = &'a mut Self;
5551 fn take_or_borrow<'a>(
5552 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5553 ) -> Self::Borrowed<'a> {
5554 value
5555 }
5556 }
5557
5558 unsafe impl fidl::encoding::TypeMarker for ClosedTargetCreateNHandleVectorRequest {
5559 type Owned = Self;
5560
5561 #[inline(always)]
5562 fn inline_align(_context: fidl::encoding::Context) -> usize {
5563 4
5564 }
5565
5566 #[inline(always)]
5567 fn inline_size(_context: fidl::encoding::Context) -> usize {
5568 4
5569 }
5570 #[inline(always)]
5571 fn encode_is_copy() -> bool {
5572 true
5573 }
5574
5575 #[inline(always)]
5576 fn decode_is_copy() -> bool {
5577 true
5578 }
5579 }
5580
5581 unsafe impl
5582 fidl::encoding::Encode<
5583 ClosedTargetCreateNHandleVectorRequest,
5584 fidl::encoding::DefaultFuchsiaResourceDialect,
5585 > for &mut ClosedTargetCreateNHandleVectorRequest
5586 {
5587 #[inline]
5588 unsafe fn encode(
5589 self,
5590 encoder: &mut fidl::encoding::Encoder<
5591 '_,
5592 fidl::encoding::DefaultFuchsiaResourceDialect,
5593 >,
5594 offset: usize,
5595 _depth: fidl::encoding::Depth,
5596 ) -> fidl::Result<()> {
5597 encoder.debug_check_bounds::<ClosedTargetCreateNHandleVectorRequest>(offset);
5598 unsafe {
5599 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5601 (buf_ptr as *mut ClosedTargetCreateNHandleVectorRequest).write_unaligned(
5602 (self as *const ClosedTargetCreateNHandleVectorRequest).read(),
5603 );
5604 }
5607 Ok(())
5608 }
5609 }
5610 unsafe impl<T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>>
5611 fidl::encoding::Encode<
5612 ClosedTargetCreateNHandleVectorRequest,
5613 fidl::encoding::DefaultFuchsiaResourceDialect,
5614 > for (T0,)
5615 {
5616 #[inline]
5617 unsafe fn encode(
5618 self,
5619 encoder: &mut fidl::encoding::Encoder<
5620 '_,
5621 fidl::encoding::DefaultFuchsiaResourceDialect,
5622 >,
5623 offset: usize,
5624 depth: fidl::encoding::Depth,
5625 ) -> fidl::Result<()> {
5626 encoder.debug_check_bounds::<ClosedTargetCreateNHandleVectorRequest>(offset);
5627 self.0.encode(encoder, offset + 0, depth)?;
5631 Ok(())
5632 }
5633 }
5634
5635 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5636 for ClosedTargetCreateNHandleVectorRequest
5637 {
5638 #[inline(always)]
5639 fn new_empty() -> Self {
5640 Self { n: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect) }
5641 }
5642
5643 #[inline]
5644 unsafe fn decode(
5645 &mut self,
5646 decoder: &mut fidl::encoding::Decoder<
5647 '_,
5648 fidl::encoding::DefaultFuchsiaResourceDialect,
5649 >,
5650 offset: usize,
5651 _depth: fidl::encoding::Depth,
5652 ) -> fidl::Result<()> {
5653 decoder.debug_check_bounds::<Self>(offset);
5654 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5655 unsafe {
5658 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
5659 }
5660 Ok(())
5661 }
5662 }
5663
5664 impl fidl::encoding::ResourceTypeMarker for ClosedTargetCreateNHandleVectorResponse {
5665 type Borrowed<'a> = &'a mut Self;
5666 fn take_or_borrow<'a>(
5667 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5668 ) -> Self::Borrowed<'a> {
5669 value
5670 }
5671 }
5672
5673 unsafe impl fidl::encoding::TypeMarker for ClosedTargetCreateNHandleVectorResponse {
5674 type Owned = Self;
5675
5676 #[inline(always)]
5677 fn inline_align(_context: fidl::encoding::Context) -> usize {
5678 8
5679 }
5680
5681 #[inline(always)]
5682 fn inline_size(_context: fidl::encoding::Context) -> usize {
5683 16
5684 }
5685 }
5686
5687 unsafe impl
5688 fidl::encoding::Encode<
5689 ClosedTargetCreateNHandleVectorResponse,
5690 fidl::encoding::DefaultFuchsiaResourceDialect,
5691 > for &mut ClosedTargetCreateNHandleVectorResponse
5692 {
5693 #[inline]
5694 unsafe fn encode(
5695 self,
5696 encoder: &mut fidl::encoding::Encoder<
5697 '_,
5698 fidl::encoding::DefaultFuchsiaResourceDialect,
5699 >,
5700 offset: usize,
5701 _depth: fidl::encoding::Depth,
5702 ) -> fidl::Result<()> {
5703 encoder.debug_check_bounds::<ClosedTargetCreateNHandleVectorResponse>(offset);
5704 fidl::encoding::Encode::<
5706 ClosedTargetCreateNHandleVectorResponse,
5707 fidl::encoding::DefaultFuchsiaResourceDialect,
5708 >::encode(
5709 (<fidl::encoding::UnboundedVector<
5710 fidl::encoding::HandleType<
5711 fidl::Event,
5712 { fidl::ObjectType::EVENT.into_raw() },
5713 2147483648,
5714 >,
5715 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5716 &mut self.vec
5717 ),),
5718 encoder,
5719 offset,
5720 _depth,
5721 )
5722 }
5723 }
5724 unsafe impl<
5725 T0: fidl::encoding::Encode<
5726 fidl::encoding::UnboundedVector<
5727 fidl::encoding::HandleType<
5728 fidl::Event,
5729 { fidl::ObjectType::EVENT.into_raw() },
5730 2147483648,
5731 >,
5732 >,
5733 fidl::encoding::DefaultFuchsiaResourceDialect,
5734 >,
5735 >
5736 fidl::encoding::Encode<
5737 ClosedTargetCreateNHandleVectorResponse,
5738 fidl::encoding::DefaultFuchsiaResourceDialect,
5739 > for (T0,)
5740 {
5741 #[inline]
5742 unsafe fn encode(
5743 self,
5744 encoder: &mut fidl::encoding::Encoder<
5745 '_,
5746 fidl::encoding::DefaultFuchsiaResourceDialect,
5747 >,
5748 offset: usize,
5749 depth: fidl::encoding::Depth,
5750 ) -> fidl::Result<()> {
5751 encoder.debug_check_bounds::<ClosedTargetCreateNHandleVectorResponse>(offset);
5752 self.0.encode(encoder, offset + 0, depth)?;
5756 Ok(())
5757 }
5758 }
5759
5760 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5761 for ClosedTargetCreateNHandleVectorResponse
5762 {
5763 #[inline(always)]
5764 fn new_empty() -> Self {
5765 Self {
5766 vec: fidl::new_empty!(
5767 fidl::encoding::UnboundedVector<
5768 fidl::encoding::HandleType<
5769 fidl::Event,
5770 { fidl::ObjectType::EVENT.into_raw() },
5771 2147483648,
5772 >,
5773 >,
5774 fidl::encoding::DefaultFuchsiaResourceDialect
5775 ),
5776 }
5777 }
5778
5779 #[inline]
5780 unsafe fn decode(
5781 &mut self,
5782 decoder: &mut fidl::encoding::Decoder<
5783 '_,
5784 fidl::encoding::DefaultFuchsiaResourceDialect,
5785 >,
5786 offset: usize,
5787 _depth: fidl::encoding::Depth,
5788 ) -> fidl::Result<()> {
5789 decoder.debug_check_bounds::<Self>(offset);
5790 fidl::decode!(
5792 fidl::encoding::UnboundedVector<
5793 fidl::encoding::HandleType<
5794 fidl::Event,
5795 { fidl::ObjectType::EVENT.into_raw() },
5796 2147483648,
5797 >,
5798 >,
5799 fidl::encoding::DefaultFuchsiaResourceDialect,
5800 &mut self.vec,
5801 decoder,
5802 offset + 0,
5803 _depth
5804 )?;
5805 Ok(())
5806 }
5807 }
5808
5809 impl fidl::encoding::ResourceTypeMarker for ClosedTargetEchoAsTransferableSignalableEventRequest {
5810 type Borrowed<'a> = &'a mut Self;
5811 fn take_or_borrow<'a>(
5812 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5813 ) -> Self::Borrowed<'a> {
5814 value
5815 }
5816 }
5817
5818 unsafe impl fidl::encoding::TypeMarker for ClosedTargetEchoAsTransferableSignalableEventRequest {
5819 type Owned = Self;
5820
5821 #[inline(always)]
5822 fn inline_align(_context: fidl::encoding::Context) -> usize {
5823 4
5824 }
5825
5826 #[inline(always)]
5827 fn inline_size(_context: fidl::encoding::Context) -> usize {
5828 4
5829 }
5830 }
5831
5832 unsafe impl
5833 fidl::encoding::Encode<
5834 ClosedTargetEchoAsTransferableSignalableEventRequest,
5835 fidl::encoding::DefaultFuchsiaResourceDialect,
5836 > for &mut ClosedTargetEchoAsTransferableSignalableEventRequest
5837 {
5838 #[inline]
5839 unsafe fn encode(
5840 self,
5841 encoder: &mut fidl::encoding::Encoder<
5842 '_,
5843 fidl::encoding::DefaultFuchsiaResourceDialect,
5844 >,
5845 offset: usize,
5846 _depth: fidl::encoding::Depth,
5847 ) -> fidl::Result<()> {
5848 encoder
5849 .debug_check_bounds::<ClosedTargetEchoAsTransferableSignalableEventRequest>(offset);
5850 fidl::encoding::Encode::<
5852 ClosedTargetEchoAsTransferableSignalableEventRequest,
5853 fidl::encoding::DefaultFuchsiaResourceDialect,
5854 >::encode(
5855 (<fidl::encoding::HandleType<
5856 fidl::Handle,
5857 { fidl::ObjectType::NONE.into_raw() },
5858 2147483648,
5859 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5860 &mut self.handle
5861 ),),
5862 encoder,
5863 offset,
5864 _depth,
5865 )
5866 }
5867 }
5868 unsafe impl<
5869 T0: fidl::encoding::Encode<
5870 fidl::encoding::HandleType<
5871 fidl::Handle,
5872 { fidl::ObjectType::NONE.into_raw() },
5873 2147483648,
5874 >,
5875 fidl::encoding::DefaultFuchsiaResourceDialect,
5876 >,
5877 >
5878 fidl::encoding::Encode<
5879 ClosedTargetEchoAsTransferableSignalableEventRequest,
5880 fidl::encoding::DefaultFuchsiaResourceDialect,
5881 > for (T0,)
5882 {
5883 #[inline]
5884 unsafe fn encode(
5885 self,
5886 encoder: &mut fidl::encoding::Encoder<
5887 '_,
5888 fidl::encoding::DefaultFuchsiaResourceDialect,
5889 >,
5890 offset: usize,
5891 depth: fidl::encoding::Depth,
5892 ) -> fidl::Result<()> {
5893 encoder
5894 .debug_check_bounds::<ClosedTargetEchoAsTransferableSignalableEventRequest>(offset);
5895 self.0.encode(encoder, offset + 0, depth)?;
5899 Ok(())
5900 }
5901 }
5902
5903 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5904 for ClosedTargetEchoAsTransferableSignalableEventRequest
5905 {
5906 #[inline(always)]
5907 fn new_empty() -> Self {
5908 Self {
5909 handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
5910 }
5911 }
5912
5913 #[inline]
5914 unsafe fn decode(
5915 &mut self,
5916 decoder: &mut fidl::encoding::Decoder<
5917 '_,
5918 fidl::encoding::DefaultFuchsiaResourceDialect,
5919 >,
5920 offset: usize,
5921 _depth: fidl::encoding::Depth,
5922 ) -> fidl::Result<()> {
5923 decoder.debug_check_bounds::<Self>(offset);
5924 fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle, decoder, offset + 0, _depth)?;
5926 Ok(())
5927 }
5928 }
5929
5930 impl fidl::encoding::ResourceTypeMarker for ClosedTargetEchoAsTransferableSignalableEventResponse {
5931 type Borrowed<'a> = &'a mut Self;
5932 fn take_or_borrow<'a>(
5933 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5934 ) -> Self::Borrowed<'a> {
5935 value
5936 }
5937 }
5938
5939 unsafe impl fidl::encoding::TypeMarker for ClosedTargetEchoAsTransferableSignalableEventResponse {
5940 type Owned = Self;
5941
5942 #[inline(always)]
5943 fn inline_align(_context: fidl::encoding::Context) -> usize {
5944 4
5945 }
5946
5947 #[inline(always)]
5948 fn inline_size(_context: fidl::encoding::Context) -> usize {
5949 4
5950 }
5951 }
5952
5953 unsafe impl
5954 fidl::encoding::Encode<
5955 ClosedTargetEchoAsTransferableSignalableEventResponse,
5956 fidl::encoding::DefaultFuchsiaResourceDialect,
5957 > for &mut ClosedTargetEchoAsTransferableSignalableEventResponse
5958 {
5959 #[inline]
5960 unsafe fn encode(
5961 self,
5962 encoder: &mut fidl::encoding::Encoder<
5963 '_,
5964 fidl::encoding::DefaultFuchsiaResourceDialect,
5965 >,
5966 offset: usize,
5967 _depth: fidl::encoding::Depth,
5968 ) -> fidl::Result<()> {
5969 encoder.debug_check_bounds::<ClosedTargetEchoAsTransferableSignalableEventResponse>(
5970 offset,
5971 );
5972 fidl::encoding::Encode::<
5974 ClosedTargetEchoAsTransferableSignalableEventResponse,
5975 fidl::encoding::DefaultFuchsiaResourceDialect,
5976 >::encode(
5977 (<fidl::encoding::HandleType<
5978 fidl::Event,
5979 { fidl::ObjectType::EVENT.into_raw() },
5980 4098,
5981 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5982 &mut self.handle
5983 ),),
5984 encoder,
5985 offset,
5986 _depth,
5987 )
5988 }
5989 }
5990 unsafe impl<
5991 T0: fidl::encoding::Encode<
5992 fidl::encoding::HandleType<
5993 fidl::Event,
5994 { fidl::ObjectType::EVENT.into_raw() },
5995 4098,
5996 >,
5997 fidl::encoding::DefaultFuchsiaResourceDialect,
5998 >,
5999 >
6000 fidl::encoding::Encode<
6001 ClosedTargetEchoAsTransferableSignalableEventResponse,
6002 fidl::encoding::DefaultFuchsiaResourceDialect,
6003 > for (T0,)
6004 {
6005 #[inline]
6006 unsafe fn encode(
6007 self,
6008 encoder: &mut fidl::encoding::Encoder<
6009 '_,
6010 fidl::encoding::DefaultFuchsiaResourceDialect,
6011 >,
6012 offset: usize,
6013 depth: fidl::encoding::Depth,
6014 ) -> fidl::Result<()> {
6015 encoder.debug_check_bounds::<ClosedTargetEchoAsTransferableSignalableEventResponse>(
6016 offset,
6017 );
6018 self.0.encode(encoder, offset + 0, depth)?;
6022 Ok(())
6023 }
6024 }
6025
6026 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6027 for ClosedTargetEchoAsTransferableSignalableEventResponse
6028 {
6029 #[inline(always)]
6030 fn new_empty() -> Self {
6031 Self {
6032 handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 4098>, fidl::encoding::DefaultFuchsiaResourceDialect),
6033 }
6034 }
6035
6036 #[inline]
6037 unsafe fn decode(
6038 &mut self,
6039 decoder: &mut fidl::encoding::Decoder<
6040 '_,
6041 fidl::encoding::DefaultFuchsiaResourceDialect,
6042 >,
6043 offset: usize,
6044 _depth: fidl::encoding::Depth,
6045 ) -> fidl::Result<()> {
6046 decoder.debug_check_bounds::<Self>(offset);
6047 fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 4098>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle, decoder, offset + 0, _depth)?;
6049 Ok(())
6050 }
6051 }
6052
6053 impl fidl::encoding::ResourceTypeMarker for ClosedTargetGetHandleRightsRequest {
6054 type Borrowed<'a> = &'a mut Self;
6055 fn take_or_borrow<'a>(
6056 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6057 ) -> Self::Borrowed<'a> {
6058 value
6059 }
6060 }
6061
6062 unsafe impl fidl::encoding::TypeMarker for ClosedTargetGetHandleRightsRequest {
6063 type Owned = Self;
6064
6065 #[inline(always)]
6066 fn inline_align(_context: fidl::encoding::Context) -> usize {
6067 4
6068 }
6069
6070 #[inline(always)]
6071 fn inline_size(_context: fidl::encoding::Context) -> usize {
6072 4
6073 }
6074 }
6075
6076 unsafe impl
6077 fidl::encoding::Encode<
6078 ClosedTargetGetHandleRightsRequest,
6079 fidl::encoding::DefaultFuchsiaResourceDialect,
6080 > for &mut ClosedTargetGetHandleRightsRequest
6081 {
6082 #[inline]
6083 unsafe fn encode(
6084 self,
6085 encoder: &mut fidl::encoding::Encoder<
6086 '_,
6087 fidl::encoding::DefaultFuchsiaResourceDialect,
6088 >,
6089 offset: usize,
6090 _depth: fidl::encoding::Depth,
6091 ) -> fidl::Result<()> {
6092 encoder.debug_check_bounds::<ClosedTargetGetHandleRightsRequest>(offset);
6093 fidl::encoding::Encode::<
6095 ClosedTargetGetHandleRightsRequest,
6096 fidl::encoding::DefaultFuchsiaResourceDialect,
6097 >::encode(
6098 (<fidl::encoding::HandleType<
6099 fidl::Handle,
6100 { fidl::ObjectType::NONE.into_raw() },
6101 2147483648,
6102 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6103 &mut self.handle
6104 ),),
6105 encoder,
6106 offset,
6107 _depth,
6108 )
6109 }
6110 }
6111 unsafe impl<
6112 T0: fidl::encoding::Encode<
6113 fidl::encoding::HandleType<
6114 fidl::Handle,
6115 { fidl::ObjectType::NONE.into_raw() },
6116 2147483648,
6117 >,
6118 fidl::encoding::DefaultFuchsiaResourceDialect,
6119 >,
6120 >
6121 fidl::encoding::Encode<
6122 ClosedTargetGetHandleRightsRequest,
6123 fidl::encoding::DefaultFuchsiaResourceDialect,
6124 > for (T0,)
6125 {
6126 #[inline]
6127 unsafe fn encode(
6128 self,
6129 encoder: &mut fidl::encoding::Encoder<
6130 '_,
6131 fidl::encoding::DefaultFuchsiaResourceDialect,
6132 >,
6133 offset: usize,
6134 depth: fidl::encoding::Depth,
6135 ) -> fidl::Result<()> {
6136 encoder.debug_check_bounds::<ClosedTargetGetHandleRightsRequest>(offset);
6137 self.0.encode(encoder, offset + 0, depth)?;
6141 Ok(())
6142 }
6143 }
6144
6145 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6146 for ClosedTargetGetHandleRightsRequest
6147 {
6148 #[inline(always)]
6149 fn new_empty() -> Self {
6150 Self {
6151 handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6152 }
6153 }
6154
6155 #[inline]
6156 unsafe fn decode(
6157 &mut self,
6158 decoder: &mut fidl::encoding::Decoder<
6159 '_,
6160 fidl::encoding::DefaultFuchsiaResourceDialect,
6161 >,
6162 offset: usize,
6163 _depth: fidl::encoding::Depth,
6164 ) -> fidl::Result<()> {
6165 decoder.debug_check_bounds::<Self>(offset);
6166 fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle, decoder, offset + 0, _depth)?;
6168 Ok(())
6169 }
6170 }
6171
6172 impl fidl::encoding::ResourceTypeMarker for ClosedTargetGetSignalableEventRightsRequest {
6173 type Borrowed<'a> = &'a mut Self;
6174 fn take_or_borrow<'a>(
6175 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6176 ) -> Self::Borrowed<'a> {
6177 value
6178 }
6179 }
6180
6181 unsafe impl fidl::encoding::TypeMarker for ClosedTargetGetSignalableEventRightsRequest {
6182 type Owned = Self;
6183
6184 #[inline(always)]
6185 fn inline_align(_context: fidl::encoding::Context) -> usize {
6186 4
6187 }
6188
6189 #[inline(always)]
6190 fn inline_size(_context: fidl::encoding::Context) -> usize {
6191 4
6192 }
6193 }
6194
6195 unsafe impl
6196 fidl::encoding::Encode<
6197 ClosedTargetGetSignalableEventRightsRequest,
6198 fidl::encoding::DefaultFuchsiaResourceDialect,
6199 > for &mut ClosedTargetGetSignalableEventRightsRequest
6200 {
6201 #[inline]
6202 unsafe fn encode(
6203 self,
6204 encoder: &mut fidl::encoding::Encoder<
6205 '_,
6206 fidl::encoding::DefaultFuchsiaResourceDialect,
6207 >,
6208 offset: usize,
6209 _depth: fidl::encoding::Depth,
6210 ) -> fidl::Result<()> {
6211 encoder.debug_check_bounds::<ClosedTargetGetSignalableEventRightsRequest>(offset);
6212 fidl::encoding::Encode::<
6214 ClosedTargetGetSignalableEventRightsRequest,
6215 fidl::encoding::DefaultFuchsiaResourceDialect,
6216 >::encode(
6217 (<fidl::encoding::HandleType<
6218 fidl::Event,
6219 { fidl::ObjectType::EVENT.into_raw() },
6220 4096,
6221 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6222 &mut self.handle
6223 ),),
6224 encoder,
6225 offset,
6226 _depth,
6227 )
6228 }
6229 }
6230 unsafe impl<
6231 T0: fidl::encoding::Encode<
6232 fidl::encoding::HandleType<
6233 fidl::Event,
6234 { fidl::ObjectType::EVENT.into_raw() },
6235 4096,
6236 >,
6237 fidl::encoding::DefaultFuchsiaResourceDialect,
6238 >,
6239 >
6240 fidl::encoding::Encode<
6241 ClosedTargetGetSignalableEventRightsRequest,
6242 fidl::encoding::DefaultFuchsiaResourceDialect,
6243 > for (T0,)
6244 {
6245 #[inline]
6246 unsafe fn encode(
6247 self,
6248 encoder: &mut fidl::encoding::Encoder<
6249 '_,
6250 fidl::encoding::DefaultFuchsiaResourceDialect,
6251 >,
6252 offset: usize,
6253 depth: fidl::encoding::Depth,
6254 ) -> fidl::Result<()> {
6255 encoder.debug_check_bounds::<ClosedTargetGetSignalableEventRightsRequest>(offset);
6256 self.0.encode(encoder, offset + 0, depth)?;
6260 Ok(())
6261 }
6262 }
6263
6264 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6265 for ClosedTargetGetSignalableEventRightsRequest
6266 {
6267 #[inline(always)]
6268 fn new_empty() -> Self {
6269 Self {
6270 handle: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 4096>, fidl::encoding::DefaultFuchsiaResourceDialect),
6271 }
6272 }
6273
6274 #[inline]
6275 unsafe fn decode(
6276 &mut self,
6277 decoder: &mut fidl::encoding::Decoder<
6278 '_,
6279 fidl::encoding::DefaultFuchsiaResourceDialect,
6280 >,
6281 offset: usize,
6282 _depth: fidl::encoding::Depth,
6283 ) -> fidl::Result<()> {
6284 decoder.debug_check_bounds::<Self>(offset);
6285 fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 4096>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.handle, decoder, offset + 0, _depth)?;
6287 Ok(())
6288 }
6289 }
6290
6291 impl fidl::encoding::ResourceTypeMarker for ClosedTargetHandleVectorSizeRequest {
6292 type Borrowed<'a> = &'a mut Self;
6293 fn take_or_borrow<'a>(
6294 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6295 ) -> Self::Borrowed<'a> {
6296 value
6297 }
6298 }
6299
6300 unsafe impl fidl::encoding::TypeMarker for ClosedTargetHandleVectorSizeRequest {
6301 type Owned = Self;
6302
6303 #[inline(always)]
6304 fn inline_align(_context: fidl::encoding::Context) -> usize {
6305 8
6306 }
6307
6308 #[inline(always)]
6309 fn inline_size(_context: fidl::encoding::Context) -> usize {
6310 16
6311 }
6312 }
6313
6314 unsafe impl
6315 fidl::encoding::Encode<
6316 ClosedTargetHandleVectorSizeRequest,
6317 fidl::encoding::DefaultFuchsiaResourceDialect,
6318 > for &mut ClosedTargetHandleVectorSizeRequest
6319 {
6320 #[inline]
6321 unsafe fn encode(
6322 self,
6323 encoder: &mut fidl::encoding::Encoder<
6324 '_,
6325 fidl::encoding::DefaultFuchsiaResourceDialect,
6326 >,
6327 offset: usize,
6328 _depth: fidl::encoding::Depth,
6329 ) -> fidl::Result<()> {
6330 encoder.debug_check_bounds::<ClosedTargetHandleVectorSizeRequest>(offset);
6331 fidl::encoding::Encode::<
6333 ClosedTargetHandleVectorSizeRequest,
6334 fidl::encoding::DefaultFuchsiaResourceDialect,
6335 >::encode(
6336 (<fidl::encoding::UnboundedVector<
6337 fidl::encoding::HandleType<
6338 fidl::Event,
6339 { fidl::ObjectType::EVENT.into_raw() },
6340 2147483648,
6341 >,
6342 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6343 &mut self.vec
6344 ),),
6345 encoder,
6346 offset,
6347 _depth,
6348 )
6349 }
6350 }
6351 unsafe impl<
6352 T0: fidl::encoding::Encode<
6353 fidl::encoding::UnboundedVector<
6354 fidl::encoding::HandleType<
6355 fidl::Event,
6356 { fidl::ObjectType::EVENT.into_raw() },
6357 2147483648,
6358 >,
6359 >,
6360 fidl::encoding::DefaultFuchsiaResourceDialect,
6361 >,
6362 >
6363 fidl::encoding::Encode<
6364 ClosedTargetHandleVectorSizeRequest,
6365 fidl::encoding::DefaultFuchsiaResourceDialect,
6366 > for (T0,)
6367 {
6368 #[inline]
6369 unsafe fn encode(
6370 self,
6371 encoder: &mut fidl::encoding::Encoder<
6372 '_,
6373 fidl::encoding::DefaultFuchsiaResourceDialect,
6374 >,
6375 offset: usize,
6376 depth: fidl::encoding::Depth,
6377 ) -> fidl::Result<()> {
6378 encoder.debug_check_bounds::<ClosedTargetHandleVectorSizeRequest>(offset);
6379 self.0.encode(encoder, offset + 0, depth)?;
6383 Ok(())
6384 }
6385 }
6386
6387 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6388 for ClosedTargetHandleVectorSizeRequest
6389 {
6390 #[inline(always)]
6391 fn new_empty() -> Self {
6392 Self {
6393 vec: fidl::new_empty!(
6394 fidl::encoding::UnboundedVector<
6395 fidl::encoding::HandleType<
6396 fidl::Event,
6397 { fidl::ObjectType::EVENT.into_raw() },
6398 2147483648,
6399 >,
6400 >,
6401 fidl::encoding::DefaultFuchsiaResourceDialect
6402 ),
6403 }
6404 }
6405
6406 #[inline]
6407 unsafe fn decode(
6408 &mut self,
6409 decoder: &mut fidl::encoding::Decoder<
6410 '_,
6411 fidl::encoding::DefaultFuchsiaResourceDialect,
6412 >,
6413 offset: usize,
6414 _depth: fidl::encoding::Depth,
6415 ) -> fidl::Result<()> {
6416 decoder.debug_check_bounds::<Self>(offset);
6417 fidl::decode!(
6419 fidl::encoding::UnboundedVector<
6420 fidl::encoding::HandleType<
6421 fidl::Event,
6422 { fidl::ObjectType::EVENT.into_raw() },
6423 2147483648,
6424 >,
6425 >,
6426 fidl::encoding::DefaultFuchsiaResourceDialect,
6427 &mut self.vec,
6428 decoder,
6429 offset + 0,
6430 _depth
6431 )?;
6432 Ok(())
6433 }
6434 }
6435
6436 impl fidl::encoding::ResourceTypeMarker for RunnerStartRequest {
6437 type Borrowed<'a> = &'a mut Self;
6438 fn take_or_borrow<'a>(
6439 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6440 ) -> Self::Borrowed<'a> {
6441 value
6442 }
6443 }
6444
6445 unsafe impl fidl::encoding::TypeMarker for RunnerStartRequest {
6446 type Owned = Self;
6447
6448 #[inline(always)]
6449 fn inline_align(_context: fidl::encoding::Context) -> usize {
6450 8
6451 }
6452
6453 #[inline(always)]
6454 fn inline_size(_context: fidl::encoding::Context) -> usize {
6455 24
6456 }
6457 }
6458
6459 unsafe impl
6460 fidl::encoding::Encode<RunnerStartRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
6461 for &mut RunnerStartRequest
6462 {
6463 #[inline]
6464 unsafe fn encode(
6465 self,
6466 encoder: &mut fidl::encoding::Encoder<
6467 '_,
6468 fidl::encoding::DefaultFuchsiaResourceDialect,
6469 >,
6470 offset: usize,
6471 _depth: fidl::encoding::Depth,
6472 ) -> fidl::Result<()> {
6473 encoder.debug_check_bounds::<RunnerStartRequest>(offset);
6474 fidl::encoding::Encode::<
6476 RunnerStartRequest,
6477 fidl::encoding::DefaultFuchsiaResourceDialect,
6478 >::encode(
6479 (
6480 <Test as fidl::encoding::ValueTypeMarker>::borrow(&self.test),
6481 <AnyTarget as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6482 &mut self.any_target,
6483 ),
6484 ),
6485 encoder,
6486 offset,
6487 _depth,
6488 )
6489 }
6490 }
6491 unsafe impl<
6492 T0: fidl::encoding::Encode<Test, fidl::encoding::DefaultFuchsiaResourceDialect>,
6493 T1: fidl::encoding::Encode<AnyTarget, fidl::encoding::DefaultFuchsiaResourceDialect>,
6494 >
6495 fidl::encoding::Encode<RunnerStartRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
6496 for (T0, T1)
6497 {
6498 #[inline]
6499 unsafe fn encode(
6500 self,
6501 encoder: &mut fidl::encoding::Encoder<
6502 '_,
6503 fidl::encoding::DefaultFuchsiaResourceDialect,
6504 >,
6505 offset: usize,
6506 depth: fidl::encoding::Depth,
6507 ) -> fidl::Result<()> {
6508 encoder.debug_check_bounds::<RunnerStartRequest>(offset);
6509 unsafe {
6512 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
6513 (ptr as *mut u64).write_unaligned(0);
6514 }
6515 self.0.encode(encoder, offset + 0, depth)?;
6517 self.1.encode(encoder, offset + 8, depth)?;
6518 Ok(())
6519 }
6520 }
6521
6522 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6523 for RunnerStartRequest
6524 {
6525 #[inline(always)]
6526 fn new_empty() -> Self {
6527 Self {
6528 test: fidl::new_empty!(Test, fidl::encoding::DefaultFuchsiaResourceDialect),
6529 any_target: fidl::new_empty!(
6530 AnyTarget,
6531 fidl::encoding::DefaultFuchsiaResourceDialect
6532 ),
6533 }
6534 }
6535
6536 #[inline]
6537 unsafe fn decode(
6538 &mut self,
6539 decoder: &mut fidl::encoding::Decoder<
6540 '_,
6541 fidl::encoding::DefaultFuchsiaResourceDialect,
6542 >,
6543 offset: usize,
6544 _depth: fidl::encoding::Depth,
6545 ) -> fidl::Result<()> {
6546 decoder.debug_check_bounds::<Self>(offset);
6547 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
6549 let padval = unsafe { (ptr as *const u64).read_unaligned() };
6550 let mask = 0xffffffff00000000u64;
6551 let maskedval = padval & mask;
6552 if maskedval != 0 {
6553 return Err(fidl::Error::NonZeroPadding {
6554 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
6555 });
6556 }
6557 fidl::decode!(
6558 Test,
6559 fidl::encoding::DefaultFuchsiaResourceDialect,
6560 &mut self.test,
6561 decoder,
6562 offset + 0,
6563 _depth
6564 )?;
6565 fidl::decode!(
6566 AnyTarget,
6567 fidl::encoding::DefaultFuchsiaResourceDialect,
6568 &mut self.any_target,
6569 decoder,
6570 offset + 8,
6571 _depth
6572 )?;
6573 Ok(())
6574 }
6575 }
6576
6577 impl fidl::encoding::ResourceTypeMarker for AnyTarget {
6578 type Borrowed<'a> = &'a mut Self;
6579 fn take_or_borrow<'a>(
6580 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6581 ) -> Self::Borrowed<'a> {
6582 value
6583 }
6584 }
6585
6586 unsafe impl fidl::encoding::TypeMarker for AnyTarget {
6587 type Owned = Self;
6588
6589 #[inline(always)]
6590 fn inline_align(_context: fidl::encoding::Context) -> usize {
6591 8
6592 }
6593
6594 #[inline(always)]
6595 fn inline_size(_context: fidl::encoding::Context) -> usize {
6596 16
6597 }
6598 }
6599
6600 unsafe impl fidl::encoding::Encode<AnyTarget, fidl::encoding::DefaultFuchsiaResourceDialect>
6601 for &mut AnyTarget
6602 {
6603 #[inline]
6604 unsafe fn encode(
6605 self,
6606 encoder: &mut fidl::encoding::Encoder<
6607 '_,
6608 fidl::encoding::DefaultFuchsiaResourceDialect,
6609 >,
6610 offset: usize,
6611 _depth: fidl::encoding::Depth,
6612 ) -> fidl::Result<()> {
6613 encoder.debug_check_bounds::<AnyTarget>(offset);
6614 encoder.write_num::<u64>(self.ordinal(), offset);
6615 match self {
6616 AnyTarget::Closed(ref mut val) => {
6617 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClosedTargetMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
6618 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClosedTargetMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
6619 encoder, offset + 8, _depth
6620 )
6621 }
6622 AnyTarget::Ajar(ref mut val) => {
6623 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<AjarTargetMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
6624 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<AjarTargetMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
6625 encoder, offset + 8, _depth
6626 )
6627 }
6628 AnyTarget::Open(ref mut val) => {
6629 fidl::encoding::encode_in_envelope::<fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<OpenTargetMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
6630 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<OpenTargetMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
6631 encoder, offset + 8, _depth
6632 )
6633 }
6634 }
6635 }
6636 }
6637
6638 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for AnyTarget {
6639 #[inline(always)]
6640 fn new_empty() -> Self {
6641 Self::Closed(fidl::new_empty!(
6642 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClosedTargetMarker>>,
6643 fidl::encoding::DefaultFuchsiaResourceDialect
6644 ))
6645 }
6646
6647 #[inline]
6648 unsafe fn decode(
6649 &mut self,
6650 decoder: &mut fidl::encoding::Decoder<
6651 '_,
6652 fidl::encoding::DefaultFuchsiaResourceDialect,
6653 >,
6654 offset: usize,
6655 mut depth: fidl::encoding::Depth,
6656 ) -> fidl::Result<()> {
6657 decoder.debug_check_bounds::<Self>(offset);
6658 #[allow(unused_variables)]
6659 let next_out_of_line = decoder.next_out_of_line();
6660 let handles_before = decoder.remaining_handles();
6661 let (ordinal, inlined, num_bytes, num_handles) =
6662 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
6663
6664 let member_inline_size = match ordinal {
6665 1 => <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClosedTargetMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6666 2 => <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<AjarTargetMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6667 3 => <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<OpenTargetMarker>> as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6668 _ => return Err(fidl::Error::UnknownUnionTag),
6669 };
6670
6671 if inlined != (member_inline_size <= 4) {
6672 return Err(fidl::Error::InvalidInlineBitInEnvelope);
6673 }
6674 let _inner_offset;
6675 if inlined {
6676 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
6677 _inner_offset = offset + 8;
6678 } else {
6679 depth.increment()?;
6680 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6681 }
6682 match ordinal {
6683 1 => {
6684 #[allow(irrefutable_let_patterns)]
6685 if let AnyTarget::Closed(_) = self {
6686 } else {
6688 *self = AnyTarget::Closed(fidl::new_empty!(
6690 fidl::encoding::Endpoint<
6691 fidl::endpoints::ServerEnd<ClosedTargetMarker>,
6692 >,
6693 fidl::encoding::DefaultFuchsiaResourceDialect
6694 ));
6695 }
6696 #[allow(irrefutable_let_patterns)]
6697 if let AnyTarget::Closed(ref mut val) = self {
6698 fidl::decode!(
6699 fidl::encoding::Endpoint<
6700 fidl::endpoints::ServerEnd<ClosedTargetMarker>,
6701 >,
6702 fidl::encoding::DefaultFuchsiaResourceDialect,
6703 val,
6704 decoder,
6705 _inner_offset,
6706 depth
6707 )?;
6708 } else {
6709 unreachable!()
6710 }
6711 }
6712 2 => {
6713 #[allow(irrefutable_let_patterns)]
6714 if let AnyTarget::Ajar(_) = self {
6715 } else {
6717 *self = AnyTarget::Ajar(fidl::new_empty!(
6719 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<AjarTargetMarker>>,
6720 fidl::encoding::DefaultFuchsiaResourceDialect
6721 ));
6722 }
6723 #[allow(irrefutable_let_patterns)]
6724 if let AnyTarget::Ajar(ref mut val) = self {
6725 fidl::decode!(
6726 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<AjarTargetMarker>>,
6727 fidl::encoding::DefaultFuchsiaResourceDialect,
6728 val,
6729 decoder,
6730 _inner_offset,
6731 depth
6732 )?;
6733 } else {
6734 unreachable!()
6735 }
6736 }
6737 3 => {
6738 #[allow(irrefutable_let_patterns)]
6739 if let AnyTarget::Open(_) = self {
6740 } else {
6742 *self = AnyTarget::Open(fidl::new_empty!(
6744 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<OpenTargetMarker>>,
6745 fidl::encoding::DefaultFuchsiaResourceDialect
6746 ));
6747 }
6748 #[allow(irrefutable_let_patterns)]
6749 if let AnyTarget::Open(ref mut val) = self {
6750 fidl::decode!(
6751 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<OpenTargetMarker>>,
6752 fidl::encoding::DefaultFuchsiaResourceDialect,
6753 val,
6754 decoder,
6755 _inner_offset,
6756 depth
6757 )?;
6758 } else {
6759 unreachable!()
6760 }
6761 }
6762 ordinal => panic!("unexpected ordinal {:?}", ordinal),
6763 }
6764 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
6765 return Err(fidl::Error::InvalidNumBytesInEnvelope);
6766 }
6767 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6768 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6769 }
6770 Ok(())
6771 }
6772 }
6773}