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