Skip to main content

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        Self { client: fidl::client::sync::Client::new(channel) }
65    }
66
67    pub fn into_channel(self) -> fidl::Channel {
68        self.client.into_channel()
69    }
70
71    /// Waits until an event arrives and returns it. It is safe for other
72    /// threads to make concurrent requests while waiting for an event.
73    pub fn wait_for_event(
74        &self,
75        deadline: zx::MonotonicInstant,
76    ) -> Result<ConnectorEvent, fidl::Error> {
77        ConnectorEvent::decode(self.client.wait_for_event::<ConnectorMarker>(deadline)?)
78    }
79
80    pub fn r#connect(
81        &self,
82        mut request: fidl::endpoints::ServerEnd<MlmeMarker>,
83    ) -> Result<(), fidl::Error> {
84        self.client.send::<ConnectorConnectRequest>(
85            (request,),
86            0x42131859717af962,
87            fidl::encoding::DynamicFlags::empty(),
88        )
89    }
90}
91
92#[cfg(target_os = "fuchsia")]
93impl From<ConnectorSynchronousProxy> for zx::NullableHandle {
94    fn from(value: ConnectorSynchronousProxy) -> Self {
95        value.into_channel().into()
96    }
97}
98
99#[cfg(target_os = "fuchsia")]
100impl From<fidl::Channel> for ConnectorSynchronousProxy {
101    fn from(value: fidl::Channel) -> Self {
102        Self::new(value)
103    }
104}
105
106#[cfg(target_os = "fuchsia")]
107impl fidl::endpoints::FromClient for ConnectorSynchronousProxy {
108    type Protocol = ConnectorMarker;
109
110    fn from_client(value: fidl::endpoints::ClientEnd<ConnectorMarker>) -> Self {
111        Self::new(value.into_channel())
112    }
113}
114
115#[derive(Debug, Clone)]
116pub struct ConnectorProxy {
117    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
118}
119
120impl fidl::endpoints::Proxy for ConnectorProxy {
121    type Protocol = ConnectorMarker;
122
123    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
124        Self::new(inner)
125    }
126
127    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
128        self.client.into_channel().map_err(|client| Self { client })
129    }
130
131    fn as_channel(&self) -> &::fidl::AsyncChannel {
132        self.client.as_channel()
133    }
134}
135
136impl ConnectorProxy {
137    /// Create a new Proxy for fuchsia.wlan.mlme/Connector.
138    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
139        let protocol_name = <ConnectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
140        Self { client: fidl::client::Client::new(channel, protocol_name) }
141    }
142
143    /// Get a Stream of events from the remote end of the protocol.
144    ///
145    /// # Panics
146    ///
147    /// Panics if the event stream was already taken.
148    pub fn take_event_stream(&self) -> ConnectorEventStream {
149        ConnectorEventStream { event_receiver: self.client.take_event_receiver() }
150    }
151
152    pub fn r#connect(
153        &self,
154        mut request: fidl::endpoints::ServerEnd<MlmeMarker>,
155    ) -> Result<(), fidl::Error> {
156        ConnectorProxyInterface::r#connect(self, request)
157    }
158}
159
160impl ConnectorProxyInterface for ConnectorProxy {
161    fn r#connect(
162        &self,
163        mut request: fidl::endpoints::ServerEnd<MlmeMarker>,
164    ) -> Result<(), fidl::Error> {
165        self.client.send::<ConnectorConnectRequest>(
166            (request,),
167            0x42131859717af962,
168            fidl::encoding::DynamicFlags::empty(),
169        )
170    }
171}
172
173pub struct ConnectorEventStream {
174    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
175}
176
177impl std::marker::Unpin for ConnectorEventStream {}
178
179impl futures::stream::FusedStream for ConnectorEventStream {
180    fn is_terminated(&self) -> bool {
181        self.event_receiver.is_terminated()
182    }
183}
184
185impl futures::Stream for ConnectorEventStream {
186    type Item = Result<ConnectorEvent, fidl::Error>;
187
188    fn poll_next(
189        mut self: std::pin::Pin<&mut Self>,
190        cx: &mut std::task::Context<'_>,
191    ) -> std::task::Poll<Option<Self::Item>> {
192        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
193            &mut self.event_receiver,
194            cx
195        )?) {
196            Some(buf) => std::task::Poll::Ready(Some(ConnectorEvent::decode(buf))),
197            None => std::task::Poll::Ready(None),
198        }
199    }
200}
201
202#[derive(Debug)]
203pub enum ConnectorEvent {}
204
205impl ConnectorEvent {
206    /// Decodes a message buffer as a [`ConnectorEvent`].
207    fn decode(
208        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
209    ) -> Result<ConnectorEvent, fidl::Error> {
210        let (bytes, _handles) = buf.split_mut();
211        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
212        debug_assert_eq!(tx_header.tx_id, 0);
213        match tx_header.ordinal {
214            _ => Err(fidl::Error::UnknownOrdinal {
215                ordinal: tx_header.ordinal,
216                protocol_name: <ConnectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
217            }),
218        }
219    }
220}
221
222/// A Stream of incoming requests for fuchsia.wlan.mlme/Connector.
223pub struct ConnectorRequestStream {
224    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
225    is_terminated: bool,
226}
227
228impl std::marker::Unpin for ConnectorRequestStream {}
229
230impl futures::stream::FusedStream for ConnectorRequestStream {
231    fn is_terminated(&self) -> bool {
232        self.is_terminated
233    }
234}
235
236impl fidl::endpoints::RequestStream for ConnectorRequestStream {
237    type Protocol = ConnectorMarker;
238    type ControlHandle = ConnectorControlHandle;
239
240    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
241        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
242    }
243
244    fn control_handle(&self) -> Self::ControlHandle {
245        ConnectorControlHandle { inner: self.inner.clone() }
246    }
247
248    fn into_inner(
249        self,
250    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
251    {
252        (self.inner, self.is_terminated)
253    }
254
255    fn from_inner(
256        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
257        is_terminated: bool,
258    ) -> Self {
259        Self { inner, is_terminated }
260    }
261}
262
263impl futures::Stream for ConnectorRequestStream {
264    type Item = Result<ConnectorRequest, fidl::Error>;
265
266    fn poll_next(
267        mut self: std::pin::Pin<&mut Self>,
268        cx: &mut std::task::Context<'_>,
269    ) -> std::task::Poll<Option<Self::Item>> {
270        let this = &mut *self;
271        if this.inner.check_shutdown(cx) {
272            this.is_terminated = true;
273            return std::task::Poll::Ready(None);
274        }
275        if this.is_terminated {
276            panic!("polled ConnectorRequestStream after completion");
277        }
278        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
279            |bytes, handles| {
280                match this.inner.channel().read_etc(cx, bytes, handles) {
281                    std::task::Poll::Ready(Ok(())) => {}
282                    std::task::Poll::Pending => return std::task::Poll::Pending,
283                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
284                        this.is_terminated = true;
285                        return std::task::Poll::Ready(None);
286                    }
287                    std::task::Poll::Ready(Err(e)) => {
288                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
289                            e.into(),
290                        ))));
291                    }
292                }
293
294                // A message has been received from the channel
295                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
296
297                std::task::Poll::Ready(Some(match header.ordinal {
298                    0x42131859717af962 => {
299                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
300                        let mut req = fidl::new_empty!(
301                            ConnectorConnectRequest,
302                            fidl::encoding::DefaultFuchsiaResourceDialect
303                        );
304                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectorConnectRequest>(&header, _body_bytes, handles, &mut req)?;
305                        let control_handle = ConnectorControlHandle { inner: this.inner.clone() };
306                        Ok(ConnectorRequest::Connect { request: req.request, control_handle })
307                    }
308                    _ => Err(fidl::Error::UnknownOrdinal {
309                        ordinal: header.ordinal,
310                        protocol_name:
311                            <ConnectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
312                    }),
313                }))
314            },
315        )
316    }
317}
318
319/// This protocol is used to connect to the interface's underlying MLME.
320#[derive(Debug)]
321pub enum ConnectorRequest {
322    Connect {
323        request: fidl::endpoints::ServerEnd<MlmeMarker>,
324        control_handle: ConnectorControlHandle,
325    },
326}
327
328impl ConnectorRequest {
329    #[allow(irrefutable_let_patterns)]
330    pub fn into_connect(
331        self,
332    ) -> Option<(fidl::endpoints::ServerEnd<MlmeMarker>, ConnectorControlHandle)> {
333        if let ConnectorRequest::Connect { request, control_handle } = self {
334            Some((request, control_handle))
335        } else {
336            None
337        }
338    }
339
340    /// Name of the method defined in FIDL
341    pub fn method_name(&self) -> &'static str {
342        match *self {
343            ConnectorRequest::Connect { .. } => "connect",
344        }
345    }
346}
347
348#[derive(Debug, Clone)]
349pub struct ConnectorControlHandle {
350    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
351}
352
353impl ConnectorControlHandle {
354    pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
355        self.inner.shutdown_with_epitaph(status.into())
356    }
357}
358
359impl fidl::endpoints::ControlHandle for ConnectorControlHandle {
360    fn shutdown(&self) {
361        self.inner.shutdown()
362    }
363
364    fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
365        self.inner.shutdown_with_epitaph(status)
366    }
367
368    fn is_closed(&self) -> bool {
369        self.inner.channel().is_closed()
370    }
371    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
372        self.inner.channel().on_closed()
373    }
374
375    #[cfg(target_os = "fuchsia")]
376    fn signal_peer(
377        &self,
378        clear_mask: zx::Signals,
379        set_mask: zx::Signals,
380    ) -> Result<(), zx_status::Status> {
381        use fidl::Peered;
382        self.inner.channel().signal_peer(clear_mask, set_mask)
383    }
384}
385
386impl ConnectorControlHandle {}
387
388#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
389pub struct MlmeMarker;
390
391impl fidl::endpoints::ProtocolMarker for MlmeMarker {
392    type Proxy = MlmeProxy;
393    type RequestStream = MlmeRequestStream;
394    #[cfg(target_os = "fuchsia")]
395    type SynchronousProxy = MlmeSynchronousProxy;
396
397    const DEBUG_NAME: &'static str = "(anonymous) Mlme";
398}
399pub type MlmeStartScheduledScanResult = Result<(), i32>;
400pub type MlmeStopScheduledScanResult = Result<(), i32>;
401pub type MlmeGetScheduledScanEnabledResult = Result<Vec<u64>, i32>;
402pub type MlmeQueryTelemetrySupportResult = Result<fidl_fuchsia_wlan_stats::TelemetrySupport, i32>;
403pub type MlmeGetSignalReportResult = Result<fidl_fuchsia_wlan_stats::SignalReport, i32>;
404pub type MlmeSetMacAddressResult = Result<(), i32>;
405pub type MlmeInstallApfPacketFilterResult = Result<(), i32>;
406pub type MlmeReadApfPacketFilterDataResult = Result<Vec<u8>, i32>;
407pub type MlmeSetApfPacketFilterEnabledResult = Result<(), i32>;
408pub type MlmeGetApfPacketFilterEnabledResult = Result<bool, i32>;
409
410pub trait MlmeProxyInterface: Send + Sync {
411    fn r#start_scan(&self, req: &ScanRequest) -> Result<(), fidl::Error>;
412    type StartScheduledScanResponseFut: std::future::Future<Output = Result<MlmeStartScheduledScanResult, fidl::Error>>
413        + Send;
414    fn r#start_scheduled_scan(
415        &self,
416        txn_id: u64,
417        req: &fidl_fuchsia_wlan_common::ScheduledScanRequest,
418    ) -> Self::StartScheduledScanResponseFut;
419    type StopScheduledScanResponseFut: std::future::Future<Output = Result<MlmeStopScheduledScanResult, fidl::Error>>
420        + Send;
421    fn r#stop_scheduled_scan(&self, txn_id: u64) -> Self::StopScheduledScanResponseFut;
422    type GetScheduledScanEnabledResponseFut: std::future::Future<Output = Result<MlmeGetScheduledScanEnabledResult, fidl::Error>>
423        + Send;
424    fn r#get_scheduled_scan_enabled(&self) -> Self::GetScheduledScanEnabledResponseFut;
425    fn r#connect_req(&self, req: &ConnectRequest) -> Result<(), fidl::Error>;
426    fn r#reconnect_req(&self, req: &ReconnectRequest) -> Result<(), fidl::Error>;
427    fn r#roam_req(&self, req: &RoamRequest) -> Result<(), fidl::Error>;
428    fn r#authenticate_resp(&self, resp: &AuthenticateResponse) -> Result<(), fidl::Error>;
429    fn r#deauthenticate_req(&self, req: &DeauthenticateRequest) -> Result<(), fidl::Error>;
430    fn r#associate_resp(&self, resp: &AssociateResponse) -> Result<(), fidl::Error>;
431    fn r#disassociate_req(&self, req: &DisassociateRequest) -> Result<(), fidl::Error>;
432    fn r#reset_req(&self, req: &ResetRequest) -> Result<(), fidl::Error>;
433    fn r#start_req(&self, req: &StartRequest) -> Result<(), fidl::Error>;
434    fn r#stop_req(&self, req: &StopRequest) -> Result<(), fidl::Error>;
435    fn r#set_keys_req(&self, req: &SetKeysRequest) -> Result<(), fidl::Error>;
436    fn r#delete_keys_req(&self, req: &DeleteKeysRequest) -> Result<(), fidl::Error>;
437    fn r#eapol_req(&self, req: &EapolRequest) -> Result<(), fidl::Error>;
438    fn r#set_controlled_port(&self, req: &SetControlledPortRequest) -> Result<(), fidl::Error>;
439    type QueryDeviceInfoResponseFut: std::future::Future<Output = Result<DeviceInfo, fidl::Error>>
440        + Send;
441    fn r#query_device_info(&self) -> Self::QueryDeviceInfoResponseFut;
442    type QueryTelemetrySupportResponseFut: std::future::Future<Output = Result<MlmeQueryTelemetrySupportResult, fidl::Error>>
443        + Send;
444    fn r#query_telemetry_support(&self) -> Self::QueryTelemetrySupportResponseFut;
445    type GetIfaceStatsResponseFut: std::future::Future<Output = Result<GetIfaceStatsResponse, fidl::Error>>
446        + Send;
447    fn r#get_iface_stats(&self) -> Self::GetIfaceStatsResponseFut;
448    type GetIfaceHistogramStatsResponseFut: std::future::Future<Output = Result<GetIfaceHistogramStatsResponse, fidl::Error>>
449        + Send;
450    fn r#get_iface_histogram_stats(&self) -> Self::GetIfaceHistogramStatsResponseFut;
451    type GetSignalReportResponseFut: std::future::Future<Output = Result<MlmeGetSignalReportResult, fidl::Error>>
452        + Send;
453    fn r#get_signal_report(&self) -> Self::GetSignalReportResponseFut;
454    type ListMinstrelPeersResponseFut: std::future::Future<Output = Result<MinstrelListResponse, fidl::Error>>
455        + Send;
456    fn r#list_minstrel_peers(&self) -> Self::ListMinstrelPeersResponseFut;
457    type GetMinstrelStatsResponseFut: std::future::Future<Output = Result<MinstrelStatsResponse, fidl::Error>>
458        + Send;
459    fn r#get_minstrel_stats(&self, req: &MinstrelStatsRequest)
460    -> Self::GetMinstrelStatsResponseFut;
461    type StartCaptureFramesResponseFut: std::future::Future<Output = Result<StartCaptureFramesResponse, fidl::Error>>
462        + Send;
463    fn r#start_capture_frames(
464        &self,
465        req: &StartCaptureFramesRequest,
466    ) -> Self::StartCaptureFramesResponseFut;
467    fn r#stop_capture_frames(&self) -> Result<(), fidl::Error>;
468    fn r#sae_handshake_resp(&self, resp: &SaeHandshakeResponse) -> Result<(), fidl::Error>;
469    fn r#sae_frame_tx(&self, frame: &SaeFrame) -> Result<(), fidl::Error>;
470    fn r#wmm_status_req(&self) -> Result<(), fidl::Error>;
471    fn r#finalize_association_req(
472        &self,
473        negotiated_capabilities: &NegotiatedCapabilities,
474    ) -> Result<(), fidl::Error>;
475    type SetMacAddressResponseFut: std::future::Future<Output = Result<MlmeSetMacAddressResult, fidl::Error>>
476        + Send;
477    fn r#set_mac_address(&self, mac_addr: &[u8; 6]) -> Self::SetMacAddressResponseFut;
478    type InstallApfPacketFilterResponseFut: std::future::Future<Output = Result<MlmeInstallApfPacketFilterResult, fidl::Error>>
479        + Send;
480    fn r#install_apf_packet_filter(
481        &self,
482        program: &[u8],
483    ) -> Self::InstallApfPacketFilterResponseFut;
484    type ReadApfPacketFilterDataResponseFut: std::future::Future<Output = Result<MlmeReadApfPacketFilterDataResult, fidl::Error>>
485        + Send;
486    fn r#read_apf_packet_filter_data(&self) -> Self::ReadApfPacketFilterDataResponseFut;
487    type SetApfPacketFilterEnabledResponseFut: std::future::Future<Output = Result<MlmeSetApfPacketFilterEnabledResult, fidl::Error>>
488        + Send;
489    fn r#set_apf_packet_filter_enabled(
490        &self,
491        enabled: bool,
492    ) -> Self::SetApfPacketFilterEnabledResponseFut;
493    type GetApfPacketFilterEnabledResponseFut: std::future::Future<Output = Result<MlmeGetApfPacketFilterEnabledResult, fidl::Error>>
494        + Send;
495    fn r#get_apf_packet_filter_enabled(&self) -> Self::GetApfPacketFilterEnabledResponseFut;
496}
497#[derive(Debug)]
498#[cfg(target_os = "fuchsia")]
499pub struct MlmeSynchronousProxy {
500    client: fidl::client::sync::Client,
501}
502
503#[cfg(target_os = "fuchsia")]
504impl fidl::endpoints::SynchronousProxy for MlmeSynchronousProxy {
505    type Proxy = MlmeProxy;
506    type Protocol = MlmeMarker;
507
508    fn from_channel(inner: fidl::Channel) -> Self {
509        Self::new(inner)
510    }
511
512    fn into_channel(self) -> fidl::Channel {
513        self.client.into_channel()
514    }
515
516    fn as_channel(&self) -> &fidl::Channel {
517        self.client.as_channel()
518    }
519}
520
521#[cfg(target_os = "fuchsia")]
522impl MlmeSynchronousProxy {
523    pub fn new(channel: fidl::Channel) -> Self {
524        Self { client: fidl::client::sync::Client::new(channel) }
525    }
526
527    pub fn into_channel(self) -> fidl::Channel {
528        self.client.into_channel()
529    }
530
531    /// Waits until an event arrives and returns it. It is safe for other
532    /// threads to make concurrent requests while waiting for an event.
533    pub fn wait_for_event(&self, deadline: zx::MonotonicInstant) -> Result<MlmeEvent, fidl::Error> {
534        MlmeEvent::decode(self.client.wait_for_event::<MlmeMarker>(deadline)?)
535    }
536
537    pub fn r#start_scan(&self, mut req: &ScanRequest) -> Result<(), fidl::Error> {
538        self.client.send::<MlmeStartScanRequest>(
539            (req,),
540            0x342cc5ec6a957479,
541            fidl::encoding::DynamicFlags::empty(),
542        )
543    }
544
545    /// Starts scheduled scanning.
546    pub fn r#start_scheduled_scan(
547        &self,
548        mut txn_id: u64,
549        mut req: &fidl_fuchsia_wlan_common::ScheduledScanRequest,
550        ___deadline: zx::MonotonicInstant,
551    ) -> Result<MlmeStartScheduledScanResult, fidl::Error> {
552        let _response = self.client.send_query::<
553            MlmeStartScheduledScanRequest,
554            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
555            MlmeMarker,
556        >(
557            (txn_id, req,),
558            0x7fff163af4620212,
559            fidl::encoding::DynamicFlags::empty(),
560            ___deadline,
561        )?;
562        Ok(_response.map(|x| x))
563    }
564
565    /// Stops scheduled scanning.
566    pub fn r#stop_scheduled_scan(
567        &self,
568        mut txn_id: u64,
569        ___deadline: zx::MonotonicInstant,
570    ) -> Result<MlmeStopScheduledScanResult, fidl::Error> {
571        let _response = self.client.send_query::<
572            MlmeStopScheduledScanRequest,
573            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
574            MlmeMarker,
575        >(
576            (txn_id,),
577            0x5fbc466f3daa4dd9,
578            fidl::encoding::DynamicFlags::empty(),
579            ___deadline,
580        )?;
581        Ok(_response.map(|x| x))
582    }
583
584    /// Returns the transaction IDs of any currently active scheduled scans.
585    pub fn r#get_scheduled_scan_enabled(
586        &self,
587        ___deadline: zx::MonotonicInstant,
588    ) -> Result<MlmeGetScheduledScanEnabledResult, fidl::Error> {
589        let _response = self.client.send_query::<
590            fidl::encoding::EmptyPayload,
591            fidl::encoding::ResultType<MlmeGetScheduledScanEnabledResponse, i32>,
592            MlmeMarker,
593        >(
594            (),
595            0x1ecc6a7fe7f9fcff,
596            fidl::encoding::DynamicFlags::empty(),
597            ___deadline,
598        )?;
599        Ok(_response.map(|x| x.active_txn_ids))
600    }
601
602    pub fn r#connect_req(&self, mut req: &ConnectRequest) -> Result<(), fidl::Error> {
603        self.client.send::<MlmeConnectReqRequest>(
604            (req,),
605            0x31153dc85f8f64c,
606            fidl::encoding::DynamicFlags::empty(),
607        )
608    }
609
610    pub fn r#reconnect_req(&self, mut req: &ReconnectRequest) -> Result<(), fidl::Error> {
611        self.client.send::<MlmeReconnectReqRequest>(
612            (req,),
613            0x74e0f1bd758b6b78,
614            fidl::encoding::DynamicFlags::empty(),
615        )
616    }
617
618    /// Initiate a roam attempt (SME-initiated).
619    pub fn r#roam_req(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
620        self.client.send::<MlmeRoamReqRequest>(
621            (req,),
622            0x3ba163eadf7dba45,
623            fidl::encoding::DynamicFlags::empty(),
624        )
625    }
626
627    pub fn r#authenticate_resp(&self, mut resp: &AuthenticateResponse) -> Result<(), fidl::Error> {
628        self.client.send::<MlmeAuthenticateRespRequest>(
629            (resp,),
630            0x26108aade2fdd2f4,
631            fidl::encoding::DynamicFlags::empty(),
632        )
633    }
634
635    pub fn r#deauthenticate_req(&self, mut req: &DeauthenticateRequest) -> Result<(), fidl::Error> {
636        self.client.send::<MlmeDeauthenticateReqRequest>(
637            (req,),
638            0x228983b200de5d12,
639            fidl::encoding::DynamicFlags::empty(),
640        )
641    }
642
643    pub fn r#associate_resp(&self, mut resp: &AssociateResponse) -> Result<(), fidl::Error> {
644        self.client.send::<MlmeAssociateRespRequest>(
645            (resp,),
646            0x70244dbd652ed6d9,
647            fidl::encoding::DynamicFlags::empty(),
648        )
649    }
650
651    pub fn r#disassociate_req(&self, mut req: &DisassociateRequest) -> Result<(), fidl::Error> {
652        self.client.send::<MlmeDisassociateReqRequest>(
653            (req,),
654            0x5765807f1387d764,
655            fidl::encoding::DynamicFlags::empty(),
656        )
657    }
658
659    pub fn r#reset_req(&self, mut req: &ResetRequest) -> Result<(), fidl::Error> {
660        self.client.send::<MlmeResetReqRequest>(
661            (req,),
662            0x780b98c58a286b9f,
663            fidl::encoding::DynamicFlags::empty(),
664        )
665    }
666
667    pub fn r#start_req(&self, mut req: &StartRequest) -> Result<(), fidl::Error> {
668        self.client.send::<MlmeStartReqRequest>(
669            (req,),
670            0x5d95885f8053654,
671            fidl::encoding::DynamicFlags::empty(),
672        )
673    }
674
675    pub fn r#stop_req(&self, mut req: &StopRequest) -> Result<(), fidl::Error> {
676        self.client.send::<MlmeStopReqRequest>(
677            (req,),
678            0x27b9a2ab04a2c79f,
679            fidl::encoding::DynamicFlags::empty(),
680        )
681    }
682
683    pub fn r#set_keys_req(&self, mut req: &SetKeysRequest) -> Result<(), fidl::Error> {
684        self.client.send::<MlmeSetKeysReqRequest>(
685            (req,),
686            0x6b30a07fd3a11a79,
687            fidl::encoding::DynamicFlags::empty(),
688        )
689    }
690
691    pub fn r#delete_keys_req(&self, mut req: &DeleteKeysRequest) -> Result<(), fidl::Error> {
692        self.client.send::<MlmeDeleteKeysReqRequest>(
693            (req,),
694            0x1e3524d20d190c8f,
695            fidl::encoding::DynamicFlags::empty(),
696        )
697    }
698
699    pub fn r#eapol_req(&self, mut req: &EapolRequest) -> Result<(), fidl::Error> {
700        self.client.send::<MlmeEapolReqRequest>(
701            (req,),
702            0xc3c096924704d4,
703            fidl::encoding::DynamicFlags::empty(),
704        )
705    }
706
707    pub fn r#set_controlled_port(
708        &self,
709        mut req: &SetControlledPortRequest,
710    ) -> Result<(), fidl::Error> {
711        self.client.send::<MlmeSetControlledPortRequest>(
712            (req,),
713            0x4e47065668890c8d,
714            fidl::encoding::DynamicFlags::empty(),
715        )
716    }
717
718    pub fn r#query_device_info(
719        &self,
720        ___deadline: zx::MonotonicInstant,
721    ) -> Result<DeviceInfo, fidl::Error> {
722        let _response = self
723            .client
724            .send_query::<fidl::encoding::EmptyPayload, MlmeQueryDeviceInfoResponse, MlmeMarker>(
725                (),
726                0x6ee3e7f63f2b7bc0,
727                fidl::encoding::DynamicFlags::empty(),
728                ___deadline,
729            )?;
730        Ok(_response.info)
731    }
732
733    pub fn r#query_telemetry_support(
734        &self,
735        ___deadline: zx::MonotonicInstant,
736    ) -> Result<MlmeQueryTelemetrySupportResult, fidl::Error> {
737        let _response = self.client.send_query::<
738            fidl::encoding::EmptyPayload,
739            fidl::encoding::ResultType<MlmeQueryTelemetrySupportResponse, i32>,
740            MlmeMarker,
741        >(
742            (),
743            0x1598879b70332c99,
744            fidl::encoding::DynamicFlags::empty(),
745            ___deadline,
746        )?;
747        Ok(_response.map(|x| x.resp))
748    }
749
750    pub fn r#get_iface_stats(
751        &self,
752        ___deadline: zx::MonotonicInstant,
753    ) -> Result<GetIfaceStatsResponse, fidl::Error> {
754        let _response = self
755            .client
756            .send_query::<fidl::encoding::EmptyPayload, MlmeGetIfaceStatsResponse, MlmeMarker>(
757                (),
758                0xede1a8342d1b211,
759                fidl::encoding::DynamicFlags::empty(),
760                ___deadline,
761            )?;
762        Ok(_response.resp)
763    }
764
765    pub fn r#get_iface_histogram_stats(
766        &self,
767        ___deadline: zx::MonotonicInstant,
768    ) -> Result<GetIfaceHistogramStatsResponse, fidl::Error> {
769        let _response = self.client.send_query::<
770            fidl::encoding::EmptyPayload,
771            MlmeGetIfaceHistogramStatsResponse,
772            MlmeMarker,
773        >(
774            (),
775            0x1979c9d3449f8675,
776            fidl::encoding::DynamicFlags::empty(),
777            ___deadline,
778        )?;
779        Ok(_response.resp)
780    }
781
782    pub fn r#get_signal_report(
783        &self,
784        ___deadline: zx::MonotonicInstant,
785    ) -> Result<MlmeGetSignalReportResult, fidl::Error> {
786        let _response = self.client.send_query::<
787            fidl::encoding::EmptyPayload,
788            fidl::encoding::ResultType<MlmeGetSignalReportResponse, i32>,
789            MlmeMarker,
790        >(
791            (),
792            0x7e47e7ebe92acec9,
793            fidl::encoding::DynamicFlags::empty(),
794            ___deadline,
795        )?;
796        Ok(_response.map(|x| x.resp))
797    }
798
799    pub fn r#list_minstrel_peers(
800        &self,
801        ___deadline: zx::MonotonicInstant,
802    ) -> Result<MinstrelListResponse, fidl::Error> {
803        let _response = self
804            .client
805            .send_query::<fidl::encoding::EmptyPayload, MlmeListMinstrelPeersResponse, MlmeMarker>(
806                (),
807                0x4ac5d1e66fe1ffd5,
808                fidl::encoding::DynamicFlags::empty(),
809                ___deadline,
810            )?;
811        Ok(_response.resp)
812    }
813
814    pub fn r#get_minstrel_stats(
815        &self,
816        mut req: &MinstrelStatsRequest,
817        ___deadline: zx::MonotonicInstant,
818    ) -> Result<MinstrelStatsResponse, fidl::Error> {
819        let _response = self
820            .client
821            .send_query::<MlmeGetMinstrelStatsRequest, MlmeGetMinstrelStatsResponse, MlmeMarker>(
822                (req,),
823                0x2f688b1245323f4b,
824                fidl::encoding::DynamicFlags::empty(),
825                ___deadline,
826            )?;
827        Ok(_response.resp)
828    }
829
830    pub fn r#start_capture_frames(
831        &self,
832        mut req: &StartCaptureFramesRequest,
833        ___deadline: zx::MonotonicInstant,
834    ) -> Result<StartCaptureFramesResponse, fidl::Error> {
835        let _response = self.client.send_query::<
836            MlmeStartCaptureFramesRequest,
837            MlmeStartCaptureFramesResponse,
838            MlmeMarker,
839        >(
840            (req,),
841            0x23b369ed5749ee69,
842            fidl::encoding::DynamicFlags::empty(),
843            ___deadline,
844        )?;
845        Ok(_response.resp)
846    }
847
848    pub fn r#stop_capture_frames(&self) -> Result<(), fidl::Error> {
849        self.client.send::<fidl::encoding::EmptyPayload>(
850            (),
851            0x2f1aebbc68bf7c54,
852            fidl::encoding::DynamicFlags::empty(),
853        )
854    }
855
856    /// Notifies that SAE authentication is completed.
857    pub fn r#sae_handshake_resp(&self, mut resp: &SaeHandshakeResponse) -> Result<(), fidl::Error> {
858        self.client.send::<MlmeSaeHandshakeRespRequest>(
859            (resp,),
860            0x28477bd2f7a5ab0c,
861            fidl::encoding::DynamicFlags::empty(),
862        )
863    }
864
865    /// Transmits SAE frame (if SME is managing SAE authentication).
866    pub fn r#sae_frame_tx(&self, mut frame: &SaeFrame) -> Result<(), fidl::Error> {
867        self.client.send::<MlmeSaeFrameTxRequest>(
868            (frame,),
869            0x7700c0d536733d8c,
870            fidl::encoding::DynamicFlags::empty(),
871        )
872    }
873
874    pub fn r#wmm_status_req(&self) -> Result<(), fidl::Error> {
875        self.client.send::<fidl::encoding::EmptyPayload>(
876            (),
877            0xef4851f6088fede,
878            fidl::encoding::DynamicFlags::empty(),
879        )
880    }
881
882    pub fn r#finalize_association_req(
883        &self,
884        mut negotiated_capabilities: &NegotiatedCapabilities,
885    ) -> Result<(), fidl::Error> {
886        self.client.send::<MlmeFinalizeAssociationReqRequest>(
887            (negotiated_capabilities,),
888            0x7aea59787cfd385a,
889            fidl::encoding::DynamicFlags::empty(),
890        )
891    }
892
893    pub fn r#set_mac_address(
894        &self,
895        mut mac_addr: &[u8; 6],
896        ___deadline: zx::MonotonicInstant,
897    ) -> Result<MlmeSetMacAddressResult, fidl::Error> {
898        let _response = self.client.send_query::<
899            MlmeSetMacAddressRequest,
900            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
901            MlmeMarker,
902        >(
903            (mac_addr,),
904            0x476999f9bb27afe1,
905            fidl::encoding::DynamicFlags::empty(),
906            ___deadline,
907        )?;
908        Ok(_response.map(|x| x))
909    }
910
911    pub fn r#install_apf_packet_filter(
912        &self,
913        mut program: &[u8],
914        ___deadline: zx::MonotonicInstant,
915    ) -> Result<MlmeInstallApfPacketFilterResult, fidl::Error> {
916        let _response = self.client.send_query::<
917            MlmeInstallApfPacketFilterRequest,
918            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
919            MlmeMarker,
920        >(
921            (program,),
922            0x267565b4916c825b,
923            fidl::encoding::DynamicFlags::empty(),
924            ___deadline,
925        )?;
926        Ok(_response.map(|x| x))
927    }
928
929    pub fn r#read_apf_packet_filter_data(
930        &self,
931        ___deadline: zx::MonotonicInstant,
932    ) -> Result<MlmeReadApfPacketFilterDataResult, fidl::Error> {
933        let _response = self.client.send_query::<
934            fidl::encoding::EmptyPayload,
935            fidl::encoding::ResultType<MlmeReadApfPacketFilterDataResponse, i32>,
936            MlmeMarker,
937        >(
938            (),
939            0x6040d744f1b2cb61,
940            fidl::encoding::DynamicFlags::empty(),
941            ___deadline,
942        )?;
943        Ok(_response.map(|x| x.memory))
944    }
945
946    pub fn r#set_apf_packet_filter_enabled(
947        &self,
948        mut enabled: bool,
949        ___deadline: zx::MonotonicInstant,
950    ) -> Result<MlmeSetApfPacketFilterEnabledResult, fidl::Error> {
951        let _response = self.client.send_query::<
952            MlmeSetApfPacketFilterEnabledRequest,
953            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
954            MlmeMarker,
955        >(
956            (enabled,),
957            0x6d99bdca77076aea,
958            fidl::encoding::DynamicFlags::empty(),
959            ___deadline,
960        )?;
961        Ok(_response.map(|x| x))
962    }
963
964    pub fn r#get_apf_packet_filter_enabled(
965        &self,
966        ___deadline: zx::MonotonicInstant,
967    ) -> Result<MlmeGetApfPacketFilterEnabledResult, fidl::Error> {
968        let _response = self.client.send_query::<
969            fidl::encoding::EmptyPayload,
970            fidl::encoding::ResultType<MlmeGetApfPacketFilterEnabledResponse, i32>,
971            MlmeMarker,
972        >(
973            (),
974            0x1df408bc154be1e4,
975            fidl::encoding::DynamicFlags::empty(),
976            ___deadline,
977        )?;
978        Ok(_response.map(|x| x.enabled))
979    }
980}
981
982#[cfg(target_os = "fuchsia")]
983impl From<MlmeSynchronousProxy> for zx::NullableHandle {
984    fn from(value: MlmeSynchronousProxy) -> Self {
985        value.into_channel().into()
986    }
987}
988
989#[cfg(target_os = "fuchsia")]
990impl From<fidl::Channel> for MlmeSynchronousProxy {
991    fn from(value: fidl::Channel) -> Self {
992        Self::new(value)
993    }
994}
995
996#[cfg(target_os = "fuchsia")]
997impl fidl::endpoints::FromClient for MlmeSynchronousProxy {
998    type Protocol = MlmeMarker;
999
1000    fn from_client(value: fidl::endpoints::ClientEnd<MlmeMarker>) -> Self {
1001        Self::new(value.into_channel())
1002    }
1003}
1004
1005#[derive(Debug, Clone)]
1006pub struct MlmeProxy {
1007    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1008}
1009
1010impl fidl::endpoints::Proxy for MlmeProxy {
1011    type Protocol = MlmeMarker;
1012
1013    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1014        Self::new(inner)
1015    }
1016
1017    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1018        self.client.into_channel().map_err(|client| Self { client })
1019    }
1020
1021    fn as_channel(&self) -> &::fidl::AsyncChannel {
1022        self.client.as_channel()
1023    }
1024}
1025
1026impl MlmeProxy {
1027    /// Create a new Proxy for fuchsia.wlan.mlme/MLME.
1028    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1029        let protocol_name = <MlmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1030        Self { client: fidl::client::Client::new(channel, protocol_name) }
1031    }
1032
1033    /// Get a Stream of events from the remote end of the protocol.
1034    ///
1035    /// # Panics
1036    ///
1037    /// Panics if the event stream was already taken.
1038    pub fn take_event_stream(&self) -> MlmeEventStream {
1039        MlmeEventStream { event_receiver: self.client.take_event_receiver() }
1040    }
1041
1042    pub fn r#start_scan(&self, mut req: &ScanRequest) -> Result<(), fidl::Error> {
1043        MlmeProxyInterface::r#start_scan(self, req)
1044    }
1045
1046    /// Starts scheduled scanning.
1047    pub fn r#start_scheduled_scan(
1048        &self,
1049        mut txn_id: u64,
1050        mut req: &fidl_fuchsia_wlan_common::ScheduledScanRequest,
1051    ) -> fidl::client::QueryResponseFut<
1052        MlmeStartScheduledScanResult,
1053        fidl::encoding::DefaultFuchsiaResourceDialect,
1054    > {
1055        MlmeProxyInterface::r#start_scheduled_scan(self, txn_id, req)
1056    }
1057
1058    /// Stops scheduled scanning.
1059    pub fn r#stop_scheduled_scan(
1060        &self,
1061        mut txn_id: u64,
1062    ) -> fidl::client::QueryResponseFut<
1063        MlmeStopScheduledScanResult,
1064        fidl::encoding::DefaultFuchsiaResourceDialect,
1065    > {
1066        MlmeProxyInterface::r#stop_scheduled_scan(self, txn_id)
1067    }
1068
1069    /// Returns the transaction IDs of any currently active scheduled scans.
1070    pub fn r#get_scheduled_scan_enabled(
1071        &self,
1072    ) -> fidl::client::QueryResponseFut<
1073        MlmeGetScheduledScanEnabledResult,
1074        fidl::encoding::DefaultFuchsiaResourceDialect,
1075    > {
1076        MlmeProxyInterface::r#get_scheduled_scan_enabled(self)
1077    }
1078
1079    pub fn r#connect_req(&self, mut req: &ConnectRequest) -> Result<(), fidl::Error> {
1080        MlmeProxyInterface::r#connect_req(self, req)
1081    }
1082
1083    pub fn r#reconnect_req(&self, mut req: &ReconnectRequest) -> Result<(), fidl::Error> {
1084        MlmeProxyInterface::r#reconnect_req(self, req)
1085    }
1086
1087    /// Initiate a roam attempt (SME-initiated).
1088    pub fn r#roam_req(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
1089        MlmeProxyInterface::r#roam_req(self, req)
1090    }
1091
1092    pub fn r#authenticate_resp(&self, mut resp: &AuthenticateResponse) -> Result<(), fidl::Error> {
1093        MlmeProxyInterface::r#authenticate_resp(self, resp)
1094    }
1095
1096    pub fn r#deauthenticate_req(&self, mut req: &DeauthenticateRequest) -> Result<(), fidl::Error> {
1097        MlmeProxyInterface::r#deauthenticate_req(self, req)
1098    }
1099
1100    pub fn r#associate_resp(&self, mut resp: &AssociateResponse) -> Result<(), fidl::Error> {
1101        MlmeProxyInterface::r#associate_resp(self, resp)
1102    }
1103
1104    pub fn r#disassociate_req(&self, mut req: &DisassociateRequest) -> Result<(), fidl::Error> {
1105        MlmeProxyInterface::r#disassociate_req(self, req)
1106    }
1107
1108    pub fn r#reset_req(&self, mut req: &ResetRequest) -> Result<(), fidl::Error> {
1109        MlmeProxyInterface::r#reset_req(self, req)
1110    }
1111
1112    pub fn r#start_req(&self, mut req: &StartRequest) -> Result<(), fidl::Error> {
1113        MlmeProxyInterface::r#start_req(self, req)
1114    }
1115
1116    pub fn r#stop_req(&self, mut req: &StopRequest) -> Result<(), fidl::Error> {
1117        MlmeProxyInterface::r#stop_req(self, req)
1118    }
1119
1120    pub fn r#set_keys_req(&self, mut req: &SetKeysRequest) -> Result<(), fidl::Error> {
1121        MlmeProxyInterface::r#set_keys_req(self, req)
1122    }
1123
1124    pub fn r#delete_keys_req(&self, mut req: &DeleteKeysRequest) -> Result<(), fidl::Error> {
1125        MlmeProxyInterface::r#delete_keys_req(self, req)
1126    }
1127
1128    pub fn r#eapol_req(&self, mut req: &EapolRequest) -> Result<(), fidl::Error> {
1129        MlmeProxyInterface::r#eapol_req(self, req)
1130    }
1131
1132    pub fn r#set_controlled_port(
1133        &self,
1134        mut req: &SetControlledPortRequest,
1135    ) -> Result<(), fidl::Error> {
1136        MlmeProxyInterface::r#set_controlled_port(self, req)
1137    }
1138
1139    pub fn r#query_device_info(
1140        &self,
1141    ) -> fidl::client::QueryResponseFut<DeviceInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
1142    {
1143        MlmeProxyInterface::r#query_device_info(self)
1144    }
1145
1146    pub fn r#query_telemetry_support(
1147        &self,
1148    ) -> fidl::client::QueryResponseFut<
1149        MlmeQueryTelemetrySupportResult,
1150        fidl::encoding::DefaultFuchsiaResourceDialect,
1151    > {
1152        MlmeProxyInterface::r#query_telemetry_support(self)
1153    }
1154
1155    pub fn r#get_iface_stats(
1156        &self,
1157    ) -> fidl::client::QueryResponseFut<
1158        GetIfaceStatsResponse,
1159        fidl::encoding::DefaultFuchsiaResourceDialect,
1160    > {
1161        MlmeProxyInterface::r#get_iface_stats(self)
1162    }
1163
1164    pub fn r#get_iface_histogram_stats(
1165        &self,
1166    ) -> fidl::client::QueryResponseFut<
1167        GetIfaceHistogramStatsResponse,
1168        fidl::encoding::DefaultFuchsiaResourceDialect,
1169    > {
1170        MlmeProxyInterface::r#get_iface_histogram_stats(self)
1171    }
1172
1173    pub fn r#get_signal_report(
1174        &self,
1175    ) -> fidl::client::QueryResponseFut<
1176        MlmeGetSignalReportResult,
1177        fidl::encoding::DefaultFuchsiaResourceDialect,
1178    > {
1179        MlmeProxyInterface::r#get_signal_report(self)
1180    }
1181
1182    pub fn r#list_minstrel_peers(
1183        &self,
1184    ) -> fidl::client::QueryResponseFut<
1185        MinstrelListResponse,
1186        fidl::encoding::DefaultFuchsiaResourceDialect,
1187    > {
1188        MlmeProxyInterface::r#list_minstrel_peers(self)
1189    }
1190
1191    pub fn r#get_minstrel_stats(
1192        &self,
1193        mut req: &MinstrelStatsRequest,
1194    ) -> fidl::client::QueryResponseFut<
1195        MinstrelStatsResponse,
1196        fidl::encoding::DefaultFuchsiaResourceDialect,
1197    > {
1198        MlmeProxyInterface::r#get_minstrel_stats(self, req)
1199    }
1200
1201    pub fn r#start_capture_frames(
1202        &self,
1203        mut req: &StartCaptureFramesRequest,
1204    ) -> fidl::client::QueryResponseFut<
1205        StartCaptureFramesResponse,
1206        fidl::encoding::DefaultFuchsiaResourceDialect,
1207    > {
1208        MlmeProxyInterface::r#start_capture_frames(self, req)
1209    }
1210
1211    pub fn r#stop_capture_frames(&self) -> Result<(), fidl::Error> {
1212        MlmeProxyInterface::r#stop_capture_frames(self)
1213    }
1214
1215    /// Notifies that SAE authentication is completed.
1216    pub fn r#sae_handshake_resp(&self, mut resp: &SaeHandshakeResponse) -> Result<(), fidl::Error> {
1217        MlmeProxyInterface::r#sae_handshake_resp(self, resp)
1218    }
1219
1220    /// Transmits SAE frame (if SME is managing SAE authentication).
1221    pub fn r#sae_frame_tx(&self, mut frame: &SaeFrame) -> Result<(), fidl::Error> {
1222        MlmeProxyInterface::r#sae_frame_tx(self, frame)
1223    }
1224
1225    pub fn r#wmm_status_req(&self) -> Result<(), fidl::Error> {
1226        MlmeProxyInterface::r#wmm_status_req(self)
1227    }
1228
1229    pub fn r#finalize_association_req(
1230        &self,
1231        mut negotiated_capabilities: &NegotiatedCapabilities,
1232    ) -> Result<(), fidl::Error> {
1233        MlmeProxyInterface::r#finalize_association_req(self, negotiated_capabilities)
1234    }
1235
1236    pub fn r#set_mac_address(
1237        &self,
1238        mut mac_addr: &[u8; 6],
1239    ) -> fidl::client::QueryResponseFut<
1240        MlmeSetMacAddressResult,
1241        fidl::encoding::DefaultFuchsiaResourceDialect,
1242    > {
1243        MlmeProxyInterface::r#set_mac_address(self, mac_addr)
1244    }
1245
1246    pub fn r#install_apf_packet_filter(
1247        &self,
1248        mut program: &[u8],
1249    ) -> fidl::client::QueryResponseFut<
1250        MlmeInstallApfPacketFilterResult,
1251        fidl::encoding::DefaultFuchsiaResourceDialect,
1252    > {
1253        MlmeProxyInterface::r#install_apf_packet_filter(self, program)
1254    }
1255
1256    pub fn r#read_apf_packet_filter_data(
1257        &self,
1258    ) -> fidl::client::QueryResponseFut<
1259        MlmeReadApfPacketFilterDataResult,
1260        fidl::encoding::DefaultFuchsiaResourceDialect,
1261    > {
1262        MlmeProxyInterface::r#read_apf_packet_filter_data(self)
1263    }
1264
1265    pub fn r#set_apf_packet_filter_enabled(
1266        &self,
1267        mut enabled: bool,
1268    ) -> fidl::client::QueryResponseFut<
1269        MlmeSetApfPacketFilterEnabledResult,
1270        fidl::encoding::DefaultFuchsiaResourceDialect,
1271    > {
1272        MlmeProxyInterface::r#set_apf_packet_filter_enabled(self, enabled)
1273    }
1274
1275    pub fn r#get_apf_packet_filter_enabled(
1276        &self,
1277    ) -> fidl::client::QueryResponseFut<
1278        MlmeGetApfPacketFilterEnabledResult,
1279        fidl::encoding::DefaultFuchsiaResourceDialect,
1280    > {
1281        MlmeProxyInterface::r#get_apf_packet_filter_enabled(self)
1282    }
1283}
1284
1285impl MlmeProxyInterface for MlmeProxy {
1286    fn r#start_scan(&self, mut req: &ScanRequest) -> Result<(), fidl::Error> {
1287        self.client.send::<MlmeStartScanRequest>(
1288            (req,),
1289            0x342cc5ec6a957479,
1290            fidl::encoding::DynamicFlags::empty(),
1291        )
1292    }
1293
1294    type StartScheduledScanResponseFut = fidl::client::QueryResponseFut<
1295        MlmeStartScheduledScanResult,
1296        fidl::encoding::DefaultFuchsiaResourceDialect,
1297    >;
1298    fn r#start_scheduled_scan(
1299        &self,
1300        mut txn_id: u64,
1301        mut req: &fidl_fuchsia_wlan_common::ScheduledScanRequest,
1302    ) -> Self::StartScheduledScanResponseFut {
1303        fn _decode(
1304            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1305        ) -> Result<MlmeStartScheduledScanResult, fidl::Error> {
1306            let _response = fidl::client::decode_transaction_body::<
1307                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1308                fidl::encoding::DefaultFuchsiaResourceDialect,
1309                0x7fff163af4620212,
1310            >(_buf?)?;
1311            Ok(_response.map(|x| x))
1312        }
1313        self.client
1314            .send_query_and_decode::<MlmeStartScheduledScanRequest, MlmeStartScheduledScanResult>(
1315                (txn_id, req),
1316                0x7fff163af4620212,
1317                fidl::encoding::DynamicFlags::empty(),
1318                _decode,
1319            )
1320    }
1321
1322    type StopScheduledScanResponseFut = fidl::client::QueryResponseFut<
1323        MlmeStopScheduledScanResult,
1324        fidl::encoding::DefaultFuchsiaResourceDialect,
1325    >;
1326    fn r#stop_scheduled_scan(&self, mut txn_id: u64) -> Self::StopScheduledScanResponseFut {
1327        fn _decode(
1328            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1329        ) -> Result<MlmeStopScheduledScanResult, fidl::Error> {
1330            let _response = fidl::client::decode_transaction_body::<
1331                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1332                fidl::encoding::DefaultFuchsiaResourceDialect,
1333                0x5fbc466f3daa4dd9,
1334            >(_buf?)?;
1335            Ok(_response.map(|x| x))
1336        }
1337        self.client
1338            .send_query_and_decode::<MlmeStopScheduledScanRequest, MlmeStopScheduledScanResult>(
1339                (txn_id,),
1340                0x5fbc466f3daa4dd9,
1341                fidl::encoding::DynamicFlags::empty(),
1342                _decode,
1343            )
1344    }
1345
1346    type GetScheduledScanEnabledResponseFut = fidl::client::QueryResponseFut<
1347        MlmeGetScheduledScanEnabledResult,
1348        fidl::encoding::DefaultFuchsiaResourceDialect,
1349    >;
1350    fn r#get_scheduled_scan_enabled(&self) -> Self::GetScheduledScanEnabledResponseFut {
1351        fn _decode(
1352            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1353        ) -> Result<MlmeGetScheduledScanEnabledResult, fidl::Error> {
1354            let _response = fidl::client::decode_transaction_body::<
1355                fidl::encoding::ResultType<MlmeGetScheduledScanEnabledResponse, i32>,
1356                fidl::encoding::DefaultFuchsiaResourceDialect,
1357                0x1ecc6a7fe7f9fcff,
1358            >(_buf?)?;
1359            Ok(_response.map(|x| x.active_txn_ids))
1360        }
1361        self.client.send_query_and_decode::<
1362            fidl::encoding::EmptyPayload,
1363            MlmeGetScheduledScanEnabledResult,
1364        >(
1365            (),
1366            0x1ecc6a7fe7f9fcff,
1367            fidl::encoding::DynamicFlags::empty(),
1368            _decode,
1369        )
1370    }
1371
1372    fn r#connect_req(&self, mut req: &ConnectRequest) -> Result<(), fidl::Error> {
1373        self.client.send::<MlmeConnectReqRequest>(
1374            (req,),
1375            0x31153dc85f8f64c,
1376            fidl::encoding::DynamicFlags::empty(),
1377        )
1378    }
1379
1380    fn r#reconnect_req(&self, mut req: &ReconnectRequest) -> Result<(), fidl::Error> {
1381        self.client.send::<MlmeReconnectReqRequest>(
1382            (req,),
1383            0x74e0f1bd758b6b78,
1384            fidl::encoding::DynamicFlags::empty(),
1385        )
1386    }
1387
1388    fn r#roam_req(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
1389        self.client.send::<MlmeRoamReqRequest>(
1390            (req,),
1391            0x3ba163eadf7dba45,
1392            fidl::encoding::DynamicFlags::empty(),
1393        )
1394    }
1395
1396    fn r#authenticate_resp(&self, mut resp: &AuthenticateResponse) -> Result<(), fidl::Error> {
1397        self.client.send::<MlmeAuthenticateRespRequest>(
1398            (resp,),
1399            0x26108aade2fdd2f4,
1400            fidl::encoding::DynamicFlags::empty(),
1401        )
1402    }
1403
1404    fn r#deauthenticate_req(&self, mut req: &DeauthenticateRequest) -> Result<(), fidl::Error> {
1405        self.client.send::<MlmeDeauthenticateReqRequest>(
1406            (req,),
1407            0x228983b200de5d12,
1408            fidl::encoding::DynamicFlags::empty(),
1409        )
1410    }
1411
1412    fn r#associate_resp(&self, mut resp: &AssociateResponse) -> Result<(), fidl::Error> {
1413        self.client.send::<MlmeAssociateRespRequest>(
1414            (resp,),
1415            0x70244dbd652ed6d9,
1416            fidl::encoding::DynamicFlags::empty(),
1417        )
1418    }
1419
1420    fn r#disassociate_req(&self, mut req: &DisassociateRequest) -> Result<(), fidl::Error> {
1421        self.client.send::<MlmeDisassociateReqRequest>(
1422            (req,),
1423            0x5765807f1387d764,
1424            fidl::encoding::DynamicFlags::empty(),
1425        )
1426    }
1427
1428    fn r#reset_req(&self, mut req: &ResetRequest) -> Result<(), fidl::Error> {
1429        self.client.send::<MlmeResetReqRequest>(
1430            (req,),
1431            0x780b98c58a286b9f,
1432            fidl::encoding::DynamicFlags::empty(),
1433        )
1434    }
1435
1436    fn r#start_req(&self, mut req: &StartRequest) -> Result<(), fidl::Error> {
1437        self.client.send::<MlmeStartReqRequest>(
1438            (req,),
1439            0x5d95885f8053654,
1440            fidl::encoding::DynamicFlags::empty(),
1441        )
1442    }
1443
1444    fn r#stop_req(&self, mut req: &StopRequest) -> Result<(), fidl::Error> {
1445        self.client.send::<MlmeStopReqRequest>(
1446            (req,),
1447            0x27b9a2ab04a2c79f,
1448            fidl::encoding::DynamicFlags::empty(),
1449        )
1450    }
1451
1452    fn r#set_keys_req(&self, mut req: &SetKeysRequest) -> Result<(), fidl::Error> {
1453        self.client.send::<MlmeSetKeysReqRequest>(
1454            (req,),
1455            0x6b30a07fd3a11a79,
1456            fidl::encoding::DynamicFlags::empty(),
1457        )
1458    }
1459
1460    fn r#delete_keys_req(&self, mut req: &DeleteKeysRequest) -> Result<(), fidl::Error> {
1461        self.client.send::<MlmeDeleteKeysReqRequest>(
1462            (req,),
1463            0x1e3524d20d190c8f,
1464            fidl::encoding::DynamicFlags::empty(),
1465        )
1466    }
1467
1468    fn r#eapol_req(&self, mut req: &EapolRequest) -> Result<(), fidl::Error> {
1469        self.client.send::<MlmeEapolReqRequest>(
1470            (req,),
1471            0xc3c096924704d4,
1472            fidl::encoding::DynamicFlags::empty(),
1473        )
1474    }
1475
1476    fn r#set_controlled_port(&self, mut req: &SetControlledPortRequest) -> Result<(), fidl::Error> {
1477        self.client.send::<MlmeSetControlledPortRequest>(
1478            (req,),
1479            0x4e47065668890c8d,
1480            fidl::encoding::DynamicFlags::empty(),
1481        )
1482    }
1483
1484    type QueryDeviceInfoResponseFut =
1485        fidl::client::QueryResponseFut<DeviceInfo, fidl::encoding::DefaultFuchsiaResourceDialect>;
1486    fn r#query_device_info(&self) -> Self::QueryDeviceInfoResponseFut {
1487        fn _decode(
1488            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1489        ) -> Result<DeviceInfo, fidl::Error> {
1490            let _response = fidl::client::decode_transaction_body::<
1491                MlmeQueryDeviceInfoResponse,
1492                fidl::encoding::DefaultFuchsiaResourceDialect,
1493                0x6ee3e7f63f2b7bc0,
1494            >(_buf?)?;
1495            Ok(_response.info)
1496        }
1497        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, DeviceInfo>(
1498            (),
1499            0x6ee3e7f63f2b7bc0,
1500            fidl::encoding::DynamicFlags::empty(),
1501            _decode,
1502        )
1503    }
1504
1505    type QueryTelemetrySupportResponseFut = fidl::client::QueryResponseFut<
1506        MlmeQueryTelemetrySupportResult,
1507        fidl::encoding::DefaultFuchsiaResourceDialect,
1508    >;
1509    fn r#query_telemetry_support(&self) -> Self::QueryTelemetrySupportResponseFut {
1510        fn _decode(
1511            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1512        ) -> Result<MlmeQueryTelemetrySupportResult, fidl::Error> {
1513            let _response = fidl::client::decode_transaction_body::<
1514                fidl::encoding::ResultType<MlmeQueryTelemetrySupportResponse, i32>,
1515                fidl::encoding::DefaultFuchsiaResourceDialect,
1516                0x1598879b70332c99,
1517            >(_buf?)?;
1518            Ok(_response.map(|x| x.resp))
1519        }
1520        self.client
1521            .send_query_and_decode::<fidl::encoding::EmptyPayload, MlmeQueryTelemetrySupportResult>(
1522                (),
1523                0x1598879b70332c99,
1524                fidl::encoding::DynamicFlags::empty(),
1525                _decode,
1526            )
1527    }
1528
1529    type GetIfaceStatsResponseFut = fidl::client::QueryResponseFut<
1530        GetIfaceStatsResponse,
1531        fidl::encoding::DefaultFuchsiaResourceDialect,
1532    >;
1533    fn r#get_iface_stats(&self) -> Self::GetIfaceStatsResponseFut {
1534        fn _decode(
1535            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1536        ) -> Result<GetIfaceStatsResponse, fidl::Error> {
1537            let _response = fidl::client::decode_transaction_body::<
1538                MlmeGetIfaceStatsResponse,
1539                fidl::encoding::DefaultFuchsiaResourceDialect,
1540                0xede1a8342d1b211,
1541            >(_buf?)?;
1542            Ok(_response.resp)
1543        }
1544        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, GetIfaceStatsResponse>(
1545            (),
1546            0xede1a8342d1b211,
1547            fidl::encoding::DynamicFlags::empty(),
1548            _decode,
1549        )
1550    }
1551
1552    type GetIfaceHistogramStatsResponseFut = fidl::client::QueryResponseFut<
1553        GetIfaceHistogramStatsResponse,
1554        fidl::encoding::DefaultFuchsiaResourceDialect,
1555    >;
1556    fn r#get_iface_histogram_stats(&self) -> Self::GetIfaceHistogramStatsResponseFut {
1557        fn _decode(
1558            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1559        ) -> Result<GetIfaceHistogramStatsResponse, fidl::Error> {
1560            let _response = fidl::client::decode_transaction_body::<
1561                MlmeGetIfaceHistogramStatsResponse,
1562                fidl::encoding::DefaultFuchsiaResourceDialect,
1563                0x1979c9d3449f8675,
1564            >(_buf?)?;
1565            Ok(_response.resp)
1566        }
1567        self.client
1568            .send_query_and_decode::<fidl::encoding::EmptyPayload, GetIfaceHistogramStatsResponse>(
1569                (),
1570                0x1979c9d3449f8675,
1571                fidl::encoding::DynamicFlags::empty(),
1572                _decode,
1573            )
1574    }
1575
1576    type GetSignalReportResponseFut = fidl::client::QueryResponseFut<
1577        MlmeGetSignalReportResult,
1578        fidl::encoding::DefaultFuchsiaResourceDialect,
1579    >;
1580    fn r#get_signal_report(&self) -> Self::GetSignalReportResponseFut {
1581        fn _decode(
1582            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1583        ) -> Result<MlmeGetSignalReportResult, fidl::Error> {
1584            let _response = fidl::client::decode_transaction_body::<
1585                fidl::encoding::ResultType<MlmeGetSignalReportResponse, i32>,
1586                fidl::encoding::DefaultFuchsiaResourceDialect,
1587                0x7e47e7ebe92acec9,
1588            >(_buf?)?;
1589            Ok(_response.map(|x| x.resp))
1590        }
1591        self.client
1592            .send_query_and_decode::<fidl::encoding::EmptyPayload, MlmeGetSignalReportResult>(
1593                (),
1594                0x7e47e7ebe92acec9,
1595                fidl::encoding::DynamicFlags::empty(),
1596                _decode,
1597            )
1598    }
1599
1600    type ListMinstrelPeersResponseFut = fidl::client::QueryResponseFut<
1601        MinstrelListResponse,
1602        fidl::encoding::DefaultFuchsiaResourceDialect,
1603    >;
1604    fn r#list_minstrel_peers(&self) -> Self::ListMinstrelPeersResponseFut {
1605        fn _decode(
1606            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1607        ) -> Result<MinstrelListResponse, fidl::Error> {
1608            let _response = fidl::client::decode_transaction_body::<
1609                MlmeListMinstrelPeersResponse,
1610                fidl::encoding::DefaultFuchsiaResourceDialect,
1611                0x4ac5d1e66fe1ffd5,
1612            >(_buf?)?;
1613            Ok(_response.resp)
1614        }
1615        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, MinstrelListResponse>(
1616            (),
1617            0x4ac5d1e66fe1ffd5,
1618            fidl::encoding::DynamicFlags::empty(),
1619            _decode,
1620        )
1621    }
1622
1623    type GetMinstrelStatsResponseFut = fidl::client::QueryResponseFut<
1624        MinstrelStatsResponse,
1625        fidl::encoding::DefaultFuchsiaResourceDialect,
1626    >;
1627    fn r#get_minstrel_stats(
1628        &self,
1629        mut req: &MinstrelStatsRequest,
1630    ) -> Self::GetMinstrelStatsResponseFut {
1631        fn _decode(
1632            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1633        ) -> Result<MinstrelStatsResponse, fidl::Error> {
1634            let _response = fidl::client::decode_transaction_body::<
1635                MlmeGetMinstrelStatsResponse,
1636                fidl::encoding::DefaultFuchsiaResourceDialect,
1637                0x2f688b1245323f4b,
1638            >(_buf?)?;
1639            Ok(_response.resp)
1640        }
1641        self.client.send_query_and_decode::<MlmeGetMinstrelStatsRequest, MinstrelStatsResponse>(
1642            (req,),
1643            0x2f688b1245323f4b,
1644            fidl::encoding::DynamicFlags::empty(),
1645            _decode,
1646        )
1647    }
1648
1649    type StartCaptureFramesResponseFut = fidl::client::QueryResponseFut<
1650        StartCaptureFramesResponse,
1651        fidl::encoding::DefaultFuchsiaResourceDialect,
1652    >;
1653    fn r#start_capture_frames(
1654        &self,
1655        mut req: &StartCaptureFramesRequest,
1656    ) -> Self::StartCaptureFramesResponseFut {
1657        fn _decode(
1658            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1659        ) -> Result<StartCaptureFramesResponse, fidl::Error> {
1660            let _response = fidl::client::decode_transaction_body::<
1661                MlmeStartCaptureFramesResponse,
1662                fidl::encoding::DefaultFuchsiaResourceDialect,
1663                0x23b369ed5749ee69,
1664            >(_buf?)?;
1665            Ok(_response.resp)
1666        }
1667        self.client
1668            .send_query_and_decode::<MlmeStartCaptureFramesRequest, StartCaptureFramesResponse>(
1669                (req,),
1670                0x23b369ed5749ee69,
1671                fidl::encoding::DynamicFlags::empty(),
1672                _decode,
1673            )
1674    }
1675
1676    fn r#stop_capture_frames(&self) -> Result<(), fidl::Error> {
1677        self.client.send::<fidl::encoding::EmptyPayload>(
1678            (),
1679            0x2f1aebbc68bf7c54,
1680            fidl::encoding::DynamicFlags::empty(),
1681        )
1682    }
1683
1684    fn r#sae_handshake_resp(&self, mut resp: &SaeHandshakeResponse) -> Result<(), fidl::Error> {
1685        self.client.send::<MlmeSaeHandshakeRespRequest>(
1686            (resp,),
1687            0x28477bd2f7a5ab0c,
1688            fidl::encoding::DynamicFlags::empty(),
1689        )
1690    }
1691
1692    fn r#sae_frame_tx(&self, mut frame: &SaeFrame) -> Result<(), fidl::Error> {
1693        self.client.send::<MlmeSaeFrameTxRequest>(
1694            (frame,),
1695            0x7700c0d536733d8c,
1696            fidl::encoding::DynamicFlags::empty(),
1697        )
1698    }
1699
1700    fn r#wmm_status_req(&self) -> Result<(), fidl::Error> {
1701        self.client.send::<fidl::encoding::EmptyPayload>(
1702            (),
1703            0xef4851f6088fede,
1704            fidl::encoding::DynamicFlags::empty(),
1705        )
1706    }
1707
1708    fn r#finalize_association_req(
1709        &self,
1710        mut negotiated_capabilities: &NegotiatedCapabilities,
1711    ) -> Result<(), fidl::Error> {
1712        self.client.send::<MlmeFinalizeAssociationReqRequest>(
1713            (negotiated_capabilities,),
1714            0x7aea59787cfd385a,
1715            fidl::encoding::DynamicFlags::empty(),
1716        )
1717    }
1718
1719    type SetMacAddressResponseFut = fidl::client::QueryResponseFut<
1720        MlmeSetMacAddressResult,
1721        fidl::encoding::DefaultFuchsiaResourceDialect,
1722    >;
1723    fn r#set_mac_address(&self, mut mac_addr: &[u8; 6]) -> Self::SetMacAddressResponseFut {
1724        fn _decode(
1725            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1726        ) -> Result<MlmeSetMacAddressResult, fidl::Error> {
1727            let _response = fidl::client::decode_transaction_body::<
1728                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1729                fidl::encoding::DefaultFuchsiaResourceDialect,
1730                0x476999f9bb27afe1,
1731            >(_buf?)?;
1732            Ok(_response.map(|x| x))
1733        }
1734        self.client.send_query_and_decode::<MlmeSetMacAddressRequest, MlmeSetMacAddressResult>(
1735            (mac_addr,),
1736            0x476999f9bb27afe1,
1737            fidl::encoding::DynamicFlags::empty(),
1738            _decode,
1739        )
1740    }
1741
1742    type InstallApfPacketFilterResponseFut = fidl::client::QueryResponseFut<
1743        MlmeInstallApfPacketFilterResult,
1744        fidl::encoding::DefaultFuchsiaResourceDialect,
1745    >;
1746    fn r#install_apf_packet_filter(
1747        &self,
1748        mut program: &[u8],
1749    ) -> Self::InstallApfPacketFilterResponseFut {
1750        fn _decode(
1751            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1752        ) -> Result<MlmeInstallApfPacketFilterResult, fidl::Error> {
1753            let _response = fidl::client::decode_transaction_body::<
1754                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1755                fidl::encoding::DefaultFuchsiaResourceDialect,
1756                0x267565b4916c825b,
1757            >(_buf?)?;
1758            Ok(_response.map(|x| x))
1759        }
1760        self.client.send_query_and_decode::<
1761            MlmeInstallApfPacketFilterRequest,
1762            MlmeInstallApfPacketFilterResult,
1763        >(
1764            (program,),
1765            0x267565b4916c825b,
1766            fidl::encoding::DynamicFlags::empty(),
1767            _decode,
1768        )
1769    }
1770
1771    type ReadApfPacketFilterDataResponseFut = fidl::client::QueryResponseFut<
1772        MlmeReadApfPacketFilterDataResult,
1773        fidl::encoding::DefaultFuchsiaResourceDialect,
1774    >;
1775    fn r#read_apf_packet_filter_data(&self) -> Self::ReadApfPacketFilterDataResponseFut {
1776        fn _decode(
1777            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1778        ) -> Result<MlmeReadApfPacketFilterDataResult, fidl::Error> {
1779            let _response = fidl::client::decode_transaction_body::<
1780                fidl::encoding::ResultType<MlmeReadApfPacketFilterDataResponse, i32>,
1781                fidl::encoding::DefaultFuchsiaResourceDialect,
1782                0x6040d744f1b2cb61,
1783            >(_buf?)?;
1784            Ok(_response.map(|x| x.memory))
1785        }
1786        self.client.send_query_and_decode::<
1787            fidl::encoding::EmptyPayload,
1788            MlmeReadApfPacketFilterDataResult,
1789        >(
1790            (),
1791            0x6040d744f1b2cb61,
1792            fidl::encoding::DynamicFlags::empty(),
1793            _decode,
1794        )
1795    }
1796
1797    type SetApfPacketFilterEnabledResponseFut = fidl::client::QueryResponseFut<
1798        MlmeSetApfPacketFilterEnabledResult,
1799        fidl::encoding::DefaultFuchsiaResourceDialect,
1800    >;
1801    fn r#set_apf_packet_filter_enabled(
1802        &self,
1803        mut enabled: bool,
1804    ) -> Self::SetApfPacketFilterEnabledResponseFut {
1805        fn _decode(
1806            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1807        ) -> Result<MlmeSetApfPacketFilterEnabledResult, fidl::Error> {
1808            let _response = fidl::client::decode_transaction_body::<
1809                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1810                fidl::encoding::DefaultFuchsiaResourceDialect,
1811                0x6d99bdca77076aea,
1812            >(_buf?)?;
1813            Ok(_response.map(|x| x))
1814        }
1815        self.client.send_query_and_decode::<
1816            MlmeSetApfPacketFilterEnabledRequest,
1817            MlmeSetApfPacketFilterEnabledResult,
1818        >(
1819            (enabled,),
1820            0x6d99bdca77076aea,
1821            fidl::encoding::DynamicFlags::empty(),
1822            _decode,
1823        )
1824    }
1825
1826    type GetApfPacketFilterEnabledResponseFut = fidl::client::QueryResponseFut<
1827        MlmeGetApfPacketFilterEnabledResult,
1828        fidl::encoding::DefaultFuchsiaResourceDialect,
1829    >;
1830    fn r#get_apf_packet_filter_enabled(&self) -> Self::GetApfPacketFilterEnabledResponseFut {
1831        fn _decode(
1832            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1833        ) -> Result<MlmeGetApfPacketFilterEnabledResult, fidl::Error> {
1834            let _response = fidl::client::decode_transaction_body::<
1835                fidl::encoding::ResultType<MlmeGetApfPacketFilterEnabledResponse, i32>,
1836                fidl::encoding::DefaultFuchsiaResourceDialect,
1837                0x1df408bc154be1e4,
1838            >(_buf?)?;
1839            Ok(_response.map(|x| x.enabled))
1840        }
1841        self.client.send_query_and_decode::<
1842            fidl::encoding::EmptyPayload,
1843            MlmeGetApfPacketFilterEnabledResult,
1844        >(
1845            (),
1846            0x1df408bc154be1e4,
1847            fidl::encoding::DynamicFlags::empty(),
1848            _decode,
1849        )
1850    }
1851}
1852
1853pub struct MlmeEventStream {
1854    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1855}
1856
1857impl std::marker::Unpin for MlmeEventStream {}
1858
1859impl futures::stream::FusedStream for MlmeEventStream {
1860    fn is_terminated(&self) -> bool {
1861        self.event_receiver.is_terminated()
1862    }
1863}
1864
1865impl futures::Stream for MlmeEventStream {
1866    type Item = Result<MlmeEvent, fidl::Error>;
1867
1868    fn poll_next(
1869        mut self: std::pin::Pin<&mut Self>,
1870        cx: &mut std::task::Context<'_>,
1871    ) -> std::task::Poll<Option<Self::Item>> {
1872        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1873            &mut self.event_receiver,
1874            cx
1875        )?) {
1876            Some(buf) => std::task::Poll::Ready(Some(MlmeEvent::decode(buf))),
1877            None => std::task::Poll::Ready(None),
1878        }
1879    }
1880}
1881
1882#[derive(Debug)]
1883pub enum MlmeEvent {
1884    OnScanResult { result: ScanResult },
1885    OnScanEnd { end: ScanEnd },
1886    OnScheduledScanMatchesAvailable { txn_id: u64 },
1887    OnScheduledScanStoppedByFirmware { txn_id: u64 },
1888    ConnectConf { resp: ConnectConfirm },
1889    RoamConf { conf: RoamConfirm },
1890    RoamStartInd { ind: RoamStartIndication },
1891    RoamResultInd { ind: RoamResultIndication },
1892    AuthenticateInd { ind: AuthenticateIndication },
1893    DeauthenticateConf { resp: DeauthenticateConfirm },
1894    DeauthenticateInd { ind: DeauthenticateIndication },
1895    AssociateInd { ind: AssociateIndication },
1896    DisassociateConf { resp: DisassociateConfirm },
1897    DisassociateInd { ind: DisassociateIndication },
1898    StartConf { resp: StartConfirm },
1899    StopConf { resp: StopConfirm },
1900    SetKeysConf { conf: SetKeysConfirm },
1901    EapolConf { resp: EapolConfirm },
1902    SignalReport { ind: fidl_fuchsia_wlan_internal::SignalReportIndication },
1903    EapolInd { ind: EapolIndication },
1904    RelayCapturedFrame { result: CapturedFrameResult },
1905    OnChannelSwitched { info: fidl_fuchsia_wlan_internal::ChannelSwitchInfo },
1906    OnPmkAvailable { info: PmkInfo },
1907    OnSaeHandshakeInd { ind: SaeHandshakeIndication },
1908    OnSaeFrameRx { frame: SaeFrame },
1909    OnWmmStatusResp { status: i32, resp: fidl_fuchsia_wlan_internal::WmmStatusResponse },
1910}
1911
1912impl MlmeEvent {
1913    #[allow(irrefutable_let_patterns)]
1914    pub fn into_on_scan_result(self) -> Option<ScanResult> {
1915        if let MlmeEvent::OnScanResult { result } = self { Some((result)) } else { None }
1916    }
1917    #[allow(irrefutable_let_patterns)]
1918    pub fn into_on_scan_end(self) -> Option<ScanEnd> {
1919        if let MlmeEvent::OnScanEnd { end } = self { Some((end)) } else { None }
1920    }
1921    #[allow(irrefutable_let_patterns)]
1922    pub fn into_on_scheduled_scan_matches_available(self) -> Option<u64> {
1923        if let MlmeEvent::OnScheduledScanMatchesAvailable { txn_id } = self {
1924            Some((txn_id))
1925        } else {
1926            None
1927        }
1928    }
1929    #[allow(irrefutable_let_patterns)]
1930    pub fn into_on_scheduled_scan_stopped_by_firmware(self) -> Option<u64> {
1931        if let MlmeEvent::OnScheduledScanStoppedByFirmware { txn_id } = self {
1932            Some((txn_id))
1933        } else {
1934            None
1935        }
1936    }
1937    #[allow(irrefutable_let_patterns)]
1938    pub fn into_connect_conf(self) -> Option<ConnectConfirm> {
1939        if let MlmeEvent::ConnectConf { resp } = self { Some((resp)) } else { None }
1940    }
1941    #[allow(irrefutable_let_patterns)]
1942    pub fn into_roam_conf(self) -> Option<RoamConfirm> {
1943        if let MlmeEvent::RoamConf { conf } = self { Some((conf)) } else { None }
1944    }
1945    #[allow(irrefutable_let_patterns)]
1946    pub fn into_roam_start_ind(self) -> Option<RoamStartIndication> {
1947        if let MlmeEvent::RoamStartInd { ind } = self { Some((ind)) } else { None }
1948    }
1949    #[allow(irrefutable_let_patterns)]
1950    pub fn into_roam_result_ind(self) -> Option<RoamResultIndication> {
1951        if let MlmeEvent::RoamResultInd { ind } = self { Some((ind)) } else { None }
1952    }
1953    #[allow(irrefutable_let_patterns)]
1954    pub fn into_authenticate_ind(self) -> Option<AuthenticateIndication> {
1955        if let MlmeEvent::AuthenticateInd { ind } = self { Some((ind)) } else { None }
1956    }
1957    #[allow(irrefutable_let_patterns)]
1958    pub fn into_deauthenticate_conf(self) -> Option<DeauthenticateConfirm> {
1959        if let MlmeEvent::DeauthenticateConf { resp } = self { Some((resp)) } else { None }
1960    }
1961    #[allow(irrefutable_let_patterns)]
1962    pub fn into_deauthenticate_ind(self) -> Option<DeauthenticateIndication> {
1963        if let MlmeEvent::DeauthenticateInd { ind } = self { Some((ind)) } else { None }
1964    }
1965    #[allow(irrefutable_let_patterns)]
1966    pub fn into_associate_ind(self) -> Option<AssociateIndication> {
1967        if let MlmeEvent::AssociateInd { ind } = self { Some((ind)) } else { None }
1968    }
1969    #[allow(irrefutable_let_patterns)]
1970    pub fn into_disassociate_conf(self) -> Option<DisassociateConfirm> {
1971        if let MlmeEvent::DisassociateConf { resp } = self { Some((resp)) } else { None }
1972    }
1973    #[allow(irrefutable_let_patterns)]
1974    pub fn into_disassociate_ind(self) -> Option<DisassociateIndication> {
1975        if let MlmeEvent::DisassociateInd { ind } = self { Some((ind)) } else { None }
1976    }
1977    #[allow(irrefutable_let_patterns)]
1978    pub fn into_start_conf(self) -> Option<StartConfirm> {
1979        if let MlmeEvent::StartConf { resp } = self { Some((resp)) } else { None }
1980    }
1981    #[allow(irrefutable_let_patterns)]
1982    pub fn into_stop_conf(self) -> Option<StopConfirm> {
1983        if let MlmeEvent::StopConf { resp } = self { Some((resp)) } else { None }
1984    }
1985    #[allow(irrefutable_let_patterns)]
1986    pub fn into_set_keys_conf(self) -> Option<SetKeysConfirm> {
1987        if let MlmeEvent::SetKeysConf { conf } = self { Some((conf)) } else { None }
1988    }
1989    #[allow(irrefutable_let_patterns)]
1990    pub fn into_eapol_conf(self) -> Option<EapolConfirm> {
1991        if let MlmeEvent::EapolConf { resp } = self { Some((resp)) } else { None }
1992    }
1993    #[allow(irrefutable_let_patterns)]
1994    pub fn into_signal_report(self) -> Option<fidl_fuchsia_wlan_internal::SignalReportIndication> {
1995        if let MlmeEvent::SignalReport { ind } = self { Some((ind)) } else { None }
1996    }
1997    #[allow(irrefutable_let_patterns)]
1998    pub fn into_eapol_ind(self) -> Option<EapolIndication> {
1999        if let MlmeEvent::EapolInd { ind } = self { Some((ind)) } else { None }
2000    }
2001    #[allow(irrefutable_let_patterns)]
2002    pub fn into_relay_captured_frame(self) -> Option<CapturedFrameResult> {
2003        if let MlmeEvent::RelayCapturedFrame { result } = self { Some((result)) } else { None }
2004    }
2005    #[allow(irrefutable_let_patterns)]
2006    pub fn into_on_channel_switched(self) -> Option<fidl_fuchsia_wlan_internal::ChannelSwitchInfo> {
2007        if let MlmeEvent::OnChannelSwitched { info } = self { Some((info)) } else { None }
2008    }
2009    #[allow(irrefutable_let_patterns)]
2010    pub fn into_on_pmk_available(self) -> Option<PmkInfo> {
2011        if let MlmeEvent::OnPmkAvailable { info } = self { Some((info)) } else { None }
2012    }
2013    #[allow(irrefutable_let_patterns)]
2014    pub fn into_on_sae_handshake_ind(self) -> Option<SaeHandshakeIndication> {
2015        if let MlmeEvent::OnSaeHandshakeInd { ind } = self { Some((ind)) } else { None }
2016    }
2017    #[allow(irrefutable_let_patterns)]
2018    pub fn into_on_sae_frame_rx(self) -> Option<SaeFrame> {
2019        if let MlmeEvent::OnSaeFrameRx { frame } = self { Some((frame)) } else { None }
2020    }
2021    #[allow(irrefutable_let_patterns)]
2022    pub fn into_on_wmm_status_resp(
2023        self,
2024    ) -> Option<(i32, fidl_fuchsia_wlan_internal::WmmStatusResponse)> {
2025        if let MlmeEvent::OnWmmStatusResp { status, resp } = self {
2026            Some((status, resp))
2027        } else {
2028            None
2029        }
2030    }
2031
2032    /// Decodes a message buffer as a [`MlmeEvent`].
2033    fn decode(
2034        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2035    ) -> Result<MlmeEvent, fidl::Error> {
2036        let (bytes, _handles) = buf.split_mut();
2037        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2038        debug_assert_eq!(tx_header.tx_id, 0);
2039        match tx_header.ordinal {
2040            0x681af7466a75074d => {
2041                let mut out = fidl::new_empty!(
2042                    MlmeOnScanResultRequest,
2043                    fidl::encoding::DefaultFuchsiaResourceDialect
2044                );
2045                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnScanResultRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2046                Ok((MlmeEvent::OnScanResult { result: out.result }))
2047            }
2048            0x7f2702d253e7ca59 => {
2049                let mut out = fidl::new_empty!(
2050                    MlmeOnScanEndRequest,
2051                    fidl::encoding::DefaultFuchsiaResourceDialect
2052                );
2053                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnScanEndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2054                Ok((MlmeEvent::OnScanEnd { end: out.end }))
2055            }
2056            0x3d915df5108ec4e1 => {
2057                let mut out = fidl::new_empty!(
2058                    MlmeOnScheduledScanMatchesAvailableRequest,
2059                    fidl::encoding::DefaultFuchsiaResourceDialect
2060                );
2061                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnScheduledScanMatchesAvailableRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2062                Ok((MlmeEvent::OnScheduledScanMatchesAvailable { txn_id: out.txn_id }))
2063            }
2064            0x4c2cb4b145163fd0 => {
2065                let mut out = fidl::new_empty!(
2066                    MlmeOnScheduledScanStoppedByFirmwareRequest,
2067                    fidl::encoding::DefaultFuchsiaResourceDialect
2068                );
2069                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnScheduledScanStoppedByFirmwareRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2070                Ok((MlmeEvent::OnScheduledScanStoppedByFirmware { txn_id: out.txn_id }))
2071            }
2072            0x77b27623279b981e => {
2073                let mut out = fidl::new_empty!(
2074                    MlmeConnectConfRequest,
2075                    fidl::encoding::DefaultFuchsiaResourceDialect
2076                );
2077                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeConnectConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2078                Ok((MlmeEvent::ConnectConf { resp: out.resp }))
2079            }
2080            0x3f608034faa054bc => {
2081                let mut out = fidl::new_empty!(
2082                    MlmeRoamConfRequest,
2083                    fidl::encoding::DefaultFuchsiaResourceDialect
2084                );
2085                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeRoamConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2086                Ok((MlmeEvent::RoamConf { conf: out.conf }))
2087            }
2088            0x270a1ec78672d094 => {
2089                let mut out = fidl::new_empty!(
2090                    MlmeRoamStartIndRequest,
2091                    fidl::encoding::DefaultFuchsiaResourceDialect
2092                );
2093                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeRoamStartIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2094                Ok((MlmeEvent::RoamStartInd { ind: out.ind }))
2095            }
2096            0x26d074364fc84865 => {
2097                let mut out = fidl::new_empty!(
2098                    MlmeRoamResultIndRequest,
2099                    fidl::encoding::DefaultFuchsiaResourceDialect
2100                );
2101                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeRoamResultIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2102                Ok((MlmeEvent::RoamResultInd { ind: out.ind }))
2103            }
2104            0x460f49ae891adbe9 => {
2105                let mut out = fidl::new_empty!(
2106                    MlmeAuthenticateIndRequest,
2107                    fidl::encoding::DefaultFuchsiaResourceDialect
2108                );
2109                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeAuthenticateIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2110                Ok((MlmeEvent::AuthenticateInd { ind: out.ind }))
2111            }
2112            0x3b44debc21b88c8c => {
2113                let mut out = fidl::new_empty!(
2114                    MlmeDeauthenticateConfRequest,
2115                    fidl::encoding::DefaultFuchsiaResourceDialect
2116                );
2117                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDeauthenticateConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2118                Ok((MlmeEvent::DeauthenticateConf { resp: out.resp }))
2119            }
2120            0x7ee0889b326da1d7 => {
2121                let mut out = fidl::new_empty!(
2122                    MlmeDeauthenticateIndRequest,
2123                    fidl::encoding::DefaultFuchsiaResourceDialect
2124                );
2125                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDeauthenticateIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2126                Ok((MlmeEvent::DeauthenticateInd { ind: out.ind }))
2127            }
2128            0x6a86f20e3063dd63 => {
2129                let mut out = fidl::new_empty!(
2130                    MlmeAssociateIndRequest,
2131                    fidl::encoding::DefaultFuchsiaResourceDialect
2132                );
2133                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeAssociateIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2134                Ok((MlmeEvent::AssociateInd { ind: out.ind }))
2135            }
2136            0x61345fbce732a28d => {
2137                let mut out = fidl::new_empty!(
2138                    MlmeDisassociateConfRequest,
2139                    fidl::encoding::DefaultFuchsiaResourceDialect
2140                );
2141                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDisassociateConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2142                Ok((MlmeEvent::DisassociateConf { resp: out.resp }))
2143            }
2144            0x77ac0ebf387c1f35 => {
2145                let mut out = fidl::new_empty!(
2146                    MlmeDisassociateIndRequest,
2147                    fidl::encoding::DefaultFuchsiaResourceDialect
2148                );
2149                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDisassociateIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2150                Ok((MlmeEvent::DisassociateInd { ind: out.ind }))
2151            }
2152            0x15ea6cdf3b8382b3 => {
2153                let mut out = fidl::new_empty!(
2154                    MlmeStartConfRequest,
2155                    fidl::encoding::DefaultFuchsiaResourceDialect
2156                );
2157                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStartConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2158                Ok((MlmeEvent::StartConf { resp: out.resp }))
2159            }
2160            0x50b426ef4a84a2df => {
2161                let mut out = fidl::new_empty!(
2162                    MlmeStopConfRequest,
2163                    fidl::encoding::DefaultFuchsiaResourceDialect
2164                );
2165                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStopConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2166                Ok((MlmeEvent::StopConf { resp: out.resp }))
2167            }
2168            0x5bafb3a8d4039380 => {
2169                let mut out = fidl::new_empty!(
2170                    MlmeSetKeysConfRequest,
2171                    fidl::encoding::DefaultFuchsiaResourceDialect
2172                );
2173                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSetKeysConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2174                Ok((MlmeEvent::SetKeysConf { conf: out.conf }))
2175            }
2176            0x6ffa21f4ee73ce64 => {
2177                let mut out = fidl::new_empty!(
2178                    MlmeEapolConfRequest,
2179                    fidl::encoding::DefaultFuchsiaResourceDialect
2180                );
2181                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeEapolConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2182                Ok((MlmeEvent::EapolConf { resp: out.resp }))
2183            }
2184            0x48f32a876aa53d8f => {
2185                let mut out = fidl::new_empty!(
2186                    MlmeSignalReportRequest,
2187                    fidl::encoding::DefaultFuchsiaResourceDialect
2188                );
2189                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSignalReportRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2190                Ok((MlmeEvent::SignalReport { ind: out.ind }))
2191            }
2192            0x7038dca46a3142fc => {
2193                let mut out = fidl::new_empty!(
2194                    MlmeEapolIndRequest,
2195                    fidl::encoding::DefaultFuchsiaResourceDialect
2196                );
2197                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeEapolIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2198                Ok((MlmeEvent::EapolInd { ind: out.ind }))
2199            }
2200            0x6f00a6f3cff9b1f5 => {
2201                let mut out = fidl::new_empty!(
2202                    MlmeRelayCapturedFrameRequest,
2203                    fidl::encoding::DefaultFuchsiaResourceDialect
2204                );
2205                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeRelayCapturedFrameRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2206                Ok((MlmeEvent::RelayCapturedFrame { result: out.result }))
2207            }
2208            0x581750594e4c0c1 => {
2209                let mut out = fidl::new_empty!(
2210                    MlmeOnChannelSwitchedRequest,
2211                    fidl::encoding::DefaultFuchsiaResourceDialect
2212                );
2213                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnChannelSwitchedRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2214                Ok((MlmeEvent::OnChannelSwitched { info: out.info }))
2215            }
2216            0x1314fc2c79643f90 => {
2217                let mut out = fidl::new_empty!(
2218                    MlmeOnPmkAvailableRequest,
2219                    fidl::encoding::DefaultFuchsiaResourceDialect
2220                );
2221                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnPmkAvailableRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2222                Ok((MlmeEvent::OnPmkAvailable { info: out.info }))
2223            }
2224            0x6308b10e18986d7e => {
2225                let mut out = fidl::new_empty!(
2226                    MlmeOnSaeHandshakeIndRequest,
2227                    fidl::encoding::DefaultFuchsiaResourceDialect
2228                );
2229                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnSaeHandshakeIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2230                Ok((MlmeEvent::OnSaeHandshakeInd { ind: out.ind }))
2231            }
2232            0x4ebf51c86ef5f3cd => {
2233                let mut out = fidl::new_empty!(
2234                    MlmeOnSaeFrameRxRequest,
2235                    fidl::encoding::DefaultFuchsiaResourceDialect
2236                );
2237                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnSaeFrameRxRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2238                Ok((MlmeEvent::OnSaeFrameRx { frame: out.frame }))
2239            }
2240            0x53f056b432e7b5cb => {
2241                let mut out = fidl::new_empty!(
2242                    MlmeOnWmmStatusRespRequest,
2243                    fidl::encoding::DefaultFuchsiaResourceDialect
2244                );
2245                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnWmmStatusRespRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2246                Ok((MlmeEvent::OnWmmStatusResp { status: out.status, resp: out.resp }))
2247            }
2248            _ => Err(fidl::Error::UnknownOrdinal {
2249                ordinal: tx_header.ordinal,
2250                protocol_name: <MlmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2251            }),
2252        }
2253    }
2254}
2255
2256/// A Stream of incoming requests for fuchsia.wlan.mlme/MLME.
2257pub struct MlmeRequestStream {
2258    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2259    is_terminated: bool,
2260}
2261
2262impl std::marker::Unpin for MlmeRequestStream {}
2263
2264impl futures::stream::FusedStream for MlmeRequestStream {
2265    fn is_terminated(&self) -> bool {
2266        self.is_terminated
2267    }
2268}
2269
2270impl fidl::endpoints::RequestStream for MlmeRequestStream {
2271    type Protocol = MlmeMarker;
2272    type ControlHandle = MlmeControlHandle;
2273
2274    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2275        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2276    }
2277
2278    fn control_handle(&self) -> Self::ControlHandle {
2279        MlmeControlHandle { inner: self.inner.clone() }
2280    }
2281
2282    fn into_inner(
2283        self,
2284    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2285    {
2286        (self.inner, self.is_terminated)
2287    }
2288
2289    fn from_inner(
2290        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2291        is_terminated: bool,
2292    ) -> Self {
2293        Self { inner, is_terminated }
2294    }
2295}
2296
2297impl futures::Stream for MlmeRequestStream {
2298    type Item = Result<MlmeRequest, fidl::Error>;
2299
2300    fn poll_next(
2301        mut self: std::pin::Pin<&mut Self>,
2302        cx: &mut std::task::Context<'_>,
2303    ) -> std::task::Poll<Option<Self::Item>> {
2304        let this = &mut *self;
2305        if this.inner.check_shutdown(cx) {
2306            this.is_terminated = true;
2307            return std::task::Poll::Ready(None);
2308        }
2309        if this.is_terminated {
2310            panic!("polled MlmeRequestStream after completion");
2311        }
2312        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
2313            |bytes, handles| {
2314                match this.inner.channel().read_etc(cx, bytes, handles) {
2315                    std::task::Poll::Ready(Ok(())) => {}
2316                    std::task::Poll::Pending => return std::task::Poll::Pending,
2317                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
2318                        this.is_terminated = true;
2319                        return std::task::Poll::Ready(None);
2320                    }
2321                    std::task::Poll::Ready(Err(e)) => {
2322                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2323                            e.into(),
2324                        ))));
2325                    }
2326                }
2327
2328                // A message has been received from the channel
2329                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2330
2331                std::task::Poll::Ready(Some(match header.ordinal {
2332                    0x342cc5ec6a957479 => {
2333                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2334                        let mut req = fidl::new_empty!(
2335                            MlmeStartScanRequest,
2336                            fidl::encoding::DefaultFuchsiaResourceDialect
2337                        );
2338                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStartScanRequest>(&header, _body_bytes, handles, &mut req)?;
2339                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2340                        Ok(MlmeRequest::StartScan { req: req.req, control_handle })
2341                    }
2342                    0x7fff163af4620212 => {
2343                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2344                        let mut req = fidl::new_empty!(
2345                            MlmeStartScheduledScanRequest,
2346                            fidl::encoding::DefaultFuchsiaResourceDialect
2347                        );
2348                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStartScheduledScanRequest>(&header, _body_bytes, handles, &mut req)?;
2349                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2350                        Ok(MlmeRequest::StartScheduledScan {
2351                            txn_id: req.txn_id,
2352                            req: req.req,
2353
2354                            responder: MlmeStartScheduledScanResponder {
2355                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2356                                tx_id: header.tx_id,
2357                            },
2358                        })
2359                    }
2360                    0x5fbc466f3daa4dd9 => {
2361                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2362                        let mut req = fidl::new_empty!(
2363                            MlmeStopScheduledScanRequest,
2364                            fidl::encoding::DefaultFuchsiaResourceDialect
2365                        );
2366                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStopScheduledScanRequest>(&header, _body_bytes, handles, &mut req)?;
2367                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2368                        Ok(MlmeRequest::StopScheduledScan {
2369                            txn_id: req.txn_id,
2370
2371                            responder: MlmeStopScheduledScanResponder {
2372                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2373                                tx_id: header.tx_id,
2374                            },
2375                        })
2376                    }
2377                    0x1ecc6a7fe7f9fcff => {
2378                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2379                        let mut req = fidl::new_empty!(
2380                            fidl::encoding::EmptyPayload,
2381                            fidl::encoding::DefaultFuchsiaResourceDialect
2382                        );
2383                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2384                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2385                        Ok(MlmeRequest::GetScheduledScanEnabled {
2386                            responder: MlmeGetScheduledScanEnabledResponder {
2387                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2388                                tx_id: header.tx_id,
2389                            },
2390                        })
2391                    }
2392                    0x31153dc85f8f64c => {
2393                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2394                        let mut req = fidl::new_empty!(
2395                            MlmeConnectReqRequest,
2396                            fidl::encoding::DefaultFuchsiaResourceDialect
2397                        );
2398                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeConnectReqRequest>(&header, _body_bytes, handles, &mut req)?;
2399                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2400                        Ok(MlmeRequest::ConnectReq { req: req.req, control_handle })
2401                    }
2402                    0x74e0f1bd758b6b78 => {
2403                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2404                        let mut req = fidl::new_empty!(
2405                            MlmeReconnectReqRequest,
2406                            fidl::encoding::DefaultFuchsiaResourceDialect
2407                        );
2408                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeReconnectReqRequest>(&header, _body_bytes, handles, &mut req)?;
2409                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2410                        Ok(MlmeRequest::ReconnectReq { req: req.req, control_handle })
2411                    }
2412                    0x3ba163eadf7dba45 => {
2413                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2414                        let mut req = fidl::new_empty!(
2415                            MlmeRoamReqRequest,
2416                            fidl::encoding::DefaultFuchsiaResourceDialect
2417                        );
2418                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeRoamReqRequest>(&header, _body_bytes, handles, &mut req)?;
2419                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2420                        Ok(MlmeRequest::RoamReq { req: req.req, control_handle })
2421                    }
2422                    0x26108aade2fdd2f4 => {
2423                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2424                        let mut req = fidl::new_empty!(
2425                            MlmeAuthenticateRespRequest,
2426                            fidl::encoding::DefaultFuchsiaResourceDialect
2427                        );
2428                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeAuthenticateRespRequest>(&header, _body_bytes, handles, &mut req)?;
2429                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2430                        Ok(MlmeRequest::AuthenticateResp { resp: req.resp, control_handle })
2431                    }
2432                    0x228983b200de5d12 => {
2433                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2434                        let mut req = fidl::new_empty!(
2435                            MlmeDeauthenticateReqRequest,
2436                            fidl::encoding::DefaultFuchsiaResourceDialect
2437                        );
2438                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDeauthenticateReqRequest>(&header, _body_bytes, handles, &mut req)?;
2439                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2440                        Ok(MlmeRequest::DeauthenticateReq { req: req.req, control_handle })
2441                    }
2442                    0x70244dbd652ed6d9 => {
2443                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2444                        let mut req = fidl::new_empty!(
2445                            MlmeAssociateRespRequest,
2446                            fidl::encoding::DefaultFuchsiaResourceDialect
2447                        );
2448                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeAssociateRespRequest>(&header, _body_bytes, handles, &mut req)?;
2449                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2450                        Ok(MlmeRequest::AssociateResp { resp: req.resp, control_handle })
2451                    }
2452                    0x5765807f1387d764 => {
2453                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2454                        let mut req = fidl::new_empty!(
2455                            MlmeDisassociateReqRequest,
2456                            fidl::encoding::DefaultFuchsiaResourceDialect
2457                        );
2458                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDisassociateReqRequest>(&header, _body_bytes, handles, &mut req)?;
2459                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2460                        Ok(MlmeRequest::DisassociateReq { req: req.req, control_handle })
2461                    }
2462                    0x780b98c58a286b9f => {
2463                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2464                        let mut req = fidl::new_empty!(
2465                            MlmeResetReqRequest,
2466                            fidl::encoding::DefaultFuchsiaResourceDialect
2467                        );
2468                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeResetReqRequest>(&header, _body_bytes, handles, &mut req)?;
2469                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2470                        Ok(MlmeRequest::ResetReq { req: req.req, control_handle })
2471                    }
2472                    0x5d95885f8053654 => {
2473                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2474                        let mut req = fidl::new_empty!(
2475                            MlmeStartReqRequest,
2476                            fidl::encoding::DefaultFuchsiaResourceDialect
2477                        );
2478                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStartReqRequest>(&header, _body_bytes, handles, &mut req)?;
2479                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2480                        Ok(MlmeRequest::StartReq { req: req.req, control_handle })
2481                    }
2482                    0x27b9a2ab04a2c79f => {
2483                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2484                        let mut req = fidl::new_empty!(
2485                            MlmeStopReqRequest,
2486                            fidl::encoding::DefaultFuchsiaResourceDialect
2487                        );
2488                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStopReqRequest>(&header, _body_bytes, handles, &mut req)?;
2489                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2490                        Ok(MlmeRequest::StopReq { req: req.req, control_handle })
2491                    }
2492                    0x6b30a07fd3a11a79 => {
2493                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2494                        let mut req = fidl::new_empty!(
2495                            MlmeSetKeysReqRequest,
2496                            fidl::encoding::DefaultFuchsiaResourceDialect
2497                        );
2498                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSetKeysReqRequest>(&header, _body_bytes, handles, &mut req)?;
2499                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2500                        Ok(MlmeRequest::SetKeysReq { req: req.req, control_handle })
2501                    }
2502                    0x1e3524d20d190c8f => {
2503                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2504                        let mut req = fidl::new_empty!(
2505                            MlmeDeleteKeysReqRequest,
2506                            fidl::encoding::DefaultFuchsiaResourceDialect
2507                        );
2508                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDeleteKeysReqRequest>(&header, _body_bytes, handles, &mut req)?;
2509                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2510                        Ok(MlmeRequest::DeleteKeysReq { req: req.req, control_handle })
2511                    }
2512                    0xc3c096924704d4 => {
2513                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2514                        let mut req = fidl::new_empty!(
2515                            MlmeEapolReqRequest,
2516                            fidl::encoding::DefaultFuchsiaResourceDialect
2517                        );
2518                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeEapolReqRequest>(&header, _body_bytes, handles, &mut req)?;
2519                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2520                        Ok(MlmeRequest::EapolReq { req: req.req, control_handle })
2521                    }
2522                    0x4e47065668890c8d => {
2523                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2524                        let mut req = fidl::new_empty!(
2525                            MlmeSetControlledPortRequest,
2526                            fidl::encoding::DefaultFuchsiaResourceDialect
2527                        );
2528                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSetControlledPortRequest>(&header, _body_bytes, handles, &mut req)?;
2529                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2530                        Ok(MlmeRequest::SetControlledPort { req: req.req, control_handle })
2531                    }
2532                    0x6ee3e7f63f2b7bc0 => {
2533                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2534                        let mut req = fidl::new_empty!(
2535                            fidl::encoding::EmptyPayload,
2536                            fidl::encoding::DefaultFuchsiaResourceDialect
2537                        );
2538                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2539                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2540                        Ok(MlmeRequest::QueryDeviceInfo {
2541                            responder: MlmeQueryDeviceInfoResponder {
2542                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2543                                tx_id: header.tx_id,
2544                            },
2545                        })
2546                    }
2547                    0x1598879b70332c99 => {
2548                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2549                        let mut req = fidl::new_empty!(
2550                            fidl::encoding::EmptyPayload,
2551                            fidl::encoding::DefaultFuchsiaResourceDialect
2552                        );
2553                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2554                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2555                        Ok(MlmeRequest::QueryTelemetrySupport {
2556                            responder: MlmeQueryTelemetrySupportResponder {
2557                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2558                                tx_id: header.tx_id,
2559                            },
2560                        })
2561                    }
2562                    0xede1a8342d1b211 => {
2563                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2564                        let mut req = fidl::new_empty!(
2565                            fidl::encoding::EmptyPayload,
2566                            fidl::encoding::DefaultFuchsiaResourceDialect
2567                        );
2568                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2569                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2570                        Ok(MlmeRequest::GetIfaceStats {
2571                            responder: MlmeGetIfaceStatsResponder {
2572                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2573                                tx_id: header.tx_id,
2574                            },
2575                        })
2576                    }
2577                    0x1979c9d3449f8675 => {
2578                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2579                        let mut req = fidl::new_empty!(
2580                            fidl::encoding::EmptyPayload,
2581                            fidl::encoding::DefaultFuchsiaResourceDialect
2582                        );
2583                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2584                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2585                        Ok(MlmeRequest::GetIfaceHistogramStats {
2586                            responder: MlmeGetIfaceHistogramStatsResponder {
2587                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2588                                tx_id: header.tx_id,
2589                            },
2590                        })
2591                    }
2592                    0x7e47e7ebe92acec9 => {
2593                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2594                        let mut req = fidl::new_empty!(
2595                            fidl::encoding::EmptyPayload,
2596                            fidl::encoding::DefaultFuchsiaResourceDialect
2597                        );
2598                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2599                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2600                        Ok(MlmeRequest::GetSignalReport {
2601                            responder: MlmeGetSignalReportResponder {
2602                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2603                                tx_id: header.tx_id,
2604                            },
2605                        })
2606                    }
2607                    0x4ac5d1e66fe1ffd5 => {
2608                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2609                        let mut req = fidl::new_empty!(
2610                            fidl::encoding::EmptyPayload,
2611                            fidl::encoding::DefaultFuchsiaResourceDialect
2612                        );
2613                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2614                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2615                        Ok(MlmeRequest::ListMinstrelPeers {
2616                            responder: MlmeListMinstrelPeersResponder {
2617                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2618                                tx_id: header.tx_id,
2619                            },
2620                        })
2621                    }
2622                    0x2f688b1245323f4b => {
2623                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2624                        let mut req = fidl::new_empty!(
2625                            MlmeGetMinstrelStatsRequest,
2626                            fidl::encoding::DefaultFuchsiaResourceDialect
2627                        );
2628                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeGetMinstrelStatsRequest>(&header, _body_bytes, handles, &mut req)?;
2629                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2630                        Ok(MlmeRequest::GetMinstrelStats {
2631                            req: req.req,
2632
2633                            responder: MlmeGetMinstrelStatsResponder {
2634                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2635                                tx_id: header.tx_id,
2636                            },
2637                        })
2638                    }
2639                    0x23b369ed5749ee69 => {
2640                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2641                        let mut req = fidl::new_empty!(
2642                            MlmeStartCaptureFramesRequest,
2643                            fidl::encoding::DefaultFuchsiaResourceDialect
2644                        );
2645                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStartCaptureFramesRequest>(&header, _body_bytes, handles, &mut req)?;
2646                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2647                        Ok(MlmeRequest::StartCaptureFrames {
2648                            req: req.req,
2649
2650                            responder: MlmeStartCaptureFramesResponder {
2651                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2652                                tx_id: header.tx_id,
2653                            },
2654                        })
2655                    }
2656                    0x2f1aebbc68bf7c54 => {
2657                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2658                        let mut req = fidl::new_empty!(
2659                            fidl::encoding::EmptyPayload,
2660                            fidl::encoding::DefaultFuchsiaResourceDialect
2661                        );
2662                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2663                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2664                        Ok(MlmeRequest::StopCaptureFrames { control_handle })
2665                    }
2666                    0x28477bd2f7a5ab0c => {
2667                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2668                        let mut req = fidl::new_empty!(
2669                            MlmeSaeHandshakeRespRequest,
2670                            fidl::encoding::DefaultFuchsiaResourceDialect
2671                        );
2672                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSaeHandshakeRespRequest>(&header, _body_bytes, handles, &mut req)?;
2673                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2674                        Ok(MlmeRequest::SaeHandshakeResp { resp: req.resp, control_handle })
2675                    }
2676                    0x7700c0d536733d8c => {
2677                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2678                        let mut req = fidl::new_empty!(
2679                            MlmeSaeFrameTxRequest,
2680                            fidl::encoding::DefaultFuchsiaResourceDialect
2681                        );
2682                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSaeFrameTxRequest>(&header, _body_bytes, handles, &mut req)?;
2683                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2684                        Ok(MlmeRequest::SaeFrameTx { frame: req.frame, control_handle })
2685                    }
2686                    0xef4851f6088fede => {
2687                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2688                        let mut req = fidl::new_empty!(
2689                            fidl::encoding::EmptyPayload,
2690                            fidl::encoding::DefaultFuchsiaResourceDialect
2691                        );
2692                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2693                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2694                        Ok(MlmeRequest::WmmStatusReq { control_handle })
2695                    }
2696                    0x7aea59787cfd385a => {
2697                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2698                        let mut req = fidl::new_empty!(
2699                            MlmeFinalizeAssociationReqRequest,
2700                            fidl::encoding::DefaultFuchsiaResourceDialect
2701                        );
2702                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeFinalizeAssociationReqRequest>(&header, _body_bytes, handles, &mut req)?;
2703                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2704                        Ok(MlmeRequest::FinalizeAssociationReq {
2705                            negotiated_capabilities: req.negotiated_capabilities,
2706
2707                            control_handle,
2708                        })
2709                    }
2710                    0x476999f9bb27afe1 => {
2711                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2712                        let mut req = fidl::new_empty!(
2713                            MlmeSetMacAddressRequest,
2714                            fidl::encoding::DefaultFuchsiaResourceDialect
2715                        );
2716                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSetMacAddressRequest>(&header, _body_bytes, handles, &mut req)?;
2717                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2718                        Ok(MlmeRequest::SetMacAddress {
2719                            mac_addr: req.mac_addr,
2720
2721                            responder: MlmeSetMacAddressResponder {
2722                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2723                                tx_id: header.tx_id,
2724                            },
2725                        })
2726                    }
2727                    0x267565b4916c825b => {
2728                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2729                        let mut req = fidl::new_empty!(
2730                            MlmeInstallApfPacketFilterRequest,
2731                            fidl::encoding::DefaultFuchsiaResourceDialect
2732                        );
2733                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeInstallApfPacketFilterRequest>(&header, _body_bytes, handles, &mut req)?;
2734                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2735                        Ok(MlmeRequest::InstallApfPacketFilter {
2736                            program: req.program,
2737
2738                            responder: MlmeInstallApfPacketFilterResponder {
2739                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2740                                tx_id: header.tx_id,
2741                            },
2742                        })
2743                    }
2744                    0x6040d744f1b2cb61 => {
2745                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2746                        let mut req = fidl::new_empty!(
2747                            fidl::encoding::EmptyPayload,
2748                            fidl::encoding::DefaultFuchsiaResourceDialect
2749                        );
2750                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2751                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2752                        Ok(MlmeRequest::ReadApfPacketFilterData {
2753                            responder: MlmeReadApfPacketFilterDataResponder {
2754                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2755                                tx_id: header.tx_id,
2756                            },
2757                        })
2758                    }
2759                    0x6d99bdca77076aea => {
2760                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2761                        let mut req = fidl::new_empty!(
2762                            MlmeSetApfPacketFilterEnabledRequest,
2763                            fidl::encoding::DefaultFuchsiaResourceDialect
2764                        );
2765                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSetApfPacketFilterEnabledRequest>(&header, _body_bytes, handles, &mut req)?;
2766                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2767                        Ok(MlmeRequest::SetApfPacketFilterEnabled {
2768                            enabled: req.enabled,
2769
2770                            responder: MlmeSetApfPacketFilterEnabledResponder {
2771                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2772                                tx_id: header.tx_id,
2773                            },
2774                        })
2775                    }
2776                    0x1df408bc154be1e4 => {
2777                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2778                        let mut req = fidl::new_empty!(
2779                            fidl::encoding::EmptyPayload,
2780                            fidl::encoding::DefaultFuchsiaResourceDialect
2781                        );
2782                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2783                        let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2784                        Ok(MlmeRequest::GetApfPacketFilterEnabled {
2785                            responder: MlmeGetApfPacketFilterEnabledResponder {
2786                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2787                                tx_id: header.tx_id,
2788                            },
2789                        })
2790                    }
2791                    _ => Err(fidl::Error::UnknownOrdinal {
2792                        ordinal: header.ordinal,
2793                        protocol_name: <MlmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2794                    }),
2795                }))
2796            },
2797        )
2798    }
2799}
2800
2801#[derive(Debug)]
2802pub enum MlmeRequest {
2803    StartScan {
2804        req: ScanRequest,
2805        control_handle: MlmeControlHandle,
2806    },
2807    /// Starts scheduled scanning.
2808    StartScheduledScan {
2809        txn_id: u64,
2810        req: fidl_fuchsia_wlan_common::ScheduledScanRequest,
2811        responder: MlmeStartScheduledScanResponder,
2812    },
2813    /// Stops scheduled scanning.
2814    StopScheduledScan {
2815        txn_id: u64,
2816        responder: MlmeStopScheduledScanResponder,
2817    },
2818    /// Returns the transaction IDs of any currently active scheduled scans.
2819    GetScheduledScanEnabled {
2820        responder: MlmeGetScheduledScanEnabledResponder,
2821    },
2822    ConnectReq {
2823        req: ConnectRequest,
2824        control_handle: MlmeControlHandle,
2825    },
2826    ReconnectReq {
2827        req: ReconnectRequest,
2828        control_handle: MlmeControlHandle,
2829    },
2830    /// Initiate a roam attempt (SME-initiated).
2831    RoamReq {
2832        req: RoamRequest,
2833        control_handle: MlmeControlHandle,
2834    },
2835    AuthenticateResp {
2836        resp: AuthenticateResponse,
2837        control_handle: MlmeControlHandle,
2838    },
2839    DeauthenticateReq {
2840        req: DeauthenticateRequest,
2841        control_handle: MlmeControlHandle,
2842    },
2843    AssociateResp {
2844        resp: AssociateResponse,
2845        control_handle: MlmeControlHandle,
2846    },
2847    DisassociateReq {
2848        req: DisassociateRequest,
2849        control_handle: MlmeControlHandle,
2850    },
2851    ResetReq {
2852        req: ResetRequest,
2853        control_handle: MlmeControlHandle,
2854    },
2855    StartReq {
2856        req: StartRequest,
2857        control_handle: MlmeControlHandle,
2858    },
2859    StopReq {
2860        req: StopRequest,
2861        control_handle: MlmeControlHandle,
2862    },
2863    SetKeysReq {
2864        req: SetKeysRequest,
2865        control_handle: MlmeControlHandle,
2866    },
2867    DeleteKeysReq {
2868        req: DeleteKeysRequest,
2869        control_handle: MlmeControlHandle,
2870    },
2871    EapolReq {
2872        req: EapolRequest,
2873        control_handle: MlmeControlHandle,
2874    },
2875    SetControlledPort {
2876        req: SetControlledPortRequest,
2877        control_handle: MlmeControlHandle,
2878    },
2879    QueryDeviceInfo {
2880        responder: MlmeQueryDeviceInfoResponder,
2881    },
2882    QueryTelemetrySupport {
2883        responder: MlmeQueryTelemetrySupportResponder,
2884    },
2885    GetIfaceStats {
2886        responder: MlmeGetIfaceStatsResponder,
2887    },
2888    GetIfaceHistogramStats {
2889        responder: MlmeGetIfaceHistogramStatsResponder,
2890    },
2891    GetSignalReport {
2892        responder: MlmeGetSignalReportResponder,
2893    },
2894    ListMinstrelPeers {
2895        responder: MlmeListMinstrelPeersResponder,
2896    },
2897    GetMinstrelStats {
2898        req: MinstrelStatsRequest,
2899        responder: MlmeGetMinstrelStatsResponder,
2900    },
2901    StartCaptureFrames {
2902        req: StartCaptureFramesRequest,
2903        responder: MlmeStartCaptureFramesResponder,
2904    },
2905    StopCaptureFrames {
2906        control_handle: MlmeControlHandle,
2907    },
2908    /// Notifies that SAE authentication is completed.
2909    SaeHandshakeResp {
2910        resp: SaeHandshakeResponse,
2911        control_handle: MlmeControlHandle,
2912    },
2913    /// Transmits SAE frame (if SME is managing SAE authentication).
2914    SaeFrameTx {
2915        frame: SaeFrame,
2916        control_handle: MlmeControlHandle,
2917    },
2918    WmmStatusReq {
2919        control_handle: MlmeControlHandle,
2920    },
2921    FinalizeAssociationReq {
2922        negotiated_capabilities: NegotiatedCapabilities,
2923        control_handle: MlmeControlHandle,
2924    },
2925    SetMacAddress {
2926        mac_addr: [u8; 6],
2927        responder: MlmeSetMacAddressResponder,
2928    },
2929    InstallApfPacketFilter {
2930        program: Vec<u8>,
2931        responder: MlmeInstallApfPacketFilterResponder,
2932    },
2933    ReadApfPacketFilterData {
2934        responder: MlmeReadApfPacketFilterDataResponder,
2935    },
2936    SetApfPacketFilterEnabled {
2937        enabled: bool,
2938        responder: MlmeSetApfPacketFilterEnabledResponder,
2939    },
2940    GetApfPacketFilterEnabled {
2941        responder: MlmeGetApfPacketFilterEnabledResponder,
2942    },
2943}
2944
2945impl MlmeRequest {
2946    #[allow(irrefutable_let_patterns)]
2947    pub fn into_start_scan(self) -> Option<(ScanRequest, MlmeControlHandle)> {
2948        if let MlmeRequest::StartScan { req, control_handle } = self {
2949            Some((req, control_handle))
2950        } else {
2951            None
2952        }
2953    }
2954
2955    #[allow(irrefutable_let_patterns)]
2956    pub fn into_start_scheduled_scan(
2957        self,
2958    ) -> Option<(
2959        u64,
2960        fidl_fuchsia_wlan_common::ScheduledScanRequest,
2961        MlmeStartScheduledScanResponder,
2962    )> {
2963        if let MlmeRequest::StartScheduledScan { txn_id, req, responder } = self {
2964            Some((txn_id, req, responder))
2965        } else {
2966            None
2967        }
2968    }
2969
2970    #[allow(irrefutable_let_patterns)]
2971    pub fn into_stop_scheduled_scan(self) -> Option<(u64, MlmeStopScheduledScanResponder)> {
2972        if let MlmeRequest::StopScheduledScan { txn_id, responder } = self {
2973            Some((txn_id, responder))
2974        } else {
2975            None
2976        }
2977    }
2978
2979    #[allow(irrefutable_let_patterns)]
2980    pub fn into_get_scheduled_scan_enabled(self) -> Option<(MlmeGetScheduledScanEnabledResponder)> {
2981        if let MlmeRequest::GetScheduledScanEnabled { responder } = self {
2982            Some((responder))
2983        } else {
2984            None
2985        }
2986    }
2987
2988    #[allow(irrefutable_let_patterns)]
2989    pub fn into_connect_req(self) -> Option<(ConnectRequest, MlmeControlHandle)> {
2990        if let MlmeRequest::ConnectReq { req, control_handle } = self {
2991            Some((req, control_handle))
2992        } else {
2993            None
2994        }
2995    }
2996
2997    #[allow(irrefutable_let_patterns)]
2998    pub fn into_reconnect_req(self) -> Option<(ReconnectRequest, MlmeControlHandle)> {
2999        if let MlmeRequest::ReconnectReq { req, control_handle } = self {
3000            Some((req, control_handle))
3001        } else {
3002            None
3003        }
3004    }
3005
3006    #[allow(irrefutable_let_patterns)]
3007    pub fn into_roam_req(self) -> Option<(RoamRequest, MlmeControlHandle)> {
3008        if let MlmeRequest::RoamReq { req, control_handle } = self {
3009            Some((req, control_handle))
3010        } else {
3011            None
3012        }
3013    }
3014
3015    #[allow(irrefutable_let_patterns)]
3016    pub fn into_authenticate_resp(self) -> Option<(AuthenticateResponse, MlmeControlHandle)> {
3017        if let MlmeRequest::AuthenticateResp { resp, control_handle } = self {
3018            Some((resp, control_handle))
3019        } else {
3020            None
3021        }
3022    }
3023
3024    #[allow(irrefutable_let_patterns)]
3025    pub fn into_deauthenticate_req(self) -> Option<(DeauthenticateRequest, MlmeControlHandle)> {
3026        if let MlmeRequest::DeauthenticateReq { req, control_handle } = self {
3027            Some((req, control_handle))
3028        } else {
3029            None
3030        }
3031    }
3032
3033    #[allow(irrefutable_let_patterns)]
3034    pub fn into_associate_resp(self) -> Option<(AssociateResponse, MlmeControlHandle)> {
3035        if let MlmeRequest::AssociateResp { resp, control_handle } = self {
3036            Some((resp, control_handle))
3037        } else {
3038            None
3039        }
3040    }
3041
3042    #[allow(irrefutable_let_patterns)]
3043    pub fn into_disassociate_req(self) -> Option<(DisassociateRequest, MlmeControlHandle)> {
3044        if let MlmeRequest::DisassociateReq { req, control_handle } = self {
3045            Some((req, control_handle))
3046        } else {
3047            None
3048        }
3049    }
3050
3051    #[allow(irrefutable_let_patterns)]
3052    pub fn into_reset_req(self) -> Option<(ResetRequest, MlmeControlHandle)> {
3053        if let MlmeRequest::ResetReq { req, control_handle } = self {
3054            Some((req, control_handle))
3055        } else {
3056            None
3057        }
3058    }
3059
3060    #[allow(irrefutable_let_patterns)]
3061    pub fn into_start_req(self) -> Option<(StartRequest, MlmeControlHandle)> {
3062        if let MlmeRequest::StartReq { req, control_handle } = self {
3063            Some((req, control_handle))
3064        } else {
3065            None
3066        }
3067    }
3068
3069    #[allow(irrefutable_let_patterns)]
3070    pub fn into_stop_req(self) -> Option<(StopRequest, MlmeControlHandle)> {
3071        if let MlmeRequest::StopReq { req, control_handle } = self {
3072            Some((req, control_handle))
3073        } else {
3074            None
3075        }
3076    }
3077
3078    #[allow(irrefutable_let_patterns)]
3079    pub fn into_set_keys_req(self) -> Option<(SetKeysRequest, MlmeControlHandle)> {
3080        if let MlmeRequest::SetKeysReq { req, control_handle } = self {
3081            Some((req, control_handle))
3082        } else {
3083            None
3084        }
3085    }
3086
3087    #[allow(irrefutable_let_patterns)]
3088    pub fn into_delete_keys_req(self) -> Option<(DeleteKeysRequest, MlmeControlHandle)> {
3089        if let MlmeRequest::DeleteKeysReq { req, control_handle } = self {
3090            Some((req, control_handle))
3091        } else {
3092            None
3093        }
3094    }
3095
3096    #[allow(irrefutable_let_patterns)]
3097    pub fn into_eapol_req(self) -> Option<(EapolRequest, MlmeControlHandle)> {
3098        if let MlmeRequest::EapolReq { req, control_handle } = self {
3099            Some((req, control_handle))
3100        } else {
3101            None
3102        }
3103    }
3104
3105    #[allow(irrefutable_let_patterns)]
3106    pub fn into_set_controlled_port(self) -> Option<(SetControlledPortRequest, MlmeControlHandle)> {
3107        if let MlmeRequest::SetControlledPort { req, control_handle } = self {
3108            Some((req, control_handle))
3109        } else {
3110            None
3111        }
3112    }
3113
3114    #[allow(irrefutable_let_patterns)]
3115    pub fn into_query_device_info(self) -> Option<(MlmeQueryDeviceInfoResponder)> {
3116        if let MlmeRequest::QueryDeviceInfo { responder } = self { Some((responder)) } else { None }
3117    }
3118
3119    #[allow(irrefutable_let_patterns)]
3120    pub fn into_query_telemetry_support(self) -> Option<(MlmeQueryTelemetrySupportResponder)> {
3121        if let MlmeRequest::QueryTelemetrySupport { responder } = self {
3122            Some((responder))
3123        } else {
3124            None
3125        }
3126    }
3127
3128    #[allow(irrefutable_let_patterns)]
3129    pub fn into_get_iface_stats(self) -> Option<(MlmeGetIfaceStatsResponder)> {
3130        if let MlmeRequest::GetIfaceStats { responder } = self { Some((responder)) } else { None }
3131    }
3132
3133    #[allow(irrefutable_let_patterns)]
3134    pub fn into_get_iface_histogram_stats(self) -> Option<(MlmeGetIfaceHistogramStatsResponder)> {
3135        if let MlmeRequest::GetIfaceHistogramStats { responder } = self {
3136            Some((responder))
3137        } else {
3138            None
3139        }
3140    }
3141
3142    #[allow(irrefutable_let_patterns)]
3143    pub fn into_get_signal_report(self) -> Option<(MlmeGetSignalReportResponder)> {
3144        if let MlmeRequest::GetSignalReport { responder } = self { Some((responder)) } else { None }
3145    }
3146
3147    #[allow(irrefutable_let_patterns)]
3148    pub fn into_list_minstrel_peers(self) -> Option<(MlmeListMinstrelPeersResponder)> {
3149        if let MlmeRequest::ListMinstrelPeers { responder } = self {
3150            Some((responder))
3151        } else {
3152            None
3153        }
3154    }
3155
3156    #[allow(irrefutable_let_patterns)]
3157    pub fn into_get_minstrel_stats(
3158        self,
3159    ) -> Option<(MinstrelStatsRequest, MlmeGetMinstrelStatsResponder)> {
3160        if let MlmeRequest::GetMinstrelStats { req, responder } = self {
3161            Some((req, responder))
3162        } else {
3163            None
3164        }
3165    }
3166
3167    #[allow(irrefutable_let_patterns)]
3168    pub fn into_start_capture_frames(
3169        self,
3170    ) -> Option<(StartCaptureFramesRequest, MlmeStartCaptureFramesResponder)> {
3171        if let MlmeRequest::StartCaptureFrames { req, responder } = self {
3172            Some((req, responder))
3173        } else {
3174            None
3175        }
3176    }
3177
3178    #[allow(irrefutable_let_patterns)]
3179    pub fn into_stop_capture_frames(self) -> Option<(MlmeControlHandle)> {
3180        if let MlmeRequest::StopCaptureFrames { control_handle } = self {
3181            Some((control_handle))
3182        } else {
3183            None
3184        }
3185    }
3186
3187    #[allow(irrefutable_let_patterns)]
3188    pub fn into_sae_handshake_resp(self) -> Option<(SaeHandshakeResponse, MlmeControlHandle)> {
3189        if let MlmeRequest::SaeHandshakeResp { resp, control_handle } = self {
3190            Some((resp, control_handle))
3191        } else {
3192            None
3193        }
3194    }
3195
3196    #[allow(irrefutable_let_patterns)]
3197    pub fn into_sae_frame_tx(self) -> Option<(SaeFrame, MlmeControlHandle)> {
3198        if let MlmeRequest::SaeFrameTx { frame, control_handle } = self {
3199            Some((frame, control_handle))
3200        } else {
3201            None
3202        }
3203    }
3204
3205    #[allow(irrefutable_let_patterns)]
3206    pub fn into_wmm_status_req(self) -> Option<(MlmeControlHandle)> {
3207        if let MlmeRequest::WmmStatusReq { control_handle } = self {
3208            Some((control_handle))
3209        } else {
3210            None
3211        }
3212    }
3213
3214    #[allow(irrefutable_let_patterns)]
3215    pub fn into_finalize_association_req(
3216        self,
3217    ) -> Option<(NegotiatedCapabilities, MlmeControlHandle)> {
3218        if let MlmeRequest::FinalizeAssociationReq { negotiated_capabilities, control_handle } =
3219            self
3220        {
3221            Some((negotiated_capabilities, control_handle))
3222        } else {
3223            None
3224        }
3225    }
3226
3227    #[allow(irrefutable_let_patterns)]
3228    pub fn into_set_mac_address(self) -> Option<([u8; 6], MlmeSetMacAddressResponder)> {
3229        if let MlmeRequest::SetMacAddress { mac_addr, responder } = self {
3230            Some((mac_addr, responder))
3231        } else {
3232            None
3233        }
3234    }
3235
3236    #[allow(irrefutable_let_patterns)]
3237    pub fn into_install_apf_packet_filter(
3238        self,
3239    ) -> Option<(Vec<u8>, MlmeInstallApfPacketFilterResponder)> {
3240        if let MlmeRequest::InstallApfPacketFilter { program, responder } = self {
3241            Some((program, responder))
3242        } else {
3243            None
3244        }
3245    }
3246
3247    #[allow(irrefutable_let_patterns)]
3248    pub fn into_read_apf_packet_filter_data(
3249        self,
3250    ) -> Option<(MlmeReadApfPacketFilterDataResponder)> {
3251        if let MlmeRequest::ReadApfPacketFilterData { responder } = self {
3252            Some((responder))
3253        } else {
3254            None
3255        }
3256    }
3257
3258    #[allow(irrefutable_let_patterns)]
3259    pub fn into_set_apf_packet_filter_enabled(
3260        self,
3261    ) -> Option<(bool, MlmeSetApfPacketFilterEnabledResponder)> {
3262        if let MlmeRequest::SetApfPacketFilterEnabled { enabled, responder } = self {
3263            Some((enabled, responder))
3264        } else {
3265            None
3266        }
3267    }
3268
3269    #[allow(irrefutable_let_patterns)]
3270    pub fn into_get_apf_packet_filter_enabled(
3271        self,
3272    ) -> Option<(MlmeGetApfPacketFilterEnabledResponder)> {
3273        if let MlmeRequest::GetApfPacketFilterEnabled { responder } = self {
3274            Some((responder))
3275        } else {
3276            None
3277        }
3278    }
3279
3280    /// Name of the method defined in FIDL
3281    pub fn method_name(&self) -> &'static str {
3282        match *self {
3283            MlmeRequest::StartScan { .. } => "start_scan",
3284            MlmeRequest::StartScheduledScan { .. } => "start_scheduled_scan",
3285            MlmeRequest::StopScheduledScan { .. } => "stop_scheduled_scan",
3286            MlmeRequest::GetScheduledScanEnabled { .. } => "get_scheduled_scan_enabled",
3287            MlmeRequest::ConnectReq { .. } => "connect_req",
3288            MlmeRequest::ReconnectReq { .. } => "reconnect_req",
3289            MlmeRequest::RoamReq { .. } => "roam_req",
3290            MlmeRequest::AuthenticateResp { .. } => "authenticate_resp",
3291            MlmeRequest::DeauthenticateReq { .. } => "deauthenticate_req",
3292            MlmeRequest::AssociateResp { .. } => "associate_resp",
3293            MlmeRequest::DisassociateReq { .. } => "disassociate_req",
3294            MlmeRequest::ResetReq { .. } => "reset_req",
3295            MlmeRequest::StartReq { .. } => "start_req",
3296            MlmeRequest::StopReq { .. } => "stop_req",
3297            MlmeRequest::SetKeysReq { .. } => "set_keys_req",
3298            MlmeRequest::DeleteKeysReq { .. } => "delete_keys_req",
3299            MlmeRequest::EapolReq { .. } => "eapol_req",
3300            MlmeRequest::SetControlledPort { .. } => "set_controlled_port",
3301            MlmeRequest::QueryDeviceInfo { .. } => "query_device_info",
3302            MlmeRequest::QueryTelemetrySupport { .. } => "query_telemetry_support",
3303            MlmeRequest::GetIfaceStats { .. } => "get_iface_stats",
3304            MlmeRequest::GetIfaceHistogramStats { .. } => "get_iface_histogram_stats",
3305            MlmeRequest::GetSignalReport { .. } => "get_signal_report",
3306            MlmeRequest::ListMinstrelPeers { .. } => "list_minstrel_peers",
3307            MlmeRequest::GetMinstrelStats { .. } => "get_minstrel_stats",
3308            MlmeRequest::StartCaptureFrames { .. } => "start_capture_frames",
3309            MlmeRequest::StopCaptureFrames { .. } => "stop_capture_frames",
3310            MlmeRequest::SaeHandshakeResp { .. } => "sae_handshake_resp",
3311            MlmeRequest::SaeFrameTx { .. } => "sae_frame_tx",
3312            MlmeRequest::WmmStatusReq { .. } => "wmm_status_req",
3313            MlmeRequest::FinalizeAssociationReq { .. } => "finalize_association_req",
3314            MlmeRequest::SetMacAddress { .. } => "set_mac_address",
3315            MlmeRequest::InstallApfPacketFilter { .. } => "install_apf_packet_filter",
3316            MlmeRequest::ReadApfPacketFilterData { .. } => "read_apf_packet_filter_data",
3317            MlmeRequest::SetApfPacketFilterEnabled { .. } => "set_apf_packet_filter_enabled",
3318            MlmeRequest::GetApfPacketFilterEnabled { .. } => "get_apf_packet_filter_enabled",
3319        }
3320    }
3321}
3322
3323#[derive(Debug, Clone)]
3324pub struct MlmeControlHandle {
3325    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3326}
3327
3328impl MlmeControlHandle {
3329    pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
3330        self.inner.shutdown_with_epitaph(status.into())
3331    }
3332}
3333
3334impl fidl::endpoints::ControlHandle for MlmeControlHandle {
3335    fn shutdown(&self) {
3336        self.inner.shutdown()
3337    }
3338
3339    fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
3340        self.inner.shutdown_with_epitaph(status)
3341    }
3342
3343    fn is_closed(&self) -> bool {
3344        self.inner.channel().is_closed()
3345    }
3346    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3347        self.inner.channel().on_closed()
3348    }
3349
3350    #[cfg(target_os = "fuchsia")]
3351    fn signal_peer(
3352        &self,
3353        clear_mask: zx::Signals,
3354        set_mask: zx::Signals,
3355    ) -> Result<(), zx_status::Status> {
3356        use fidl::Peered;
3357        self.inner.channel().signal_peer(clear_mask, set_mask)
3358    }
3359}
3360
3361impl MlmeControlHandle {
3362    pub fn send_on_scan_result(&self, mut result: &ScanResult) -> Result<(), fidl::Error> {
3363        self.inner.send::<MlmeOnScanResultRequest>(
3364            (result,),
3365            0,
3366            0x681af7466a75074d,
3367            fidl::encoding::DynamicFlags::empty(),
3368        )
3369    }
3370
3371    pub fn send_on_scan_end(&self, mut end: &ScanEnd) -> Result<(), fidl::Error> {
3372        self.inner.send::<MlmeOnScanEndRequest>(
3373            (end,),
3374            0,
3375            0x7f2702d253e7ca59,
3376            fidl::encoding::DynamicFlags::empty(),
3377        )
3378    }
3379
3380    pub fn send_on_scheduled_scan_matches_available(
3381        &self,
3382        mut txn_id: u64,
3383    ) -> Result<(), fidl::Error> {
3384        self.inner.send::<MlmeOnScheduledScanMatchesAvailableRequest>(
3385            (txn_id,),
3386            0,
3387            0x3d915df5108ec4e1,
3388            fidl::encoding::DynamicFlags::empty(),
3389        )
3390    }
3391
3392    pub fn send_on_scheduled_scan_stopped_by_firmware(
3393        &self,
3394        mut txn_id: u64,
3395    ) -> Result<(), fidl::Error> {
3396        self.inner.send::<MlmeOnScheduledScanStoppedByFirmwareRequest>(
3397            (txn_id,),
3398            0,
3399            0x4c2cb4b145163fd0,
3400            fidl::encoding::DynamicFlags::empty(),
3401        )
3402    }
3403
3404    pub fn send_connect_conf(&self, mut resp: &ConnectConfirm) -> Result<(), fidl::Error> {
3405        self.inner.send::<MlmeConnectConfRequest>(
3406            (resp,),
3407            0,
3408            0x77b27623279b981e,
3409            fidl::encoding::DynamicFlags::empty(),
3410        )
3411    }
3412
3413    pub fn send_roam_conf(&self, mut conf: &RoamConfirm) -> Result<(), fidl::Error> {
3414        self.inner.send::<MlmeRoamConfRequest>(
3415            (conf,),
3416            0,
3417            0x3f608034faa054bc,
3418            fidl::encoding::DynamicFlags::empty(),
3419        )
3420    }
3421
3422    pub fn send_roam_start_ind(&self, mut ind: &RoamStartIndication) -> Result<(), fidl::Error> {
3423        self.inner.send::<MlmeRoamStartIndRequest>(
3424            (ind,),
3425            0,
3426            0x270a1ec78672d094,
3427            fidl::encoding::DynamicFlags::empty(),
3428        )
3429    }
3430
3431    pub fn send_roam_result_ind(&self, mut ind: &RoamResultIndication) -> Result<(), fidl::Error> {
3432        self.inner.send::<MlmeRoamResultIndRequest>(
3433            (ind,),
3434            0,
3435            0x26d074364fc84865,
3436            fidl::encoding::DynamicFlags::empty(),
3437        )
3438    }
3439
3440    pub fn send_authenticate_ind(
3441        &self,
3442        mut ind: &AuthenticateIndication,
3443    ) -> Result<(), fidl::Error> {
3444        self.inner.send::<MlmeAuthenticateIndRequest>(
3445            (ind,),
3446            0,
3447            0x460f49ae891adbe9,
3448            fidl::encoding::DynamicFlags::empty(),
3449        )
3450    }
3451
3452    pub fn send_deauthenticate_conf(
3453        &self,
3454        mut resp: &DeauthenticateConfirm,
3455    ) -> Result<(), fidl::Error> {
3456        self.inner.send::<MlmeDeauthenticateConfRequest>(
3457            (resp,),
3458            0,
3459            0x3b44debc21b88c8c,
3460            fidl::encoding::DynamicFlags::empty(),
3461        )
3462    }
3463
3464    pub fn send_deauthenticate_ind(
3465        &self,
3466        mut ind: &DeauthenticateIndication,
3467    ) -> Result<(), fidl::Error> {
3468        self.inner.send::<MlmeDeauthenticateIndRequest>(
3469            (ind,),
3470            0,
3471            0x7ee0889b326da1d7,
3472            fidl::encoding::DynamicFlags::empty(),
3473        )
3474    }
3475
3476    pub fn send_associate_ind(&self, mut ind: &AssociateIndication) -> Result<(), fidl::Error> {
3477        self.inner.send::<MlmeAssociateIndRequest>(
3478            (ind,),
3479            0,
3480            0x6a86f20e3063dd63,
3481            fidl::encoding::DynamicFlags::empty(),
3482        )
3483    }
3484
3485    pub fn send_disassociate_conf(
3486        &self,
3487        mut resp: &DisassociateConfirm,
3488    ) -> Result<(), fidl::Error> {
3489        self.inner.send::<MlmeDisassociateConfRequest>(
3490            (resp,),
3491            0,
3492            0x61345fbce732a28d,
3493            fidl::encoding::DynamicFlags::empty(),
3494        )
3495    }
3496
3497    pub fn send_disassociate_ind(
3498        &self,
3499        mut ind: &DisassociateIndication,
3500    ) -> Result<(), fidl::Error> {
3501        self.inner.send::<MlmeDisassociateIndRequest>(
3502            (ind,),
3503            0,
3504            0x77ac0ebf387c1f35,
3505            fidl::encoding::DynamicFlags::empty(),
3506        )
3507    }
3508
3509    pub fn send_start_conf(&self, mut resp: &StartConfirm) -> Result<(), fidl::Error> {
3510        self.inner.send::<MlmeStartConfRequest>(
3511            (resp,),
3512            0,
3513            0x15ea6cdf3b8382b3,
3514            fidl::encoding::DynamicFlags::empty(),
3515        )
3516    }
3517
3518    pub fn send_stop_conf(&self, mut resp: &StopConfirm) -> Result<(), fidl::Error> {
3519        self.inner.send::<MlmeStopConfRequest>(
3520            (resp,),
3521            0,
3522            0x50b426ef4a84a2df,
3523            fidl::encoding::DynamicFlags::empty(),
3524        )
3525    }
3526
3527    pub fn send_set_keys_conf(&self, mut conf: &SetKeysConfirm) -> Result<(), fidl::Error> {
3528        self.inner.send::<MlmeSetKeysConfRequest>(
3529            (conf,),
3530            0,
3531            0x5bafb3a8d4039380,
3532            fidl::encoding::DynamicFlags::empty(),
3533        )
3534    }
3535
3536    pub fn send_eapol_conf(&self, mut resp: &EapolConfirm) -> Result<(), fidl::Error> {
3537        self.inner.send::<MlmeEapolConfRequest>(
3538            (resp,),
3539            0,
3540            0x6ffa21f4ee73ce64,
3541            fidl::encoding::DynamicFlags::empty(),
3542        )
3543    }
3544
3545    pub fn send_signal_report(
3546        &self,
3547        mut ind: &fidl_fuchsia_wlan_internal::SignalReportIndication,
3548    ) -> Result<(), fidl::Error> {
3549        self.inner.send::<MlmeSignalReportRequest>(
3550            (ind,),
3551            0,
3552            0x48f32a876aa53d8f,
3553            fidl::encoding::DynamicFlags::empty(),
3554        )
3555    }
3556
3557    pub fn send_eapol_ind(&self, mut ind: &EapolIndication) -> Result<(), fidl::Error> {
3558        self.inner.send::<MlmeEapolIndRequest>(
3559            (ind,),
3560            0,
3561            0x7038dca46a3142fc,
3562            fidl::encoding::DynamicFlags::empty(),
3563        )
3564    }
3565
3566    pub fn send_relay_captured_frame(
3567        &self,
3568        mut result: &CapturedFrameResult,
3569    ) -> Result<(), fidl::Error> {
3570        self.inner.send::<MlmeRelayCapturedFrameRequest>(
3571            (result,),
3572            0,
3573            0x6f00a6f3cff9b1f5,
3574            fidl::encoding::DynamicFlags::empty(),
3575        )
3576    }
3577
3578    pub fn send_on_channel_switched(
3579        &self,
3580        mut info: &fidl_fuchsia_wlan_internal::ChannelSwitchInfo,
3581    ) -> Result<(), fidl::Error> {
3582        self.inner.send::<MlmeOnChannelSwitchedRequest>(
3583            (info,),
3584            0,
3585            0x581750594e4c0c1,
3586            fidl::encoding::DynamicFlags::empty(),
3587        )
3588    }
3589
3590    pub fn send_on_pmk_available(&self, mut info: &PmkInfo) -> Result<(), fidl::Error> {
3591        self.inner.send::<MlmeOnPmkAvailableRequest>(
3592            (info,),
3593            0,
3594            0x1314fc2c79643f90,
3595            fidl::encoding::DynamicFlags::empty(),
3596        )
3597    }
3598
3599    pub fn send_on_sae_handshake_ind(
3600        &self,
3601        mut ind: &SaeHandshakeIndication,
3602    ) -> Result<(), fidl::Error> {
3603        self.inner.send::<MlmeOnSaeHandshakeIndRequest>(
3604            (ind,),
3605            0,
3606            0x6308b10e18986d7e,
3607            fidl::encoding::DynamicFlags::empty(),
3608        )
3609    }
3610
3611    pub fn send_on_sae_frame_rx(&self, mut frame: &SaeFrame) -> Result<(), fidl::Error> {
3612        self.inner.send::<MlmeOnSaeFrameRxRequest>(
3613            (frame,),
3614            0,
3615            0x4ebf51c86ef5f3cd,
3616            fidl::encoding::DynamicFlags::empty(),
3617        )
3618    }
3619
3620    pub fn send_on_wmm_status_resp(
3621        &self,
3622        mut status: i32,
3623        mut resp: &fidl_fuchsia_wlan_internal::WmmStatusResponse,
3624    ) -> Result<(), fidl::Error> {
3625        self.inner.send::<MlmeOnWmmStatusRespRequest>(
3626            (status, resp),
3627            0,
3628            0x53f056b432e7b5cb,
3629            fidl::encoding::DynamicFlags::empty(),
3630        )
3631    }
3632}
3633
3634#[must_use = "FIDL methods require a response to be sent"]
3635#[derive(Debug)]
3636pub struct MlmeStartScheduledScanResponder {
3637    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
3638    tx_id: u32,
3639}
3640
3641/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
3642/// if the responder is dropped without sending a response, so that the client
3643/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3644impl std::ops::Drop for MlmeStartScheduledScanResponder {
3645    fn drop(&mut self) {
3646        self.control_handle.shutdown();
3647        // Safety: drops once, never accessed again
3648        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3649    }
3650}
3651
3652impl fidl::endpoints::Responder for MlmeStartScheduledScanResponder {
3653    type ControlHandle = MlmeControlHandle;
3654
3655    fn control_handle(&self) -> &MlmeControlHandle {
3656        &self.control_handle
3657    }
3658
3659    fn drop_without_shutdown(mut self) {
3660        // Safety: drops once, never accessed again due to mem::forget
3661        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3662        // Prevent Drop from running (which would shut down the channel)
3663        std::mem::forget(self);
3664    }
3665}
3666
3667impl MlmeStartScheduledScanResponder {
3668    /// Sends a response to the FIDL transaction.
3669    ///
3670    /// Sets the channel to shutdown if an error occurs.
3671    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3672        let _result = self.send_raw(result);
3673        if _result.is_err() {
3674            self.control_handle.shutdown();
3675        }
3676        self.drop_without_shutdown();
3677        _result
3678    }
3679
3680    /// Similar to "send" but does not shutdown the channel if an error occurs.
3681    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3682        let _result = self.send_raw(result);
3683        self.drop_without_shutdown();
3684        _result
3685    }
3686
3687    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3688        self.control_handle
3689            .inner
3690            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3691                result,
3692                self.tx_id,
3693                0x7fff163af4620212,
3694                fidl::encoding::DynamicFlags::empty(),
3695            )
3696    }
3697}
3698
3699#[must_use = "FIDL methods require a response to be sent"]
3700#[derive(Debug)]
3701pub struct MlmeStopScheduledScanResponder {
3702    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
3703    tx_id: u32,
3704}
3705
3706/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
3707/// if the responder is dropped without sending a response, so that the client
3708/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3709impl std::ops::Drop for MlmeStopScheduledScanResponder {
3710    fn drop(&mut self) {
3711        self.control_handle.shutdown();
3712        // Safety: drops once, never accessed again
3713        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3714    }
3715}
3716
3717impl fidl::endpoints::Responder for MlmeStopScheduledScanResponder {
3718    type ControlHandle = MlmeControlHandle;
3719
3720    fn control_handle(&self) -> &MlmeControlHandle {
3721        &self.control_handle
3722    }
3723
3724    fn drop_without_shutdown(mut self) {
3725        // Safety: drops once, never accessed again due to mem::forget
3726        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3727        // Prevent Drop from running (which would shut down the channel)
3728        std::mem::forget(self);
3729    }
3730}
3731
3732impl MlmeStopScheduledScanResponder {
3733    /// Sends a response to the FIDL transaction.
3734    ///
3735    /// Sets the channel to shutdown if an error occurs.
3736    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3737        let _result = self.send_raw(result);
3738        if _result.is_err() {
3739            self.control_handle.shutdown();
3740        }
3741        self.drop_without_shutdown();
3742        _result
3743    }
3744
3745    /// Similar to "send" but does not shutdown the channel if an error occurs.
3746    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3747        let _result = self.send_raw(result);
3748        self.drop_without_shutdown();
3749        _result
3750    }
3751
3752    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3753        self.control_handle
3754            .inner
3755            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3756                result,
3757                self.tx_id,
3758                0x5fbc466f3daa4dd9,
3759                fidl::encoding::DynamicFlags::empty(),
3760            )
3761    }
3762}
3763
3764#[must_use = "FIDL methods require a response to be sent"]
3765#[derive(Debug)]
3766pub struct MlmeGetScheduledScanEnabledResponder {
3767    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
3768    tx_id: u32,
3769}
3770
3771/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
3772/// if the responder is dropped without sending a response, so that the client
3773/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3774impl std::ops::Drop for MlmeGetScheduledScanEnabledResponder {
3775    fn drop(&mut self) {
3776        self.control_handle.shutdown();
3777        // Safety: drops once, never accessed again
3778        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3779    }
3780}
3781
3782impl fidl::endpoints::Responder for MlmeGetScheduledScanEnabledResponder {
3783    type ControlHandle = MlmeControlHandle;
3784
3785    fn control_handle(&self) -> &MlmeControlHandle {
3786        &self.control_handle
3787    }
3788
3789    fn drop_without_shutdown(mut self) {
3790        // Safety: drops once, never accessed again due to mem::forget
3791        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3792        // Prevent Drop from running (which would shut down the channel)
3793        std::mem::forget(self);
3794    }
3795}
3796
3797impl MlmeGetScheduledScanEnabledResponder {
3798    /// Sends a response to the FIDL transaction.
3799    ///
3800    /// Sets the channel to shutdown if an error occurs.
3801    pub fn send(self, mut result: Result<&[u64], i32>) -> Result<(), fidl::Error> {
3802        let _result = self.send_raw(result);
3803        if _result.is_err() {
3804            self.control_handle.shutdown();
3805        }
3806        self.drop_without_shutdown();
3807        _result
3808    }
3809
3810    /// Similar to "send" but does not shutdown the channel if an error occurs.
3811    pub fn send_no_shutdown_on_err(
3812        self,
3813        mut result: Result<&[u64], i32>,
3814    ) -> Result<(), fidl::Error> {
3815        let _result = self.send_raw(result);
3816        self.drop_without_shutdown();
3817        _result
3818    }
3819
3820    fn send_raw(&self, mut result: Result<&[u64], i32>) -> Result<(), fidl::Error> {
3821        self.control_handle.inner.send::<fidl::encoding::ResultType<
3822            MlmeGetScheduledScanEnabledResponse,
3823            i32,
3824        >>(
3825            result.map(|active_txn_ids| (active_txn_ids,)),
3826            self.tx_id,
3827            0x1ecc6a7fe7f9fcff,
3828            fidl::encoding::DynamicFlags::empty(),
3829        )
3830    }
3831}
3832
3833#[must_use = "FIDL methods require a response to be sent"]
3834#[derive(Debug)]
3835pub struct MlmeQueryDeviceInfoResponder {
3836    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
3837    tx_id: u32,
3838}
3839
3840/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
3841/// if the responder is dropped without sending a response, so that the client
3842/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3843impl std::ops::Drop for MlmeQueryDeviceInfoResponder {
3844    fn drop(&mut self) {
3845        self.control_handle.shutdown();
3846        // Safety: drops once, never accessed again
3847        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3848    }
3849}
3850
3851impl fidl::endpoints::Responder for MlmeQueryDeviceInfoResponder {
3852    type ControlHandle = MlmeControlHandle;
3853
3854    fn control_handle(&self) -> &MlmeControlHandle {
3855        &self.control_handle
3856    }
3857
3858    fn drop_without_shutdown(mut self) {
3859        // Safety: drops once, never accessed again due to mem::forget
3860        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3861        // Prevent Drop from running (which would shut down the channel)
3862        std::mem::forget(self);
3863    }
3864}
3865
3866impl MlmeQueryDeviceInfoResponder {
3867    /// Sends a response to the FIDL transaction.
3868    ///
3869    /// Sets the channel to shutdown if an error occurs.
3870    pub fn send(self, mut info: &DeviceInfo) -> Result<(), fidl::Error> {
3871        let _result = self.send_raw(info);
3872        if _result.is_err() {
3873            self.control_handle.shutdown();
3874        }
3875        self.drop_without_shutdown();
3876        _result
3877    }
3878
3879    /// Similar to "send" but does not shutdown the channel if an error occurs.
3880    pub fn send_no_shutdown_on_err(self, mut info: &DeviceInfo) -> Result<(), fidl::Error> {
3881        let _result = self.send_raw(info);
3882        self.drop_without_shutdown();
3883        _result
3884    }
3885
3886    fn send_raw(&self, mut info: &DeviceInfo) -> Result<(), fidl::Error> {
3887        self.control_handle.inner.send::<MlmeQueryDeviceInfoResponse>(
3888            (info,),
3889            self.tx_id,
3890            0x6ee3e7f63f2b7bc0,
3891            fidl::encoding::DynamicFlags::empty(),
3892        )
3893    }
3894}
3895
3896#[must_use = "FIDL methods require a response to be sent"]
3897#[derive(Debug)]
3898pub struct MlmeQueryTelemetrySupportResponder {
3899    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
3900    tx_id: u32,
3901}
3902
3903/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
3904/// if the responder is dropped without sending a response, so that the client
3905/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3906impl std::ops::Drop for MlmeQueryTelemetrySupportResponder {
3907    fn drop(&mut self) {
3908        self.control_handle.shutdown();
3909        // Safety: drops once, never accessed again
3910        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3911    }
3912}
3913
3914impl fidl::endpoints::Responder for MlmeQueryTelemetrySupportResponder {
3915    type ControlHandle = MlmeControlHandle;
3916
3917    fn control_handle(&self) -> &MlmeControlHandle {
3918        &self.control_handle
3919    }
3920
3921    fn drop_without_shutdown(mut self) {
3922        // Safety: drops once, never accessed again due to mem::forget
3923        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3924        // Prevent Drop from running (which would shut down the channel)
3925        std::mem::forget(self);
3926    }
3927}
3928
3929impl MlmeQueryTelemetrySupportResponder {
3930    /// Sends a response to the FIDL transaction.
3931    ///
3932    /// Sets the channel to shutdown if an error occurs.
3933    pub fn send(
3934        self,
3935        mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
3936    ) -> Result<(), fidl::Error> {
3937        let _result = self.send_raw(result);
3938        if _result.is_err() {
3939            self.control_handle.shutdown();
3940        }
3941        self.drop_without_shutdown();
3942        _result
3943    }
3944
3945    /// Similar to "send" but does not shutdown the channel if an error occurs.
3946    pub fn send_no_shutdown_on_err(
3947        self,
3948        mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
3949    ) -> Result<(), fidl::Error> {
3950        let _result = self.send_raw(result);
3951        self.drop_without_shutdown();
3952        _result
3953    }
3954
3955    fn send_raw(
3956        &self,
3957        mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
3958    ) -> Result<(), fidl::Error> {
3959        self.control_handle
3960            .inner
3961            .send::<fidl::encoding::ResultType<MlmeQueryTelemetrySupportResponse, i32>>(
3962                result.map(|resp| (resp,)),
3963                self.tx_id,
3964                0x1598879b70332c99,
3965                fidl::encoding::DynamicFlags::empty(),
3966            )
3967    }
3968}
3969
3970#[must_use = "FIDL methods require a response to be sent"]
3971#[derive(Debug)]
3972pub struct MlmeGetIfaceStatsResponder {
3973    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
3974    tx_id: u32,
3975}
3976
3977/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
3978/// if the responder is dropped without sending a response, so that the client
3979/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3980impl std::ops::Drop for MlmeGetIfaceStatsResponder {
3981    fn drop(&mut self) {
3982        self.control_handle.shutdown();
3983        // Safety: drops once, never accessed again
3984        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3985    }
3986}
3987
3988impl fidl::endpoints::Responder for MlmeGetIfaceStatsResponder {
3989    type ControlHandle = MlmeControlHandle;
3990
3991    fn control_handle(&self) -> &MlmeControlHandle {
3992        &self.control_handle
3993    }
3994
3995    fn drop_without_shutdown(mut self) {
3996        // Safety: drops once, never accessed again due to mem::forget
3997        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3998        // Prevent Drop from running (which would shut down the channel)
3999        std::mem::forget(self);
4000    }
4001}
4002
4003impl MlmeGetIfaceStatsResponder {
4004    /// Sends a response to the FIDL transaction.
4005    ///
4006    /// Sets the channel to shutdown if an error occurs.
4007    pub fn send(self, mut resp: &GetIfaceStatsResponse) -> Result<(), fidl::Error> {
4008        let _result = self.send_raw(resp);
4009        if _result.is_err() {
4010            self.control_handle.shutdown();
4011        }
4012        self.drop_without_shutdown();
4013        _result
4014    }
4015
4016    /// Similar to "send" but does not shutdown the channel if an error occurs.
4017    pub fn send_no_shutdown_on_err(
4018        self,
4019        mut resp: &GetIfaceStatsResponse,
4020    ) -> Result<(), fidl::Error> {
4021        let _result = self.send_raw(resp);
4022        self.drop_without_shutdown();
4023        _result
4024    }
4025
4026    fn send_raw(&self, mut resp: &GetIfaceStatsResponse) -> Result<(), fidl::Error> {
4027        self.control_handle.inner.send::<MlmeGetIfaceStatsResponse>(
4028            (resp,),
4029            self.tx_id,
4030            0xede1a8342d1b211,
4031            fidl::encoding::DynamicFlags::empty(),
4032        )
4033    }
4034}
4035
4036#[must_use = "FIDL methods require a response to be sent"]
4037#[derive(Debug)]
4038pub struct MlmeGetIfaceHistogramStatsResponder {
4039    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
4040    tx_id: u32,
4041}
4042
4043/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
4044/// if the responder is dropped without sending a response, so that the client
4045/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4046impl std::ops::Drop for MlmeGetIfaceHistogramStatsResponder {
4047    fn drop(&mut self) {
4048        self.control_handle.shutdown();
4049        // Safety: drops once, never accessed again
4050        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4051    }
4052}
4053
4054impl fidl::endpoints::Responder for MlmeGetIfaceHistogramStatsResponder {
4055    type ControlHandle = MlmeControlHandle;
4056
4057    fn control_handle(&self) -> &MlmeControlHandle {
4058        &self.control_handle
4059    }
4060
4061    fn drop_without_shutdown(mut self) {
4062        // Safety: drops once, never accessed again due to mem::forget
4063        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4064        // Prevent Drop from running (which would shut down the channel)
4065        std::mem::forget(self);
4066    }
4067}
4068
4069impl MlmeGetIfaceHistogramStatsResponder {
4070    /// Sends a response to the FIDL transaction.
4071    ///
4072    /// Sets the channel to shutdown if an error occurs.
4073    pub fn send(self, mut resp: &GetIfaceHistogramStatsResponse) -> Result<(), fidl::Error> {
4074        let _result = self.send_raw(resp);
4075        if _result.is_err() {
4076            self.control_handle.shutdown();
4077        }
4078        self.drop_without_shutdown();
4079        _result
4080    }
4081
4082    /// Similar to "send" but does not shutdown the channel if an error occurs.
4083    pub fn send_no_shutdown_on_err(
4084        self,
4085        mut resp: &GetIfaceHistogramStatsResponse,
4086    ) -> Result<(), fidl::Error> {
4087        let _result = self.send_raw(resp);
4088        self.drop_without_shutdown();
4089        _result
4090    }
4091
4092    fn send_raw(&self, mut resp: &GetIfaceHistogramStatsResponse) -> Result<(), fidl::Error> {
4093        self.control_handle.inner.send::<MlmeGetIfaceHistogramStatsResponse>(
4094            (resp,),
4095            self.tx_id,
4096            0x1979c9d3449f8675,
4097            fidl::encoding::DynamicFlags::empty(),
4098        )
4099    }
4100}
4101
4102#[must_use = "FIDL methods require a response to be sent"]
4103#[derive(Debug)]
4104pub struct MlmeGetSignalReportResponder {
4105    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
4106    tx_id: u32,
4107}
4108
4109/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
4110/// if the responder is dropped without sending a response, so that the client
4111/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4112impl std::ops::Drop for MlmeGetSignalReportResponder {
4113    fn drop(&mut self) {
4114        self.control_handle.shutdown();
4115        // Safety: drops once, never accessed again
4116        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4117    }
4118}
4119
4120impl fidl::endpoints::Responder for MlmeGetSignalReportResponder {
4121    type ControlHandle = MlmeControlHandle;
4122
4123    fn control_handle(&self) -> &MlmeControlHandle {
4124        &self.control_handle
4125    }
4126
4127    fn drop_without_shutdown(mut self) {
4128        // Safety: drops once, never accessed again due to mem::forget
4129        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4130        // Prevent Drop from running (which would shut down the channel)
4131        std::mem::forget(self);
4132    }
4133}
4134
4135impl MlmeGetSignalReportResponder {
4136    /// Sends a response to the FIDL transaction.
4137    ///
4138    /// Sets the channel to shutdown if an error occurs.
4139    pub fn send(
4140        self,
4141        mut result: Result<&fidl_fuchsia_wlan_stats::SignalReport, i32>,
4142    ) -> Result<(), fidl::Error> {
4143        let _result = self.send_raw(result);
4144        if _result.is_err() {
4145            self.control_handle.shutdown();
4146        }
4147        self.drop_without_shutdown();
4148        _result
4149    }
4150
4151    /// Similar to "send" but does not shutdown the channel if an error occurs.
4152    pub fn send_no_shutdown_on_err(
4153        self,
4154        mut result: Result<&fidl_fuchsia_wlan_stats::SignalReport, i32>,
4155    ) -> Result<(), fidl::Error> {
4156        let _result = self.send_raw(result);
4157        self.drop_without_shutdown();
4158        _result
4159    }
4160
4161    fn send_raw(
4162        &self,
4163        mut result: Result<&fidl_fuchsia_wlan_stats::SignalReport, i32>,
4164    ) -> Result<(), fidl::Error> {
4165        self.control_handle
4166            .inner
4167            .send::<fidl::encoding::ResultType<MlmeGetSignalReportResponse, i32>>(
4168                result.map(|resp| (resp,)),
4169                self.tx_id,
4170                0x7e47e7ebe92acec9,
4171                fidl::encoding::DynamicFlags::empty(),
4172            )
4173    }
4174}
4175
4176#[must_use = "FIDL methods require a response to be sent"]
4177#[derive(Debug)]
4178pub struct MlmeListMinstrelPeersResponder {
4179    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
4180    tx_id: u32,
4181}
4182
4183/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
4184/// if the responder is dropped without sending a response, so that the client
4185/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4186impl std::ops::Drop for MlmeListMinstrelPeersResponder {
4187    fn drop(&mut self) {
4188        self.control_handle.shutdown();
4189        // Safety: drops once, never accessed again
4190        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4191    }
4192}
4193
4194impl fidl::endpoints::Responder for MlmeListMinstrelPeersResponder {
4195    type ControlHandle = MlmeControlHandle;
4196
4197    fn control_handle(&self) -> &MlmeControlHandle {
4198        &self.control_handle
4199    }
4200
4201    fn drop_without_shutdown(mut self) {
4202        // Safety: drops once, never accessed again due to mem::forget
4203        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4204        // Prevent Drop from running (which would shut down the channel)
4205        std::mem::forget(self);
4206    }
4207}
4208
4209impl MlmeListMinstrelPeersResponder {
4210    /// Sends a response to the FIDL transaction.
4211    ///
4212    /// Sets the channel to shutdown if an error occurs.
4213    pub fn send(self, mut resp: &MinstrelListResponse) -> Result<(), fidl::Error> {
4214        let _result = self.send_raw(resp);
4215        if _result.is_err() {
4216            self.control_handle.shutdown();
4217        }
4218        self.drop_without_shutdown();
4219        _result
4220    }
4221
4222    /// Similar to "send" but does not shutdown the channel if an error occurs.
4223    pub fn send_no_shutdown_on_err(
4224        self,
4225        mut resp: &MinstrelListResponse,
4226    ) -> Result<(), fidl::Error> {
4227        let _result = self.send_raw(resp);
4228        self.drop_without_shutdown();
4229        _result
4230    }
4231
4232    fn send_raw(&self, mut resp: &MinstrelListResponse) -> Result<(), fidl::Error> {
4233        self.control_handle.inner.send::<MlmeListMinstrelPeersResponse>(
4234            (resp,),
4235            self.tx_id,
4236            0x4ac5d1e66fe1ffd5,
4237            fidl::encoding::DynamicFlags::empty(),
4238        )
4239    }
4240}
4241
4242#[must_use = "FIDL methods require a response to be sent"]
4243#[derive(Debug)]
4244pub struct MlmeGetMinstrelStatsResponder {
4245    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
4246    tx_id: u32,
4247}
4248
4249/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
4250/// if the responder is dropped without sending a response, so that the client
4251/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4252impl std::ops::Drop for MlmeGetMinstrelStatsResponder {
4253    fn drop(&mut self) {
4254        self.control_handle.shutdown();
4255        // Safety: drops once, never accessed again
4256        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4257    }
4258}
4259
4260impl fidl::endpoints::Responder for MlmeGetMinstrelStatsResponder {
4261    type ControlHandle = MlmeControlHandle;
4262
4263    fn control_handle(&self) -> &MlmeControlHandle {
4264        &self.control_handle
4265    }
4266
4267    fn drop_without_shutdown(mut self) {
4268        // Safety: drops once, never accessed again due to mem::forget
4269        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4270        // Prevent Drop from running (which would shut down the channel)
4271        std::mem::forget(self);
4272    }
4273}
4274
4275impl MlmeGetMinstrelStatsResponder {
4276    /// Sends a response to the FIDL transaction.
4277    ///
4278    /// Sets the channel to shutdown if an error occurs.
4279    pub fn send(self, mut resp: &MinstrelStatsResponse) -> Result<(), fidl::Error> {
4280        let _result = self.send_raw(resp);
4281        if _result.is_err() {
4282            self.control_handle.shutdown();
4283        }
4284        self.drop_without_shutdown();
4285        _result
4286    }
4287
4288    /// Similar to "send" but does not shutdown the channel if an error occurs.
4289    pub fn send_no_shutdown_on_err(
4290        self,
4291        mut resp: &MinstrelStatsResponse,
4292    ) -> Result<(), fidl::Error> {
4293        let _result = self.send_raw(resp);
4294        self.drop_without_shutdown();
4295        _result
4296    }
4297
4298    fn send_raw(&self, mut resp: &MinstrelStatsResponse) -> Result<(), fidl::Error> {
4299        self.control_handle.inner.send::<MlmeGetMinstrelStatsResponse>(
4300            (resp,),
4301            self.tx_id,
4302            0x2f688b1245323f4b,
4303            fidl::encoding::DynamicFlags::empty(),
4304        )
4305    }
4306}
4307
4308#[must_use = "FIDL methods require a response to be sent"]
4309#[derive(Debug)]
4310pub struct MlmeStartCaptureFramesResponder {
4311    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
4312    tx_id: u32,
4313}
4314
4315/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
4316/// if the responder is dropped without sending a response, so that the client
4317/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4318impl std::ops::Drop for MlmeStartCaptureFramesResponder {
4319    fn drop(&mut self) {
4320        self.control_handle.shutdown();
4321        // Safety: drops once, never accessed again
4322        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4323    }
4324}
4325
4326impl fidl::endpoints::Responder for MlmeStartCaptureFramesResponder {
4327    type ControlHandle = MlmeControlHandle;
4328
4329    fn control_handle(&self) -> &MlmeControlHandle {
4330        &self.control_handle
4331    }
4332
4333    fn drop_without_shutdown(mut self) {
4334        // Safety: drops once, never accessed again due to mem::forget
4335        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4336        // Prevent Drop from running (which would shut down the channel)
4337        std::mem::forget(self);
4338    }
4339}
4340
4341impl MlmeStartCaptureFramesResponder {
4342    /// Sends a response to the FIDL transaction.
4343    ///
4344    /// Sets the channel to shutdown if an error occurs.
4345    pub fn send(self, mut resp: &StartCaptureFramesResponse) -> Result<(), fidl::Error> {
4346        let _result = self.send_raw(resp);
4347        if _result.is_err() {
4348            self.control_handle.shutdown();
4349        }
4350        self.drop_without_shutdown();
4351        _result
4352    }
4353
4354    /// Similar to "send" but does not shutdown the channel if an error occurs.
4355    pub fn send_no_shutdown_on_err(
4356        self,
4357        mut resp: &StartCaptureFramesResponse,
4358    ) -> Result<(), fidl::Error> {
4359        let _result = self.send_raw(resp);
4360        self.drop_without_shutdown();
4361        _result
4362    }
4363
4364    fn send_raw(&self, mut resp: &StartCaptureFramesResponse) -> Result<(), fidl::Error> {
4365        self.control_handle.inner.send::<MlmeStartCaptureFramesResponse>(
4366            (resp,),
4367            self.tx_id,
4368            0x23b369ed5749ee69,
4369            fidl::encoding::DynamicFlags::empty(),
4370        )
4371    }
4372}
4373
4374#[must_use = "FIDL methods require a response to be sent"]
4375#[derive(Debug)]
4376pub struct MlmeSetMacAddressResponder {
4377    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
4378    tx_id: u32,
4379}
4380
4381/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
4382/// if the responder is dropped without sending a response, so that the client
4383/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4384impl std::ops::Drop for MlmeSetMacAddressResponder {
4385    fn drop(&mut self) {
4386        self.control_handle.shutdown();
4387        // Safety: drops once, never accessed again
4388        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4389    }
4390}
4391
4392impl fidl::endpoints::Responder for MlmeSetMacAddressResponder {
4393    type ControlHandle = MlmeControlHandle;
4394
4395    fn control_handle(&self) -> &MlmeControlHandle {
4396        &self.control_handle
4397    }
4398
4399    fn drop_without_shutdown(mut self) {
4400        // Safety: drops once, never accessed again due to mem::forget
4401        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4402        // Prevent Drop from running (which would shut down the channel)
4403        std::mem::forget(self);
4404    }
4405}
4406
4407impl MlmeSetMacAddressResponder {
4408    /// Sends a response to the FIDL transaction.
4409    ///
4410    /// Sets the channel to shutdown if an error occurs.
4411    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4412        let _result = self.send_raw(result);
4413        if _result.is_err() {
4414            self.control_handle.shutdown();
4415        }
4416        self.drop_without_shutdown();
4417        _result
4418    }
4419
4420    /// Similar to "send" but does not shutdown the channel if an error occurs.
4421    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4422        let _result = self.send_raw(result);
4423        self.drop_without_shutdown();
4424        _result
4425    }
4426
4427    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4428        self.control_handle
4429            .inner
4430            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4431                result,
4432                self.tx_id,
4433                0x476999f9bb27afe1,
4434                fidl::encoding::DynamicFlags::empty(),
4435            )
4436    }
4437}
4438
4439#[must_use = "FIDL methods require a response to be sent"]
4440#[derive(Debug)]
4441pub struct MlmeInstallApfPacketFilterResponder {
4442    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
4443    tx_id: u32,
4444}
4445
4446/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
4447/// if the responder is dropped without sending a response, so that the client
4448/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4449impl std::ops::Drop for MlmeInstallApfPacketFilterResponder {
4450    fn drop(&mut self) {
4451        self.control_handle.shutdown();
4452        // Safety: drops once, never accessed again
4453        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4454    }
4455}
4456
4457impl fidl::endpoints::Responder for MlmeInstallApfPacketFilterResponder {
4458    type ControlHandle = MlmeControlHandle;
4459
4460    fn control_handle(&self) -> &MlmeControlHandle {
4461        &self.control_handle
4462    }
4463
4464    fn drop_without_shutdown(mut self) {
4465        // Safety: drops once, never accessed again due to mem::forget
4466        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4467        // Prevent Drop from running (which would shut down the channel)
4468        std::mem::forget(self);
4469    }
4470}
4471
4472impl MlmeInstallApfPacketFilterResponder {
4473    /// Sends a response to the FIDL transaction.
4474    ///
4475    /// Sets the channel to shutdown if an error occurs.
4476    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4477        let _result = self.send_raw(result);
4478        if _result.is_err() {
4479            self.control_handle.shutdown();
4480        }
4481        self.drop_without_shutdown();
4482        _result
4483    }
4484
4485    /// Similar to "send" but does not shutdown the channel if an error occurs.
4486    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4487        let _result = self.send_raw(result);
4488        self.drop_without_shutdown();
4489        _result
4490    }
4491
4492    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4493        self.control_handle
4494            .inner
4495            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4496                result,
4497                self.tx_id,
4498                0x267565b4916c825b,
4499                fidl::encoding::DynamicFlags::empty(),
4500            )
4501    }
4502}
4503
4504#[must_use = "FIDL methods require a response to be sent"]
4505#[derive(Debug)]
4506pub struct MlmeReadApfPacketFilterDataResponder {
4507    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
4508    tx_id: u32,
4509}
4510
4511/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
4512/// if the responder is dropped without sending a response, so that the client
4513/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4514impl std::ops::Drop for MlmeReadApfPacketFilterDataResponder {
4515    fn drop(&mut self) {
4516        self.control_handle.shutdown();
4517        // Safety: drops once, never accessed again
4518        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4519    }
4520}
4521
4522impl fidl::endpoints::Responder for MlmeReadApfPacketFilterDataResponder {
4523    type ControlHandle = MlmeControlHandle;
4524
4525    fn control_handle(&self) -> &MlmeControlHandle {
4526        &self.control_handle
4527    }
4528
4529    fn drop_without_shutdown(mut self) {
4530        // Safety: drops once, never accessed again due to mem::forget
4531        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4532        // Prevent Drop from running (which would shut down the channel)
4533        std::mem::forget(self);
4534    }
4535}
4536
4537impl MlmeReadApfPacketFilterDataResponder {
4538    /// Sends a response to the FIDL transaction.
4539    ///
4540    /// Sets the channel to shutdown if an error occurs.
4541    pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
4542        let _result = self.send_raw(result);
4543        if _result.is_err() {
4544            self.control_handle.shutdown();
4545        }
4546        self.drop_without_shutdown();
4547        _result
4548    }
4549
4550    /// Similar to "send" but does not shutdown the channel if an error occurs.
4551    pub fn send_no_shutdown_on_err(
4552        self,
4553        mut result: Result<&[u8], i32>,
4554    ) -> Result<(), fidl::Error> {
4555        let _result = self.send_raw(result);
4556        self.drop_without_shutdown();
4557        _result
4558    }
4559
4560    fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
4561        self.control_handle.inner.send::<fidl::encoding::ResultType<
4562            MlmeReadApfPacketFilterDataResponse,
4563            i32,
4564        >>(
4565            result.map(|memory| (memory,)),
4566            self.tx_id,
4567            0x6040d744f1b2cb61,
4568            fidl::encoding::DynamicFlags::empty(),
4569        )
4570    }
4571}
4572
4573#[must_use = "FIDL methods require a response to be sent"]
4574#[derive(Debug)]
4575pub struct MlmeSetApfPacketFilterEnabledResponder {
4576    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
4577    tx_id: u32,
4578}
4579
4580/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
4581/// if the responder is dropped without sending a response, so that the client
4582/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4583impl std::ops::Drop for MlmeSetApfPacketFilterEnabledResponder {
4584    fn drop(&mut self) {
4585        self.control_handle.shutdown();
4586        // Safety: drops once, never accessed again
4587        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4588    }
4589}
4590
4591impl fidl::endpoints::Responder for MlmeSetApfPacketFilterEnabledResponder {
4592    type ControlHandle = MlmeControlHandle;
4593
4594    fn control_handle(&self) -> &MlmeControlHandle {
4595        &self.control_handle
4596    }
4597
4598    fn drop_without_shutdown(mut self) {
4599        // Safety: drops once, never accessed again due to mem::forget
4600        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4601        // Prevent Drop from running (which would shut down the channel)
4602        std::mem::forget(self);
4603    }
4604}
4605
4606impl MlmeSetApfPacketFilterEnabledResponder {
4607    /// Sends a response to the FIDL transaction.
4608    ///
4609    /// Sets the channel to shutdown if an error occurs.
4610    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4611        let _result = self.send_raw(result);
4612        if _result.is_err() {
4613            self.control_handle.shutdown();
4614        }
4615        self.drop_without_shutdown();
4616        _result
4617    }
4618
4619    /// Similar to "send" but does not shutdown the channel if an error occurs.
4620    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4621        let _result = self.send_raw(result);
4622        self.drop_without_shutdown();
4623        _result
4624    }
4625
4626    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4627        self.control_handle
4628            .inner
4629            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4630                result,
4631                self.tx_id,
4632                0x6d99bdca77076aea,
4633                fidl::encoding::DynamicFlags::empty(),
4634            )
4635    }
4636}
4637
4638#[must_use = "FIDL methods require a response to be sent"]
4639#[derive(Debug)]
4640pub struct MlmeGetApfPacketFilterEnabledResponder {
4641    control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
4642    tx_id: u32,
4643}
4644
4645/// Set the the channel to be shutdown (see [`MlmeControlHandle::shutdown`])
4646/// if the responder is dropped without sending a response, so that the client
4647/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4648impl std::ops::Drop for MlmeGetApfPacketFilterEnabledResponder {
4649    fn drop(&mut self) {
4650        self.control_handle.shutdown();
4651        // Safety: drops once, never accessed again
4652        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4653    }
4654}
4655
4656impl fidl::endpoints::Responder for MlmeGetApfPacketFilterEnabledResponder {
4657    type ControlHandle = MlmeControlHandle;
4658
4659    fn control_handle(&self) -> &MlmeControlHandle {
4660        &self.control_handle
4661    }
4662
4663    fn drop_without_shutdown(mut self) {
4664        // Safety: drops once, never accessed again due to mem::forget
4665        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4666        // Prevent Drop from running (which would shut down the channel)
4667        std::mem::forget(self);
4668    }
4669}
4670
4671impl MlmeGetApfPacketFilterEnabledResponder {
4672    /// Sends a response to the FIDL transaction.
4673    ///
4674    /// Sets the channel to shutdown if an error occurs.
4675    pub fn send(self, mut result: Result<bool, i32>) -> Result<(), fidl::Error> {
4676        let _result = self.send_raw(result);
4677        if _result.is_err() {
4678            self.control_handle.shutdown();
4679        }
4680        self.drop_without_shutdown();
4681        _result
4682    }
4683
4684    /// Similar to "send" but does not shutdown the channel if an error occurs.
4685    pub fn send_no_shutdown_on_err(self, mut result: Result<bool, i32>) -> Result<(), fidl::Error> {
4686        let _result = self.send_raw(result);
4687        self.drop_without_shutdown();
4688        _result
4689    }
4690
4691    fn send_raw(&self, mut result: Result<bool, i32>) -> Result<(), fidl::Error> {
4692        self.control_handle.inner.send::<fidl::encoding::ResultType<
4693            MlmeGetApfPacketFilterEnabledResponse,
4694            i32,
4695        >>(
4696            result.map(|enabled| (enabled,)),
4697            self.tx_id,
4698            0x1df408bc154be1e4,
4699            fidl::encoding::DynamicFlags::empty(),
4700        )
4701    }
4702}
4703
4704mod internal {
4705    use super::*;
4706
4707    impl fidl::encoding::ResourceTypeMarker for ConnectorConnectRequest {
4708        type Borrowed<'a> = &'a mut Self;
4709        fn take_or_borrow<'a>(
4710            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4711        ) -> Self::Borrowed<'a> {
4712            value
4713        }
4714    }
4715
4716    unsafe impl fidl::encoding::TypeMarker for ConnectorConnectRequest {
4717        type Owned = Self;
4718
4719        #[inline(always)]
4720        fn inline_align(_context: fidl::encoding::Context) -> usize {
4721            4
4722        }
4723
4724        #[inline(always)]
4725        fn inline_size(_context: fidl::encoding::Context) -> usize {
4726            4
4727        }
4728    }
4729
4730    unsafe impl
4731        fidl::encoding::Encode<
4732            ConnectorConnectRequest,
4733            fidl::encoding::DefaultFuchsiaResourceDialect,
4734        > for &mut ConnectorConnectRequest
4735    {
4736        #[inline]
4737        unsafe fn encode(
4738            self,
4739            encoder: &mut fidl::encoding::Encoder<
4740                '_,
4741                fidl::encoding::DefaultFuchsiaResourceDialect,
4742            >,
4743            offset: usize,
4744            _depth: fidl::encoding::Depth,
4745        ) -> fidl::Result<()> {
4746            encoder.debug_check_bounds::<ConnectorConnectRequest>(offset);
4747            // Delegate to tuple encoding.
4748            fidl::encoding::Encode::<ConnectorConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
4749                (
4750                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<MlmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.request),
4751                ),
4752                encoder, offset, _depth
4753            )
4754        }
4755    }
4756    unsafe impl<
4757        T0: fidl::encoding::Encode<
4758                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<MlmeMarker>>,
4759                fidl::encoding::DefaultFuchsiaResourceDialect,
4760            >,
4761    >
4762        fidl::encoding::Encode<
4763            ConnectorConnectRequest,
4764            fidl::encoding::DefaultFuchsiaResourceDialect,
4765        > for (T0,)
4766    {
4767        #[inline]
4768        unsafe fn encode(
4769            self,
4770            encoder: &mut fidl::encoding::Encoder<
4771                '_,
4772                fidl::encoding::DefaultFuchsiaResourceDialect,
4773            >,
4774            offset: usize,
4775            depth: fidl::encoding::Depth,
4776        ) -> fidl::Result<()> {
4777            encoder.debug_check_bounds::<ConnectorConnectRequest>(offset);
4778            // Zero out padding regions. There's no need to apply masks
4779            // because the unmasked parts will be overwritten by fields.
4780            // Write the fields.
4781            self.0.encode(encoder, offset + 0, depth)?;
4782            Ok(())
4783        }
4784    }
4785
4786    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4787        for ConnectorConnectRequest
4788    {
4789        #[inline(always)]
4790        fn new_empty() -> Self {
4791            Self {
4792                request: fidl::new_empty!(
4793                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<MlmeMarker>>,
4794                    fidl::encoding::DefaultFuchsiaResourceDialect
4795                ),
4796            }
4797        }
4798
4799        #[inline]
4800        unsafe fn decode(
4801            &mut self,
4802            decoder: &mut fidl::encoding::Decoder<
4803                '_,
4804                fidl::encoding::DefaultFuchsiaResourceDialect,
4805            >,
4806            offset: usize,
4807            _depth: fidl::encoding::Depth,
4808        ) -> fidl::Result<()> {
4809            decoder.debug_check_bounds::<Self>(offset);
4810            // Verify that padding bytes are zero.
4811            fidl::decode!(
4812                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<MlmeMarker>>,
4813                fidl::encoding::DefaultFuchsiaResourceDialect,
4814                &mut self.request,
4815                decoder,
4816                offset + 0,
4817                _depth
4818            )?;
4819            Ok(())
4820        }
4821    }
4822}