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