fidl_fuchsia_wlan_mlme/
fidl_fuchsia_wlan_mlme.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_mlme__common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15pub struct ConnectorConnectRequest {
16    pub request: fidl::endpoints::ServerEnd<MlmeMarker>,
17}
18
19impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ConnectorConnectRequest {}
20
21#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
22pub struct ConnectorMarker;
23
24impl fidl::endpoints::ProtocolMarker for ConnectorMarker {
25    type Proxy = ConnectorProxy;
26    type RequestStream = ConnectorRequestStream;
27    #[cfg(target_os = "fuchsia")]
28    type SynchronousProxy = ConnectorSynchronousProxy;
29
30    const DEBUG_NAME: &'static str = "(anonymous) Connector";
31}
32
33pub trait ConnectorProxyInterface: Send + Sync {
34    fn r#connect(&self, request: fidl::endpoints::ServerEnd<MlmeMarker>)
35    -> Result<(), fidl::Error>;
36}
37#[derive(Debug)]
38#[cfg(target_os = "fuchsia")]
39pub struct ConnectorSynchronousProxy {
40    client: fidl::client::sync::Client,
41}
42
43#[cfg(target_os = "fuchsia")]
44impl fidl::endpoints::SynchronousProxy for ConnectorSynchronousProxy {
45    type Proxy = ConnectorProxy;
46    type Protocol = ConnectorMarker;
47
48    fn from_channel(inner: fidl::Channel) -> Self {
49        Self::new(inner)
50    }
51
52    fn into_channel(self) -> fidl::Channel {
53        self.client.into_channel()
54    }
55
56    fn as_channel(&self) -> &fidl::Channel {
57        self.client.as_channel()
58    }
59}
60
61#[cfg(target_os = "fuchsia")]
62impl ConnectorSynchronousProxy {
63    pub fn new(channel: fidl::Channel) -> Self {
64        let protocol_name = <ConnectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
65        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
66    }
67
68    pub fn into_channel(self) -> fidl::Channel {
69        self.client.into_channel()
70    }
71
72    /// Waits until an event arrives and returns it. It is safe for other
73    /// threads to make concurrent requests while waiting for an event.
74    pub fn wait_for_event(
75        &self,
76        deadline: zx::MonotonicInstant,
77    ) -> Result<ConnectorEvent, fidl::Error> {
78        ConnectorEvent::decode(self.client.wait_for_event(deadline)?)
79    }
80
81    pub fn r#connect(
82        &self,
83        mut request: fidl::endpoints::ServerEnd<MlmeMarker>,
84    ) -> Result<(), fidl::Error> {
85        self.client.send::<ConnectorConnectRequest>(
86            (request,),
87            0x42131859717af962,
88            fidl::encoding::DynamicFlags::empty(),
89        )
90    }
91}
92
93#[cfg(target_os = "fuchsia")]
94impl From<ConnectorSynchronousProxy> for zx::Handle {
95    fn from(value: ConnectorSynchronousProxy) -> Self {
96        value.into_channel().into()
97    }
98}
99
100#[cfg(target_os = "fuchsia")]
101impl From<fidl::Channel> for ConnectorSynchronousProxy {
102    fn from(value: fidl::Channel) -> Self {
103        Self::new(value)
104    }
105}
106
107#[cfg(target_os = "fuchsia")]
108impl fidl::endpoints::FromClient for ConnectorSynchronousProxy {
109    type Protocol = ConnectorMarker;
110
111    fn from_client(value: fidl::endpoints::ClientEnd<ConnectorMarker>) -> Self {
112        Self::new(value.into_channel())
113    }
114}
115
116#[derive(Debug, Clone)]
117pub struct ConnectorProxy {
118    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
119}
120
121impl fidl::endpoints::Proxy for ConnectorProxy {
122    type Protocol = ConnectorMarker;
123
124    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
125        Self::new(inner)
126    }
127
128    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
129        self.client.into_channel().map_err(|client| Self { client })
130    }
131
132    fn as_channel(&self) -> &::fidl::AsyncChannel {
133        self.client.as_channel()
134    }
135}
136
137impl ConnectorProxy {
138    /// Create a new Proxy for fuchsia.wlan.mlme/Connector.
139    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
140        let protocol_name = <ConnectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
141        Self { client: fidl::client::Client::new(channel, protocol_name) }
142    }
143
144    /// Get a Stream of events from the remote end of the protocol.
145    ///
146    /// # Panics
147    ///
148    /// Panics if the event stream was already taken.
149    pub fn take_event_stream(&self) -> ConnectorEventStream {
150        ConnectorEventStream { event_receiver: self.client.take_event_receiver() }
151    }
152
153    pub fn r#connect(
154        &self,
155        mut request: fidl::endpoints::ServerEnd<MlmeMarker>,
156    ) -> Result<(), fidl::Error> {
157        ConnectorProxyInterface::r#connect(self, request)
158    }
159}
160
161impl ConnectorProxyInterface for ConnectorProxy {
162    fn r#connect(
163        &self,
164        mut request: fidl::endpoints::ServerEnd<MlmeMarker>,
165    ) -> Result<(), fidl::Error> {
166        self.client.send::<ConnectorConnectRequest>(
167            (request,),
168            0x42131859717af962,
169            fidl::encoding::DynamicFlags::empty(),
170        )
171    }
172}
173
174pub struct ConnectorEventStream {
175    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
176}
177
178impl std::marker::Unpin for ConnectorEventStream {}
179
180impl futures::stream::FusedStream for ConnectorEventStream {
181    fn is_terminated(&self) -> bool {
182        self.event_receiver.is_terminated()
183    }
184}
185
186impl futures::Stream for ConnectorEventStream {
187    type Item = Result<ConnectorEvent, fidl::Error>;
188
189    fn poll_next(
190        mut self: std::pin::Pin<&mut Self>,
191        cx: &mut std::task::Context<'_>,
192    ) -> std::task::Poll<Option<Self::Item>> {
193        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
194            &mut self.event_receiver,
195            cx
196        )?) {
197            Some(buf) => std::task::Poll::Ready(Some(ConnectorEvent::decode(buf))),
198            None => std::task::Poll::Ready(None),
199        }
200    }
201}
202
203#[derive(Debug)]
204pub enum ConnectorEvent {}
205
206impl ConnectorEvent {
207    /// Decodes a message buffer as a [`ConnectorEvent`].
208    fn decode(
209        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
210    ) -> Result<ConnectorEvent, fidl::Error> {
211        let (bytes, _handles) = buf.split_mut();
212        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
213        debug_assert_eq!(tx_header.tx_id, 0);
214        match tx_header.ordinal {
215            _ => Err(fidl::Error::UnknownOrdinal {
216                ordinal: tx_header.ordinal,
217                protocol_name: <ConnectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
218            }),
219        }
220    }
221}
222
223/// A Stream of incoming requests for fuchsia.wlan.mlme/Connector.
224pub struct ConnectorRequestStream {
225    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
226    is_terminated: bool,
227}
228
229impl std::marker::Unpin for ConnectorRequestStream {}
230
231impl futures::stream::FusedStream for ConnectorRequestStream {
232    fn is_terminated(&self) -> bool {
233        self.is_terminated
234    }
235}
236
237impl fidl::endpoints::RequestStream for ConnectorRequestStream {
238    type Protocol = ConnectorMarker;
239    type ControlHandle = ConnectorControlHandle;
240
241    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
242        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
243    }
244
245    fn control_handle(&self) -> Self::ControlHandle {
246        ConnectorControlHandle { inner: self.inner.clone() }
247    }
248
249    fn into_inner(
250        self,
251    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
252    {
253        (self.inner, self.is_terminated)
254    }
255
256    fn from_inner(
257        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
258        is_terminated: bool,
259    ) -> Self {
260        Self { inner, is_terminated }
261    }
262}
263
264impl futures::Stream for ConnectorRequestStream {
265    type Item = Result<ConnectorRequest, fidl::Error>;
266
267    fn poll_next(
268        mut self: std::pin::Pin<&mut Self>,
269        cx: &mut std::task::Context<'_>,
270    ) -> std::task::Poll<Option<Self::Item>> {
271        let this = &mut *self;
272        if this.inner.check_shutdown(cx) {
273            this.is_terminated = true;
274            return std::task::Poll::Ready(None);
275        }
276        if this.is_terminated {
277            panic!("polled ConnectorRequestStream after completion");
278        }
279        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
280            |bytes, handles| {
281                match this.inner.channel().read_etc(cx, bytes, handles) {
282                    std::task::Poll::Ready(Ok(())) => {}
283                    std::task::Poll::Pending => return std::task::Poll::Pending,
284                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
285                        this.is_terminated = true;
286                        return std::task::Poll::Ready(None);
287                    }
288                    std::task::Poll::Ready(Err(e)) => {
289                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
290                            e.into(),
291                        ))));
292                    }
293                }
294
295                // A message has been received from the channel
296                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
297
298                std::task::Poll::Ready(Some(match header.ordinal {
299                    0x42131859717af962 => {
300                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
301                        let mut req = fidl::new_empty!(
302                            ConnectorConnectRequest,
303                            fidl::encoding::DefaultFuchsiaResourceDialect
304                        );
305                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectorConnectRequest>(&header, _body_bytes, handles, &mut req)?;
306                        let control_handle = ConnectorControlHandle { inner: this.inner.clone() };
307                        Ok(ConnectorRequest::Connect { request: req.request, control_handle })
308                    }
309                    _ => Err(fidl::Error::UnknownOrdinal {
310                        ordinal: header.ordinal,
311                        protocol_name:
312                            <ConnectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
313                    }),
314                }))
315            },
316        )
317    }
318}
319
320/// This protocol is used to connect to the interface's underlying MLME.
321#[derive(Debug)]
322pub enum ConnectorRequest {
323    Connect {
324        request: fidl::endpoints::ServerEnd<MlmeMarker>,
325        control_handle: ConnectorControlHandle,
326    },
327}
328
329impl ConnectorRequest {
330    #[allow(irrefutable_let_patterns)]
331    pub fn into_connect(
332        self,
333    ) -> Option<(fidl::endpoints::ServerEnd<MlmeMarker>, ConnectorControlHandle)> {
334        if let ConnectorRequest::Connect { request, control_handle } = self {
335            Some((request, control_handle))
336        } else {
337            None
338        }
339    }
340
341    /// Name of the method defined in FIDL
342    pub fn method_name(&self) -> &'static str {
343        match *self {
344            ConnectorRequest::Connect { .. } => "connect",
345        }
346    }
347}
348
349#[derive(Debug, Clone)]
350pub struct ConnectorControlHandle {
351    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
352}
353
354impl fidl::endpoints::ControlHandle for ConnectorControlHandle {
355    fn shutdown(&self) {
356        self.inner.shutdown()
357    }
358    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
359        self.inner.shutdown_with_epitaph(status)
360    }
361
362    fn is_closed(&self) -> bool {
363        self.inner.channel().is_closed()
364    }
365    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
366        self.inner.channel().on_closed()
367    }
368
369    #[cfg(target_os = "fuchsia")]
370    fn signal_peer(
371        &self,
372        clear_mask: zx::Signals,
373        set_mask: zx::Signals,
374    ) -> Result<(), zx_status::Status> {
375        use fidl::Peered;
376        self.inner.channel().signal_peer(clear_mask, set_mask)
377    }
378}
379
380impl ConnectorControlHandle {}
381
382#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
383pub struct MlmeMarker;
384
385impl fidl::endpoints::ProtocolMarker for MlmeMarker {
386    type Proxy = MlmeProxy;
387    type RequestStream = MlmeRequestStream;
388    #[cfg(target_os = "fuchsia")]
389    type SynchronousProxy = MlmeSynchronousProxy;
390
391    const DEBUG_NAME: &'static str = "(anonymous) Mlme";
392}
393pub type MlmeQueryTelemetrySupportResult = Result<fidl_fuchsia_wlan_stats::TelemetrySupport, i32>;
394pub type MlmeGetSignalReportResult = Result<fidl_fuchsia_wlan_stats::SignalReport, i32>;
395
396pub trait MlmeProxyInterface: Send + Sync {
397    fn r#start_scan(&self, req: &ScanRequest) -> Result<(), fidl::Error>;
398    fn r#connect_req(&self, req: &ConnectRequest) -> Result<(), fidl::Error>;
399    fn r#reconnect_req(&self, req: &ReconnectRequest) -> Result<(), fidl::Error>;
400    fn r#roam_req(&self, req: &RoamRequest) -> Result<(), fidl::Error>;
401    fn r#authenticate_resp(&self, resp: &AuthenticateResponse) -> Result<(), fidl::Error>;
402    fn r#deauthenticate_req(&self, req: &DeauthenticateRequest) -> Result<(), fidl::Error>;
403    fn r#associate_resp(&self, resp: &AssociateResponse) -> Result<(), fidl::Error>;
404    fn r#disassociate_req(&self, req: &DisassociateRequest) -> Result<(), fidl::Error>;
405    fn r#reset_req(&self, req: &ResetRequest) -> Result<(), fidl::Error>;
406    fn r#start_req(&self, req: &StartRequest) -> Result<(), fidl::Error>;
407    fn r#stop_req(&self, req: &StopRequest) -> Result<(), fidl::Error>;
408    fn r#set_keys_req(&self, req: &SetKeysRequest) -> Result<(), fidl::Error>;
409    fn r#delete_keys_req(&self, req: &DeleteKeysRequest) -> Result<(), fidl::Error>;
410    fn r#eapol_req(&self, req: &EapolRequest) -> Result<(), fidl::Error>;
411    fn r#set_controlled_port(&self, req: &SetControlledPortRequest) -> Result<(), fidl::Error>;
412    type QueryDeviceInfoResponseFut: std::future::Future<Output = Result<DeviceInfo, fidl::Error>>
413        + Send;
414    fn r#query_device_info(&self) -> Self::QueryDeviceInfoResponseFut;
415    type QueryTelemetrySupportResponseFut: std::future::Future<Output = Result<MlmeQueryTelemetrySupportResult, fidl::Error>>
416        + Send;
417    fn r#query_telemetry_support(&self) -> Self::QueryTelemetrySupportResponseFut;
418    type GetIfaceStatsResponseFut: std::future::Future<Output = Result<GetIfaceStatsResponse, fidl::Error>>
419        + Send;
420    fn r#get_iface_stats(&self) -> Self::GetIfaceStatsResponseFut;
421    type GetIfaceHistogramStatsResponseFut: std::future::Future<Output = Result<GetIfaceHistogramStatsResponse, fidl::Error>>
422        + Send;
423    fn r#get_iface_histogram_stats(&self) -> Self::GetIfaceHistogramStatsResponseFut;
424    type GetSignalReportResponseFut: std::future::Future<Output = Result<MlmeGetSignalReportResult, fidl::Error>>
425        + Send;
426    fn r#get_signal_report(&self) -> Self::GetSignalReportResponseFut;
427    type ListMinstrelPeersResponseFut: std::future::Future<Output = Result<MinstrelListResponse, fidl::Error>>
428        + Send;
429    fn r#list_minstrel_peers(&self) -> Self::ListMinstrelPeersResponseFut;
430    type GetMinstrelStatsResponseFut: std::future::Future<Output = Result<MinstrelStatsResponse, fidl::Error>>
431        + Send;
432    fn r#get_minstrel_stats(&self, req: &MinstrelStatsRequest)
433    -> Self::GetMinstrelStatsResponseFut;
434    type StartCaptureFramesResponseFut: std::future::Future<Output = Result<StartCaptureFramesResponse, fidl::Error>>
435        + Send;
436    fn r#start_capture_frames(
437        &self,
438        req: &StartCaptureFramesRequest,
439    ) -> Self::StartCaptureFramesResponseFut;
440    fn r#stop_capture_frames(&self) -> Result<(), fidl::Error>;
441    fn r#sae_handshake_resp(&self, resp: &SaeHandshakeResponse) -> Result<(), fidl::Error>;
442    fn r#sae_frame_tx(&self, frame: &SaeFrame) -> Result<(), fidl::Error>;
443    fn r#wmm_status_req(&self) -> Result<(), fidl::Error>;
444    fn r#finalize_association_req(
445        &self,
446        negotiated_capabilities: &NegotiatedCapabilities,
447    ) -> Result<(), fidl::Error>;
448}
449#[derive(Debug)]
450#[cfg(target_os = "fuchsia")]
451pub struct MlmeSynchronousProxy {
452    client: fidl::client::sync::Client,
453}
454
455#[cfg(target_os = "fuchsia")]
456impl fidl::endpoints::SynchronousProxy for MlmeSynchronousProxy {
457    type Proxy = MlmeProxy;
458    type Protocol = MlmeMarker;
459
460    fn from_channel(inner: fidl::Channel) -> Self {
461        Self::new(inner)
462    }
463
464    fn into_channel(self) -> fidl::Channel {
465        self.client.into_channel()
466    }
467
468    fn as_channel(&self) -> &fidl::Channel {
469        self.client.as_channel()
470    }
471}
472
473#[cfg(target_os = "fuchsia")]
474impl MlmeSynchronousProxy {
475    pub fn new(channel: fidl::Channel) -> Self {
476        let protocol_name = <MlmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
477        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
478    }
479
480    pub fn into_channel(self) -> fidl::Channel {
481        self.client.into_channel()
482    }
483
484    /// Waits until an event arrives and returns it. It is safe for other
485    /// threads to make concurrent requests while waiting for an event.
486    pub fn wait_for_event(&self, deadline: zx::MonotonicInstant) -> Result<MlmeEvent, fidl::Error> {
487        MlmeEvent::decode(self.client.wait_for_event(deadline)?)
488    }
489
490    pub fn r#start_scan(&self, mut req: &ScanRequest) -> Result<(), fidl::Error> {
491        self.client.send::<MlmeStartScanRequest>(
492            (req,),
493            0x342cc5ec6a957479,
494            fidl::encoding::DynamicFlags::empty(),
495        )
496    }
497
498    pub fn r#connect_req(&self, mut req: &ConnectRequest) -> Result<(), fidl::Error> {
499        self.client.send::<MlmeConnectReqRequest>(
500            (req,),
501            0x31153dc85f8f64c,
502            fidl::encoding::DynamicFlags::empty(),
503        )
504    }
505
506    pub fn r#reconnect_req(&self, mut req: &ReconnectRequest) -> Result<(), fidl::Error> {
507        self.client.send::<MlmeReconnectReqRequest>(
508            (req,),
509            0x74e0f1bd758b6b78,
510            fidl::encoding::DynamicFlags::empty(),
511        )
512    }
513
514    /// Initiate a roam attempt (SME-initiated).
515    pub fn r#roam_req(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
516        self.client.send::<MlmeRoamReqRequest>(
517            (req,),
518            0x3ba163eadf7dba45,
519            fidl::encoding::DynamicFlags::empty(),
520        )
521    }
522
523    pub fn r#authenticate_resp(&self, mut resp: &AuthenticateResponse) -> Result<(), fidl::Error> {
524        self.client.send::<MlmeAuthenticateRespRequest>(
525            (resp,),
526            0x26108aade2fdd2f4,
527            fidl::encoding::DynamicFlags::empty(),
528        )
529    }
530
531    pub fn r#deauthenticate_req(&self, mut req: &DeauthenticateRequest) -> Result<(), fidl::Error> {
532        self.client.send::<MlmeDeauthenticateReqRequest>(
533            (req,),
534            0x228983b200de5d12,
535            fidl::encoding::DynamicFlags::empty(),
536        )
537    }
538
539    pub fn r#associate_resp(&self, mut resp: &AssociateResponse) -> Result<(), fidl::Error> {
540        self.client.send::<MlmeAssociateRespRequest>(
541            (resp,),
542            0x70244dbd652ed6d9,
543            fidl::encoding::DynamicFlags::empty(),
544        )
545    }
546
547    pub fn r#disassociate_req(&self, mut req: &DisassociateRequest) -> Result<(), fidl::Error> {
548        self.client.send::<MlmeDisassociateReqRequest>(
549            (req,),
550            0x5765807f1387d764,
551            fidl::encoding::DynamicFlags::empty(),
552        )
553    }
554
555    pub fn r#reset_req(&self, mut req: &ResetRequest) -> Result<(), fidl::Error> {
556        self.client.send::<MlmeResetReqRequest>(
557            (req,),
558            0x780b98c58a286b9f,
559            fidl::encoding::DynamicFlags::empty(),
560        )
561    }
562
563    pub fn r#start_req(&self, mut req: &StartRequest) -> Result<(), fidl::Error> {
564        self.client.send::<MlmeStartReqRequest>(
565            (req,),
566            0x5d95885f8053654,
567            fidl::encoding::DynamicFlags::empty(),
568        )
569    }
570
571    pub fn r#stop_req(&self, mut req: &StopRequest) -> Result<(), fidl::Error> {
572        self.client.send::<MlmeStopReqRequest>(
573            (req,),
574            0x27b9a2ab04a2c79f,
575            fidl::encoding::DynamicFlags::empty(),
576        )
577    }
578
579    pub fn r#set_keys_req(&self, mut req: &SetKeysRequest) -> Result<(), fidl::Error> {
580        self.client.send::<MlmeSetKeysReqRequest>(
581            (req,),
582            0x6b30a07fd3a11a79,
583            fidl::encoding::DynamicFlags::empty(),
584        )
585    }
586
587    pub fn r#delete_keys_req(&self, mut req: &DeleteKeysRequest) -> Result<(), fidl::Error> {
588        self.client.send::<MlmeDeleteKeysReqRequest>(
589            (req,),
590            0x1e3524d20d190c8f,
591            fidl::encoding::DynamicFlags::empty(),
592        )
593    }
594
595    pub fn r#eapol_req(&self, mut req: &EapolRequest) -> Result<(), fidl::Error> {
596        self.client.send::<MlmeEapolReqRequest>(
597            (req,),
598            0xc3c096924704d4,
599            fidl::encoding::DynamicFlags::empty(),
600        )
601    }
602
603    pub fn r#set_controlled_port(
604        &self,
605        mut req: &SetControlledPortRequest,
606    ) -> Result<(), fidl::Error> {
607        self.client.send::<MlmeSetControlledPortRequest>(
608            (req,),
609            0x4e47065668890c8d,
610            fidl::encoding::DynamicFlags::empty(),
611        )
612    }
613
614    pub fn r#query_device_info(
615        &self,
616        ___deadline: zx::MonotonicInstant,
617    ) -> Result<DeviceInfo, fidl::Error> {
618        let _response =
619            self.client.send_query::<fidl::encoding::EmptyPayload, MlmeQueryDeviceInfoResponse>(
620                (),
621                0x6ee3e7f63f2b7bc0,
622                fidl::encoding::DynamicFlags::empty(),
623                ___deadline,
624            )?;
625        Ok(_response.info)
626    }
627
628    pub fn r#query_telemetry_support(
629        &self,
630        ___deadline: zx::MonotonicInstant,
631    ) -> Result<MlmeQueryTelemetrySupportResult, fidl::Error> {
632        let _response = self.client.send_query::<
633            fidl::encoding::EmptyPayload,
634            fidl::encoding::ResultType<MlmeQueryTelemetrySupportResponse, i32>,
635        >(
636            (),
637            0x1598879b70332c99,
638            fidl::encoding::DynamicFlags::empty(),
639            ___deadline,
640        )?;
641        Ok(_response.map(|x| x.resp))
642    }
643
644    pub fn r#get_iface_stats(
645        &self,
646        ___deadline: zx::MonotonicInstant,
647    ) -> Result<GetIfaceStatsResponse, fidl::Error> {
648        let _response =
649            self.client.send_query::<fidl::encoding::EmptyPayload, MlmeGetIfaceStatsResponse>(
650                (),
651                0xede1a8342d1b211,
652                fidl::encoding::DynamicFlags::empty(),
653                ___deadline,
654            )?;
655        Ok(_response.resp)
656    }
657
658    pub fn r#get_iface_histogram_stats(
659        &self,
660        ___deadline: zx::MonotonicInstant,
661    ) -> Result<GetIfaceHistogramStatsResponse, fidl::Error> {
662        let _response = self
663            .client
664            .send_query::<fidl::encoding::EmptyPayload, MlmeGetIfaceHistogramStatsResponse>(
665                (),
666                0x1979c9d3449f8675,
667                fidl::encoding::DynamicFlags::empty(),
668                ___deadline,
669            )?;
670        Ok(_response.resp)
671    }
672
673    pub fn r#get_signal_report(
674        &self,
675        ___deadline: zx::MonotonicInstant,
676    ) -> Result<MlmeGetSignalReportResult, fidl::Error> {
677        let _response = self.client.send_query::<
678            fidl::encoding::EmptyPayload,
679            fidl::encoding::ResultType<MlmeGetSignalReportResponse, i32>,
680        >(
681            (),
682            0x7e47e7ebe92acec9,
683            fidl::encoding::DynamicFlags::empty(),
684            ___deadline,
685        )?;
686        Ok(_response.map(|x| x.resp))
687    }
688
689    pub fn r#list_minstrel_peers(
690        &self,
691        ___deadline: zx::MonotonicInstant,
692    ) -> Result<MinstrelListResponse, fidl::Error> {
693        let _response =
694            self.client.send_query::<fidl::encoding::EmptyPayload, MlmeListMinstrelPeersResponse>(
695                (),
696                0x4ac5d1e66fe1ffd5,
697                fidl::encoding::DynamicFlags::empty(),
698                ___deadline,
699            )?;
700        Ok(_response.resp)
701    }
702
703    pub fn r#get_minstrel_stats(
704        &self,
705        mut req: &MinstrelStatsRequest,
706        ___deadline: zx::MonotonicInstant,
707    ) -> Result<MinstrelStatsResponse, fidl::Error> {
708        let _response =
709            self.client.send_query::<MlmeGetMinstrelStatsRequest, MlmeGetMinstrelStatsResponse>(
710                (req,),
711                0x2f688b1245323f4b,
712                fidl::encoding::DynamicFlags::empty(),
713                ___deadline,
714            )?;
715        Ok(_response.resp)
716    }
717
718    pub fn r#start_capture_frames(
719        &self,
720        mut req: &StartCaptureFramesRequest,
721        ___deadline: zx::MonotonicInstant,
722    ) -> Result<StartCaptureFramesResponse, fidl::Error> {
723        let _response = self
724            .client
725            .send_query::<MlmeStartCaptureFramesRequest, MlmeStartCaptureFramesResponse>(
726                (req,),
727                0x23b369ed5749ee69,
728                fidl::encoding::DynamicFlags::empty(),
729                ___deadline,
730            )?;
731        Ok(_response.resp)
732    }
733
734    pub fn r#stop_capture_frames(&self) -> Result<(), fidl::Error> {
735        self.client.send::<fidl::encoding::EmptyPayload>(
736            (),
737            0x2f1aebbc68bf7c54,
738            fidl::encoding::DynamicFlags::empty(),
739        )
740    }
741
742    /// Notifies that SAE authentication is completed.
743    pub fn r#sae_handshake_resp(&self, mut resp: &SaeHandshakeResponse) -> Result<(), fidl::Error> {
744        self.client.send::<MlmeSaeHandshakeRespRequest>(
745            (resp,),
746            0x28477bd2f7a5ab0c,
747            fidl::encoding::DynamicFlags::empty(),
748        )
749    }
750
751    /// Transmits SAE frame (if SME is managing SAE authentication).
752    pub fn r#sae_frame_tx(&self, mut frame: &SaeFrame) -> Result<(), fidl::Error> {
753        self.client.send::<MlmeSaeFrameTxRequest>(
754            (frame,),
755            0x7700c0d536733d8c,
756            fidl::encoding::DynamicFlags::empty(),
757        )
758    }
759
760    pub fn r#wmm_status_req(&self) -> Result<(), fidl::Error> {
761        self.client.send::<fidl::encoding::EmptyPayload>(
762            (),
763            0xef4851f6088fede,
764            fidl::encoding::DynamicFlags::empty(),
765        )
766    }
767
768    pub fn r#finalize_association_req(
769        &self,
770        mut negotiated_capabilities: &NegotiatedCapabilities,
771    ) -> Result<(), fidl::Error> {
772        self.client.send::<MlmeFinalizeAssociationReqRequest>(
773            (negotiated_capabilities,),
774            0x7aea59787cfd385a,
775            fidl::encoding::DynamicFlags::empty(),
776        )
777    }
778}
779
780#[cfg(target_os = "fuchsia")]
781impl From<MlmeSynchronousProxy> for zx::Handle {
782    fn from(value: MlmeSynchronousProxy) -> Self {
783        value.into_channel().into()
784    }
785}
786
787#[cfg(target_os = "fuchsia")]
788impl From<fidl::Channel> for MlmeSynchronousProxy {
789    fn from(value: fidl::Channel) -> Self {
790        Self::new(value)
791    }
792}
793
794#[cfg(target_os = "fuchsia")]
795impl fidl::endpoints::FromClient for MlmeSynchronousProxy {
796    type Protocol = MlmeMarker;
797
798    fn from_client(value: fidl::endpoints::ClientEnd<MlmeMarker>) -> Self {
799        Self::new(value.into_channel())
800    }
801}
802
803#[derive(Debug, Clone)]
804pub struct MlmeProxy {
805    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
806}
807
808impl fidl::endpoints::Proxy for MlmeProxy {
809    type Protocol = MlmeMarker;
810
811    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
812        Self::new(inner)
813    }
814
815    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
816        self.client.into_channel().map_err(|client| Self { client })
817    }
818
819    fn as_channel(&self) -> &::fidl::AsyncChannel {
820        self.client.as_channel()
821    }
822}
823
824impl MlmeProxy {
825    /// Create a new Proxy for fuchsia.wlan.mlme/MLME.
826    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
827        let protocol_name = <MlmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
828        Self { client: fidl::client::Client::new(channel, protocol_name) }
829    }
830
831    /// Get a Stream of events from the remote end of the protocol.
832    ///
833    /// # Panics
834    ///
835    /// Panics if the event stream was already taken.
836    pub fn take_event_stream(&self) -> MlmeEventStream {
837        MlmeEventStream { event_receiver: self.client.take_event_receiver() }
838    }
839
840    pub fn r#start_scan(&self, mut req: &ScanRequest) -> Result<(), fidl::Error> {
841        MlmeProxyInterface::r#start_scan(self, req)
842    }
843
844    pub fn r#connect_req(&self, mut req: &ConnectRequest) -> Result<(), fidl::Error> {
845        MlmeProxyInterface::r#connect_req(self, req)
846    }
847
848    pub fn r#reconnect_req(&self, mut req: &ReconnectRequest) -> Result<(), fidl::Error> {
849        MlmeProxyInterface::r#reconnect_req(self, req)
850    }
851
852    /// Initiate a roam attempt (SME-initiated).
853    pub fn r#roam_req(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
854        MlmeProxyInterface::r#roam_req(self, req)
855    }
856
857    pub fn r#authenticate_resp(&self, mut resp: &AuthenticateResponse) -> Result<(), fidl::Error> {
858        MlmeProxyInterface::r#authenticate_resp(self, resp)
859    }
860
861    pub fn r#deauthenticate_req(&self, mut req: &DeauthenticateRequest) -> Result<(), fidl::Error> {
862        MlmeProxyInterface::r#deauthenticate_req(self, req)
863    }
864
865    pub fn r#associate_resp(&self, mut resp: &AssociateResponse) -> Result<(), fidl::Error> {
866        MlmeProxyInterface::r#associate_resp(self, resp)
867    }
868
869    pub fn r#disassociate_req(&self, mut req: &DisassociateRequest) -> Result<(), fidl::Error> {
870        MlmeProxyInterface::r#disassociate_req(self, req)
871    }
872
873    pub fn r#reset_req(&self, mut req: &ResetRequest) -> Result<(), fidl::Error> {
874        MlmeProxyInterface::r#reset_req(self, req)
875    }
876
877    pub fn r#start_req(&self, mut req: &StartRequest) -> Result<(), fidl::Error> {
878        MlmeProxyInterface::r#start_req(self, req)
879    }
880
881    pub fn r#stop_req(&self, mut req: &StopRequest) -> Result<(), fidl::Error> {
882        MlmeProxyInterface::r#stop_req(self, req)
883    }
884
885    pub fn r#set_keys_req(&self, mut req: &SetKeysRequest) -> Result<(), fidl::Error> {
886        MlmeProxyInterface::r#set_keys_req(self, req)
887    }
888
889    pub fn r#delete_keys_req(&self, mut req: &DeleteKeysRequest) -> Result<(), fidl::Error> {
890        MlmeProxyInterface::r#delete_keys_req(self, req)
891    }
892
893    pub fn r#eapol_req(&self, mut req: &EapolRequest) -> Result<(), fidl::Error> {
894        MlmeProxyInterface::r#eapol_req(self, req)
895    }
896
897    pub fn r#set_controlled_port(
898        &self,
899        mut req: &SetControlledPortRequest,
900    ) -> Result<(), fidl::Error> {
901        MlmeProxyInterface::r#set_controlled_port(self, req)
902    }
903
904    pub fn r#query_device_info(
905        &self,
906    ) -> fidl::client::QueryResponseFut<DeviceInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
907    {
908        MlmeProxyInterface::r#query_device_info(self)
909    }
910
911    pub fn r#query_telemetry_support(
912        &self,
913    ) -> fidl::client::QueryResponseFut<
914        MlmeQueryTelemetrySupportResult,
915        fidl::encoding::DefaultFuchsiaResourceDialect,
916    > {
917        MlmeProxyInterface::r#query_telemetry_support(self)
918    }
919
920    pub fn r#get_iface_stats(
921        &self,
922    ) -> fidl::client::QueryResponseFut<
923        GetIfaceStatsResponse,
924        fidl::encoding::DefaultFuchsiaResourceDialect,
925    > {
926        MlmeProxyInterface::r#get_iface_stats(self)
927    }
928
929    pub fn r#get_iface_histogram_stats(
930        &self,
931    ) -> fidl::client::QueryResponseFut<
932        GetIfaceHistogramStatsResponse,
933        fidl::encoding::DefaultFuchsiaResourceDialect,
934    > {
935        MlmeProxyInterface::r#get_iface_histogram_stats(self)
936    }
937
938    pub fn r#get_signal_report(
939        &self,
940    ) -> fidl::client::QueryResponseFut<
941        MlmeGetSignalReportResult,
942        fidl::encoding::DefaultFuchsiaResourceDialect,
943    > {
944        MlmeProxyInterface::r#get_signal_report(self)
945    }
946
947    pub fn r#list_minstrel_peers(
948        &self,
949    ) -> fidl::client::QueryResponseFut<
950        MinstrelListResponse,
951        fidl::encoding::DefaultFuchsiaResourceDialect,
952    > {
953        MlmeProxyInterface::r#list_minstrel_peers(self)
954    }
955
956    pub fn r#get_minstrel_stats(
957        &self,
958        mut req: &MinstrelStatsRequest,
959    ) -> fidl::client::QueryResponseFut<
960        MinstrelStatsResponse,
961        fidl::encoding::DefaultFuchsiaResourceDialect,
962    > {
963        MlmeProxyInterface::r#get_minstrel_stats(self, req)
964    }
965
966    pub fn r#start_capture_frames(
967        &self,
968        mut req: &StartCaptureFramesRequest,
969    ) -> fidl::client::QueryResponseFut<
970        StartCaptureFramesResponse,
971        fidl::encoding::DefaultFuchsiaResourceDialect,
972    > {
973        MlmeProxyInterface::r#start_capture_frames(self, req)
974    }
975
976    pub fn r#stop_capture_frames(&self) -> Result<(), fidl::Error> {
977        MlmeProxyInterface::r#stop_capture_frames(self)
978    }
979
980    /// Notifies that SAE authentication is completed.
981    pub fn r#sae_handshake_resp(&self, mut resp: &SaeHandshakeResponse) -> Result<(), fidl::Error> {
982        MlmeProxyInterface::r#sae_handshake_resp(self, resp)
983    }
984
985    /// Transmits SAE frame (if SME is managing SAE authentication).
986    pub fn r#sae_frame_tx(&self, mut frame: &SaeFrame) -> Result<(), fidl::Error> {
987        MlmeProxyInterface::r#sae_frame_tx(self, frame)
988    }
989
990    pub fn r#wmm_status_req(&self) -> Result<(), fidl::Error> {
991        MlmeProxyInterface::r#wmm_status_req(self)
992    }
993
994    pub fn r#finalize_association_req(
995        &self,
996        mut negotiated_capabilities: &NegotiatedCapabilities,
997    ) -> Result<(), fidl::Error> {
998        MlmeProxyInterface::r#finalize_association_req(self, negotiated_capabilities)
999    }
1000}
1001
1002impl MlmeProxyInterface for MlmeProxy {
1003    fn r#start_scan(&self, mut req: &ScanRequest) -> Result<(), fidl::Error> {
1004        self.client.send::<MlmeStartScanRequest>(
1005            (req,),
1006            0x342cc5ec6a957479,
1007            fidl::encoding::DynamicFlags::empty(),
1008        )
1009    }
1010
1011    fn r#connect_req(&self, mut req: &ConnectRequest) -> Result<(), fidl::Error> {
1012        self.client.send::<MlmeConnectReqRequest>(
1013            (req,),
1014            0x31153dc85f8f64c,
1015            fidl::encoding::DynamicFlags::empty(),
1016        )
1017    }
1018
1019    fn r#reconnect_req(&self, mut req: &ReconnectRequest) -> Result<(), fidl::Error> {
1020        self.client.send::<MlmeReconnectReqRequest>(
1021            (req,),
1022            0x74e0f1bd758b6b78,
1023            fidl::encoding::DynamicFlags::empty(),
1024        )
1025    }
1026
1027    fn r#roam_req(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
1028        self.client.send::<MlmeRoamReqRequest>(
1029            (req,),
1030            0x3ba163eadf7dba45,
1031            fidl::encoding::DynamicFlags::empty(),
1032        )
1033    }
1034
1035    fn r#authenticate_resp(&self, mut resp: &AuthenticateResponse) -> Result<(), fidl::Error> {
1036        self.client.send::<MlmeAuthenticateRespRequest>(
1037            (resp,),
1038            0x26108aade2fdd2f4,
1039            fidl::encoding::DynamicFlags::empty(),
1040        )
1041    }
1042
1043    fn r#deauthenticate_req(&self, mut req: &DeauthenticateRequest) -> Result<(), fidl::Error> {
1044        self.client.send::<MlmeDeauthenticateReqRequest>(
1045            (req,),
1046            0x228983b200de5d12,
1047            fidl::encoding::DynamicFlags::empty(),
1048        )
1049    }
1050
1051    fn r#associate_resp(&self, mut resp: &AssociateResponse) -> Result<(), fidl::Error> {
1052        self.client.send::<MlmeAssociateRespRequest>(
1053            (resp,),
1054            0x70244dbd652ed6d9,
1055            fidl::encoding::DynamicFlags::empty(),
1056        )
1057    }
1058
1059    fn r#disassociate_req(&self, mut req: &DisassociateRequest) -> Result<(), fidl::Error> {
1060        self.client.send::<MlmeDisassociateReqRequest>(
1061            (req,),
1062            0x5765807f1387d764,
1063            fidl::encoding::DynamicFlags::empty(),
1064        )
1065    }
1066
1067    fn r#reset_req(&self, mut req: &ResetRequest) -> Result<(), fidl::Error> {
1068        self.client.send::<MlmeResetReqRequest>(
1069            (req,),
1070            0x780b98c58a286b9f,
1071            fidl::encoding::DynamicFlags::empty(),
1072        )
1073    }
1074
1075    fn r#start_req(&self, mut req: &StartRequest) -> Result<(), fidl::Error> {
1076        self.client.send::<MlmeStartReqRequest>(
1077            (req,),
1078            0x5d95885f8053654,
1079            fidl::encoding::DynamicFlags::empty(),
1080        )
1081    }
1082
1083    fn r#stop_req(&self, mut req: &StopRequest) -> Result<(), fidl::Error> {
1084        self.client.send::<MlmeStopReqRequest>(
1085            (req,),
1086            0x27b9a2ab04a2c79f,
1087            fidl::encoding::DynamicFlags::empty(),
1088        )
1089    }
1090
1091    fn r#set_keys_req(&self, mut req: &SetKeysRequest) -> Result<(), fidl::Error> {
1092        self.client.send::<MlmeSetKeysReqRequest>(
1093            (req,),
1094            0x6b30a07fd3a11a79,
1095            fidl::encoding::DynamicFlags::empty(),
1096        )
1097    }
1098
1099    fn r#delete_keys_req(&self, mut req: &DeleteKeysRequest) -> Result<(), fidl::Error> {
1100        self.client.send::<MlmeDeleteKeysReqRequest>(
1101            (req,),
1102            0x1e3524d20d190c8f,
1103            fidl::encoding::DynamicFlags::empty(),
1104        )
1105    }
1106
1107    fn r#eapol_req(&self, mut req: &EapolRequest) -> Result<(), fidl::Error> {
1108        self.client.send::<MlmeEapolReqRequest>(
1109            (req,),
1110            0xc3c096924704d4,
1111            fidl::encoding::DynamicFlags::empty(),
1112        )
1113    }
1114
1115    fn r#set_controlled_port(&self, mut req: &SetControlledPortRequest) -> Result<(), fidl::Error> {
1116        self.client.send::<MlmeSetControlledPortRequest>(
1117            (req,),
1118            0x4e47065668890c8d,
1119            fidl::encoding::DynamicFlags::empty(),
1120        )
1121    }
1122
1123    type QueryDeviceInfoResponseFut =
1124        fidl::client::QueryResponseFut<DeviceInfo, fidl::encoding::DefaultFuchsiaResourceDialect>;
1125    fn r#query_device_info(&self) -> Self::QueryDeviceInfoResponseFut {
1126        fn _decode(
1127            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1128        ) -> Result<DeviceInfo, fidl::Error> {
1129            let _response = fidl::client::decode_transaction_body::<
1130                MlmeQueryDeviceInfoResponse,
1131                fidl::encoding::DefaultFuchsiaResourceDialect,
1132                0x6ee3e7f63f2b7bc0,
1133            >(_buf?)?;
1134            Ok(_response.info)
1135        }
1136        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, DeviceInfo>(
1137            (),
1138            0x6ee3e7f63f2b7bc0,
1139            fidl::encoding::DynamicFlags::empty(),
1140            _decode,
1141        )
1142    }
1143
1144    type QueryTelemetrySupportResponseFut = fidl::client::QueryResponseFut<
1145        MlmeQueryTelemetrySupportResult,
1146        fidl::encoding::DefaultFuchsiaResourceDialect,
1147    >;
1148    fn r#query_telemetry_support(&self) -> Self::QueryTelemetrySupportResponseFut {
1149        fn _decode(
1150            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1151        ) -> Result<MlmeQueryTelemetrySupportResult, fidl::Error> {
1152            let _response = fidl::client::decode_transaction_body::<
1153                fidl::encoding::ResultType<MlmeQueryTelemetrySupportResponse, i32>,
1154                fidl::encoding::DefaultFuchsiaResourceDialect,
1155                0x1598879b70332c99,
1156            >(_buf?)?;
1157            Ok(_response.map(|x| x.resp))
1158        }
1159        self.client
1160            .send_query_and_decode::<fidl::encoding::EmptyPayload, MlmeQueryTelemetrySupportResult>(
1161                (),
1162                0x1598879b70332c99,
1163                fidl::encoding::DynamicFlags::empty(),
1164                _decode,
1165            )
1166    }
1167
1168    type GetIfaceStatsResponseFut = fidl::client::QueryResponseFut<
1169        GetIfaceStatsResponse,
1170        fidl::encoding::DefaultFuchsiaResourceDialect,
1171    >;
1172    fn r#get_iface_stats(&self) -> Self::GetIfaceStatsResponseFut {
1173        fn _decode(
1174            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1175        ) -> Result<GetIfaceStatsResponse, fidl::Error> {
1176            let _response = fidl::client::decode_transaction_body::<
1177                MlmeGetIfaceStatsResponse,
1178                fidl::encoding::DefaultFuchsiaResourceDialect,
1179                0xede1a8342d1b211,
1180            >(_buf?)?;
1181            Ok(_response.resp)
1182        }
1183        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, GetIfaceStatsResponse>(
1184            (),
1185            0xede1a8342d1b211,
1186            fidl::encoding::DynamicFlags::empty(),
1187            _decode,
1188        )
1189    }
1190
1191    type GetIfaceHistogramStatsResponseFut = fidl::client::QueryResponseFut<
1192        GetIfaceHistogramStatsResponse,
1193        fidl::encoding::DefaultFuchsiaResourceDialect,
1194    >;
1195    fn r#get_iface_histogram_stats(&self) -> Self::GetIfaceHistogramStatsResponseFut {
1196        fn _decode(
1197            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1198        ) -> Result<GetIfaceHistogramStatsResponse, fidl::Error> {
1199            let _response = fidl::client::decode_transaction_body::<
1200                MlmeGetIfaceHistogramStatsResponse,
1201                fidl::encoding::DefaultFuchsiaResourceDialect,
1202                0x1979c9d3449f8675,
1203            >(_buf?)?;
1204            Ok(_response.resp)
1205        }
1206        self.client
1207            .send_query_and_decode::<fidl::encoding::EmptyPayload, GetIfaceHistogramStatsResponse>(
1208                (),
1209                0x1979c9d3449f8675,
1210                fidl::encoding::DynamicFlags::empty(),
1211                _decode,
1212            )
1213    }
1214
1215    type GetSignalReportResponseFut = fidl::client::QueryResponseFut<
1216        MlmeGetSignalReportResult,
1217        fidl::encoding::DefaultFuchsiaResourceDialect,
1218    >;
1219    fn r#get_signal_report(&self) -> Self::GetSignalReportResponseFut {
1220        fn _decode(
1221            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1222        ) -> Result<MlmeGetSignalReportResult, fidl::Error> {
1223            let _response = fidl::client::decode_transaction_body::<
1224                fidl::encoding::ResultType<MlmeGetSignalReportResponse, i32>,
1225                fidl::encoding::DefaultFuchsiaResourceDialect,
1226                0x7e47e7ebe92acec9,
1227            >(_buf?)?;
1228            Ok(_response.map(|x| x.resp))
1229        }
1230        self.client
1231            .send_query_and_decode::<fidl::encoding::EmptyPayload, MlmeGetSignalReportResult>(
1232                (),
1233                0x7e47e7ebe92acec9,
1234                fidl::encoding::DynamicFlags::empty(),
1235                _decode,
1236            )
1237    }
1238
1239    type ListMinstrelPeersResponseFut = fidl::client::QueryResponseFut<
1240        MinstrelListResponse,
1241        fidl::encoding::DefaultFuchsiaResourceDialect,
1242    >;
1243    fn r#list_minstrel_peers(&self) -> Self::ListMinstrelPeersResponseFut {
1244        fn _decode(
1245            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1246        ) -> Result<MinstrelListResponse, fidl::Error> {
1247            let _response = fidl::client::decode_transaction_body::<
1248                MlmeListMinstrelPeersResponse,
1249                fidl::encoding::DefaultFuchsiaResourceDialect,
1250                0x4ac5d1e66fe1ffd5,
1251            >(_buf?)?;
1252            Ok(_response.resp)
1253        }
1254        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, MinstrelListResponse>(
1255            (),
1256            0x4ac5d1e66fe1ffd5,
1257            fidl::encoding::DynamicFlags::empty(),
1258            _decode,
1259        )
1260    }
1261
1262    type GetMinstrelStatsResponseFut = fidl::client::QueryResponseFut<
1263        MinstrelStatsResponse,
1264        fidl::encoding::DefaultFuchsiaResourceDialect,
1265    >;
1266    fn r#get_minstrel_stats(
1267        &self,
1268        mut req: &MinstrelStatsRequest,
1269    ) -> Self::GetMinstrelStatsResponseFut {
1270        fn _decode(
1271            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1272        ) -> Result<MinstrelStatsResponse, fidl::Error> {
1273            let _response = fidl::client::decode_transaction_body::<
1274                MlmeGetMinstrelStatsResponse,
1275                fidl::encoding::DefaultFuchsiaResourceDialect,
1276                0x2f688b1245323f4b,
1277            >(_buf?)?;
1278            Ok(_response.resp)
1279        }
1280        self.client.send_query_and_decode::<MlmeGetMinstrelStatsRequest, MinstrelStatsResponse>(
1281            (req,),
1282            0x2f688b1245323f4b,
1283            fidl::encoding::DynamicFlags::empty(),
1284            _decode,
1285        )
1286    }
1287
1288    type StartCaptureFramesResponseFut = fidl::client::QueryResponseFut<
1289        StartCaptureFramesResponse,
1290        fidl::encoding::DefaultFuchsiaResourceDialect,
1291    >;
1292    fn r#start_capture_frames(
1293        &self,
1294        mut req: &StartCaptureFramesRequest,
1295    ) -> Self::StartCaptureFramesResponseFut {
1296        fn _decode(
1297            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1298        ) -> Result<StartCaptureFramesResponse, fidl::Error> {
1299            let _response = fidl::client::decode_transaction_body::<
1300                MlmeStartCaptureFramesResponse,
1301                fidl::encoding::DefaultFuchsiaResourceDialect,
1302                0x23b369ed5749ee69,
1303            >(_buf?)?;
1304            Ok(_response.resp)
1305        }
1306        self.client
1307            .send_query_and_decode::<MlmeStartCaptureFramesRequest, StartCaptureFramesResponse>(
1308                (req,),
1309                0x23b369ed5749ee69,
1310                fidl::encoding::DynamicFlags::empty(),
1311                _decode,
1312            )
1313    }
1314
1315    fn r#stop_capture_frames(&self) -> Result<(), fidl::Error> {
1316        self.client.send::<fidl::encoding::EmptyPayload>(
1317            (),
1318            0x2f1aebbc68bf7c54,
1319            fidl::encoding::DynamicFlags::empty(),
1320        )
1321    }
1322
1323    fn r#sae_handshake_resp(&self, mut resp: &SaeHandshakeResponse) -> Result<(), fidl::Error> {
1324        self.client.send::<MlmeSaeHandshakeRespRequest>(
1325            (resp,),
1326            0x28477bd2f7a5ab0c,
1327            fidl::encoding::DynamicFlags::empty(),
1328        )
1329    }
1330
1331    fn r#sae_frame_tx(&self, mut frame: &SaeFrame) -> Result<(), fidl::Error> {
1332        self.client.send::<MlmeSaeFrameTxRequest>(
1333            (frame,),
1334            0x7700c0d536733d8c,
1335            fidl::encoding::DynamicFlags::empty(),
1336        )
1337    }
1338
1339    fn r#wmm_status_req(&self) -> Result<(), fidl::Error> {
1340        self.client.send::<fidl::encoding::EmptyPayload>(
1341            (),
1342            0xef4851f6088fede,
1343            fidl::encoding::DynamicFlags::empty(),
1344        )
1345    }
1346
1347    fn r#finalize_association_req(
1348        &self,
1349        mut negotiated_capabilities: &NegotiatedCapabilities,
1350    ) -> Result<(), fidl::Error> {
1351        self.client.send::<MlmeFinalizeAssociationReqRequest>(
1352            (negotiated_capabilities,),
1353            0x7aea59787cfd385a,
1354            fidl::encoding::DynamicFlags::empty(),
1355        )
1356    }
1357}
1358
1359pub struct MlmeEventStream {
1360    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1361}
1362
1363impl std::marker::Unpin for MlmeEventStream {}
1364
1365impl futures::stream::FusedStream for MlmeEventStream {
1366    fn is_terminated(&self) -> bool {
1367        self.event_receiver.is_terminated()
1368    }
1369}
1370
1371impl futures::Stream for MlmeEventStream {
1372    type Item = Result<MlmeEvent, fidl::Error>;
1373
1374    fn poll_next(
1375        mut self: std::pin::Pin<&mut Self>,
1376        cx: &mut std::task::Context<'_>,
1377    ) -> std::task::Poll<Option<Self::Item>> {
1378        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1379            &mut self.event_receiver,
1380            cx
1381        )?) {
1382            Some(buf) => std::task::Poll::Ready(Some(MlmeEvent::decode(buf))),
1383            None => std::task::Poll::Ready(None),
1384        }
1385    }
1386}
1387
1388#[derive(Debug)]
1389pub enum MlmeEvent {
1390    OnScanResult { result: ScanResult },
1391    OnScanEnd { end: ScanEnd },
1392    ConnectConf { resp: ConnectConfirm },
1393    RoamConf { conf: RoamConfirm },
1394    RoamStartInd { ind: RoamStartIndication },
1395    RoamResultInd { ind: RoamResultIndication },
1396    AuthenticateInd { ind: AuthenticateIndication },
1397    DeauthenticateConf { resp: DeauthenticateConfirm },
1398    DeauthenticateInd { ind: DeauthenticateIndication },
1399    AssociateInd { ind: AssociateIndication },
1400    DisassociateConf { resp: DisassociateConfirm },
1401    DisassociateInd { ind: DisassociateIndication },
1402    StartConf { resp: StartConfirm },
1403    StopConf { resp: StopConfirm },
1404    SetKeysConf { conf: SetKeysConfirm },
1405    EapolConf { resp: EapolConfirm },
1406    SignalReport { ind: fidl_fuchsia_wlan_internal::SignalReportIndication },
1407    EapolInd { ind: EapolIndication },
1408    RelayCapturedFrame { result: CapturedFrameResult },
1409    OnChannelSwitched { info: fidl_fuchsia_wlan_internal::ChannelSwitchInfo },
1410    OnPmkAvailable { info: PmkInfo },
1411    OnSaeHandshakeInd { ind: SaeHandshakeIndication },
1412    OnSaeFrameRx { frame: SaeFrame },
1413    OnWmmStatusResp { status: i32, resp: fidl_fuchsia_wlan_internal::WmmStatusResponse },
1414}
1415
1416impl MlmeEvent {
1417    #[allow(irrefutable_let_patterns)]
1418    pub fn into_on_scan_result(self) -> Option<ScanResult> {
1419        if let MlmeEvent::OnScanResult { result } = self { Some((result)) } else { None }
1420    }
1421    #[allow(irrefutable_let_patterns)]
1422    pub fn into_on_scan_end(self) -> Option<ScanEnd> {
1423        if let MlmeEvent::OnScanEnd { end } = self { Some((end)) } else { None }
1424    }
1425    #[allow(irrefutable_let_patterns)]
1426    pub fn into_connect_conf(self) -> Option<ConnectConfirm> {
1427        if let MlmeEvent::ConnectConf { resp } = self { Some((resp)) } else { None }
1428    }
1429    #[allow(irrefutable_let_patterns)]
1430    pub fn into_roam_conf(self) -> Option<RoamConfirm> {
1431        if let MlmeEvent::RoamConf { conf } = self { Some((conf)) } else { None }
1432    }
1433    #[allow(irrefutable_let_patterns)]
1434    pub fn into_roam_start_ind(self) -> Option<RoamStartIndication> {
1435        if let MlmeEvent::RoamStartInd { ind } = self { Some((ind)) } else { None }
1436    }
1437    #[allow(irrefutable_let_patterns)]
1438    pub fn into_roam_result_ind(self) -> Option<RoamResultIndication> {
1439        if let MlmeEvent::RoamResultInd { ind } = self { Some((ind)) } else { None }
1440    }
1441    #[allow(irrefutable_let_patterns)]
1442    pub fn into_authenticate_ind(self) -> Option<AuthenticateIndication> {
1443        if let MlmeEvent::AuthenticateInd { ind } = self { Some((ind)) } else { None }
1444    }
1445    #[allow(irrefutable_let_patterns)]
1446    pub fn into_deauthenticate_conf(self) -> Option<DeauthenticateConfirm> {
1447        if let MlmeEvent::DeauthenticateConf { resp } = self { Some((resp)) } else { None }
1448    }
1449    #[allow(irrefutable_let_patterns)]
1450    pub fn into_deauthenticate_ind(self) -> Option<DeauthenticateIndication> {
1451        if let MlmeEvent::DeauthenticateInd { ind } = self { Some((ind)) } else { None }
1452    }
1453    #[allow(irrefutable_let_patterns)]
1454    pub fn into_associate_ind(self) -> Option<AssociateIndication> {
1455        if let MlmeEvent::AssociateInd { ind } = self { Some((ind)) } else { None }
1456    }
1457    #[allow(irrefutable_let_patterns)]
1458    pub fn into_disassociate_conf(self) -> Option<DisassociateConfirm> {
1459        if let MlmeEvent::DisassociateConf { resp } = self { Some((resp)) } else { None }
1460    }
1461    #[allow(irrefutable_let_patterns)]
1462    pub fn into_disassociate_ind(self) -> Option<DisassociateIndication> {
1463        if let MlmeEvent::DisassociateInd { ind } = self { Some((ind)) } else { None }
1464    }
1465    #[allow(irrefutable_let_patterns)]
1466    pub fn into_start_conf(self) -> Option<StartConfirm> {
1467        if let MlmeEvent::StartConf { resp } = self { Some((resp)) } else { None }
1468    }
1469    #[allow(irrefutable_let_patterns)]
1470    pub fn into_stop_conf(self) -> Option<StopConfirm> {
1471        if let MlmeEvent::StopConf { resp } = self { Some((resp)) } else { None }
1472    }
1473    #[allow(irrefutable_let_patterns)]
1474    pub fn into_set_keys_conf(self) -> Option<SetKeysConfirm> {
1475        if let MlmeEvent::SetKeysConf { conf } = self { Some((conf)) } else { None }
1476    }
1477    #[allow(irrefutable_let_patterns)]
1478    pub fn into_eapol_conf(self) -> Option<EapolConfirm> {
1479        if let MlmeEvent::EapolConf { resp } = self { Some((resp)) } else { None }
1480    }
1481    #[allow(irrefutable_let_patterns)]
1482    pub fn into_signal_report(self) -> Option<fidl_fuchsia_wlan_internal::SignalReportIndication> {
1483        if let MlmeEvent::SignalReport { ind } = self { Some((ind)) } else { None }
1484    }
1485    #[allow(irrefutable_let_patterns)]
1486    pub fn into_eapol_ind(self) -> Option<EapolIndication> {
1487        if let MlmeEvent::EapolInd { ind } = self { Some((ind)) } else { None }
1488    }
1489    #[allow(irrefutable_let_patterns)]
1490    pub fn into_relay_captured_frame(self) -> Option<CapturedFrameResult> {
1491        if let MlmeEvent::RelayCapturedFrame { result } = self { Some((result)) } else { None }
1492    }
1493    #[allow(irrefutable_let_patterns)]
1494    pub fn into_on_channel_switched(self) -> Option<fidl_fuchsia_wlan_internal::ChannelSwitchInfo> {
1495        if let MlmeEvent::OnChannelSwitched { info } = self { Some((info)) } else { None }
1496    }
1497    #[allow(irrefutable_let_patterns)]
1498    pub fn into_on_pmk_available(self) -> Option<PmkInfo> {
1499        if let MlmeEvent::OnPmkAvailable { info } = self { Some((info)) } else { None }
1500    }
1501    #[allow(irrefutable_let_patterns)]
1502    pub fn into_on_sae_handshake_ind(self) -> Option<SaeHandshakeIndication> {
1503        if let MlmeEvent::OnSaeHandshakeInd { ind } = self { Some((ind)) } else { None }
1504    }
1505    #[allow(irrefutable_let_patterns)]
1506    pub fn into_on_sae_frame_rx(self) -> Option<SaeFrame> {
1507        if let MlmeEvent::OnSaeFrameRx { frame } = self { Some((frame)) } else { None }
1508    }
1509    #[allow(irrefutable_let_patterns)]
1510    pub fn into_on_wmm_status_resp(
1511        self,
1512    ) -> Option<(i32, fidl_fuchsia_wlan_internal::WmmStatusResponse)> {
1513        if let MlmeEvent::OnWmmStatusResp { status, resp } = self {
1514            Some((status, resp))
1515        } else {
1516            None
1517        }
1518    }
1519
1520    /// Decodes a message buffer as a [`MlmeEvent`].
1521    fn decode(
1522        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1523    ) -> Result<MlmeEvent, fidl::Error> {
1524        let (bytes, _handles) = buf.split_mut();
1525        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1526        debug_assert_eq!(tx_header.tx_id, 0);
1527        match tx_header.ordinal {
1528            0x681af7466a75074d => {
1529                let mut out = fidl::new_empty!(
1530                    MlmeOnScanResultRequest,
1531                    fidl::encoding::DefaultFuchsiaResourceDialect
1532                );
1533                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnScanResultRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1534                Ok((MlmeEvent::OnScanResult { result: out.result }))
1535            }
1536            0x7f2702d253e7ca59 => {
1537                let mut out = fidl::new_empty!(
1538                    MlmeOnScanEndRequest,
1539                    fidl::encoding::DefaultFuchsiaResourceDialect
1540                );
1541                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnScanEndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1542                Ok((MlmeEvent::OnScanEnd { end: out.end }))
1543            }
1544            0x77b27623279b981e => {
1545                let mut out = fidl::new_empty!(
1546                    MlmeConnectConfRequest,
1547                    fidl::encoding::DefaultFuchsiaResourceDialect
1548                );
1549                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeConnectConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1550                Ok((MlmeEvent::ConnectConf { resp: out.resp }))
1551            }
1552            0x3f608034faa054bc => {
1553                let mut out = fidl::new_empty!(
1554                    MlmeRoamConfRequest,
1555                    fidl::encoding::DefaultFuchsiaResourceDialect
1556                );
1557                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeRoamConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1558                Ok((MlmeEvent::RoamConf { conf: out.conf }))
1559            }
1560            0x270a1ec78672d094 => {
1561                let mut out = fidl::new_empty!(
1562                    MlmeRoamStartIndRequest,
1563                    fidl::encoding::DefaultFuchsiaResourceDialect
1564                );
1565                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeRoamStartIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1566                Ok((MlmeEvent::RoamStartInd { ind: out.ind }))
1567            }
1568            0x26d074364fc84865 => {
1569                let mut out = fidl::new_empty!(
1570                    MlmeRoamResultIndRequest,
1571                    fidl::encoding::DefaultFuchsiaResourceDialect
1572                );
1573                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeRoamResultIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1574                Ok((MlmeEvent::RoamResultInd { ind: out.ind }))
1575            }
1576            0x460f49ae891adbe9 => {
1577                let mut out = fidl::new_empty!(
1578                    MlmeAuthenticateIndRequest,
1579                    fidl::encoding::DefaultFuchsiaResourceDialect
1580                );
1581                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeAuthenticateIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1582                Ok((MlmeEvent::AuthenticateInd { ind: out.ind }))
1583            }
1584            0x3b44debc21b88c8c => {
1585                let mut out = fidl::new_empty!(
1586                    MlmeDeauthenticateConfRequest,
1587                    fidl::encoding::DefaultFuchsiaResourceDialect
1588                );
1589                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDeauthenticateConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1590                Ok((MlmeEvent::DeauthenticateConf { resp: out.resp }))
1591            }
1592            0x7ee0889b326da1d7 => {
1593                let mut out = fidl::new_empty!(
1594                    MlmeDeauthenticateIndRequest,
1595                    fidl::encoding::DefaultFuchsiaResourceDialect
1596                );
1597                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDeauthenticateIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1598                Ok((MlmeEvent::DeauthenticateInd { ind: out.ind }))
1599            }
1600            0x6a86f20e3063dd63 => {
1601                let mut out = fidl::new_empty!(
1602                    MlmeAssociateIndRequest,
1603                    fidl::encoding::DefaultFuchsiaResourceDialect
1604                );
1605                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeAssociateIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1606                Ok((MlmeEvent::AssociateInd { ind: out.ind }))
1607            }
1608            0x61345fbce732a28d => {
1609                let mut out = fidl::new_empty!(
1610                    MlmeDisassociateConfRequest,
1611                    fidl::encoding::DefaultFuchsiaResourceDialect
1612                );
1613                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDisassociateConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1614                Ok((MlmeEvent::DisassociateConf { resp: out.resp }))
1615            }
1616            0x77ac0ebf387c1f35 => {
1617                let mut out = fidl::new_empty!(
1618                    MlmeDisassociateIndRequest,
1619                    fidl::encoding::DefaultFuchsiaResourceDialect
1620                );
1621                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDisassociateIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1622                Ok((MlmeEvent::DisassociateInd { ind: out.ind }))
1623            }
1624            0x15ea6cdf3b8382b3 => {
1625                let mut out = fidl::new_empty!(
1626                    MlmeStartConfRequest,
1627                    fidl::encoding::DefaultFuchsiaResourceDialect
1628                );
1629                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStartConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1630                Ok((MlmeEvent::StartConf { resp: out.resp }))
1631            }
1632            0x50b426ef4a84a2df => {
1633                let mut out = fidl::new_empty!(
1634                    MlmeStopConfRequest,
1635                    fidl::encoding::DefaultFuchsiaResourceDialect
1636                );
1637                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStopConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1638                Ok((MlmeEvent::StopConf { resp: out.resp }))
1639            }
1640            0x5bafb3a8d4039380 => {
1641                let mut out = fidl::new_empty!(
1642                    MlmeSetKeysConfRequest,
1643                    fidl::encoding::DefaultFuchsiaResourceDialect
1644                );
1645                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSetKeysConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1646                Ok((MlmeEvent::SetKeysConf { conf: out.conf }))
1647            }
1648            0x6ffa21f4ee73ce64 => {
1649                let mut out = fidl::new_empty!(
1650                    MlmeEapolConfRequest,
1651                    fidl::encoding::DefaultFuchsiaResourceDialect
1652                );
1653                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeEapolConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1654                Ok((MlmeEvent::EapolConf { resp: out.resp }))
1655            }
1656            0x48f32a876aa53d8f => {
1657                let mut out = fidl::new_empty!(
1658                    MlmeSignalReportRequest,
1659                    fidl::encoding::DefaultFuchsiaResourceDialect
1660                );
1661                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSignalReportRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1662                Ok((MlmeEvent::SignalReport { ind: out.ind }))
1663            }
1664            0x7038dca46a3142fc => {
1665                let mut out = fidl::new_empty!(
1666                    MlmeEapolIndRequest,
1667                    fidl::encoding::DefaultFuchsiaResourceDialect
1668                );
1669                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeEapolIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1670                Ok((MlmeEvent::EapolInd { ind: out.ind }))
1671            }
1672            0x6f00a6f3cff9b1f5 => {
1673                let mut out = fidl::new_empty!(
1674                    MlmeRelayCapturedFrameRequest,
1675                    fidl::encoding::DefaultFuchsiaResourceDialect
1676                );
1677                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeRelayCapturedFrameRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1678                Ok((MlmeEvent::RelayCapturedFrame { result: out.result }))
1679            }
1680            0x581750594e4c0c1 => {
1681                let mut out = fidl::new_empty!(
1682                    MlmeOnChannelSwitchedRequest,
1683                    fidl::encoding::DefaultFuchsiaResourceDialect
1684                );
1685                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnChannelSwitchedRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1686                Ok((MlmeEvent::OnChannelSwitched { info: out.info }))
1687            }
1688            0x1314fc2c79643f90 => {
1689                let mut out = fidl::new_empty!(
1690                    MlmeOnPmkAvailableRequest,
1691                    fidl::encoding::DefaultFuchsiaResourceDialect
1692                );
1693                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnPmkAvailableRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1694                Ok((MlmeEvent::OnPmkAvailable { info: out.info }))
1695            }
1696            0x6308b10e18986d7e => {
1697                let mut out = fidl::new_empty!(
1698                    MlmeOnSaeHandshakeIndRequest,
1699                    fidl::encoding::DefaultFuchsiaResourceDialect
1700                );
1701                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnSaeHandshakeIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1702                Ok((MlmeEvent::OnSaeHandshakeInd { ind: out.ind }))
1703            }
1704            0x4ebf51c86ef5f3cd => {
1705                let mut out = fidl::new_empty!(
1706                    MlmeOnSaeFrameRxRequest,
1707                    fidl::encoding::DefaultFuchsiaResourceDialect
1708                );
1709                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnSaeFrameRxRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1710                Ok((MlmeEvent::OnSaeFrameRx { frame: out.frame }))
1711            }
1712            0x53f056b432e7b5cb => {
1713                let mut out = fidl::new_empty!(
1714                    MlmeOnWmmStatusRespRequest,
1715                    fidl::encoding::DefaultFuchsiaResourceDialect
1716                );
1717                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnWmmStatusRespRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1718                Ok((MlmeEvent::OnWmmStatusResp { status: out.status, resp: out.resp }))
1719            }
1720            _ => Err(fidl::Error::UnknownOrdinal {
1721                ordinal: tx_header.ordinal,
1722                protocol_name: <MlmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1723            }),
1724        }
1725    }
1726}
1727
1728/// A Stream of incoming requests for fuchsia.wlan.mlme/MLME.
1729pub struct MlmeRequestStream {
1730    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1731    is_terminated: bool,
1732}
1733
1734impl std::marker::Unpin for MlmeRequestStream {}
1735
1736impl futures::stream::FusedStream for MlmeRequestStream {
1737    fn is_terminated(&self) -> bool {
1738        self.is_terminated
1739    }
1740}
1741
1742impl fidl::endpoints::RequestStream for MlmeRequestStream {
1743    type Protocol = MlmeMarker;
1744    type ControlHandle = MlmeControlHandle;
1745
1746    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1747        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1748    }
1749
1750    fn control_handle(&self) -> Self::ControlHandle {
1751        MlmeControlHandle { inner: self.inner.clone() }
1752    }
1753
1754    fn into_inner(
1755        self,
1756    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1757    {
1758        (self.inner, self.is_terminated)
1759    }
1760
1761    fn from_inner(
1762        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1763        is_terminated: bool,
1764    ) -> Self {
1765        Self { inner, is_terminated }
1766    }
1767}
1768
1769impl futures::Stream for MlmeRequestStream {
1770    type Item = Result<MlmeRequest, fidl::Error>;
1771
1772    fn poll_next(
1773        mut self: std::pin::Pin<&mut Self>,
1774        cx: &mut std::task::Context<'_>,
1775    ) -> std::task::Poll<Option<Self::Item>> {
1776        let this = &mut *self;
1777        if this.inner.check_shutdown(cx) {
1778            this.is_terminated = true;
1779            return std::task::Poll::Ready(None);
1780        }
1781        if this.is_terminated {
1782            panic!("polled MlmeRequestStream after completion");
1783        }
1784        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1785            |bytes, handles| {
1786                match this.inner.channel().read_etc(cx, bytes, handles) {
1787                    std::task::Poll::Ready(Ok(())) => {}
1788                    std::task::Poll::Pending => return std::task::Poll::Pending,
1789                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1790                        this.is_terminated = true;
1791                        return std::task::Poll::Ready(None);
1792                    }
1793                    std::task::Poll::Ready(Err(e)) => {
1794                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1795                            e.into(),
1796                        ))));
1797                    }
1798                }
1799
1800                // A message has been received from the channel
1801                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1802
1803                std::task::Poll::Ready(Some(match header.ordinal {
1804                    0x342cc5ec6a957479 => {
1805                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1806                        let mut req = fidl::new_empty!(
1807                            MlmeStartScanRequest,
1808                            fidl::encoding::DefaultFuchsiaResourceDialect
1809                        );
1810                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStartScanRequest>(&header, _body_bytes, handles, &mut req)?;
1811                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1812                        Ok(MlmeRequest::StartScan { req: req.req, control_handle })
1813                    }
1814                    0x31153dc85f8f64c => {
1815                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1816                        let mut req = fidl::new_empty!(
1817                            MlmeConnectReqRequest,
1818                            fidl::encoding::DefaultFuchsiaResourceDialect
1819                        );
1820                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeConnectReqRequest>(&header, _body_bytes, handles, &mut req)?;
1821                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1822                        Ok(MlmeRequest::ConnectReq { req: req.req, control_handle })
1823                    }
1824                    0x74e0f1bd758b6b78 => {
1825                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1826                        let mut req = fidl::new_empty!(
1827                            MlmeReconnectReqRequest,
1828                            fidl::encoding::DefaultFuchsiaResourceDialect
1829                        );
1830                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeReconnectReqRequest>(&header, _body_bytes, handles, &mut req)?;
1831                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1832                        Ok(MlmeRequest::ReconnectReq { req: req.req, control_handle })
1833                    }
1834                    0x3ba163eadf7dba45 => {
1835                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1836                        let mut req = fidl::new_empty!(
1837                            MlmeRoamReqRequest,
1838                            fidl::encoding::DefaultFuchsiaResourceDialect
1839                        );
1840                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeRoamReqRequest>(&header, _body_bytes, handles, &mut req)?;
1841                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1842                        Ok(MlmeRequest::RoamReq { req: req.req, control_handle })
1843                    }
1844                    0x26108aade2fdd2f4 => {
1845                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1846                        let mut req = fidl::new_empty!(
1847                            MlmeAuthenticateRespRequest,
1848                            fidl::encoding::DefaultFuchsiaResourceDialect
1849                        );
1850                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeAuthenticateRespRequest>(&header, _body_bytes, handles, &mut req)?;
1851                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1852                        Ok(MlmeRequest::AuthenticateResp { resp: req.resp, control_handle })
1853                    }
1854                    0x228983b200de5d12 => {
1855                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1856                        let mut req = fidl::new_empty!(
1857                            MlmeDeauthenticateReqRequest,
1858                            fidl::encoding::DefaultFuchsiaResourceDialect
1859                        );
1860                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDeauthenticateReqRequest>(&header, _body_bytes, handles, &mut req)?;
1861                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1862                        Ok(MlmeRequest::DeauthenticateReq { req: req.req, control_handle })
1863                    }
1864                    0x70244dbd652ed6d9 => {
1865                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1866                        let mut req = fidl::new_empty!(
1867                            MlmeAssociateRespRequest,
1868                            fidl::encoding::DefaultFuchsiaResourceDialect
1869                        );
1870                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeAssociateRespRequest>(&header, _body_bytes, handles, &mut req)?;
1871                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1872                        Ok(MlmeRequest::AssociateResp { resp: req.resp, control_handle })
1873                    }
1874                    0x5765807f1387d764 => {
1875                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1876                        let mut req = fidl::new_empty!(
1877                            MlmeDisassociateReqRequest,
1878                            fidl::encoding::DefaultFuchsiaResourceDialect
1879                        );
1880                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDisassociateReqRequest>(&header, _body_bytes, handles, &mut req)?;
1881                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1882                        Ok(MlmeRequest::DisassociateReq { req: req.req, control_handle })
1883                    }
1884                    0x780b98c58a286b9f => {
1885                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1886                        let mut req = fidl::new_empty!(
1887                            MlmeResetReqRequest,
1888                            fidl::encoding::DefaultFuchsiaResourceDialect
1889                        );
1890                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeResetReqRequest>(&header, _body_bytes, handles, &mut req)?;
1891                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1892                        Ok(MlmeRequest::ResetReq { req: req.req, control_handle })
1893                    }
1894                    0x5d95885f8053654 => {
1895                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1896                        let mut req = fidl::new_empty!(
1897                            MlmeStartReqRequest,
1898                            fidl::encoding::DefaultFuchsiaResourceDialect
1899                        );
1900                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStartReqRequest>(&header, _body_bytes, handles, &mut req)?;
1901                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1902                        Ok(MlmeRequest::StartReq { req: req.req, control_handle })
1903                    }
1904                    0x27b9a2ab04a2c79f => {
1905                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1906                        let mut req = fidl::new_empty!(
1907                            MlmeStopReqRequest,
1908                            fidl::encoding::DefaultFuchsiaResourceDialect
1909                        );
1910                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStopReqRequest>(&header, _body_bytes, handles, &mut req)?;
1911                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1912                        Ok(MlmeRequest::StopReq { req: req.req, control_handle })
1913                    }
1914                    0x6b30a07fd3a11a79 => {
1915                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1916                        let mut req = fidl::new_empty!(
1917                            MlmeSetKeysReqRequest,
1918                            fidl::encoding::DefaultFuchsiaResourceDialect
1919                        );
1920                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSetKeysReqRequest>(&header, _body_bytes, handles, &mut req)?;
1921                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1922                        Ok(MlmeRequest::SetKeysReq { req: req.req, control_handle })
1923                    }
1924                    0x1e3524d20d190c8f => {
1925                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1926                        let mut req = fidl::new_empty!(
1927                            MlmeDeleteKeysReqRequest,
1928                            fidl::encoding::DefaultFuchsiaResourceDialect
1929                        );
1930                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDeleteKeysReqRequest>(&header, _body_bytes, handles, &mut req)?;
1931                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1932                        Ok(MlmeRequest::DeleteKeysReq { req: req.req, control_handle })
1933                    }
1934                    0xc3c096924704d4 => {
1935                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1936                        let mut req = fidl::new_empty!(
1937                            MlmeEapolReqRequest,
1938                            fidl::encoding::DefaultFuchsiaResourceDialect
1939                        );
1940                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeEapolReqRequest>(&header, _body_bytes, handles, &mut req)?;
1941                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1942                        Ok(MlmeRequest::EapolReq { req: req.req, control_handle })
1943                    }
1944                    0x4e47065668890c8d => {
1945                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1946                        let mut req = fidl::new_empty!(
1947                            MlmeSetControlledPortRequest,
1948                            fidl::encoding::DefaultFuchsiaResourceDialect
1949                        );
1950                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSetControlledPortRequest>(&header, _body_bytes, handles, &mut req)?;
1951                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1952                        Ok(MlmeRequest::SetControlledPort { req: req.req, control_handle })
1953                    }
1954                    0x6ee3e7f63f2b7bc0 => {
1955                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1956                        let mut req = fidl::new_empty!(
1957                            fidl::encoding::EmptyPayload,
1958                            fidl::encoding::DefaultFuchsiaResourceDialect
1959                        );
1960                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1961                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1962                        Ok(MlmeRequest::QueryDeviceInfo {
1963                            responder: MlmeQueryDeviceInfoResponder {
1964                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1965                                tx_id: header.tx_id,
1966                            },
1967                        })
1968                    }
1969                    0x1598879b70332c99 => {
1970                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1971                        let mut req = fidl::new_empty!(
1972                            fidl::encoding::EmptyPayload,
1973                            fidl::encoding::DefaultFuchsiaResourceDialect
1974                        );
1975                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1976                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1977                        Ok(MlmeRequest::QueryTelemetrySupport {
1978                            responder: MlmeQueryTelemetrySupportResponder {
1979                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1980                                tx_id: header.tx_id,
1981                            },
1982                        })
1983                    }
1984                    0xede1a8342d1b211 => {
1985                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1986                        let mut req = fidl::new_empty!(
1987                            fidl::encoding::EmptyPayload,
1988                            fidl::encoding::DefaultFuchsiaResourceDialect
1989                        );
1990                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1991                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1992                        Ok(MlmeRequest::GetIfaceStats {
1993                            responder: MlmeGetIfaceStatsResponder {
1994                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1995                                tx_id: header.tx_id,
1996                            },
1997                        })
1998                    }
1999                    0x1979c9d3449f8675 => {
2000                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2001                        let mut req = fidl::new_empty!(
2002                            fidl::encoding::EmptyPayload,
2003                            fidl::encoding::DefaultFuchsiaResourceDialect
2004                        );
2005                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2006                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2007                        Ok(MlmeRequest::GetIfaceHistogramStats {
2008                            responder: MlmeGetIfaceHistogramStatsResponder {
2009                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2010                                tx_id: header.tx_id,
2011                            },
2012                        })
2013                    }
2014                    0x7e47e7ebe92acec9 => {
2015                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2016                        let mut req = fidl::new_empty!(
2017                            fidl::encoding::EmptyPayload,
2018                            fidl::encoding::DefaultFuchsiaResourceDialect
2019                        );
2020                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2021                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2022                        Ok(MlmeRequest::GetSignalReport {
2023                            responder: MlmeGetSignalReportResponder {
2024                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2025                                tx_id: header.tx_id,
2026                            },
2027                        })
2028                    }
2029                    0x4ac5d1e66fe1ffd5 => {
2030                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2031                        let mut req = fidl::new_empty!(
2032                            fidl::encoding::EmptyPayload,
2033                            fidl::encoding::DefaultFuchsiaResourceDialect
2034                        );
2035                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2036                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2037                        Ok(MlmeRequest::ListMinstrelPeers {
2038                            responder: MlmeListMinstrelPeersResponder {
2039                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2040                                tx_id: header.tx_id,
2041                            },
2042                        })
2043                    }
2044                    0x2f688b1245323f4b => {
2045                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2046                        let mut req = fidl::new_empty!(
2047                            MlmeGetMinstrelStatsRequest,
2048                            fidl::encoding::DefaultFuchsiaResourceDialect
2049                        );
2050                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeGetMinstrelStatsRequest>(&header, _body_bytes, handles, &mut req)?;
2051                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2052                        Ok(MlmeRequest::GetMinstrelStats {
2053                            req: req.req,
2054
2055                            responder: MlmeGetMinstrelStatsResponder {
2056                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2057                                tx_id: header.tx_id,
2058                            },
2059                        })
2060                    }
2061                    0x23b369ed5749ee69 => {
2062                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2063                        let mut req = fidl::new_empty!(
2064                            MlmeStartCaptureFramesRequest,
2065                            fidl::encoding::DefaultFuchsiaResourceDialect
2066                        );
2067                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStartCaptureFramesRequest>(&header, _body_bytes, handles, &mut req)?;
2068                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2069                        Ok(MlmeRequest::StartCaptureFrames {
2070                            req: req.req,
2071
2072                            responder: MlmeStartCaptureFramesResponder {
2073                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2074                                tx_id: header.tx_id,
2075                            },
2076                        })
2077                    }
2078                    0x2f1aebbc68bf7c54 => {
2079                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2080                        let mut req = fidl::new_empty!(
2081                            fidl::encoding::EmptyPayload,
2082                            fidl::encoding::DefaultFuchsiaResourceDialect
2083                        );
2084                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2085                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2086                        Ok(MlmeRequest::StopCaptureFrames { control_handle })
2087                    }
2088                    0x28477bd2f7a5ab0c => {
2089                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2090                        let mut req = fidl::new_empty!(
2091                            MlmeSaeHandshakeRespRequest,
2092                            fidl::encoding::DefaultFuchsiaResourceDialect
2093                        );
2094                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSaeHandshakeRespRequest>(&header, _body_bytes, handles, &mut req)?;
2095                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2096                        Ok(MlmeRequest::SaeHandshakeResp { resp: req.resp, control_handle })
2097                    }
2098                    0x7700c0d536733d8c => {
2099                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2100                        let mut req = fidl::new_empty!(
2101                            MlmeSaeFrameTxRequest,
2102                            fidl::encoding::DefaultFuchsiaResourceDialect
2103                        );
2104                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSaeFrameTxRequest>(&header, _body_bytes, handles, &mut req)?;
2105                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2106                        Ok(MlmeRequest::SaeFrameTx { frame: req.frame, control_handle })
2107                    }
2108                    0xef4851f6088fede => {
2109                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2110                        let mut req = fidl::new_empty!(
2111                            fidl::encoding::EmptyPayload,
2112                            fidl::encoding::DefaultFuchsiaResourceDialect
2113                        );
2114                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2115                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2116                        Ok(MlmeRequest::WmmStatusReq { control_handle })
2117                    }
2118                    0x7aea59787cfd385a => {
2119                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2120                        let mut req = fidl::new_empty!(
2121                            MlmeFinalizeAssociationReqRequest,
2122                            fidl::encoding::DefaultFuchsiaResourceDialect
2123                        );
2124                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeFinalizeAssociationReqRequest>(&header, _body_bytes, handles, &mut req)?;
2125                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2126                        Ok(MlmeRequest::FinalizeAssociationReq {
2127                            negotiated_capabilities: req.negotiated_capabilities,
2128
2129                            control_handle,
2130                        })
2131                    }
2132                    _ => Err(fidl::Error::UnknownOrdinal {
2133                        ordinal: header.ordinal,
2134                        protocol_name: <MlmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2135                    }),
2136                }))
2137            },
2138        )
2139    }
2140}
2141
2142#[derive(Debug)]
2143pub enum MlmeRequest {
2144    StartScan {
2145        req: ScanRequest,
2146        control_handle: MlmeControlHandle,
2147    },
2148    ConnectReq {
2149        req: ConnectRequest,
2150        control_handle: MlmeControlHandle,
2151    },
2152    ReconnectReq {
2153        req: ReconnectRequest,
2154        control_handle: MlmeControlHandle,
2155    },
2156    /// Initiate a roam attempt (SME-initiated).
2157    RoamReq {
2158        req: RoamRequest,
2159        control_handle: MlmeControlHandle,
2160    },
2161    AuthenticateResp {
2162        resp: AuthenticateResponse,
2163        control_handle: MlmeControlHandle,
2164    },
2165    DeauthenticateReq {
2166        req: DeauthenticateRequest,
2167        control_handle: MlmeControlHandle,
2168    },
2169    AssociateResp {
2170        resp: AssociateResponse,
2171        control_handle: MlmeControlHandle,
2172    },
2173    DisassociateReq {
2174        req: DisassociateRequest,
2175        control_handle: MlmeControlHandle,
2176    },
2177    ResetReq {
2178        req: ResetRequest,
2179        control_handle: MlmeControlHandle,
2180    },
2181    StartReq {
2182        req: StartRequest,
2183        control_handle: MlmeControlHandle,
2184    },
2185    StopReq {
2186        req: StopRequest,
2187        control_handle: MlmeControlHandle,
2188    },
2189    SetKeysReq {
2190        req: SetKeysRequest,
2191        control_handle: MlmeControlHandle,
2192    },
2193    DeleteKeysReq {
2194        req: DeleteKeysRequest,
2195        control_handle: MlmeControlHandle,
2196    },
2197    EapolReq {
2198        req: EapolRequest,
2199        control_handle: MlmeControlHandle,
2200    },
2201    SetControlledPort {
2202        req: SetControlledPortRequest,
2203        control_handle: MlmeControlHandle,
2204    },
2205    QueryDeviceInfo {
2206        responder: MlmeQueryDeviceInfoResponder,
2207    },
2208    QueryTelemetrySupport {
2209        responder: MlmeQueryTelemetrySupportResponder,
2210    },
2211    GetIfaceStats {
2212        responder: MlmeGetIfaceStatsResponder,
2213    },
2214    GetIfaceHistogramStats {
2215        responder: MlmeGetIfaceHistogramStatsResponder,
2216    },
2217    GetSignalReport {
2218        responder: MlmeGetSignalReportResponder,
2219    },
2220    ListMinstrelPeers {
2221        responder: MlmeListMinstrelPeersResponder,
2222    },
2223    GetMinstrelStats {
2224        req: MinstrelStatsRequest,
2225        responder: MlmeGetMinstrelStatsResponder,
2226    },
2227    StartCaptureFrames {
2228        req: StartCaptureFramesRequest,
2229        responder: MlmeStartCaptureFramesResponder,
2230    },
2231    StopCaptureFrames {
2232        control_handle: MlmeControlHandle,
2233    },
2234    /// Notifies that SAE authentication is completed.
2235    SaeHandshakeResp {
2236        resp: SaeHandshakeResponse,
2237        control_handle: MlmeControlHandle,
2238    },
2239    /// Transmits SAE frame (if SME is managing SAE authentication).
2240    SaeFrameTx {
2241        frame: SaeFrame,
2242        control_handle: MlmeControlHandle,
2243    },
2244    WmmStatusReq {
2245        control_handle: MlmeControlHandle,
2246    },
2247    FinalizeAssociationReq {
2248        negotiated_capabilities: NegotiatedCapabilities,
2249        control_handle: MlmeControlHandle,
2250    },
2251}
2252
2253impl MlmeRequest {
2254    #[allow(irrefutable_let_patterns)]
2255    pub fn into_start_scan(self) -> Option<(ScanRequest, MlmeControlHandle)> {
2256        if let MlmeRequest::StartScan { req, control_handle } = self {
2257            Some((req, control_handle))
2258        } else {
2259            None
2260        }
2261    }
2262
2263    #[allow(irrefutable_let_patterns)]
2264    pub fn into_connect_req(self) -> Option<(ConnectRequest, MlmeControlHandle)> {
2265        if let MlmeRequest::ConnectReq { req, control_handle } = self {
2266            Some((req, control_handle))
2267        } else {
2268            None
2269        }
2270    }
2271
2272    #[allow(irrefutable_let_patterns)]
2273    pub fn into_reconnect_req(self) -> Option<(ReconnectRequest, MlmeControlHandle)> {
2274        if let MlmeRequest::ReconnectReq { req, control_handle } = self {
2275            Some((req, control_handle))
2276        } else {
2277            None
2278        }
2279    }
2280
2281    #[allow(irrefutable_let_patterns)]
2282    pub fn into_roam_req(self) -> Option<(RoamRequest, MlmeControlHandle)> {
2283        if let MlmeRequest::RoamReq { req, control_handle } = self {
2284            Some((req, control_handle))
2285        } else {
2286            None
2287        }
2288    }
2289
2290    #[allow(irrefutable_let_patterns)]
2291    pub fn into_authenticate_resp(self) -> Option<(AuthenticateResponse, MlmeControlHandle)> {
2292        if let MlmeRequest::AuthenticateResp { resp, control_handle } = self {
2293            Some((resp, control_handle))
2294        } else {
2295            None
2296        }
2297    }
2298
2299    #[allow(irrefutable_let_patterns)]
2300    pub fn into_deauthenticate_req(self) -> Option<(DeauthenticateRequest, MlmeControlHandle)> {
2301        if let MlmeRequest::DeauthenticateReq { req, control_handle } = self {
2302            Some((req, control_handle))
2303        } else {
2304            None
2305        }
2306    }
2307
2308    #[allow(irrefutable_let_patterns)]
2309    pub fn into_associate_resp(self) -> Option<(AssociateResponse, MlmeControlHandle)> {
2310        if let MlmeRequest::AssociateResp { resp, control_handle } = self {
2311            Some((resp, control_handle))
2312        } else {
2313            None
2314        }
2315    }
2316
2317    #[allow(irrefutable_let_patterns)]
2318    pub fn into_disassociate_req(self) -> Option<(DisassociateRequest, MlmeControlHandle)> {
2319        if let MlmeRequest::DisassociateReq { req, control_handle } = self {
2320            Some((req, control_handle))
2321        } else {
2322            None
2323        }
2324    }
2325
2326    #[allow(irrefutable_let_patterns)]
2327    pub fn into_reset_req(self) -> Option<(ResetRequest, MlmeControlHandle)> {
2328        if let MlmeRequest::ResetReq { req, control_handle } = self {
2329            Some((req, control_handle))
2330        } else {
2331            None
2332        }
2333    }
2334
2335    #[allow(irrefutable_let_patterns)]
2336    pub fn into_start_req(self) -> Option<(StartRequest, MlmeControlHandle)> {
2337        if let MlmeRequest::StartReq { req, control_handle } = self {
2338            Some((req, control_handle))
2339        } else {
2340            None
2341        }
2342    }
2343
2344    #[allow(irrefutable_let_patterns)]
2345    pub fn into_stop_req(self) -> Option<(StopRequest, MlmeControlHandle)> {
2346        if let MlmeRequest::StopReq { req, control_handle } = self {
2347            Some((req, control_handle))
2348        } else {
2349            None
2350        }
2351    }
2352
2353    #[allow(irrefutable_let_patterns)]
2354    pub fn into_set_keys_req(self) -> Option<(SetKeysRequest, MlmeControlHandle)> {
2355        if let MlmeRequest::SetKeysReq { req, control_handle } = self {
2356            Some((req, control_handle))
2357        } else {
2358            None
2359        }
2360    }
2361
2362    #[allow(irrefutable_let_patterns)]
2363    pub fn into_delete_keys_req(self) -> Option<(DeleteKeysRequest, MlmeControlHandle)> {
2364        if let MlmeRequest::DeleteKeysReq { req, control_handle } = self {
2365            Some((req, control_handle))
2366        } else {
2367            None
2368        }
2369    }
2370
2371    #[allow(irrefutable_let_patterns)]
2372    pub fn into_eapol_req(self) -> Option<(EapolRequest, MlmeControlHandle)> {
2373        if let MlmeRequest::EapolReq { req, control_handle } = self {
2374            Some((req, control_handle))
2375        } else {
2376            None
2377        }
2378    }
2379
2380    #[allow(irrefutable_let_patterns)]
2381    pub fn into_set_controlled_port(self) -> Option<(SetControlledPortRequest, MlmeControlHandle)> {
2382        if let MlmeRequest::SetControlledPort { req, control_handle } = self {
2383            Some((req, control_handle))
2384        } else {
2385            None
2386        }
2387    }
2388
2389    #[allow(irrefutable_let_patterns)]
2390    pub fn into_query_device_info(self) -> Option<(MlmeQueryDeviceInfoResponder)> {
2391        if let MlmeRequest::QueryDeviceInfo { responder } = self { Some((responder)) } else { None }
2392    }
2393
2394    #[allow(irrefutable_let_patterns)]
2395    pub fn into_query_telemetry_support(self) -> Option<(MlmeQueryTelemetrySupportResponder)> {
2396        if let MlmeRequest::QueryTelemetrySupport { responder } = self {
2397            Some((responder))
2398        } else {
2399            None
2400        }
2401    }
2402
2403    #[allow(irrefutable_let_patterns)]
2404    pub fn into_get_iface_stats(self) -> Option<(MlmeGetIfaceStatsResponder)> {
2405        if let MlmeRequest::GetIfaceStats { responder } = self { Some((responder)) } else { None }
2406    }
2407
2408    #[allow(irrefutable_let_patterns)]
2409    pub fn into_get_iface_histogram_stats(self) -> Option<(MlmeGetIfaceHistogramStatsResponder)> {
2410        if let MlmeRequest::GetIfaceHistogramStats { responder } = self {
2411            Some((responder))
2412        } else {
2413            None
2414        }
2415    }
2416
2417    #[allow(irrefutable_let_patterns)]
2418    pub fn into_get_signal_report(self) -> Option<(MlmeGetSignalReportResponder)> {
2419        if let MlmeRequest::GetSignalReport { responder } = self { Some((responder)) } else { None }
2420    }
2421
2422    #[allow(irrefutable_let_patterns)]
2423    pub fn into_list_minstrel_peers(self) -> Option<(MlmeListMinstrelPeersResponder)> {
2424        if let MlmeRequest::ListMinstrelPeers { responder } = self {
2425            Some((responder))
2426        } else {
2427            None
2428        }
2429    }
2430
2431    #[allow(irrefutable_let_patterns)]
2432    pub fn into_get_minstrel_stats(
2433        self,
2434    ) -> Option<(MinstrelStatsRequest, MlmeGetMinstrelStatsResponder)> {
2435        if let MlmeRequest::GetMinstrelStats { req, responder } = self {
2436            Some((req, responder))
2437        } else {
2438            None
2439        }
2440    }
2441
2442    #[allow(irrefutable_let_patterns)]
2443    pub fn into_start_capture_frames(
2444        self,
2445    ) -> Option<(StartCaptureFramesRequest, MlmeStartCaptureFramesResponder)> {
2446        if let MlmeRequest::StartCaptureFrames { req, responder } = self {
2447            Some((req, responder))
2448        } else {
2449            None
2450        }
2451    }
2452
2453    #[allow(irrefutable_let_patterns)]
2454    pub fn into_stop_capture_frames(self) -> Option<(MlmeControlHandle)> {
2455        if let MlmeRequest::StopCaptureFrames { control_handle } = self {
2456            Some((control_handle))
2457        } else {
2458            None
2459        }
2460    }
2461
2462    #[allow(irrefutable_let_patterns)]
2463    pub fn into_sae_handshake_resp(self) -> Option<(SaeHandshakeResponse, MlmeControlHandle)> {
2464        if let MlmeRequest::SaeHandshakeResp { resp, control_handle } = self {
2465            Some((resp, control_handle))
2466        } else {
2467            None
2468        }
2469    }
2470
2471    #[allow(irrefutable_let_patterns)]
2472    pub fn into_sae_frame_tx(self) -> Option<(SaeFrame, MlmeControlHandle)> {
2473        if let MlmeRequest::SaeFrameTx { frame, control_handle } = self {
2474            Some((frame, control_handle))
2475        } else {
2476            None
2477        }
2478    }
2479
2480    #[allow(irrefutable_let_patterns)]
2481    pub fn into_wmm_status_req(self) -> Option<(MlmeControlHandle)> {
2482        if let MlmeRequest::WmmStatusReq { control_handle } = self {
2483            Some((control_handle))
2484        } else {
2485            None
2486        }
2487    }
2488
2489    #[allow(irrefutable_let_patterns)]
2490    pub fn into_finalize_association_req(
2491        self,
2492    ) -> Option<(NegotiatedCapabilities, MlmeControlHandle)> {
2493        if let MlmeRequest::FinalizeAssociationReq { negotiated_capabilities, control_handle } =
2494            self
2495        {
2496            Some((negotiated_capabilities, control_handle))
2497        } else {
2498            None
2499        }
2500    }
2501
2502    /// Name of the method defined in FIDL
2503    pub fn method_name(&self) -> &'static str {
2504        match *self {
2505            MlmeRequest::StartScan { .. } => "start_scan",
2506            MlmeRequest::ConnectReq { .. } => "connect_req",
2507            MlmeRequest::ReconnectReq { .. } => "reconnect_req",
2508            MlmeRequest::RoamReq { .. } => "roam_req",
2509            MlmeRequest::AuthenticateResp { .. } => "authenticate_resp",
2510            MlmeRequest::DeauthenticateReq { .. } => "deauthenticate_req",
2511            MlmeRequest::AssociateResp { .. } => "associate_resp",
2512            MlmeRequest::DisassociateReq { .. } => "disassociate_req",
2513            MlmeRequest::ResetReq { .. } => "reset_req",
2514            MlmeRequest::StartReq { .. } => "start_req",
2515            MlmeRequest::StopReq { .. } => "stop_req",
2516            MlmeRequest::SetKeysReq { .. } => "set_keys_req",
2517            MlmeRequest::DeleteKeysReq { .. } => "delete_keys_req",
2518            MlmeRequest::EapolReq { .. } => "eapol_req",
2519            MlmeRequest::SetControlledPort { .. } => "set_controlled_port",
2520            MlmeRequest::QueryDeviceInfo { .. } => "query_device_info",
2521            MlmeRequest::QueryTelemetrySupport { .. } => "query_telemetry_support",
2522            MlmeRequest::GetIfaceStats { .. } => "get_iface_stats",
2523            MlmeRequest::GetIfaceHistogramStats { .. } => "get_iface_histogram_stats",
2524            MlmeRequest::GetSignalReport { .. } => "get_signal_report",
2525            MlmeRequest::ListMinstrelPeers { .. } => "list_minstrel_peers",
2526            MlmeRequest::GetMinstrelStats { .. } => "get_minstrel_stats",
2527            MlmeRequest::StartCaptureFrames { .. } => "start_capture_frames",
2528            MlmeRequest::StopCaptureFrames { .. } => "stop_capture_frames",
2529            MlmeRequest::SaeHandshakeResp { .. } => "sae_handshake_resp",
2530            MlmeRequest::SaeFrameTx { .. } => "sae_frame_tx",
2531            MlmeRequest::WmmStatusReq { .. } => "wmm_status_req",
2532            MlmeRequest::FinalizeAssociationReq { .. } => "finalize_association_req",
2533        }
2534    }
2535}
2536
2537#[derive(Debug, Clone)]
2538pub struct MlmeControlHandle {
2539    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2540}
2541
2542impl fidl::endpoints::ControlHandle for MlmeControlHandle {
2543    fn shutdown(&self) {
2544        self.inner.shutdown()
2545    }
2546    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2547        self.inner.shutdown_with_epitaph(status)
2548    }
2549
2550    fn is_closed(&self) -> bool {
2551        self.inner.channel().is_closed()
2552    }
2553    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2554        self.inner.channel().on_closed()
2555    }
2556
2557    #[cfg(target_os = "fuchsia")]
2558    fn signal_peer(
2559        &self,
2560        clear_mask: zx::Signals,
2561        set_mask: zx::Signals,
2562    ) -> Result<(), zx_status::Status> {
2563        use fidl::Peered;
2564        self.inner.channel().signal_peer(clear_mask, set_mask)
2565    }
2566}
2567
2568impl MlmeControlHandle {
2569    pub fn send_on_scan_result(&self, mut result: &ScanResult) -> Result<(), fidl::Error> {
2570        self.inner.send::<MlmeOnScanResultRequest>(
2571            (result,),
2572            0,
2573            0x681af7466a75074d,
2574            fidl::encoding::DynamicFlags::empty(),
2575        )
2576    }
2577
2578    pub fn send_on_scan_end(&self, mut end: &ScanEnd) -> Result<(), fidl::Error> {
2579        self.inner.send::<MlmeOnScanEndRequest>(
2580            (end,),
2581            0,
2582            0x7f2702d253e7ca59,
2583            fidl::encoding::DynamicFlags::empty(),
2584        )
2585    }
2586
2587    pub fn send_connect_conf(&self, mut resp: &ConnectConfirm) -> Result<(), fidl::Error> {
2588        self.inner.send::<MlmeConnectConfRequest>(
2589            (resp,),
2590            0,
2591            0x77b27623279b981e,
2592            fidl::encoding::DynamicFlags::empty(),
2593        )
2594    }
2595
2596    pub fn send_roam_conf(&self, mut conf: &RoamConfirm) -> Result<(), fidl::Error> {
2597        self.inner.send::<MlmeRoamConfRequest>(
2598            (conf,),
2599            0,
2600            0x3f608034faa054bc,
2601            fidl::encoding::DynamicFlags::empty(),
2602        )
2603    }
2604
2605    pub fn send_roam_start_ind(&self, mut ind: &RoamStartIndication) -> Result<(), fidl::Error> {
2606        self.inner.send::<MlmeRoamStartIndRequest>(
2607            (ind,),
2608            0,
2609            0x270a1ec78672d094,
2610            fidl::encoding::DynamicFlags::empty(),
2611        )
2612    }
2613
2614    pub fn send_roam_result_ind(&self, mut ind: &RoamResultIndication) -> Result<(), fidl::Error> {
2615        self.inner.send::<MlmeRoamResultIndRequest>(
2616            (ind,),
2617            0,
2618            0x26d074364fc84865,
2619            fidl::encoding::DynamicFlags::empty(),
2620        )
2621    }
2622
2623    pub fn send_authenticate_ind(
2624        &self,
2625        mut ind: &AuthenticateIndication,
2626    ) -> Result<(), fidl::Error> {
2627        self.inner.send::<MlmeAuthenticateIndRequest>(
2628            (ind,),
2629            0,
2630            0x460f49ae891adbe9,
2631            fidl::encoding::DynamicFlags::empty(),
2632        )
2633    }
2634
2635    pub fn send_deauthenticate_conf(
2636        &self,
2637        mut resp: &DeauthenticateConfirm,
2638    ) -> Result<(), fidl::Error> {
2639        self.inner.send::<MlmeDeauthenticateConfRequest>(
2640            (resp,),
2641            0,
2642            0x3b44debc21b88c8c,
2643            fidl::encoding::DynamicFlags::empty(),
2644        )
2645    }
2646
2647    pub fn send_deauthenticate_ind(
2648        &self,
2649        mut ind: &DeauthenticateIndication,
2650    ) -> Result<(), fidl::Error> {
2651        self.inner.send::<MlmeDeauthenticateIndRequest>(
2652            (ind,),
2653            0,
2654            0x7ee0889b326da1d7,
2655            fidl::encoding::DynamicFlags::empty(),
2656        )
2657    }
2658
2659    pub fn send_associate_ind(&self, mut ind: &AssociateIndication) -> Result<(), fidl::Error> {
2660        self.inner.send::<MlmeAssociateIndRequest>(
2661            (ind,),
2662            0,
2663            0x6a86f20e3063dd63,
2664            fidl::encoding::DynamicFlags::empty(),
2665        )
2666    }
2667
2668    pub fn send_disassociate_conf(
2669        &self,
2670        mut resp: &DisassociateConfirm,
2671    ) -> Result<(), fidl::Error> {
2672        self.inner.send::<MlmeDisassociateConfRequest>(
2673            (resp,),
2674            0,
2675            0x61345fbce732a28d,
2676            fidl::encoding::DynamicFlags::empty(),
2677        )
2678    }
2679
2680    pub fn send_disassociate_ind(
2681        &self,
2682        mut ind: &DisassociateIndication,
2683    ) -> Result<(), fidl::Error> {
2684        self.inner.send::<MlmeDisassociateIndRequest>(
2685            (ind,),
2686            0,
2687            0x77ac0ebf387c1f35,
2688            fidl::encoding::DynamicFlags::empty(),
2689        )
2690    }
2691
2692    pub fn send_start_conf(&self, mut resp: &StartConfirm) -> Result<(), fidl::Error> {
2693        self.inner.send::<MlmeStartConfRequest>(
2694            (resp,),
2695            0,
2696            0x15ea6cdf3b8382b3,
2697            fidl::encoding::DynamicFlags::empty(),
2698        )
2699    }
2700
2701    pub fn send_stop_conf(&self, mut resp: &StopConfirm) -> Result<(), fidl::Error> {
2702        self.inner.send::<MlmeStopConfRequest>(
2703            (resp,),
2704            0,
2705            0x50b426ef4a84a2df,
2706            fidl::encoding::DynamicFlags::empty(),
2707        )
2708    }
2709
2710    pub fn send_set_keys_conf(&self, mut conf: &SetKeysConfirm) -> Result<(), fidl::Error> {
2711        self.inner.send::<MlmeSetKeysConfRequest>(
2712            (conf,),
2713            0,
2714            0x5bafb3a8d4039380,
2715            fidl::encoding::DynamicFlags::empty(),
2716        )
2717    }
2718
2719    pub fn send_eapol_conf(&self, mut resp: &EapolConfirm) -> Result<(), fidl::Error> {
2720        self.inner.send::<MlmeEapolConfRequest>(
2721            (resp,),
2722            0,
2723            0x6ffa21f4ee73ce64,
2724            fidl::encoding::DynamicFlags::empty(),
2725        )
2726    }
2727
2728    pub fn send_signal_report(
2729        &self,
2730        mut ind: &fidl_fuchsia_wlan_internal::SignalReportIndication,
2731    ) -> Result<(), fidl::Error> {
2732        self.inner.send::<MlmeSignalReportRequest>(
2733            (ind,),
2734            0,
2735            0x48f32a876aa53d8f,
2736            fidl::encoding::DynamicFlags::empty(),
2737        )
2738    }
2739
2740    pub fn send_eapol_ind(&self, mut ind: &EapolIndication) -> Result<(), fidl::Error> {
2741        self.inner.send::<MlmeEapolIndRequest>(
2742            (ind,),
2743            0,
2744            0x7038dca46a3142fc,
2745            fidl::encoding::DynamicFlags::empty(),
2746        )
2747    }
2748
2749    pub fn send_relay_captured_frame(
2750        &self,
2751        mut result: &CapturedFrameResult,
2752    ) -> Result<(), fidl::Error> {
2753        self.inner.send::<MlmeRelayCapturedFrameRequest>(
2754            (result,),
2755            0,
2756            0x6f00a6f3cff9b1f5,
2757            fidl::encoding::DynamicFlags::empty(),
2758        )
2759    }
2760
2761    pub fn send_on_channel_switched(
2762        &self,
2763        mut info: &fidl_fuchsia_wlan_internal::ChannelSwitchInfo,
2764    ) -> Result<(), fidl::Error> {
2765        self.inner.send::<MlmeOnChannelSwitchedRequest>(
2766            (info,),
2767            0,
2768            0x581750594e4c0c1,
2769            fidl::encoding::DynamicFlags::empty(),
2770        )
2771    }
2772
2773    pub fn send_on_pmk_available(&self, mut info: &PmkInfo) -> Result<(), fidl::Error> {
2774        self.inner.send::<MlmeOnPmkAvailableRequest>(
2775            (info,),
2776            0,
2777            0x1314fc2c79643f90,
2778            fidl::encoding::DynamicFlags::empty(),
2779        )
2780    }
2781
2782    pub fn send_on_sae_handshake_ind(
2783        &self,
2784        mut ind: &SaeHandshakeIndication,
2785    ) -> Result<(), fidl::Error> {
2786        self.inner.send::<MlmeOnSaeHandshakeIndRequest>(
2787            (ind,),
2788            0,
2789            0x6308b10e18986d7e,
2790            fidl::encoding::DynamicFlags::empty(),
2791        )
2792    }
2793
2794    pub fn send_on_sae_frame_rx(&self, mut frame: &SaeFrame) -> Result<(), fidl::Error> {
2795        self.inner.send::<MlmeOnSaeFrameRxRequest>(
2796            (frame,),
2797            0,
2798            0x4ebf51c86ef5f3cd,
2799            fidl::encoding::DynamicFlags::empty(),
2800        )
2801    }
2802
2803    pub fn send_on_wmm_status_resp(
2804        &self,
2805        mut status: i32,
2806        mut resp: &fidl_fuchsia_wlan_internal::WmmStatusResponse,
2807    ) -> Result<(), fidl::Error> {
2808        self.inner.send::<MlmeOnWmmStatusRespRequest>(
2809            (status, resp),
2810            0,
2811            0x53f056b432e7b5cb,
2812            fidl::encoding::DynamicFlags::empty(),
2813        )
2814    }
2815}
2816
2817#[must_use = "FIDL methods require a response to be sent"]
2818#[derive(Debug)]
2819pub struct MlmeQueryDeviceInfoResponder {
2820    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
2821    tx_id: u32,
2822}
2823
2824/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
2825/// if the responder is dropped without sending a response, so that the client
2826/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2827impl std::ops::Drop for MlmeQueryDeviceInfoResponder {
2828    fn drop(&mut self) {
2829        self.control_handle.shutdown();
2830        // Safety: drops once, never accessed again
2831        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2832    }
2833}
2834
2835impl fidl::endpoints::Responder for MlmeQueryDeviceInfoResponder {
2836    type ControlHandle = MlmeControlHandle;
2837
2838    fn control_handle(&self) -> &MlmeControlHandle {
2839        &self.control_handle
2840    }
2841
2842    fn drop_without_shutdown(mut self) {
2843        // Safety: drops once, never accessed again due to mem::forget
2844        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2845        // Prevent Drop from running (which would shut down the channel)
2846        std::mem::forget(self);
2847    }
2848}
2849
2850impl MlmeQueryDeviceInfoResponder {
2851    /// Sends a response to the FIDL transaction.
2852    ///
2853    /// Sets the channel to shutdown if an error occurs.
2854    pub fn send(self, mut info: &DeviceInfo) -> Result<(), fidl::Error> {
2855        let _result = self.send_raw(info);
2856        if _result.is_err() {
2857            self.control_handle.shutdown();
2858        }
2859        self.drop_without_shutdown();
2860        _result
2861    }
2862
2863    /// Similar to "send" but does not shutdown the channel if an error occurs.
2864    pub fn send_no_shutdown_on_err(self, mut info: &DeviceInfo) -> Result<(), fidl::Error> {
2865        let _result = self.send_raw(info);
2866        self.drop_without_shutdown();
2867        _result
2868    }
2869
2870    fn send_raw(&self, mut info: &DeviceInfo) -> Result<(), fidl::Error> {
2871        self.control_handle.inner.send::<MlmeQueryDeviceInfoResponse>(
2872            (info,),
2873            self.tx_id,
2874            0x6ee3e7f63f2b7bc0,
2875            fidl::encoding::DynamicFlags::empty(),
2876        )
2877    }
2878}
2879
2880#[must_use = "FIDL methods require a response to be sent"]
2881#[derive(Debug)]
2882pub struct MlmeQueryTelemetrySupportResponder {
2883    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
2884    tx_id: u32,
2885}
2886
2887/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
2888/// if the responder is dropped without sending a response, so that the client
2889/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2890impl std::ops::Drop for MlmeQueryTelemetrySupportResponder {
2891    fn drop(&mut self) {
2892        self.control_handle.shutdown();
2893        // Safety: drops once, never accessed again
2894        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2895    }
2896}
2897
2898impl fidl::endpoints::Responder for MlmeQueryTelemetrySupportResponder {
2899    type ControlHandle = MlmeControlHandle;
2900
2901    fn control_handle(&self) -> &MlmeControlHandle {
2902        &self.control_handle
2903    }
2904
2905    fn drop_without_shutdown(mut self) {
2906        // Safety: drops once, never accessed again due to mem::forget
2907        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2908        // Prevent Drop from running (which would shut down the channel)
2909        std::mem::forget(self);
2910    }
2911}
2912
2913impl MlmeQueryTelemetrySupportResponder {
2914    /// Sends a response to the FIDL transaction.
2915    ///
2916    /// Sets the channel to shutdown if an error occurs.
2917    pub fn send(
2918        self,
2919        mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
2920    ) -> Result<(), fidl::Error> {
2921        let _result = self.send_raw(result);
2922        if _result.is_err() {
2923            self.control_handle.shutdown();
2924        }
2925        self.drop_without_shutdown();
2926        _result
2927    }
2928
2929    /// Similar to "send" but does not shutdown the channel if an error occurs.
2930    pub fn send_no_shutdown_on_err(
2931        self,
2932        mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
2933    ) -> Result<(), fidl::Error> {
2934        let _result = self.send_raw(result);
2935        self.drop_without_shutdown();
2936        _result
2937    }
2938
2939    fn send_raw(
2940        &self,
2941        mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
2942    ) -> Result<(), fidl::Error> {
2943        self.control_handle
2944            .inner
2945            .send::<fidl::encoding::ResultType<MlmeQueryTelemetrySupportResponse, i32>>(
2946                result.map(|resp| (resp,)),
2947                self.tx_id,
2948                0x1598879b70332c99,
2949                fidl::encoding::DynamicFlags::empty(),
2950            )
2951    }
2952}
2953
2954#[must_use = "FIDL methods require a response to be sent"]
2955#[derive(Debug)]
2956pub struct MlmeGetIfaceStatsResponder {
2957    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
2958    tx_id: u32,
2959}
2960
2961/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
2962/// if the responder is dropped without sending a response, so that the client
2963/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2964impl std::ops::Drop for MlmeGetIfaceStatsResponder {
2965    fn drop(&mut self) {
2966        self.control_handle.shutdown();
2967        // Safety: drops once, never accessed again
2968        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2969    }
2970}
2971
2972impl fidl::endpoints::Responder for MlmeGetIfaceStatsResponder {
2973    type ControlHandle = MlmeControlHandle;
2974
2975    fn control_handle(&self) -> &MlmeControlHandle {
2976        &self.control_handle
2977    }
2978
2979    fn drop_without_shutdown(mut self) {
2980        // Safety: drops once, never accessed again due to mem::forget
2981        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2982        // Prevent Drop from running (which would shut down the channel)
2983        std::mem::forget(self);
2984    }
2985}
2986
2987impl MlmeGetIfaceStatsResponder {
2988    /// Sends a response to the FIDL transaction.
2989    ///
2990    /// Sets the channel to shutdown if an error occurs.
2991    pub fn send(self, mut resp: &GetIfaceStatsResponse) -> Result<(), fidl::Error> {
2992        let _result = self.send_raw(resp);
2993        if _result.is_err() {
2994            self.control_handle.shutdown();
2995        }
2996        self.drop_without_shutdown();
2997        _result
2998    }
2999
3000    /// Similar to "send" but does not shutdown the channel if an error occurs.
3001    pub fn send_no_shutdown_on_err(
3002        self,
3003        mut resp: &GetIfaceStatsResponse,
3004    ) -> Result<(), fidl::Error> {
3005        let _result = self.send_raw(resp);
3006        self.drop_without_shutdown();
3007        _result
3008    }
3009
3010    fn send_raw(&self, mut resp: &GetIfaceStatsResponse) -> Result<(), fidl::Error> {
3011        self.control_handle.inner.send::<MlmeGetIfaceStatsResponse>(
3012            (resp,),
3013            self.tx_id,
3014            0xede1a8342d1b211,
3015            fidl::encoding::DynamicFlags::empty(),
3016        )
3017    }
3018}
3019
3020#[must_use = "FIDL methods require a response to be sent"]
3021#[derive(Debug)]
3022pub struct MlmeGetIfaceHistogramStatsResponder {
3023    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
3024    tx_id: u32,
3025}
3026
3027/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
3028/// if the responder is dropped without sending a response, so that the client
3029/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3030impl std::ops::Drop for MlmeGetIfaceHistogramStatsResponder {
3031    fn drop(&mut self) {
3032        self.control_handle.shutdown();
3033        // Safety: drops once, never accessed again
3034        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3035    }
3036}
3037
3038impl fidl::endpoints::Responder for MlmeGetIfaceHistogramStatsResponder {
3039    type ControlHandle = MlmeControlHandle;
3040
3041    fn control_handle(&self) -> &MlmeControlHandle {
3042        &self.control_handle
3043    }
3044
3045    fn drop_without_shutdown(mut self) {
3046        // Safety: drops once, never accessed again due to mem::forget
3047        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3048        // Prevent Drop from running (which would shut down the channel)
3049        std::mem::forget(self);
3050    }
3051}
3052
3053impl MlmeGetIfaceHistogramStatsResponder {
3054    /// Sends a response to the FIDL transaction.
3055    ///
3056    /// Sets the channel to shutdown if an error occurs.
3057    pub fn send(self, mut resp: &GetIfaceHistogramStatsResponse) -> Result<(), fidl::Error> {
3058        let _result = self.send_raw(resp);
3059        if _result.is_err() {
3060            self.control_handle.shutdown();
3061        }
3062        self.drop_without_shutdown();
3063        _result
3064    }
3065
3066    /// Similar to "send" but does not shutdown the channel if an error occurs.
3067    pub fn send_no_shutdown_on_err(
3068        self,
3069        mut resp: &GetIfaceHistogramStatsResponse,
3070    ) -> Result<(), fidl::Error> {
3071        let _result = self.send_raw(resp);
3072        self.drop_without_shutdown();
3073        _result
3074    }
3075
3076    fn send_raw(&self, mut resp: &GetIfaceHistogramStatsResponse) -> Result<(), fidl::Error> {
3077        self.control_handle.inner.send::<MlmeGetIfaceHistogramStatsResponse>(
3078            (resp,),
3079            self.tx_id,
3080            0x1979c9d3449f8675,
3081            fidl::encoding::DynamicFlags::empty(),
3082        )
3083    }
3084}
3085
3086#[must_use = "FIDL methods require a response to be sent"]
3087#[derive(Debug)]
3088pub struct MlmeGetSignalReportResponder {
3089    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
3090    tx_id: u32,
3091}
3092
3093/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
3094/// if the responder is dropped without sending a response, so that the client
3095/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3096impl std::ops::Drop for MlmeGetSignalReportResponder {
3097    fn drop(&mut self) {
3098        self.control_handle.shutdown();
3099        // Safety: drops once, never accessed again
3100        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3101    }
3102}
3103
3104impl fidl::endpoints::Responder for MlmeGetSignalReportResponder {
3105    type ControlHandle = MlmeControlHandle;
3106
3107    fn control_handle(&self) -> &MlmeControlHandle {
3108        &self.control_handle
3109    }
3110
3111    fn drop_without_shutdown(mut self) {
3112        // Safety: drops once, never accessed again due to mem::forget
3113        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3114        // Prevent Drop from running (which would shut down the channel)
3115        std::mem::forget(self);
3116    }
3117}
3118
3119impl MlmeGetSignalReportResponder {
3120    /// Sends a response to the FIDL transaction.
3121    ///
3122    /// Sets the channel to shutdown if an error occurs.
3123    pub fn send(
3124        self,
3125        mut result: Result<&fidl_fuchsia_wlan_stats::SignalReport, i32>,
3126    ) -> Result<(), fidl::Error> {
3127        let _result = self.send_raw(result);
3128        if _result.is_err() {
3129            self.control_handle.shutdown();
3130        }
3131        self.drop_without_shutdown();
3132        _result
3133    }
3134
3135    /// Similar to "send" but does not shutdown the channel if an error occurs.
3136    pub fn send_no_shutdown_on_err(
3137        self,
3138        mut result: Result<&fidl_fuchsia_wlan_stats::SignalReport, i32>,
3139    ) -> Result<(), fidl::Error> {
3140        let _result = self.send_raw(result);
3141        self.drop_without_shutdown();
3142        _result
3143    }
3144
3145    fn send_raw(
3146        &self,
3147        mut result: Result<&fidl_fuchsia_wlan_stats::SignalReport, i32>,
3148    ) -> Result<(), fidl::Error> {
3149        self.control_handle
3150            .inner
3151            .send::<fidl::encoding::ResultType<MlmeGetSignalReportResponse, i32>>(
3152                result.map(|resp| (resp,)),
3153                self.tx_id,
3154                0x7e47e7ebe92acec9,
3155                fidl::encoding::DynamicFlags::empty(),
3156            )
3157    }
3158}
3159
3160#[must_use = "FIDL methods require a response to be sent"]
3161#[derive(Debug)]
3162pub struct MlmeListMinstrelPeersResponder {
3163    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
3164    tx_id: u32,
3165}
3166
3167/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
3168/// if the responder is dropped without sending a response, so that the client
3169/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3170impl std::ops::Drop for MlmeListMinstrelPeersResponder {
3171    fn drop(&mut self) {
3172        self.control_handle.shutdown();
3173        // Safety: drops once, never accessed again
3174        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3175    }
3176}
3177
3178impl fidl::endpoints::Responder for MlmeListMinstrelPeersResponder {
3179    type ControlHandle = MlmeControlHandle;
3180
3181    fn control_handle(&self) -> &MlmeControlHandle {
3182        &self.control_handle
3183    }
3184
3185    fn drop_without_shutdown(mut self) {
3186        // Safety: drops once, never accessed again due to mem::forget
3187        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3188        // Prevent Drop from running (which would shut down the channel)
3189        std::mem::forget(self);
3190    }
3191}
3192
3193impl MlmeListMinstrelPeersResponder {
3194    /// Sends a response to the FIDL transaction.
3195    ///
3196    /// Sets the channel to shutdown if an error occurs.
3197    pub fn send(self, mut resp: &MinstrelListResponse) -> Result<(), fidl::Error> {
3198        let _result = self.send_raw(resp);
3199        if _result.is_err() {
3200            self.control_handle.shutdown();
3201        }
3202        self.drop_without_shutdown();
3203        _result
3204    }
3205
3206    /// Similar to "send" but does not shutdown the channel if an error occurs.
3207    pub fn send_no_shutdown_on_err(
3208        self,
3209        mut resp: &MinstrelListResponse,
3210    ) -> Result<(), fidl::Error> {
3211        let _result = self.send_raw(resp);
3212        self.drop_without_shutdown();
3213        _result
3214    }
3215
3216    fn send_raw(&self, mut resp: &MinstrelListResponse) -> Result<(), fidl::Error> {
3217        self.control_handle.inner.send::<MlmeListMinstrelPeersResponse>(
3218            (resp,),
3219            self.tx_id,
3220            0x4ac5d1e66fe1ffd5,
3221            fidl::encoding::DynamicFlags::empty(),
3222        )
3223    }
3224}
3225
3226#[must_use = "FIDL methods require a response to be sent"]
3227#[derive(Debug)]
3228pub struct MlmeGetMinstrelStatsResponder {
3229    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
3230    tx_id: u32,
3231}
3232
3233/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
3234/// if the responder is dropped without sending a response, so that the client
3235/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3236impl std::ops::Drop for MlmeGetMinstrelStatsResponder {
3237    fn drop(&mut self) {
3238        self.control_handle.shutdown();
3239        // Safety: drops once, never accessed again
3240        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3241    }
3242}
3243
3244impl fidl::endpoints::Responder for MlmeGetMinstrelStatsResponder {
3245    type ControlHandle = MlmeControlHandle;
3246
3247    fn control_handle(&self) -> &MlmeControlHandle {
3248        &self.control_handle
3249    }
3250
3251    fn drop_without_shutdown(mut self) {
3252        // Safety: drops once, never accessed again due to mem::forget
3253        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3254        // Prevent Drop from running (which would shut down the channel)
3255        std::mem::forget(self);
3256    }
3257}
3258
3259impl MlmeGetMinstrelStatsResponder {
3260    /// Sends a response to the FIDL transaction.
3261    ///
3262    /// Sets the channel to shutdown if an error occurs.
3263    pub fn send(self, mut resp: &MinstrelStatsResponse) -> Result<(), fidl::Error> {
3264        let _result = self.send_raw(resp);
3265        if _result.is_err() {
3266            self.control_handle.shutdown();
3267        }
3268        self.drop_without_shutdown();
3269        _result
3270    }
3271
3272    /// Similar to "send" but does not shutdown the channel if an error occurs.
3273    pub fn send_no_shutdown_on_err(
3274        self,
3275        mut resp: &MinstrelStatsResponse,
3276    ) -> Result<(), fidl::Error> {
3277        let _result = self.send_raw(resp);
3278        self.drop_without_shutdown();
3279        _result
3280    }
3281
3282    fn send_raw(&self, mut resp: &MinstrelStatsResponse) -> Result<(), fidl::Error> {
3283        self.control_handle.inner.send::<MlmeGetMinstrelStatsResponse>(
3284            (resp,),
3285            self.tx_id,
3286            0x2f688b1245323f4b,
3287            fidl::encoding::DynamicFlags::empty(),
3288        )
3289    }
3290}
3291
3292#[must_use = "FIDL methods require a response to be sent"]
3293#[derive(Debug)]
3294pub struct MlmeStartCaptureFramesResponder {
3295    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
3296    tx_id: u32,
3297}
3298
3299/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
3300/// if the responder is dropped without sending a response, so that the client
3301/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3302impl std::ops::Drop for MlmeStartCaptureFramesResponder {
3303    fn drop(&mut self) {
3304        self.control_handle.shutdown();
3305        // Safety: drops once, never accessed again
3306        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3307    }
3308}
3309
3310impl fidl::endpoints::Responder for MlmeStartCaptureFramesResponder {
3311    type ControlHandle = MlmeControlHandle;
3312
3313    fn control_handle(&self) -> &MlmeControlHandle {
3314        &self.control_handle
3315    }
3316
3317    fn drop_without_shutdown(mut self) {
3318        // Safety: drops once, never accessed again due to mem::forget
3319        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3320        // Prevent Drop from running (which would shut down the channel)
3321        std::mem::forget(self);
3322    }
3323}
3324
3325impl MlmeStartCaptureFramesResponder {
3326    /// Sends a response to the FIDL transaction.
3327    ///
3328    /// Sets the channel to shutdown if an error occurs.
3329    pub fn send(self, mut resp: &StartCaptureFramesResponse) -> Result<(), fidl::Error> {
3330        let _result = self.send_raw(resp);
3331        if _result.is_err() {
3332            self.control_handle.shutdown();
3333        }
3334        self.drop_without_shutdown();
3335        _result
3336    }
3337
3338    /// Similar to "send" but does not shutdown the channel if an error occurs.
3339    pub fn send_no_shutdown_on_err(
3340        self,
3341        mut resp: &StartCaptureFramesResponse,
3342    ) -> Result<(), fidl::Error> {
3343        let _result = self.send_raw(resp);
3344        self.drop_without_shutdown();
3345        _result
3346    }
3347
3348    fn send_raw(&self, mut resp: &StartCaptureFramesResponse) -> Result<(), fidl::Error> {
3349        self.control_handle.inner.send::<MlmeStartCaptureFramesResponse>(
3350            (resp,),
3351            self.tx_id,
3352            0x23b369ed5749ee69,
3353            fidl::encoding::DynamicFlags::empty(),
3354        )
3355    }
3356}
3357
3358mod internal {
3359    use super::*;
3360
3361    impl fidl::encoding::ResourceTypeMarker for ConnectorConnectRequest {
3362        type Borrowed<'a> = &'a mut Self;
3363        fn take_or_borrow<'a>(
3364            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3365        ) -> Self::Borrowed<'a> {
3366            value
3367        }
3368    }
3369
3370    unsafe impl fidl::encoding::TypeMarker for ConnectorConnectRequest {
3371        type Owned = Self;
3372
3373        #[inline(always)]
3374        fn inline_align(_context: fidl::encoding::Context) -> usize {
3375            4
3376        }
3377
3378        #[inline(always)]
3379        fn inline_size(_context: fidl::encoding::Context) -> usize {
3380            4
3381        }
3382    }
3383
3384    unsafe impl
3385        fidl::encoding::Encode<
3386            ConnectorConnectRequest,
3387            fidl::encoding::DefaultFuchsiaResourceDialect,
3388        > for &mut ConnectorConnectRequest
3389    {
3390        #[inline]
3391        unsafe fn encode(
3392            self,
3393            encoder: &mut fidl::encoding::Encoder<
3394                '_,
3395                fidl::encoding::DefaultFuchsiaResourceDialect,
3396            >,
3397            offset: usize,
3398            _depth: fidl::encoding::Depth,
3399        ) -> fidl::Result<()> {
3400            encoder.debug_check_bounds::<ConnectorConnectRequest>(offset);
3401            // Delegate to tuple encoding.
3402            fidl::encoding::Encode::<ConnectorConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3403                (
3404                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<MlmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.request),
3405                ),
3406                encoder, offset, _depth
3407            )
3408        }
3409    }
3410    unsafe impl<
3411        T0: fidl::encoding::Encode<
3412                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<MlmeMarker>>,
3413                fidl::encoding::DefaultFuchsiaResourceDialect,
3414            >,
3415    >
3416        fidl::encoding::Encode<
3417            ConnectorConnectRequest,
3418            fidl::encoding::DefaultFuchsiaResourceDialect,
3419        > for (T0,)
3420    {
3421        #[inline]
3422        unsafe fn encode(
3423            self,
3424            encoder: &mut fidl::encoding::Encoder<
3425                '_,
3426                fidl::encoding::DefaultFuchsiaResourceDialect,
3427            >,
3428            offset: usize,
3429            depth: fidl::encoding::Depth,
3430        ) -> fidl::Result<()> {
3431            encoder.debug_check_bounds::<ConnectorConnectRequest>(offset);
3432            // Zero out padding regions. There's no need to apply masks
3433            // because the unmasked parts will be overwritten by fields.
3434            // Write the fields.
3435            self.0.encode(encoder, offset + 0, depth)?;
3436            Ok(())
3437        }
3438    }
3439
3440    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3441        for ConnectorConnectRequest
3442    {
3443        #[inline(always)]
3444        fn new_empty() -> Self {
3445            Self {
3446                request: fidl::new_empty!(
3447                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<MlmeMarker>>,
3448                    fidl::encoding::DefaultFuchsiaResourceDialect
3449                ),
3450            }
3451        }
3452
3453        #[inline]
3454        unsafe fn decode(
3455            &mut self,
3456            decoder: &mut fidl::encoding::Decoder<
3457                '_,
3458                fidl::encoding::DefaultFuchsiaResourceDialect,
3459            >,
3460            offset: usize,
3461            _depth: fidl::encoding::Depth,
3462        ) -> fidl::Result<()> {
3463            decoder.debug_check_bounds::<Self>(offset);
3464            // Verify that padding bytes are zero.
3465            fidl::decode!(
3466                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<MlmeMarker>>,
3467                fidl::encoding::DefaultFuchsiaResourceDialect,
3468                &mut self.request,
3469                decoder,
3470                offset + 0,
3471                _depth
3472            )?;
3473            Ok(())
3474        }
3475    }
3476}