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