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