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