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_fuchsia_fakeclock_test__common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
15pub struct ExampleMarker;
16
17impl fidl::endpoints::ProtocolMarker for ExampleMarker {
18 type Proxy = ExampleProxy;
19 type RequestStream = ExampleRequestStream;
20 #[cfg(target_os = "fuchsia")]
21 type SynchronousProxy = ExampleSynchronousProxy;
22
23 const DEBUG_NAME: &'static str = "fuchsia.fakeclock.test.Example";
24}
25impl fidl::endpoints::DiscoverableProtocolMarker for ExampleMarker {}
26
27pub trait ExampleProxyInterface: Send + Sync {
28 type GetMonotonicResponseFut: std::future::Future<Output = Result<i64, fidl::Error>> + Send;
29 fn r#get_monotonic(&self) -> Self::GetMonotonicResponseFut;
30 type WaitUntilResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
31 fn r#wait_until(&self, timeout: i64) -> Self::WaitUntilResponseFut;
32 type WaitForResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
33 fn r#wait_for(&self, duration: i64) -> Self::WaitForResponseFut;
34}
35#[derive(Debug)]
36#[cfg(target_os = "fuchsia")]
37pub struct ExampleSynchronousProxy {
38 client: fidl::client::sync::Client,
39}
40
41#[cfg(target_os = "fuchsia")]
42impl fidl::endpoints::SynchronousProxy for ExampleSynchronousProxy {
43 type Proxy = ExampleProxy;
44 type Protocol = ExampleMarker;
45
46 fn from_channel(inner: fidl::Channel) -> Self {
47 Self::new(inner)
48 }
49
50 fn into_channel(self) -> fidl::Channel {
51 self.client.into_channel()
52 }
53
54 fn as_channel(&self) -> &fidl::Channel {
55 self.client.as_channel()
56 }
57}
58
59#[cfg(target_os = "fuchsia")]
60impl ExampleSynchronousProxy {
61 pub fn new(channel: fidl::Channel) -> Self {
62 let protocol_name = <ExampleMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
63 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
64 }
65
66 pub fn into_channel(self) -> fidl::Channel {
67 self.client.into_channel()
68 }
69
70 pub fn wait_for_event(
73 &self,
74 deadline: zx::MonotonicInstant,
75 ) -> Result<ExampleEvent, fidl::Error> {
76 ExampleEvent::decode(self.client.wait_for_event(deadline)?)
77 }
78
79 pub fn r#get_monotonic(&self, ___deadline: zx::MonotonicInstant) -> Result<i64, fidl::Error> {
81 let _response =
82 self.client.send_query::<fidl::encoding::EmptyPayload, ExampleGetMonotonicResponse>(
83 (),
84 0xc8bbde6196b6568,
85 fidl::encoding::DynamicFlags::empty(),
86 ___deadline,
87 )?;
88 Ok(_response.time)
89 }
90
91 pub fn r#wait_until(
93 &self,
94 mut timeout: i64,
95 ___deadline: zx::MonotonicInstant,
96 ) -> Result<(), fidl::Error> {
97 let _response =
98 self.client.send_query::<ExampleWaitUntilRequest, fidl::encoding::EmptyPayload>(
99 (timeout,),
100 0x60e188ba3d61ed0a,
101 fidl::encoding::DynamicFlags::empty(),
102 ___deadline,
103 )?;
104 Ok(_response)
105 }
106
107 pub fn r#wait_for(
109 &self,
110 mut duration: i64,
111 ___deadline: zx::MonotonicInstant,
112 ) -> Result<(), fidl::Error> {
113 let _response =
114 self.client.send_query::<ExampleWaitForRequest, fidl::encoding::EmptyPayload>(
115 (duration,),
116 0x5a6de7cbba3b5b1e,
117 fidl::encoding::DynamicFlags::empty(),
118 ___deadline,
119 )?;
120 Ok(_response)
121 }
122}
123
124#[cfg(target_os = "fuchsia")]
125impl From<ExampleSynchronousProxy> for zx::Handle {
126 fn from(value: ExampleSynchronousProxy) -> Self {
127 value.into_channel().into()
128 }
129}
130
131#[cfg(target_os = "fuchsia")]
132impl From<fidl::Channel> for ExampleSynchronousProxy {
133 fn from(value: fidl::Channel) -> Self {
134 Self::new(value)
135 }
136}
137
138#[cfg(target_os = "fuchsia")]
139impl fidl::endpoints::FromClient for ExampleSynchronousProxy {
140 type Protocol = ExampleMarker;
141
142 fn from_client(value: fidl::endpoints::ClientEnd<ExampleMarker>) -> Self {
143 Self::new(value.into_channel())
144 }
145}
146
147#[derive(Debug, Clone)]
148pub struct ExampleProxy {
149 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
150}
151
152impl fidl::endpoints::Proxy for ExampleProxy {
153 type Protocol = ExampleMarker;
154
155 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
156 Self::new(inner)
157 }
158
159 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
160 self.client.into_channel().map_err(|client| Self { client })
161 }
162
163 fn as_channel(&self) -> &::fidl::AsyncChannel {
164 self.client.as_channel()
165 }
166}
167
168impl ExampleProxy {
169 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
171 let protocol_name = <ExampleMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
172 Self { client: fidl::client::Client::new(channel, protocol_name) }
173 }
174
175 pub fn take_event_stream(&self) -> ExampleEventStream {
181 ExampleEventStream { event_receiver: self.client.take_event_receiver() }
182 }
183
184 pub fn r#get_monotonic(
186 &self,
187 ) -> fidl::client::QueryResponseFut<i64, fidl::encoding::DefaultFuchsiaResourceDialect> {
188 ExampleProxyInterface::r#get_monotonic(self)
189 }
190
191 pub fn r#wait_until(
193 &self,
194 mut timeout: i64,
195 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
196 ExampleProxyInterface::r#wait_until(self, timeout)
197 }
198
199 pub fn r#wait_for(
201 &self,
202 mut duration: i64,
203 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
204 ExampleProxyInterface::r#wait_for(self, duration)
205 }
206}
207
208impl ExampleProxyInterface for ExampleProxy {
209 type GetMonotonicResponseFut =
210 fidl::client::QueryResponseFut<i64, fidl::encoding::DefaultFuchsiaResourceDialect>;
211 fn r#get_monotonic(&self) -> Self::GetMonotonicResponseFut {
212 fn _decode(
213 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
214 ) -> Result<i64, fidl::Error> {
215 let _response = fidl::client::decode_transaction_body::<
216 ExampleGetMonotonicResponse,
217 fidl::encoding::DefaultFuchsiaResourceDialect,
218 0xc8bbde6196b6568,
219 >(_buf?)?;
220 Ok(_response.time)
221 }
222 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i64>(
223 (),
224 0xc8bbde6196b6568,
225 fidl::encoding::DynamicFlags::empty(),
226 _decode,
227 )
228 }
229
230 type WaitUntilResponseFut =
231 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
232 fn r#wait_until(&self, mut timeout: i64) -> Self::WaitUntilResponseFut {
233 fn _decode(
234 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
235 ) -> Result<(), fidl::Error> {
236 let _response = fidl::client::decode_transaction_body::<
237 fidl::encoding::EmptyPayload,
238 fidl::encoding::DefaultFuchsiaResourceDialect,
239 0x60e188ba3d61ed0a,
240 >(_buf?)?;
241 Ok(_response)
242 }
243 self.client.send_query_and_decode::<ExampleWaitUntilRequest, ()>(
244 (timeout,),
245 0x60e188ba3d61ed0a,
246 fidl::encoding::DynamicFlags::empty(),
247 _decode,
248 )
249 }
250
251 type WaitForResponseFut =
252 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
253 fn r#wait_for(&self, mut duration: i64) -> Self::WaitForResponseFut {
254 fn _decode(
255 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
256 ) -> Result<(), fidl::Error> {
257 let _response = fidl::client::decode_transaction_body::<
258 fidl::encoding::EmptyPayload,
259 fidl::encoding::DefaultFuchsiaResourceDialect,
260 0x5a6de7cbba3b5b1e,
261 >(_buf?)?;
262 Ok(_response)
263 }
264 self.client.send_query_and_decode::<ExampleWaitForRequest, ()>(
265 (duration,),
266 0x5a6de7cbba3b5b1e,
267 fidl::encoding::DynamicFlags::empty(),
268 _decode,
269 )
270 }
271}
272
273pub struct ExampleEventStream {
274 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
275}
276
277impl std::marker::Unpin for ExampleEventStream {}
278
279impl futures::stream::FusedStream for ExampleEventStream {
280 fn is_terminated(&self) -> bool {
281 self.event_receiver.is_terminated()
282 }
283}
284
285impl futures::Stream for ExampleEventStream {
286 type Item = Result<ExampleEvent, fidl::Error>;
287
288 fn poll_next(
289 mut self: std::pin::Pin<&mut Self>,
290 cx: &mut std::task::Context<'_>,
291 ) -> std::task::Poll<Option<Self::Item>> {
292 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
293 &mut self.event_receiver,
294 cx
295 )?) {
296 Some(buf) => std::task::Poll::Ready(Some(ExampleEvent::decode(buf))),
297 None => std::task::Poll::Ready(None),
298 }
299 }
300}
301
302#[derive(Debug)]
303pub enum ExampleEvent {}
304
305impl ExampleEvent {
306 fn decode(
308 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
309 ) -> Result<ExampleEvent, fidl::Error> {
310 let (bytes, _handles) = buf.split_mut();
311 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
312 debug_assert_eq!(tx_header.tx_id, 0);
313 match tx_header.ordinal {
314 _ => Err(fidl::Error::UnknownOrdinal {
315 ordinal: tx_header.ordinal,
316 protocol_name: <ExampleMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
317 }),
318 }
319 }
320}
321
322pub struct ExampleRequestStream {
324 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
325 is_terminated: bool,
326}
327
328impl std::marker::Unpin for ExampleRequestStream {}
329
330impl futures::stream::FusedStream for ExampleRequestStream {
331 fn is_terminated(&self) -> bool {
332 self.is_terminated
333 }
334}
335
336impl fidl::endpoints::RequestStream for ExampleRequestStream {
337 type Protocol = ExampleMarker;
338 type ControlHandle = ExampleControlHandle;
339
340 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
341 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
342 }
343
344 fn control_handle(&self) -> Self::ControlHandle {
345 ExampleControlHandle { inner: self.inner.clone() }
346 }
347
348 fn into_inner(
349 self,
350 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
351 {
352 (self.inner, self.is_terminated)
353 }
354
355 fn from_inner(
356 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
357 is_terminated: bool,
358 ) -> Self {
359 Self { inner, is_terminated }
360 }
361}
362
363impl futures::Stream for ExampleRequestStream {
364 type Item = Result<ExampleRequest, fidl::Error>;
365
366 fn poll_next(
367 mut self: std::pin::Pin<&mut Self>,
368 cx: &mut std::task::Context<'_>,
369 ) -> std::task::Poll<Option<Self::Item>> {
370 let this = &mut *self;
371 if this.inner.check_shutdown(cx) {
372 this.is_terminated = true;
373 return std::task::Poll::Ready(None);
374 }
375 if this.is_terminated {
376 panic!("polled ExampleRequestStream after completion");
377 }
378 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
379 |bytes, handles| {
380 match this.inner.channel().read_etc(cx, bytes, handles) {
381 std::task::Poll::Ready(Ok(())) => {}
382 std::task::Poll::Pending => return std::task::Poll::Pending,
383 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
384 this.is_terminated = true;
385 return std::task::Poll::Ready(None);
386 }
387 std::task::Poll::Ready(Err(e)) => {
388 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
389 e.into(),
390 ))));
391 }
392 }
393
394 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
396
397 std::task::Poll::Ready(Some(match header.ordinal {
398 0xc8bbde6196b6568 => {
399 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
400 let mut req = fidl::new_empty!(
401 fidl::encoding::EmptyPayload,
402 fidl::encoding::DefaultFuchsiaResourceDialect
403 );
404 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
405 let control_handle = ExampleControlHandle { inner: this.inner.clone() };
406 Ok(ExampleRequest::GetMonotonic {
407 responder: ExampleGetMonotonicResponder {
408 control_handle: std::mem::ManuallyDrop::new(control_handle),
409 tx_id: header.tx_id,
410 },
411 })
412 }
413 0x60e188ba3d61ed0a => {
414 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
415 let mut req = fidl::new_empty!(
416 ExampleWaitUntilRequest,
417 fidl::encoding::DefaultFuchsiaResourceDialect
418 );
419 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ExampleWaitUntilRequest>(&header, _body_bytes, handles, &mut req)?;
420 let control_handle = ExampleControlHandle { inner: this.inner.clone() };
421 Ok(ExampleRequest::WaitUntil {
422 timeout: req.timeout,
423
424 responder: ExampleWaitUntilResponder {
425 control_handle: std::mem::ManuallyDrop::new(control_handle),
426 tx_id: header.tx_id,
427 },
428 })
429 }
430 0x5a6de7cbba3b5b1e => {
431 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
432 let mut req = fidl::new_empty!(
433 ExampleWaitForRequest,
434 fidl::encoding::DefaultFuchsiaResourceDialect
435 );
436 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ExampleWaitForRequest>(&header, _body_bytes, handles, &mut req)?;
437 let control_handle = ExampleControlHandle { inner: this.inner.clone() };
438 Ok(ExampleRequest::WaitFor {
439 duration: req.duration,
440
441 responder: ExampleWaitForResponder {
442 control_handle: std::mem::ManuallyDrop::new(control_handle),
443 tx_id: header.tx_id,
444 },
445 })
446 }
447 _ => Err(fidl::Error::UnknownOrdinal {
448 ordinal: header.ordinal,
449 protocol_name:
450 <ExampleMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
451 }),
452 }))
453 },
454 )
455 }
456}
457
458#[derive(Debug)]
460pub enum ExampleRequest {
461 GetMonotonic { responder: ExampleGetMonotonicResponder },
463 WaitUntil { timeout: i64, responder: ExampleWaitUntilResponder },
465 WaitFor { duration: i64, responder: ExampleWaitForResponder },
467}
468
469impl ExampleRequest {
470 #[allow(irrefutable_let_patterns)]
471 pub fn into_get_monotonic(self) -> Option<(ExampleGetMonotonicResponder)> {
472 if let ExampleRequest::GetMonotonic { responder } = self { Some((responder)) } else { None }
473 }
474
475 #[allow(irrefutable_let_patterns)]
476 pub fn into_wait_until(self) -> Option<(i64, ExampleWaitUntilResponder)> {
477 if let ExampleRequest::WaitUntil { timeout, responder } = self {
478 Some((timeout, responder))
479 } else {
480 None
481 }
482 }
483
484 #[allow(irrefutable_let_patterns)]
485 pub fn into_wait_for(self) -> Option<(i64, ExampleWaitForResponder)> {
486 if let ExampleRequest::WaitFor { duration, responder } = self {
487 Some((duration, responder))
488 } else {
489 None
490 }
491 }
492
493 pub fn method_name(&self) -> &'static str {
495 match *self {
496 ExampleRequest::GetMonotonic { .. } => "get_monotonic",
497 ExampleRequest::WaitUntil { .. } => "wait_until",
498 ExampleRequest::WaitFor { .. } => "wait_for",
499 }
500 }
501}
502
503#[derive(Debug, Clone)]
504pub struct ExampleControlHandle {
505 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
506}
507
508impl fidl::endpoints::ControlHandle for ExampleControlHandle {
509 fn shutdown(&self) {
510 self.inner.shutdown()
511 }
512 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
513 self.inner.shutdown_with_epitaph(status)
514 }
515
516 fn is_closed(&self) -> bool {
517 self.inner.channel().is_closed()
518 }
519 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
520 self.inner.channel().on_closed()
521 }
522
523 #[cfg(target_os = "fuchsia")]
524 fn signal_peer(
525 &self,
526 clear_mask: zx::Signals,
527 set_mask: zx::Signals,
528 ) -> Result<(), zx_status::Status> {
529 use fidl::Peered;
530 self.inner.channel().signal_peer(clear_mask, set_mask)
531 }
532}
533
534impl ExampleControlHandle {}
535
536#[must_use = "FIDL methods require a response to be sent"]
537#[derive(Debug)]
538pub struct ExampleGetMonotonicResponder {
539 control_handle: std::mem::ManuallyDrop<ExampleControlHandle>,
540 tx_id: u32,
541}
542
543impl std::ops::Drop for ExampleGetMonotonicResponder {
547 fn drop(&mut self) {
548 self.control_handle.shutdown();
549 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
551 }
552}
553
554impl fidl::endpoints::Responder for ExampleGetMonotonicResponder {
555 type ControlHandle = ExampleControlHandle;
556
557 fn control_handle(&self) -> &ExampleControlHandle {
558 &self.control_handle
559 }
560
561 fn drop_without_shutdown(mut self) {
562 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
564 std::mem::forget(self);
566 }
567}
568
569impl ExampleGetMonotonicResponder {
570 pub fn send(self, mut time: i64) -> Result<(), fidl::Error> {
574 let _result = self.send_raw(time);
575 if _result.is_err() {
576 self.control_handle.shutdown();
577 }
578 self.drop_without_shutdown();
579 _result
580 }
581
582 pub fn send_no_shutdown_on_err(self, mut time: i64) -> Result<(), fidl::Error> {
584 let _result = self.send_raw(time);
585 self.drop_without_shutdown();
586 _result
587 }
588
589 fn send_raw(&self, mut time: i64) -> Result<(), fidl::Error> {
590 self.control_handle.inner.send::<ExampleGetMonotonicResponse>(
591 (time,),
592 self.tx_id,
593 0xc8bbde6196b6568,
594 fidl::encoding::DynamicFlags::empty(),
595 )
596 }
597}
598
599#[must_use = "FIDL methods require a response to be sent"]
600#[derive(Debug)]
601pub struct ExampleWaitUntilResponder {
602 control_handle: std::mem::ManuallyDrop<ExampleControlHandle>,
603 tx_id: u32,
604}
605
606impl std::ops::Drop for ExampleWaitUntilResponder {
610 fn drop(&mut self) {
611 self.control_handle.shutdown();
612 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
614 }
615}
616
617impl fidl::endpoints::Responder for ExampleWaitUntilResponder {
618 type ControlHandle = ExampleControlHandle;
619
620 fn control_handle(&self) -> &ExampleControlHandle {
621 &self.control_handle
622 }
623
624 fn drop_without_shutdown(mut self) {
625 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
627 std::mem::forget(self);
629 }
630}
631
632impl ExampleWaitUntilResponder {
633 pub fn send(self) -> Result<(), fidl::Error> {
637 let _result = self.send_raw();
638 if _result.is_err() {
639 self.control_handle.shutdown();
640 }
641 self.drop_without_shutdown();
642 _result
643 }
644
645 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
647 let _result = self.send_raw();
648 self.drop_without_shutdown();
649 _result
650 }
651
652 fn send_raw(&self) -> Result<(), fidl::Error> {
653 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
654 (),
655 self.tx_id,
656 0x60e188ba3d61ed0a,
657 fidl::encoding::DynamicFlags::empty(),
658 )
659 }
660}
661
662#[must_use = "FIDL methods require a response to be sent"]
663#[derive(Debug)]
664pub struct ExampleWaitForResponder {
665 control_handle: std::mem::ManuallyDrop<ExampleControlHandle>,
666 tx_id: u32,
667}
668
669impl std::ops::Drop for ExampleWaitForResponder {
673 fn drop(&mut self) {
674 self.control_handle.shutdown();
675 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
677 }
678}
679
680impl fidl::endpoints::Responder for ExampleWaitForResponder {
681 type ControlHandle = ExampleControlHandle;
682
683 fn control_handle(&self) -> &ExampleControlHandle {
684 &self.control_handle
685 }
686
687 fn drop_without_shutdown(mut self) {
688 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
690 std::mem::forget(self);
692 }
693}
694
695impl ExampleWaitForResponder {
696 pub fn send(self) -> Result<(), fidl::Error> {
700 let _result = self.send_raw();
701 if _result.is_err() {
702 self.control_handle.shutdown();
703 }
704 self.drop_without_shutdown();
705 _result
706 }
707
708 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
710 let _result = self.send_raw();
711 self.drop_without_shutdown();
712 _result
713 }
714
715 fn send_raw(&self) -> Result<(), fidl::Error> {
716 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
717 (),
718 self.tx_id,
719 0x5a6de7cbba3b5b1e,
720 fidl::encoding::DynamicFlags::empty(),
721 )
722 }
723}
724
725mod internal {
726 use super::*;
727}