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