Skip to main content

fidl_fuchsia_mockrebootcontroller/
fidl_fuchsia_mockrebootcontroller.rs

1// WARNING: This file is machine generated by fidlgen.
2
3#![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_mockrebootcontroller_common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
15pub struct MockRebootControllerMarker;
16
17impl fidl::endpoints::ProtocolMarker for MockRebootControllerMarker {
18    type Proxy = MockRebootControllerProxy;
19    type RequestStream = MockRebootControllerRequestStream;
20    #[cfg(target_os = "fuchsia")]
21    type SynchronousProxy = MockRebootControllerSynchronousProxy;
22
23    const DEBUG_NAME: &'static str = "fuchsia.mockrebootcontroller.MockRebootController";
24}
25impl fidl::endpoints::DiscoverableProtocolMarker for MockRebootControllerMarker {}
26pub type MockRebootControllerTriggerRebootResult = Result<(), RebootError>;
27pub type MockRebootControllerCrashRebootChannelResult = Result<(), RebootError>;
28
29pub trait MockRebootControllerProxyInterface: Send + Sync {
30    type TriggerRebootResponseFut: std::future::Future<Output = Result<MockRebootControllerTriggerRebootResult, fidl::Error>>
31        + Send;
32    fn r#trigger_reboot(&self) -> Self::TriggerRebootResponseFut;
33    type CrashRebootChannelResponseFut: std::future::Future<
34            Output = Result<MockRebootControllerCrashRebootChannelResult, fidl::Error>,
35        > + Send;
36    fn r#crash_reboot_channel(&self) -> Self::CrashRebootChannelResponseFut;
37}
38#[derive(Debug)]
39#[cfg(target_os = "fuchsia")]
40pub struct MockRebootControllerSynchronousProxy {
41    client: fidl::client::sync::Client,
42}
43
44#[cfg(target_os = "fuchsia")]
45impl fidl::endpoints::SynchronousProxy for MockRebootControllerSynchronousProxy {
46    type Proxy = MockRebootControllerProxy;
47    type Protocol = MockRebootControllerMarker;
48
49    fn from_channel(inner: fidl::Channel) -> Self {
50        Self::new(inner)
51    }
52
53    fn into_channel(self) -> fidl::Channel {
54        self.client.into_channel()
55    }
56
57    fn as_channel(&self) -> &fidl::Channel {
58        self.client.as_channel()
59    }
60}
61
62#[cfg(target_os = "fuchsia")]
63impl MockRebootControllerSynchronousProxy {
64    pub fn new(channel: fidl::Channel) -> Self {
65        Self { client: fidl::client::sync::Client::new(channel) }
66    }
67
68    pub fn into_channel(self) -> fidl::Channel {
69        self.client.into_channel()
70    }
71
72    /// Waits until an event arrives and returns it. It is safe for other
73    /// threads to make concurrent requests while waiting for an event.
74    pub fn wait_for_event(
75        &self,
76        deadline: zx::MonotonicInstant,
77    ) -> Result<MockRebootControllerEvent, fidl::Error> {
78        MockRebootControllerEvent::decode(
79            self.client.wait_for_event::<MockRebootControllerMarker>(deadline)?,
80        )
81    }
82
83    pub fn r#trigger_reboot(
84        &self,
85        ___deadline: zx::MonotonicInstant,
86    ) -> Result<MockRebootControllerTriggerRebootResult, fidl::Error> {
87        let _response = self.client.send_query::<
88            fidl::encoding::EmptyPayload,
89            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RebootError>,
90            MockRebootControllerMarker,
91        >(
92            (),
93            0x5e2a61aa7f881d13,
94            fidl::encoding::DynamicFlags::empty(),
95            ___deadline,
96        )?;
97        Ok(_response.map(|x| x))
98    }
99
100    pub fn r#crash_reboot_channel(
101        &self,
102        ___deadline: zx::MonotonicInstant,
103    ) -> Result<MockRebootControllerCrashRebootChannelResult, fidl::Error> {
104        let _response = self.client.send_query::<
105            fidl::encoding::EmptyPayload,
106            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RebootError>,
107            MockRebootControllerMarker,
108        >(
109            (),
110            0x7d42f63d8d9ec3c3,
111            fidl::encoding::DynamicFlags::empty(),
112            ___deadline,
113        )?;
114        Ok(_response.map(|x| x))
115    }
116}
117
118#[cfg(target_os = "fuchsia")]
119impl From<MockRebootControllerSynchronousProxy> for zx::NullableHandle {
120    fn from(value: MockRebootControllerSynchronousProxy) -> Self {
121        value.into_channel().into()
122    }
123}
124
125#[cfg(target_os = "fuchsia")]
126impl From<fidl::Channel> for MockRebootControllerSynchronousProxy {
127    fn from(value: fidl::Channel) -> Self {
128        Self::new(value)
129    }
130}
131
132#[cfg(target_os = "fuchsia")]
133impl fidl::endpoints::FromClient for MockRebootControllerSynchronousProxy {
134    type Protocol = MockRebootControllerMarker;
135
136    fn from_client(value: fidl::endpoints::ClientEnd<MockRebootControllerMarker>) -> Self {
137        Self::new(value.into_channel())
138    }
139}
140
141#[derive(Debug, Clone)]
142pub struct MockRebootControllerProxy {
143    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
144}
145
146impl fidl::endpoints::Proxy for MockRebootControllerProxy {
147    type Protocol = MockRebootControllerMarker;
148
149    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
150        Self::new(inner)
151    }
152
153    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
154        self.client.into_channel().map_err(|client| Self { client })
155    }
156
157    fn as_channel(&self) -> &::fidl::AsyncChannel {
158        self.client.as_channel()
159    }
160}
161
162impl MockRebootControllerProxy {
163    /// Create a new Proxy for fuchsia.mockrebootcontroller/MockRebootController.
164    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
165        let protocol_name =
166            <MockRebootControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
167        Self { client: fidl::client::Client::new(channel, protocol_name) }
168    }
169
170    /// Get a Stream of events from the remote end of the protocol.
171    ///
172    /// # Panics
173    ///
174    /// Panics if the event stream was already taken.
175    pub fn take_event_stream(&self) -> MockRebootControllerEventStream {
176        MockRebootControllerEventStream { event_receiver: self.client.take_event_receiver() }
177    }
178
179    pub fn r#trigger_reboot(
180        &self,
181    ) -> fidl::client::QueryResponseFut<
182        MockRebootControllerTriggerRebootResult,
183        fidl::encoding::DefaultFuchsiaResourceDialect,
184    > {
185        MockRebootControllerProxyInterface::r#trigger_reboot(self)
186    }
187
188    pub fn r#crash_reboot_channel(
189        &self,
190    ) -> fidl::client::QueryResponseFut<
191        MockRebootControllerCrashRebootChannelResult,
192        fidl::encoding::DefaultFuchsiaResourceDialect,
193    > {
194        MockRebootControllerProxyInterface::r#crash_reboot_channel(self)
195    }
196}
197
198impl MockRebootControllerProxyInterface for MockRebootControllerProxy {
199    type TriggerRebootResponseFut = fidl::client::QueryResponseFut<
200        MockRebootControllerTriggerRebootResult,
201        fidl::encoding::DefaultFuchsiaResourceDialect,
202    >;
203    fn r#trigger_reboot(&self) -> Self::TriggerRebootResponseFut {
204        fn _decode(
205            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
206        ) -> Result<MockRebootControllerTriggerRebootResult, fidl::Error> {
207            let _response = fidl::client::decode_transaction_body::<
208                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RebootError>,
209                fidl::encoding::DefaultFuchsiaResourceDialect,
210                0x5e2a61aa7f881d13,
211            >(_buf?)?;
212            Ok(_response.map(|x| x))
213        }
214        self.client.send_query_and_decode::<
215            fidl::encoding::EmptyPayload,
216            MockRebootControllerTriggerRebootResult,
217        >(
218            (),
219            0x5e2a61aa7f881d13,
220            fidl::encoding::DynamicFlags::empty(),
221            _decode,
222        )
223    }
224
225    type CrashRebootChannelResponseFut = fidl::client::QueryResponseFut<
226        MockRebootControllerCrashRebootChannelResult,
227        fidl::encoding::DefaultFuchsiaResourceDialect,
228    >;
229    fn r#crash_reboot_channel(&self) -> Self::CrashRebootChannelResponseFut {
230        fn _decode(
231            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
232        ) -> Result<MockRebootControllerCrashRebootChannelResult, fidl::Error> {
233            let _response = fidl::client::decode_transaction_body::<
234                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, RebootError>,
235                fidl::encoding::DefaultFuchsiaResourceDialect,
236                0x7d42f63d8d9ec3c3,
237            >(_buf?)?;
238            Ok(_response.map(|x| x))
239        }
240        self.client.send_query_and_decode::<
241            fidl::encoding::EmptyPayload,
242            MockRebootControllerCrashRebootChannelResult,
243        >(
244            (),
245            0x7d42f63d8d9ec3c3,
246            fidl::encoding::DynamicFlags::empty(),
247            _decode,
248        )
249    }
250}
251
252pub struct MockRebootControllerEventStream {
253    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
254}
255
256impl std::marker::Unpin for MockRebootControllerEventStream {}
257
258impl futures::stream::FusedStream for MockRebootControllerEventStream {
259    fn is_terminated(&self) -> bool {
260        self.event_receiver.is_terminated()
261    }
262}
263
264impl futures::Stream for MockRebootControllerEventStream {
265    type Item = Result<MockRebootControllerEvent, fidl::Error>;
266
267    fn poll_next(
268        mut self: std::pin::Pin<&mut Self>,
269        cx: &mut std::task::Context<'_>,
270    ) -> std::task::Poll<Option<Self::Item>> {
271        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
272            &mut self.event_receiver,
273            cx
274        )?) {
275            Some(buf) => std::task::Poll::Ready(Some(MockRebootControllerEvent::decode(buf))),
276            None => std::task::Poll::Ready(None),
277        }
278    }
279}
280
281#[derive(Debug)]
282pub enum MockRebootControllerEvent {}
283
284impl MockRebootControllerEvent {
285    /// Decodes a message buffer as a [`MockRebootControllerEvent`].
286    fn decode(
287        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
288    ) -> Result<MockRebootControllerEvent, fidl::Error> {
289        let (bytes, _handles) = buf.split_mut();
290        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
291        debug_assert_eq!(tx_header.tx_id, 0);
292        match tx_header.ordinal {
293            _ => Err(fidl::Error::UnknownOrdinal {
294                ordinal: tx_header.ordinal,
295                protocol_name:
296                    <MockRebootControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
297            }),
298        }
299    }
300}
301
302/// A Stream of incoming requests for fuchsia.mockrebootcontroller/MockRebootController.
303pub struct MockRebootControllerRequestStream {
304    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
305    is_terminated: bool,
306}
307
308impl std::marker::Unpin for MockRebootControllerRequestStream {}
309
310impl futures::stream::FusedStream for MockRebootControllerRequestStream {
311    fn is_terminated(&self) -> bool {
312        self.is_terminated
313    }
314}
315
316impl fidl::endpoints::RequestStream for MockRebootControllerRequestStream {
317    type Protocol = MockRebootControllerMarker;
318    type ControlHandle = MockRebootControllerControlHandle;
319
320    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
321        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
322    }
323
324    fn control_handle(&self) -> Self::ControlHandle {
325        MockRebootControllerControlHandle { inner: self.inner.clone() }
326    }
327
328    fn into_inner(
329        self,
330    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
331    {
332        (self.inner, self.is_terminated)
333    }
334
335    fn from_inner(
336        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
337        is_terminated: bool,
338    ) -> Self {
339        Self { inner, is_terminated }
340    }
341}
342
343impl futures::Stream for MockRebootControllerRequestStream {
344    type Item = Result<MockRebootControllerRequest, fidl::Error>;
345
346    fn poll_next(
347        mut self: std::pin::Pin<&mut Self>,
348        cx: &mut std::task::Context<'_>,
349    ) -> std::task::Poll<Option<Self::Item>> {
350        let this = &mut *self;
351        if this.inner.check_shutdown(cx) {
352            this.is_terminated = true;
353            return std::task::Poll::Ready(None);
354        }
355        if this.is_terminated {
356            panic!("polled MockRebootControllerRequestStream after completion");
357        }
358        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
359            |bytes, handles| {
360                match this.inner.channel().read_etc(cx, bytes, handles) {
361                    std::task::Poll::Ready(Ok(())) => {}
362                    std::task::Poll::Pending => return std::task::Poll::Pending,
363                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
364                        this.is_terminated = true;
365                        return std::task::Poll::Ready(None);
366                    }
367                    std::task::Poll::Ready(Err(e)) => {
368                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
369                            e.into(),
370                        ))));
371                    }
372                }
373
374                // A message has been received from the channel
375                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
376
377                std::task::Poll::Ready(Some(match header.ordinal {
378                0x5e2a61aa7f881d13 => {
379                    header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
380                    let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
381                    fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
382                    let control_handle = MockRebootControllerControlHandle {
383                        inner: this.inner.clone(),
384                    };
385                    Ok(MockRebootControllerRequest::TriggerReboot {
386                        responder: MockRebootControllerTriggerRebootResponder {
387                            control_handle: std::mem::ManuallyDrop::new(control_handle),
388                            tx_id: header.tx_id,
389                        },
390                    })
391                }
392                0x7d42f63d8d9ec3c3 => {
393                    header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
394                    let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
395                    fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
396                    let control_handle = MockRebootControllerControlHandle {
397                        inner: this.inner.clone(),
398                    };
399                    Ok(MockRebootControllerRequest::CrashRebootChannel {
400                        responder: MockRebootControllerCrashRebootChannelResponder {
401                            control_handle: std::mem::ManuallyDrop::new(control_handle),
402                            tx_id: header.tx_id,
403                        },
404                    })
405                }
406                _ => Err(fidl::Error::UnknownOrdinal {
407                    ordinal: header.ordinal,
408                    protocol_name: <MockRebootControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
409                }),
410            }))
411            },
412        )
413    }
414}
415
416#[derive(Debug)]
417pub enum MockRebootControllerRequest {
418    TriggerReboot { responder: MockRebootControllerTriggerRebootResponder },
419    CrashRebootChannel { responder: MockRebootControllerCrashRebootChannelResponder },
420}
421
422impl MockRebootControllerRequest {
423    #[allow(irrefutable_let_patterns)]
424    pub fn into_trigger_reboot(self) -> Option<(MockRebootControllerTriggerRebootResponder)> {
425        if let MockRebootControllerRequest::TriggerReboot { responder } = self {
426            Some((responder))
427        } else {
428            None
429        }
430    }
431
432    #[allow(irrefutable_let_patterns)]
433    pub fn into_crash_reboot_channel(
434        self,
435    ) -> Option<(MockRebootControllerCrashRebootChannelResponder)> {
436        if let MockRebootControllerRequest::CrashRebootChannel { responder } = self {
437            Some((responder))
438        } else {
439            None
440        }
441    }
442
443    /// Name of the method defined in FIDL
444    pub fn method_name(&self) -> &'static str {
445        match *self {
446            MockRebootControllerRequest::TriggerReboot { .. } => "trigger_reboot",
447            MockRebootControllerRequest::CrashRebootChannel { .. } => "crash_reboot_channel",
448        }
449    }
450}
451
452#[derive(Debug, Clone)]
453pub struct MockRebootControllerControlHandle {
454    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
455}
456
457impl MockRebootControllerControlHandle {
458    pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
459        self.inner.shutdown_with_epitaph(status.into())
460    }
461}
462
463impl fidl::endpoints::ControlHandle for MockRebootControllerControlHandle {
464    fn shutdown(&self) {
465        self.inner.shutdown()
466    }
467
468    fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
469        self.inner.shutdown_with_epitaph(status)
470    }
471
472    fn is_closed(&self) -> bool {
473        self.inner.channel().is_closed()
474    }
475    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
476        self.inner.channel().on_closed()
477    }
478
479    #[cfg(target_os = "fuchsia")]
480    fn signal_peer(
481        &self,
482        clear_mask: zx::Signals,
483        set_mask: zx::Signals,
484    ) -> Result<(), zx_status::Status> {
485        use fidl::Peered;
486        self.inner.channel().signal_peer(clear_mask, set_mask)
487    }
488}
489
490impl MockRebootControllerControlHandle {}
491
492#[must_use = "FIDL methods require a response to be sent"]
493#[derive(Debug)]
494pub struct MockRebootControllerTriggerRebootResponder {
495    control_handle: std::mem::ManuallyDrop<MockRebootControllerControlHandle>,
496    tx_id: u32,
497}
498
499/// Set the the channel to be shutdown (see [`MockRebootControllerControlHandle::shutdown`])
500/// if the responder is dropped without sending a response, so that the client
501/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
502impl std::ops::Drop for MockRebootControllerTriggerRebootResponder {
503    fn drop(&mut self) {
504        self.control_handle.shutdown();
505        // Safety: drops once, never accessed again
506        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
507    }
508}
509
510impl fidl::endpoints::Responder for MockRebootControllerTriggerRebootResponder {
511    type ControlHandle = MockRebootControllerControlHandle;
512
513    fn control_handle(&self) -> &MockRebootControllerControlHandle {
514        &self.control_handle
515    }
516
517    fn drop_without_shutdown(mut self) {
518        // Safety: drops once, never accessed again due to mem::forget
519        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
520        // Prevent Drop from running (which would shut down the channel)
521        std::mem::forget(self);
522    }
523}
524
525impl MockRebootControllerTriggerRebootResponder {
526    /// Sends a response to the FIDL transaction.
527    ///
528    /// Sets the channel to shutdown if an error occurs.
529    pub fn send(self, mut result: Result<(), RebootError>) -> Result<(), fidl::Error> {
530        let _result = self.send_raw(result);
531        if _result.is_err() {
532            self.control_handle.shutdown();
533        }
534        self.drop_without_shutdown();
535        _result
536    }
537
538    /// Similar to "send" but does not shutdown the channel if an error occurs.
539    pub fn send_no_shutdown_on_err(
540        self,
541        mut result: Result<(), RebootError>,
542    ) -> Result<(), fidl::Error> {
543        let _result = self.send_raw(result);
544        self.drop_without_shutdown();
545        _result
546    }
547
548    fn send_raw(&self, mut result: Result<(), RebootError>) -> Result<(), fidl::Error> {
549        self.control_handle.inner.send::<fidl::encoding::ResultType<
550            fidl::encoding::EmptyStruct,
551            RebootError,
552        >>(
553            result,
554            self.tx_id,
555            0x5e2a61aa7f881d13,
556            fidl::encoding::DynamicFlags::empty(),
557        )
558    }
559}
560
561#[must_use = "FIDL methods require a response to be sent"]
562#[derive(Debug)]
563pub struct MockRebootControllerCrashRebootChannelResponder {
564    control_handle: std::mem::ManuallyDrop<MockRebootControllerControlHandle>,
565    tx_id: u32,
566}
567
568/// Set the the channel to be shutdown (see [`MockRebootControllerControlHandle::shutdown`])
569/// if the responder is dropped without sending a response, so that the client
570/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
571impl std::ops::Drop for MockRebootControllerCrashRebootChannelResponder {
572    fn drop(&mut self) {
573        self.control_handle.shutdown();
574        // Safety: drops once, never accessed again
575        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
576    }
577}
578
579impl fidl::endpoints::Responder for MockRebootControllerCrashRebootChannelResponder {
580    type ControlHandle = MockRebootControllerControlHandle;
581
582    fn control_handle(&self) -> &MockRebootControllerControlHandle {
583        &self.control_handle
584    }
585
586    fn drop_without_shutdown(mut self) {
587        // Safety: drops once, never accessed again due to mem::forget
588        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
589        // Prevent Drop from running (which would shut down the channel)
590        std::mem::forget(self);
591    }
592}
593
594impl MockRebootControllerCrashRebootChannelResponder {
595    /// Sends a response to the FIDL transaction.
596    ///
597    /// Sets the channel to shutdown if an error occurs.
598    pub fn send(self, mut result: Result<(), RebootError>) -> Result<(), fidl::Error> {
599        let _result = self.send_raw(result);
600        if _result.is_err() {
601            self.control_handle.shutdown();
602        }
603        self.drop_without_shutdown();
604        _result
605    }
606
607    /// Similar to "send" but does not shutdown the channel if an error occurs.
608    pub fn send_no_shutdown_on_err(
609        self,
610        mut result: Result<(), RebootError>,
611    ) -> Result<(), fidl::Error> {
612        let _result = self.send_raw(result);
613        self.drop_without_shutdown();
614        _result
615    }
616
617    fn send_raw(&self, mut result: Result<(), RebootError>) -> Result<(), fidl::Error> {
618        self.control_handle.inner.send::<fidl::encoding::ResultType<
619            fidl::encoding::EmptyStruct,
620            RebootError,
621        >>(
622            result,
623            self.tx_id,
624            0x7d42f63d8d9ec3c3,
625            fidl::encoding::DynamicFlags::empty(),
626        )
627    }
628}
629
630mod internal {
631    use super::*;
632}