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::NullableHandle {
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
513 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
514 self.inner.shutdown_with_epitaph(status)
515 }
516
517 fn is_closed(&self) -> bool {
518 self.inner.channel().is_closed()
519 }
520 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
521 self.inner.channel().on_closed()
522 }
523
524 #[cfg(target_os = "fuchsia")]
525 fn signal_peer(
526 &self,
527 clear_mask: zx::Signals,
528 set_mask: zx::Signals,
529 ) -> Result<(), zx_status::Status> {
530 use fidl::Peered;
531 self.inner.channel().signal_peer(clear_mask, set_mask)
532 }
533}
534
535impl ExampleControlHandle {}
536
537#[must_use = "FIDL methods require a response to be sent"]
538#[derive(Debug)]
539pub struct ExampleGetMonotonicResponder {
540 control_handle: std::mem::ManuallyDrop<ExampleControlHandle>,
541 tx_id: u32,
542}
543
544impl std::ops::Drop for ExampleGetMonotonicResponder {
548 fn drop(&mut self) {
549 self.control_handle.shutdown();
550 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
552 }
553}
554
555impl fidl::endpoints::Responder for ExampleGetMonotonicResponder {
556 type ControlHandle = ExampleControlHandle;
557
558 fn control_handle(&self) -> &ExampleControlHandle {
559 &self.control_handle
560 }
561
562 fn drop_without_shutdown(mut self) {
563 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
565 std::mem::forget(self);
567 }
568}
569
570impl ExampleGetMonotonicResponder {
571 pub fn send(self, mut time: i64) -> Result<(), fidl::Error> {
575 let _result = self.send_raw(time);
576 if _result.is_err() {
577 self.control_handle.shutdown();
578 }
579 self.drop_without_shutdown();
580 _result
581 }
582
583 pub fn send_no_shutdown_on_err(self, mut time: i64) -> Result<(), fidl::Error> {
585 let _result = self.send_raw(time);
586 self.drop_without_shutdown();
587 _result
588 }
589
590 fn send_raw(&self, mut time: i64) -> Result<(), fidl::Error> {
591 self.control_handle.inner.send::<ExampleGetMonotonicResponse>(
592 (time,),
593 self.tx_id,
594 0xc8bbde6196b6568,
595 fidl::encoding::DynamicFlags::empty(),
596 )
597 }
598}
599
600#[must_use = "FIDL methods require a response to be sent"]
601#[derive(Debug)]
602pub struct ExampleWaitUntilResponder {
603 control_handle: std::mem::ManuallyDrop<ExampleControlHandle>,
604 tx_id: u32,
605}
606
607impl std::ops::Drop for ExampleWaitUntilResponder {
611 fn drop(&mut self) {
612 self.control_handle.shutdown();
613 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
615 }
616}
617
618impl fidl::endpoints::Responder for ExampleWaitUntilResponder {
619 type ControlHandle = ExampleControlHandle;
620
621 fn control_handle(&self) -> &ExampleControlHandle {
622 &self.control_handle
623 }
624
625 fn drop_without_shutdown(mut self) {
626 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
628 std::mem::forget(self);
630 }
631}
632
633impl ExampleWaitUntilResponder {
634 pub fn send(self) -> Result<(), fidl::Error> {
638 let _result = self.send_raw();
639 if _result.is_err() {
640 self.control_handle.shutdown();
641 }
642 self.drop_without_shutdown();
643 _result
644 }
645
646 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
648 let _result = self.send_raw();
649 self.drop_without_shutdown();
650 _result
651 }
652
653 fn send_raw(&self) -> Result<(), fidl::Error> {
654 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
655 (),
656 self.tx_id,
657 0x60e188ba3d61ed0a,
658 fidl::encoding::DynamicFlags::empty(),
659 )
660 }
661}
662
663#[must_use = "FIDL methods require a response to be sent"]
664#[derive(Debug)]
665pub struct ExampleWaitForResponder {
666 control_handle: std::mem::ManuallyDrop<ExampleControlHandle>,
667 tx_id: u32,
668}
669
670impl std::ops::Drop for ExampleWaitForResponder {
674 fn drop(&mut self) {
675 self.control_handle.shutdown();
676 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
678 }
679}
680
681impl fidl::endpoints::Responder for ExampleWaitForResponder {
682 type ControlHandle = ExampleControlHandle;
683
684 fn control_handle(&self) -> &ExampleControlHandle {
685 &self.control_handle
686 }
687
688 fn drop_without_shutdown(mut self) {
689 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
691 std::mem::forget(self);
693 }
694}
695
696impl ExampleWaitForResponder {
697 pub fn send(self) -> Result<(), fidl::Error> {
701 let _result = self.send_raw();
702 if _result.is_err() {
703 self.control_handle.shutdown();
704 }
705 self.drop_without_shutdown();
706 _result
707 }
708
709 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
711 let _result = self.send_raw();
712 self.drop_without_shutdown();
713 _result
714 }
715
716 fn send_raw(&self) -> Result<(), fidl::Error> {
717 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
718 (),
719 self.tx_id,
720 0x5a6de7cbba3b5b1e,
721 fidl::encoding::DynamicFlags::empty(),
722 )
723 }
724}
725
726mod internal {
727 use super::*;
728}