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