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