fidl_fuchsia_wlan_softmac/
fidl_fuchsia_wlan_softmac.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_softmac__common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15pub struct WlanSoftmacBridgeStartRequest {
16    pub ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
17    pub ethernet_tx: u64,
18    pub wlan_rx: u64,
19}
20
21impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
22    for WlanSoftmacBridgeStartRequest
23{
24}
25
26#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
27pub struct WlanSoftmacBridgeStartResponse {
28    pub sme_channel: fidl::Channel,
29}
30
31impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
32    for WlanSoftmacBridgeStartResponse
33{
34}
35
36#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
37pub struct EthernetRxMarker;
38
39impl fidl::endpoints::ProtocolMarker for EthernetRxMarker {
40    type Proxy = EthernetRxProxy;
41    type RequestStream = EthernetRxRequestStream;
42    #[cfg(target_os = "fuchsia")]
43    type SynchronousProxy = EthernetRxSynchronousProxy;
44
45    const DEBUG_NAME: &'static str = "(anonymous) EthernetRx";
46}
47pub type EthernetRxTransferResult = Result<(), i32>;
48
49pub trait EthernetRxProxyInterface: Send + Sync {
50    type TransferResponseFut: std::future::Future<Output = Result<EthernetRxTransferResult, fidl::Error>>
51        + Send;
52    fn r#transfer(&self, payload: &EthernetRxTransferRequest) -> Self::TransferResponseFut;
53}
54#[derive(Debug)]
55#[cfg(target_os = "fuchsia")]
56pub struct EthernetRxSynchronousProxy {
57    client: fidl::client::sync::Client,
58}
59
60#[cfg(target_os = "fuchsia")]
61impl fidl::endpoints::SynchronousProxy for EthernetRxSynchronousProxy {
62    type Proxy = EthernetRxProxy;
63    type Protocol = EthernetRxMarker;
64
65    fn from_channel(inner: fidl::Channel) -> Self {
66        Self::new(inner)
67    }
68
69    fn into_channel(self) -> fidl::Channel {
70        self.client.into_channel()
71    }
72
73    fn as_channel(&self) -> &fidl::Channel {
74        self.client.as_channel()
75    }
76}
77
78#[cfg(target_os = "fuchsia")]
79impl EthernetRxSynchronousProxy {
80    pub fn new(channel: fidl::Channel) -> Self {
81        let protocol_name = <EthernetRxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
82        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
83    }
84
85    pub fn into_channel(self) -> fidl::Channel {
86        self.client.into_channel()
87    }
88
89    /// Waits until an event arrives and returns it. It is safe for other
90    /// threads to make concurrent requests while waiting for an event.
91    pub fn wait_for_event(
92        &self,
93        deadline: zx::MonotonicInstant,
94    ) -> Result<EthernetRxEvent, fidl::Error> {
95        EthernetRxEvent::decode(self.client.wait_for_event(deadline)?)
96    }
97
98    pub fn r#transfer(
99        &self,
100        mut payload: &EthernetRxTransferRequest,
101        ___deadline: zx::MonotonicInstant,
102    ) -> Result<EthernetRxTransferResult, fidl::Error> {
103        let _response = self.client.send_query::<
104            EthernetRxTransferRequest,
105            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
106        >(
107            payload,
108            0x199ff3498ef8a22a,
109            fidl::encoding::DynamicFlags::empty(),
110            ___deadline,
111        )?;
112        Ok(_response.map(|x| x))
113    }
114}
115
116#[cfg(target_os = "fuchsia")]
117impl From<EthernetRxSynchronousProxy> for zx::Handle {
118    fn from(value: EthernetRxSynchronousProxy) -> Self {
119        value.into_channel().into()
120    }
121}
122
123#[cfg(target_os = "fuchsia")]
124impl From<fidl::Channel> for EthernetRxSynchronousProxy {
125    fn from(value: fidl::Channel) -> Self {
126        Self::new(value)
127    }
128}
129
130#[cfg(target_os = "fuchsia")]
131impl fidl::endpoints::FromClient for EthernetRxSynchronousProxy {
132    type Protocol = EthernetRxMarker;
133
134    fn from_client(value: fidl::endpoints::ClientEnd<EthernetRxMarker>) -> Self {
135        Self::new(value.into_channel())
136    }
137}
138
139#[derive(Debug, Clone)]
140pub struct EthernetRxProxy {
141    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
142}
143
144impl fidl::endpoints::Proxy for EthernetRxProxy {
145    type Protocol = EthernetRxMarker;
146
147    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
148        Self::new(inner)
149    }
150
151    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
152        self.client.into_channel().map_err(|client| Self { client })
153    }
154
155    fn as_channel(&self) -> &::fidl::AsyncChannel {
156        self.client.as_channel()
157    }
158}
159
160impl EthernetRxProxy {
161    /// Create a new Proxy for fuchsia.wlan.softmac/EthernetRx.
162    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
163        let protocol_name = <EthernetRxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
164        Self { client: fidl::client::Client::new(channel, protocol_name) }
165    }
166
167    /// Get a Stream of events from the remote end of the protocol.
168    ///
169    /// # Panics
170    ///
171    /// Panics if the event stream was already taken.
172    pub fn take_event_stream(&self) -> EthernetRxEventStream {
173        EthernetRxEventStream { event_receiver: self.client.take_event_receiver() }
174    }
175
176    pub fn r#transfer(
177        &self,
178        mut payload: &EthernetRxTransferRequest,
179    ) -> fidl::client::QueryResponseFut<
180        EthernetRxTransferResult,
181        fidl::encoding::DefaultFuchsiaResourceDialect,
182    > {
183        EthernetRxProxyInterface::r#transfer(self, payload)
184    }
185}
186
187impl EthernetRxProxyInterface for EthernetRxProxy {
188    type TransferResponseFut = fidl::client::QueryResponseFut<
189        EthernetRxTransferResult,
190        fidl::encoding::DefaultFuchsiaResourceDialect,
191    >;
192    fn r#transfer(&self, mut payload: &EthernetRxTransferRequest) -> Self::TransferResponseFut {
193        fn _decode(
194            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
195        ) -> Result<EthernetRxTransferResult, fidl::Error> {
196            let _response = fidl::client::decode_transaction_body::<
197                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
198                fidl::encoding::DefaultFuchsiaResourceDialect,
199                0x199ff3498ef8a22a,
200            >(_buf?)?;
201            Ok(_response.map(|x| x))
202        }
203        self.client.send_query_and_decode::<EthernetRxTransferRequest, EthernetRxTransferResult>(
204            payload,
205            0x199ff3498ef8a22a,
206            fidl::encoding::DynamicFlags::empty(),
207            _decode,
208        )
209    }
210}
211
212pub struct EthernetRxEventStream {
213    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
214}
215
216impl std::marker::Unpin for EthernetRxEventStream {}
217
218impl futures::stream::FusedStream for EthernetRxEventStream {
219    fn is_terminated(&self) -> bool {
220        self.event_receiver.is_terminated()
221    }
222}
223
224impl futures::Stream for EthernetRxEventStream {
225    type Item = Result<EthernetRxEvent, fidl::Error>;
226
227    fn poll_next(
228        mut self: std::pin::Pin<&mut Self>,
229        cx: &mut std::task::Context<'_>,
230    ) -> std::task::Poll<Option<Self::Item>> {
231        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
232            &mut self.event_receiver,
233            cx
234        )?) {
235            Some(buf) => std::task::Poll::Ready(Some(EthernetRxEvent::decode(buf))),
236            None => std::task::Poll::Ready(None),
237        }
238    }
239}
240
241#[derive(Debug)]
242pub enum EthernetRxEvent {}
243
244impl EthernetRxEvent {
245    /// Decodes a message buffer as a [`EthernetRxEvent`].
246    fn decode(
247        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
248    ) -> Result<EthernetRxEvent, fidl::Error> {
249        let (bytes, _handles) = buf.split_mut();
250        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
251        debug_assert_eq!(tx_header.tx_id, 0);
252        match tx_header.ordinal {
253            _ => Err(fidl::Error::UnknownOrdinal {
254                ordinal: tx_header.ordinal,
255                protocol_name: <EthernetRxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
256            }),
257        }
258    }
259}
260
261/// A Stream of incoming requests for fuchsia.wlan.softmac/EthernetRx.
262pub struct EthernetRxRequestStream {
263    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
264    is_terminated: bool,
265}
266
267impl std::marker::Unpin for EthernetRxRequestStream {}
268
269impl futures::stream::FusedStream for EthernetRxRequestStream {
270    fn is_terminated(&self) -> bool {
271        self.is_terminated
272    }
273}
274
275impl fidl::endpoints::RequestStream for EthernetRxRequestStream {
276    type Protocol = EthernetRxMarker;
277    type ControlHandle = EthernetRxControlHandle;
278
279    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
280        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
281    }
282
283    fn control_handle(&self) -> Self::ControlHandle {
284        EthernetRxControlHandle { inner: self.inner.clone() }
285    }
286
287    fn into_inner(
288        self,
289    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
290    {
291        (self.inner, self.is_terminated)
292    }
293
294    fn from_inner(
295        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
296        is_terminated: bool,
297    ) -> Self {
298        Self { inner, is_terminated }
299    }
300}
301
302impl futures::Stream for EthernetRxRequestStream {
303    type Item = Result<EthernetRxRequest, fidl::Error>;
304
305    fn poll_next(
306        mut self: std::pin::Pin<&mut Self>,
307        cx: &mut std::task::Context<'_>,
308    ) -> std::task::Poll<Option<Self::Item>> {
309        let this = &mut *self;
310        if this.inner.check_shutdown(cx) {
311            this.is_terminated = true;
312            return std::task::Poll::Ready(None);
313        }
314        if this.is_terminated {
315            panic!("polled EthernetRxRequestStream after completion");
316        }
317        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
318            |bytes, handles| {
319                match this.inner.channel().read_etc(cx, bytes, handles) {
320                    std::task::Poll::Ready(Ok(())) => {}
321                    std::task::Poll::Pending => return std::task::Poll::Pending,
322                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
323                        this.is_terminated = true;
324                        return std::task::Poll::Ready(None);
325                    }
326                    std::task::Poll::Ready(Err(e)) => {
327                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
328                            e.into(),
329                        ))))
330                    }
331                }
332
333                // A message has been received from the channel
334                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
335
336                std::task::Poll::Ready(Some(match header.ordinal {
337                    0x199ff3498ef8a22a => {
338                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
339                        let mut req = fidl::new_empty!(
340                            EthernetRxTransferRequest,
341                            fidl::encoding::DefaultFuchsiaResourceDialect
342                        );
343                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<EthernetRxTransferRequest>(&header, _body_bytes, handles, &mut req)?;
344                        let control_handle = EthernetRxControlHandle { inner: this.inner.clone() };
345                        Ok(EthernetRxRequest::Transfer {
346                            payload: req,
347                            responder: EthernetRxTransferResponder {
348                                control_handle: std::mem::ManuallyDrop::new(control_handle),
349                                tx_id: header.tx_id,
350                            },
351                        })
352                    }
353                    _ => Err(fidl::Error::UnknownOrdinal {
354                        ordinal: header.ordinal,
355                        protocol_name:
356                            <EthernetRxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
357                    }),
358                }))
359            },
360        )
361    }
362}
363
364/// Protocol for sending an Ethernet frame from the bridged wlansoftmac
365/// driver to the wlansoftmac driver.
366///
367/// # Experimental
368///
369/// This protocol is implemented as a foreign function interface (FFI)
370/// between the wlansoftmac driver and the bridged driver solely to improve
371/// the performance of processing data frames through the wlan-mlme library.
372#[derive(Debug)]
373pub enum EthernetRxRequest {
374    Transfer { payload: EthernetRxTransferRequest, responder: EthernetRxTransferResponder },
375}
376
377impl EthernetRxRequest {
378    #[allow(irrefutable_let_patterns)]
379    pub fn into_transfer(self) -> Option<(EthernetRxTransferRequest, EthernetRxTransferResponder)> {
380        if let EthernetRxRequest::Transfer { payload, responder } = self {
381            Some((payload, responder))
382        } else {
383            None
384        }
385    }
386
387    /// Name of the method defined in FIDL
388    pub fn method_name(&self) -> &'static str {
389        match *self {
390            EthernetRxRequest::Transfer { .. } => "transfer",
391        }
392    }
393}
394
395#[derive(Debug, Clone)]
396pub struct EthernetRxControlHandle {
397    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
398}
399
400impl fidl::endpoints::ControlHandle for EthernetRxControlHandle {
401    fn shutdown(&self) {
402        self.inner.shutdown()
403    }
404    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
405        self.inner.shutdown_with_epitaph(status)
406    }
407
408    fn is_closed(&self) -> bool {
409        self.inner.channel().is_closed()
410    }
411    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
412        self.inner.channel().on_closed()
413    }
414
415    #[cfg(target_os = "fuchsia")]
416    fn signal_peer(
417        &self,
418        clear_mask: zx::Signals,
419        set_mask: zx::Signals,
420    ) -> Result<(), zx_status::Status> {
421        use fidl::Peered;
422        self.inner.channel().signal_peer(clear_mask, set_mask)
423    }
424}
425
426impl EthernetRxControlHandle {}
427
428#[must_use = "FIDL methods require a response to be sent"]
429#[derive(Debug)]
430pub struct EthernetRxTransferResponder {
431    control_handle: std::mem::ManuallyDrop<EthernetRxControlHandle>,
432    tx_id: u32,
433}
434
435/// Set the the channel to be shutdown (see [`EthernetRxControlHandle::shutdown`])
436/// if the responder is dropped without sending a response, so that the client
437/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
438impl std::ops::Drop for EthernetRxTransferResponder {
439    fn drop(&mut self) {
440        self.control_handle.shutdown();
441        // Safety: drops once, never accessed again
442        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
443    }
444}
445
446impl fidl::endpoints::Responder for EthernetRxTransferResponder {
447    type ControlHandle = EthernetRxControlHandle;
448
449    fn control_handle(&self) -> &EthernetRxControlHandle {
450        &self.control_handle
451    }
452
453    fn drop_without_shutdown(mut self) {
454        // Safety: drops once, never accessed again due to mem::forget
455        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
456        // Prevent Drop from running (which would shut down the channel)
457        std::mem::forget(self);
458    }
459}
460
461impl EthernetRxTransferResponder {
462    /// Sends a response to the FIDL transaction.
463    ///
464    /// Sets the channel to shutdown if an error occurs.
465    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
466        let _result = self.send_raw(result);
467        if _result.is_err() {
468            self.control_handle.shutdown();
469        }
470        self.drop_without_shutdown();
471        _result
472    }
473
474    /// Similar to "send" but does not shutdown the channel if an error occurs.
475    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
476        let _result = self.send_raw(result);
477        self.drop_without_shutdown();
478        _result
479    }
480
481    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
482        self.control_handle
483            .inner
484            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
485                result,
486                self.tx_id,
487                0x199ff3498ef8a22a,
488                fidl::encoding::DynamicFlags::empty(),
489            )
490    }
491}
492
493#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
494pub struct EthernetTxMarker;
495
496impl fidl::endpoints::ProtocolMarker for EthernetTxMarker {
497    type Proxy = EthernetTxProxy;
498    type RequestStream = EthernetTxRequestStream;
499    #[cfg(target_os = "fuchsia")]
500    type SynchronousProxy = EthernetTxSynchronousProxy;
501
502    const DEBUG_NAME: &'static str = "(anonymous) EthernetTx";
503}
504pub type EthernetTxTransferResult = Result<(), i32>;
505
506pub trait EthernetTxProxyInterface: Send + Sync {
507    type TransferResponseFut: std::future::Future<Output = Result<EthernetTxTransferResult, fidl::Error>>
508        + Send;
509    fn r#transfer(&self, payload: &EthernetTxTransferRequest) -> Self::TransferResponseFut;
510}
511#[derive(Debug)]
512#[cfg(target_os = "fuchsia")]
513pub struct EthernetTxSynchronousProxy {
514    client: fidl::client::sync::Client,
515}
516
517#[cfg(target_os = "fuchsia")]
518impl fidl::endpoints::SynchronousProxy for EthernetTxSynchronousProxy {
519    type Proxy = EthernetTxProxy;
520    type Protocol = EthernetTxMarker;
521
522    fn from_channel(inner: fidl::Channel) -> Self {
523        Self::new(inner)
524    }
525
526    fn into_channel(self) -> fidl::Channel {
527        self.client.into_channel()
528    }
529
530    fn as_channel(&self) -> &fidl::Channel {
531        self.client.as_channel()
532    }
533}
534
535#[cfg(target_os = "fuchsia")]
536impl EthernetTxSynchronousProxy {
537    pub fn new(channel: fidl::Channel) -> Self {
538        let protocol_name = <EthernetTxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
539        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
540    }
541
542    pub fn into_channel(self) -> fidl::Channel {
543        self.client.into_channel()
544    }
545
546    /// Waits until an event arrives and returns it. It is safe for other
547    /// threads to make concurrent requests while waiting for an event.
548    pub fn wait_for_event(
549        &self,
550        deadline: zx::MonotonicInstant,
551    ) -> Result<EthernetTxEvent, fidl::Error> {
552        EthernetTxEvent::decode(self.client.wait_for_event(deadline)?)
553    }
554
555    pub fn r#transfer(
556        &self,
557        mut payload: &EthernetTxTransferRequest,
558        ___deadline: zx::MonotonicInstant,
559    ) -> Result<EthernetTxTransferResult, fidl::Error> {
560        let _response = self.client.send_query::<
561            EthernetTxTransferRequest,
562            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
563        >(
564            payload,
565            0x616dafedf07d00e7,
566            fidl::encoding::DynamicFlags::empty(),
567            ___deadline,
568        )?;
569        Ok(_response.map(|x| x))
570    }
571}
572
573#[cfg(target_os = "fuchsia")]
574impl From<EthernetTxSynchronousProxy> for zx::Handle {
575    fn from(value: EthernetTxSynchronousProxy) -> Self {
576        value.into_channel().into()
577    }
578}
579
580#[cfg(target_os = "fuchsia")]
581impl From<fidl::Channel> for EthernetTxSynchronousProxy {
582    fn from(value: fidl::Channel) -> Self {
583        Self::new(value)
584    }
585}
586
587#[cfg(target_os = "fuchsia")]
588impl fidl::endpoints::FromClient for EthernetTxSynchronousProxy {
589    type Protocol = EthernetTxMarker;
590
591    fn from_client(value: fidl::endpoints::ClientEnd<EthernetTxMarker>) -> Self {
592        Self::new(value.into_channel())
593    }
594}
595
596#[derive(Debug, Clone)]
597pub struct EthernetTxProxy {
598    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
599}
600
601impl fidl::endpoints::Proxy for EthernetTxProxy {
602    type Protocol = EthernetTxMarker;
603
604    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
605        Self::new(inner)
606    }
607
608    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
609        self.client.into_channel().map_err(|client| Self { client })
610    }
611
612    fn as_channel(&self) -> &::fidl::AsyncChannel {
613        self.client.as_channel()
614    }
615}
616
617impl EthernetTxProxy {
618    /// Create a new Proxy for fuchsia.wlan.softmac/EthernetTx.
619    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
620        let protocol_name = <EthernetTxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
621        Self { client: fidl::client::Client::new(channel, protocol_name) }
622    }
623
624    /// Get a Stream of events from the remote end of the protocol.
625    ///
626    /// # Panics
627    ///
628    /// Panics if the event stream was already taken.
629    pub fn take_event_stream(&self) -> EthernetTxEventStream {
630        EthernetTxEventStream { event_receiver: self.client.take_event_receiver() }
631    }
632
633    pub fn r#transfer(
634        &self,
635        mut payload: &EthernetTxTransferRequest,
636    ) -> fidl::client::QueryResponseFut<
637        EthernetTxTransferResult,
638        fidl::encoding::DefaultFuchsiaResourceDialect,
639    > {
640        EthernetTxProxyInterface::r#transfer(self, payload)
641    }
642}
643
644impl EthernetTxProxyInterface for EthernetTxProxy {
645    type TransferResponseFut = fidl::client::QueryResponseFut<
646        EthernetTxTransferResult,
647        fidl::encoding::DefaultFuchsiaResourceDialect,
648    >;
649    fn r#transfer(&self, mut payload: &EthernetTxTransferRequest) -> Self::TransferResponseFut {
650        fn _decode(
651            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
652        ) -> Result<EthernetTxTransferResult, fidl::Error> {
653            let _response = fidl::client::decode_transaction_body::<
654                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
655                fidl::encoding::DefaultFuchsiaResourceDialect,
656                0x616dafedf07d00e7,
657            >(_buf?)?;
658            Ok(_response.map(|x| x))
659        }
660        self.client.send_query_and_decode::<EthernetTxTransferRequest, EthernetTxTransferResult>(
661            payload,
662            0x616dafedf07d00e7,
663            fidl::encoding::DynamicFlags::empty(),
664            _decode,
665        )
666    }
667}
668
669pub struct EthernetTxEventStream {
670    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
671}
672
673impl std::marker::Unpin for EthernetTxEventStream {}
674
675impl futures::stream::FusedStream for EthernetTxEventStream {
676    fn is_terminated(&self) -> bool {
677        self.event_receiver.is_terminated()
678    }
679}
680
681impl futures::Stream for EthernetTxEventStream {
682    type Item = Result<EthernetTxEvent, fidl::Error>;
683
684    fn poll_next(
685        mut self: std::pin::Pin<&mut Self>,
686        cx: &mut std::task::Context<'_>,
687    ) -> std::task::Poll<Option<Self::Item>> {
688        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
689            &mut self.event_receiver,
690            cx
691        )?) {
692            Some(buf) => std::task::Poll::Ready(Some(EthernetTxEvent::decode(buf))),
693            None => std::task::Poll::Ready(None),
694        }
695    }
696}
697
698#[derive(Debug)]
699pub enum EthernetTxEvent {}
700
701impl EthernetTxEvent {
702    /// Decodes a message buffer as a [`EthernetTxEvent`].
703    fn decode(
704        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
705    ) -> Result<EthernetTxEvent, fidl::Error> {
706        let (bytes, _handles) = buf.split_mut();
707        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
708        debug_assert_eq!(tx_header.tx_id, 0);
709        match tx_header.ordinal {
710            _ => Err(fidl::Error::UnknownOrdinal {
711                ordinal: tx_header.ordinal,
712                protocol_name: <EthernetTxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
713            }),
714        }
715    }
716}
717
718/// A Stream of incoming requests for fuchsia.wlan.softmac/EthernetTx.
719pub struct EthernetTxRequestStream {
720    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
721    is_terminated: bool,
722}
723
724impl std::marker::Unpin for EthernetTxRequestStream {}
725
726impl futures::stream::FusedStream for EthernetTxRequestStream {
727    fn is_terminated(&self) -> bool {
728        self.is_terminated
729    }
730}
731
732impl fidl::endpoints::RequestStream for EthernetTxRequestStream {
733    type Protocol = EthernetTxMarker;
734    type ControlHandle = EthernetTxControlHandle;
735
736    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
737        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
738    }
739
740    fn control_handle(&self) -> Self::ControlHandle {
741        EthernetTxControlHandle { inner: self.inner.clone() }
742    }
743
744    fn into_inner(
745        self,
746    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
747    {
748        (self.inner, self.is_terminated)
749    }
750
751    fn from_inner(
752        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
753        is_terminated: bool,
754    ) -> Self {
755        Self { inner, is_terminated }
756    }
757}
758
759impl futures::Stream for EthernetTxRequestStream {
760    type Item = Result<EthernetTxRequest, fidl::Error>;
761
762    fn poll_next(
763        mut self: std::pin::Pin<&mut Self>,
764        cx: &mut std::task::Context<'_>,
765    ) -> std::task::Poll<Option<Self::Item>> {
766        let this = &mut *self;
767        if this.inner.check_shutdown(cx) {
768            this.is_terminated = true;
769            return std::task::Poll::Ready(None);
770        }
771        if this.is_terminated {
772            panic!("polled EthernetTxRequestStream after completion");
773        }
774        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
775            |bytes, handles| {
776                match this.inner.channel().read_etc(cx, bytes, handles) {
777                    std::task::Poll::Ready(Ok(())) => {}
778                    std::task::Poll::Pending => return std::task::Poll::Pending,
779                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
780                        this.is_terminated = true;
781                        return std::task::Poll::Ready(None);
782                    }
783                    std::task::Poll::Ready(Err(e)) => {
784                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
785                            e.into(),
786                        ))))
787                    }
788                }
789
790                // A message has been received from the channel
791                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
792
793                std::task::Poll::Ready(Some(match header.ordinal {
794                    0x616dafedf07d00e7 => {
795                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
796                        let mut req = fidl::new_empty!(
797                            EthernetTxTransferRequest,
798                            fidl::encoding::DefaultFuchsiaResourceDialect
799                        );
800                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<EthernetTxTransferRequest>(&header, _body_bytes, handles, &mut req)?;
801                        let control_handle = EthernetTxControlHandle { inner: this.inner.clone() };
802                        Ok(EthernetTxRequest::Transfer {
803                            payload: req,
804                            responder: EthernetTxTransferResponder {
805                                control_handle: std::mem::ManuallyDrop::new(control_handle),
806                                tx_id: header.tx_id,
807                            },
808                        })
809                    }
810                    _ => Err(fidl::Error::UnknownOrdinal {
811                        ordinal: header.ordinal,
812                        protocol_name:
813                            <EthernetTxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
814                    }),
815                }))
816            },
817        )
818    }
819}
820
821/// Protocol for sending an Ethernet frame from the wlansoftmac driver to the bridged
822/// wlansoftmac driver.
823///
824/// # Experimental
825///
826/// This protocol is implemented as a foreign function interface (FFI)
827/// between the wlansoftmac driver and the bridged driver solely to improve
828/// the performance of processing data frames through the wlan-mlme library.
829///
830/// # Safety
831///
832/// The `complete_borrowed_operation` field must be a function pointer of the type
833/// void (*)(eth::BorrowedOperation<>*, zx_status_t) where the first argument
834/// is the value of `borrowed_operation` field.
835///
836/// Calling `complete_borrowed_operation` will result in calling
837/// `eth::BorrowedOperation<>::Complete()` to release ownership of the packet. This
838/// must be called exactly once. Failing to call `complete_borrowed_operation`
839/// will leak memory, and calling more than once will result in use-after-free.
840#[derive(Debug)]
841pub enum EthernetTxRequest {
842    Transfer { payload: EthernetTxTransferRequest, responder: EthernetTxTransferResponder },
843}
844
845impl EthernetTxRequest {
846    #[allow(irrefutable_let_patterns)]
847    pub fn into_transfer(self) -> Option<(EthernetTxTransferRequest, EthernetTxTransferResponder)> {
848        if let EthernetTxRequest::Transfer { payload, responder } = self {
849            Some((payload, responder))
850        } else {
851            None
852        }
853    }
854
855    /// Name of the method defined in FIDL
856    pub fn method_name(&self) -> &'static str {
857        match *self {
858            EthernetTxRequest::Transfer { .. } => "transfer",
859        }
860    }
861}
862
863#[derive(Debug, Clone)]
864pub struct EthernetTxControlHandle {
865    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
866}
867
868impl fidl::endpoints::ControlHandle for EthernetTxControlHandle {
869    fn shutdown(&self) {
870        self.inner.shutdown()
871    }
872    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
873        self.inner.shutdown_with_epitaph(status)
874    }
875
876    fn is_closed(&self) -> bool {
877        self.inner.channel().is_closed()
878    }
879    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
880        self.inner.channel().on_closed()
881    }
882
883    #[cfg(target_os = "fuchsia")]
884    fn signal_peer(
885        &self,
886        clear_mask: zx::Signals,
887        set_mask: zx::Signals,
888    ) -> Result<(), zx_status::Status> {
889        use fidl::Peered;
890        self.inner.channel().signal_peer(clear_mask, set_mask)
891    }
892}
893
894impl EthernetTxControlHandle {}
895
896#[must_use = "FIDL methods require a response to be sent"]
897#[derive(Debug)]
898pub struct EthernetTxTransferResponder {
899    control_handle: std::mem::ManuallyDrop<EthernetTxControlHandle>,
900    tx_id: u32,
901}
902
903/// Set the the channel to be shutdown (see [`EthernetTxControlHandle::shutdown`])
904/// if the responder is dropped without sending a response, so that the client
905/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
906impl std::ops::Drop for EthernetTxTransferResponder {
907    fn drop(&mut self) {
908        self.control_handle.shutdown();
909        // Safety: drops once, never accessed again
910        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
911    }
912}
913
914impl fidl::endpoints::Responder for EthernetTxTransferResponder {
915    type ControlHandle = EthernetTxControlHandle;
916
917    fn control_handle(&self) -> &EthernetTxControlHandle {
918        &self.control_handle
919    }
920
921    fn drop_without_shutdown(mut self) {
922        // Safety: drops once, never accessed again due to mem::forget
923        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
924        // Prevent Drop from running (which would shut down the channel)
925        std::mem::forget(self);
926    }
927}
928
929impl EthernetTxTransferResponder {
930    /// Sends a response to the FIDL transaction.
931    ///
932    /// Sets the channel to shutdown if an error occurs.
933    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
934        let _result = self.send_raw(result);
935        if _result.is_err() {
936            self.control_handle.shutdown();
937        }
938        self.drop_without_shutdown();
939        _result
940    }
941
942    /// Similar to "send" but does not shutdown the channel if an error occurs.
943    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
944        let _result = self.send_raw(result);
945        self.drop_without_shutdown();
946        _result
947    }
948
949    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
950        self.control_handle
951            .inner
952            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
953                result,
954                self.tx_id,
955                0x616dafedf07d00e7,
956                fidl::encoding::DynamicFlags::empty(),
957            )
958    }
959}
960
961#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
962pub struct WlanRxMarker;
963
964impl fidl::endpoints::ProtocolMarker for WlanRxMarker {
965    type Proxy = WlanRxProxy;
966    type RequestStream = WlanRxRequestStream;
967    #[cfg(target_os = "fuchsia")]
968    type SynchronousProxy = WlanRxSynchronousProxy;
969
970    const DEBUG_NAME: &'static str = "(anonymous) WlanRx";
971}
972
973pub trait WlanRxProxyInterface: Send + Sync {
974    type TransferResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
975    fn r#transfer(&self, payload: &WlanRxTransferRequest) -> Self::TransferResponseFut;
976}
977#[derive(Debug)]
978#[cfg(target_os = "fuchsia")]
979pub struct WlanRxSynchronousProxy {
980    client: fidl::client::sync::Client,
981}
982
983#[cfg(target_os = "fuchsia")]
984impl fidl::endpoints::SynchronousProxy for WlanRxSynchronousProxy {
985    type Proxy = WlanRxProxy;
986    type Protocol = WlanRxMarker;
987
988    fn from_channel(inner: fidl::Channel) -> Self {
989        Self::new(inner)
990    }
991
992    fn into_channel(self) -> fidl::Channel {
993        self.client.into_channel()
994    }
995
996    fn as_channel(&self) -> &fidl::Channel {
997        self.client.as_channel()
998    }
999}
1000
1001#[cfg(target_os = "fuchsia")]
1002impl WlanRxSynchronousProxy {
1003    pub fn new(channel: fidl::Channel) -> Self {
1004        let protocol_name = <WlanRxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1005        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1006    }
1007
1008    pub fn into_channel(self) -> fidl::Channel {
1009        self.client.into_channel()
1010    }
1011
1012    /// Waits until an event arrives and returns it. It is safe for other
1013    /// threads to make concurrent requests while waiting for an event.
1014    pub fn wait_for_event(
1015        &self,
1016        deadline: zx::MonotonicInstant,
1017    ) -> Result<WlanRxEvent, fidl::Error> {
1018        WlanRxEvent::decode(self.client.wait_for_event(deadline)?)
1019    }
1020
1021    pub fn r#transfer(
1022        &self,
1023        mut payload: &WlanRxTransferRequest,
1024        ___deadline: zx::MonotonicInstant,
1025    ) -> Result<(), fidl::Error> {
1026        let _response =
1027            self.client.send_query::<WlanRxTransferRequest, fidl::encoding::EmptyPayload>(
1028                payload,
1029                0x2c73b18cbfca6055,
1030                fidl::encoding::DynamicFlags::empty(),
1031                ___deadline,
1032            )?;
1033        Ok(_response)
1034    }
1035}
1036
1037#[cfg(target_os = "fuchsia")]
1038impl From<WlanRxSynchronousProxy> for zx::Handle {
1039    fn from(value: WlanRxSynchronousProxy) -> Self {
1040        value.into_channel().into()
1041    }
1042}
1043
1044#[cfg(target_os = "fuchsia")]
1045impl From<fidl::Channel> for WlanRxSynchronousProxy {
1046    fn from(value: fidl::Channel) -> Self {
1047        Self::new(value)
1048    }
1049}
1050
1051#[cfg(target_os = "fuchsia")]
1052impl fidl::endpoints::FromClient for WlanRxSynchronousProxy {
1053    type Protocol = WlanRxMarker;
1054
1055    fn from_client(value: fidl::endpoints::ClientEnd<WlanRxMarker>) -> Self {
1056        Self::new(value.into_channel())
1057    }
1058}
1059
1060#[derive(Debug, Clone)]
1061pub struct WlanRxProxy {
1062    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1063}
1064
1065impl fidl::endpoints::Proxy for WlanRxProxy {
1066    type Protocol = WlanRxMarker;
1067
1068    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1069        Self::new(inner)
1070    }
1071
1072    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1073        self.client.into_channel().map_err(|client| Self { client })
1074    }
1075
1076    fn as_channel(&self) -> &::fidl::AsyncChannel {
1077        self.client.as_channel()
1078    }
1079}
1080
1081impl WlanRxProxy {
1082    /// Create a new Proxy for fuchsia.wlan.softmac/WlanRx.
1083    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1084        let protocol_name = <WlanRxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1085        Self { client: fidl::client::Client::new(channel, protocol_name) }
1086    }
1087
1088    /// Get a Stream of events from the remote end of the protocol.
1089    ///
1090    /// # Panics
1091    ///
1092    /// Panics if the event stream was already taken.
1093    pub fn take_event_stream(&self) -> WlanRxEventStream {
1094        WlanRxEventStream { event_receiver: self.client.take_event_receiver() }
1095    }
1096
1097    pub fn r#transfer(
1098        &self,
1099        mut payload: &WlanRxTransferRequest,
1100    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
1101        WlanRxProxyInterface::r#transfer(self, payload)
1102    }
1103}
1104
1105impl WlanRxProxyInterface for WlanRxProxy {
1106    type TransferResponseFut =
1107        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
1108    fn r#transfer(&self, mut payload: &WlanRxTransferRequest) -> Self::TransferResponseFut {
1109        fn _decode(
1110            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1111        ) -> Result<(), fidl::Error> {
1112            let _response = fidl::client::decode_transaction_body::<
1113                fidl::encoding::EmptyPayload,
1114                fidl::encoding::DefaultFuchsiaResourceDialect,
1115                0x2c73b18cbfca6055,
1116            >(_buf?)?;
1117            Ok(_response)
1118        }
1119        self.client.send_query_and_decode::<WlanRxTransferRequest, ()>(
1120            payload,
1121            0x2c73b18cbfca6055,
1122            fidl::encoding::DynamicFlags::empty(),
1123            _decode,
1124        )
1125    }
1126}
1127
1128pub struct WlanRxEventStream {
1129    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1130}
1131
1132impl std::marker::Unpin for WlanRxEventStream {}
1133
1134impl futures::stream::FusedStream for WlanRxEventStream {
1135    fn is_terminated(&self) -> bool {
1136        self.event_receiver.is_terminated()
1137    }
1138}
1139
1140impl futures::Stream for WlanRxEventStream {
1141    type Item = Result<WlanRxEvent, fidl::Error>;
1142
1143    fn poll_next(
1144        mut self: std::pin::Pin<&mut Self>,
1145        cx: &mut std::task::Context<'_>,
1146    ) -> std::task::Poll<Option<Self::Item>> {
1147        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1148            &mut self.event_receiver,
1149            cx
1150        )?) {
1151            Some(buf) => std::task::Poll::Ready(Some(WlanRxEvent::decode(buf))),
1152            None => std::task::Poll::Ready(None),
1153        }
1154    }
1155}
1156
1157#[derive(Debug)]
1158pub enum WlanRxEvent {}
1159
1160impl WlanRxEvent {
1161    /// Decodes a message buffer as a [`WlanRxEvent`].
1162    fn decode(
1163        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1164    ) -> Result<WlanRxEvent, fidl::Error> {
1165        let (bytes, _handles) = buf.split_mut();
1166        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1167        debug_assert_eq!(tx_header.tx_id, 0);
1168        match tx_header.ordinal {
1169            _ => Err(fidl::Error::UnknownOrdinal {
1170                ordinal: tx_header.ordinal,
1171                protocol_name: <WlanRxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1172            }),
1173        }
1174    }
1175}
1176
1177/// A Stream of incoming requests for fuchsia.wlan.softmac/WlanRx.
1178pub struct WlanRxRequestStream {
1179    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1180    is_terminated: bool,
1181}
1182
1183impl std::marker::Unpin for WlanRxRequestStream {}
1184
1185impl futures::stream::FusedStream for WlanRxRequestStream {
1186    fn is_terminated(&self) -> bool {
1187        self.is_terminated
1188    }
1189}
1190
1191impl fidl::endpoints::RequestStream for WlanRxRequestStream {
1192    type Protocol = WlanRxMarker;
1193    type ControlHandle = WlanRxControlHandle;
1194
1195    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1196        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1197    }
1198
1199    fn control_handle(&self) -> Self::ControlHandle {
1200        WlanRxControlHandle { inner: self.inner.clone() }
1201    }
1202
1203    fn into_inner(
1204        self,
1205    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1206    {
1207        (self.inner, self.is_terminated)
1208    }
1209
1210    fn from_inner(
1211        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1212        is_terminated: bool,
1213    ) -> Self {
1214        Self { inner, is_terminated }
1215    }
1216}
1217
1218impl futures::Stream for WlanRxRequestStream {
1219    type Item = Result<WlanRxRequest, fidl::Error>;
1220
1221    fn poll_next(
1222        mut self: std::pin::Pin<&mut Self>,
1223        cx: &mut std::task::Context<'_>,
1224    ) -> std::task::Poll<Option<Self::Item>> {
1225        let this = &mut *self;
1226        if this.inner.check_shutdown(cx) {
1227            this.is_terminated = true;
1228            return std::task::Poll::Ready(None);
1229        }
1230        if this.is_terminated {
1231            panic!("polled WlanRxRequestStream after completion");
1232        }
1233        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1234            |bytes, handles| {
1235                match this.inner.channel().read_etc(cx, bytes, handles) {
1236                    std::task::Poll::Ready(Ok(())) => {}
1237                    std::task::Poll::Pending => return std::task::Poll::Pending,
1238                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1239                        this.is_terminated = true;
1240                        return std::task::Poll::Ready(None);
1241                    }
1242                    std::task::Poll::Ready(Err(e)) => {
1243                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1244                            e.into(),
1245                        ))))
1246                    }
1247                }
1248
1249                // A message has been received from the channel
1250                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1251
1252                std::task::Poll::Ready(Some(match header.ordinal {
1253                    0x2c73b18cbfca6055 => {
1254                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1255                        let mut req = fidl::new_empty!(
1256                            WlanRxTransferRequest,
1257                            fidl::encoding::DefaultFuchsiaResourceDialect
1258                        );
1259                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanRxTransferRequest>(&header, _body_bytes, handles, &mut req)?;
1260                        let control_handle = WlanRxControlHandle { inner: this.inner.clone() };
1261                        Ok(WlanRxRequest::Transfer {
1262                            payload: req,
1263                            responder: WlanRxTransferResponder {
1264                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1265                                tx_id: header.tx_id,
1266                            },
1267                        })
1268                    }
1269                    _ => Err(fidl::Error::UnknownOrdinal {
1270                        ordinal: header.ordinal,
1271                        protocol_name:
1272                            <WlanRxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1273                    }),
1274                }))
1275            },
1276        )
1277    }
1278}
1279
1280/// Protocol for sending a WLAN frame from the wlansoftmac driver to the bridged
1281/// wlansoftmac driver.
1282///
1283/// # Experimental
1284///
1285/// This protocol is implemented as a foreign function interface (FFI)
1286/// between the wlansoftmac driver and the bridged driver solely to improve
1287/// the performance of processing data frames through the wlan-mlme library.
1288#[derive(Debug)]
1289pub enum WlanRxRequest {
1290    Transfer { payload: WlanRxTransferRequest, responder: WlanRxTransferResponder },
1291}
1292
1293impl WlanRxRequest {
1294    #[allow(irrefutable_let_patterns)]
1295    pub fn into_transfer(self) -> Option<(WlanRxTransferRequest, WlanRxTransferResponder)> {
1296        if let WlanRxRequest::Transfer { payload, responder } = self {
1297            Some((payload, responder))
1298        } else {
1299            None
1300        }
1301    }
1302
1303    /// Name of the method defined in FIDL
1304    pub fn method_name(&self) -> &'static str {
1305        match *self {
1306            WlanRxRequest::Transfer { .. } => "transfer",
1307        }
1308    }
1309}
1310
1311#[derive(Debug, Clone)]
1312pub struct WlanRxControlHandle {
1313    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1314}
1315
1316impl fidl::endpoints::ControlHandle for WlanRxControlHandle {
1317    fn shutdown(&self) {
1318        self.inner.shutdown()
1319    }
1320    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1321        self.inner.shutdown_with_epitaph(status)
1322    }
1323
1324    fn is_closed(&self) -> bool {
1325        self.inner.channel().is_closed()
1326    }
1327    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1328        self.inner.channel().on_closed()
1329    }
1330
1331    #[cfg(target_os = "fuchsia")]
1332    fn signal_peer(
1333        &self,
1334        clear_mask: zx::Signals,
1335        set_mask: zx::Signals,
1336    ) -> Result<(), zx_status::Status> {
1337        use fidl::Peered;
1338        self.inner.channel().signal_peer(clear_mask, set_mask)
1339    }
1340}
1341
1342impl WlanRxControlHandle {}
1343
1344#[must_use = "FIDL methods require a response to be sent"]
1345#[derive(Debug)]
1346pub struct WlanRxTransferResponder {
1347    control_handle: std::mem::ManuallyDrop<WlanRxControlHandle>,
1348    tx_id: u32,
1349}
1350
1351/// Set the the channel to be shutdown (see [`WlanRxControlHandle::shutdown`])
1352/// if the responder is dropped without sending a response, so that the client
1353/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
1354impl std::ops::Drop for WlanRxTransferResponder {
1355    fn drop(&mut self) {
1356        self.control_handle.shutdown();
1357        // Safety: drops once, never accessed again
1358        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1359    }
1360}
1361
1362impl fidl::endpoints::Responder for WlanRxTransferResponder {
1363    type ControlHandle = WlanRxControlHandle;
1364
1365    fn control_handle(&self) -> &WlanRxControlHandle {
1366        &self.control_handle
1367    }
1368
1369    fn drop_without_shutdown(mut self) {
1370        // Safety: drops once, never accessed again due to mem::forget
1371        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1372        // Prevent Drop from running (which would shut down the channel)
1373        std::mem::forget(self);
1374    }
1375}
1376
1377impl WlanRxTransferResponder {
1378    /// Sends a response to the FIDL transaction.
1379    ///
1380    /// Sets the channel to shutdown if an error occurs.
1381    pub fn send(self) -> Result<(), fidl::Error> {
1382        let _result = self.send_raw();
1383        if _result.is_err() {
1384            self.control_handle.shutdown();
1385        }
1386        self.drop_without_shutdown();
1387        _result
1388    }
1389
1390    /// Similar to "send" but does not shutdown the channel if an error occurs.
1391    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
1392        let _result = self.send_raw();
1393        self.drop_without_shutdown();
1394        _result
1395    }
1396
1397    fn send_raw(&self) -> Result<(), fidl::Error> {
1398        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
1399            (),
1400            self.tx_id,
1401            0x2c73b18cbfca6055,
1402            fidl::encoding::DynamicFlags::empty(),
1403        )
1404    }
1405}
1406
1407#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1408pub struct WlanSoftmacBaseMarker;
1409
1410impl fidl::endpoints::ProtocolMarker for WlanSoftmacBaseMarker {
1411    type Proxy = WlanSoftmacBaseProxy;
1412    type RequestStream = WlanSoftmacBaseRequestStream;
1413    #[cfg(target_os = "fuchsia")]
1414    type SynchronousProxy = WlanSoftmacBaseSynchronousProxy;
1415
1416    const DEBUG_NAME: &'static str = "(anonymous) WlanSoftmacBase";
1417}
1418pub type WlanSoftmacBaseQueryResult = Result<WlanSoftmacQueryResponse, i32>;
1419pub type WlanSoftmacBaseQueryDiscoverySupportResult = Result<DiscoverySupport, i32>;
1420pub type WlanSoftmacBaseQueryMacSublayerSupportResult =
1421    Result<fidl_fuchsia_wlan_common::MacSublayerSupport, i32>;
1422pub type WlanSoftmacBaseQuerySecuritySupportResult =
1423    Result<fidl_fuchsia_wlan_common::SecuritySupport, i32>;
1424pub type WlanSoftmacBaseQuerySpectrumManagementSupportResult =
1425    Result<fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>;
1426pub type WlanSoftmacBaseSetChannelResult = Result<(), i32>;
1427pub type WlanSoftmacBaseJoinBssResult = Result<(), i32>;
1428pub type WlanSoftmacBaseEnableBeaconingResult = Result<(), i32>;
1429pub type WlanSoftmacBaseDisableBeaconingResult = Result<(), i32>;
1430pub type WlanSoftmacBaseInstallKeyResult = Result<(), i32>;
1431pub type WlanSoftmacBaseNotifyAssociationCompleteResult = Result<(), i32>;
1432pub type WlanSoftmacBaseClearAssociationResult = Result<(), i32>;
1433pub type WlanSoftmacBaseStartPassiveScanResult =
1434    Result<WlanSoftmacBaseStartPassiveScanResponse, i32>;
1435pub type WlanSoftmacBaseStartActiveScanResult = Result<WlanSoftmacBaseStartActiveScanResponse, i32>;
1436pub type WlanSoftmacBaseCancelScanResult = Result<(), i32>;
1437pub type WlanSoftmacBaseUpdateWmmParametersResult = Result<(), i32>;
1438
1439pub trait WlanSoftmacBaseProxyInterface: Send + Sync {
1440    type QueryResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseQueryResult, fidl::Error>>
1441        + Send;
1442    fn r#query(&self) -> Self::QueryResponseFut;
1443    type QueryDiscoverySupportResponseFut: std::future::Future<
1444            Output = Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error>,
1445        > + Send;
1446    fn r#query_discovery_support(&self) -> Self::QueryDiscoverySupportResponseFut;
1447    type QueryMacSublayerSupportResponseFut: std::future::Future<
1448            Output = Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error>,
1449        > + Send;
1450    fn r#query_mac_sublayer_support(&self) -> Self::QueryMacSublayerSupportResponseFut;
1451    type QuerySecuritySupportResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error>>
1452        + Send;
1453    fn r#query_security_support(&self) -> Self::QuerySecuritySupportResponseFut;
1454    type QuerySpectrumManagementSupportResponseFut: std::future::Future<
1455            Output = Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error>,
1456        > + Send;
1457    fn r#query_spectrum_management_support(
1458        &self,
1459    ) -> Self::QuerySpectrumManagementSupportResponseFut;
1460    type SetChannelResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseSetChannelResult, fidl::Error>>
1461        + Send;
1462    fn r#set_channel(
1463        &self,
1464        payload: &WlanSoftmacBaseSetChannelRequest,
1465    ) -> Self::SetChannelResponseFut;
1466    type JoinBssResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseJoinBssResult, fidl::Error>>
1467        + Send;
1468    fn r#join_bss(
1469        &self,
1470        join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
1471    ) -> Self::JoinBssResponseFut;
1472    type EnableBeaconingResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error>>
1473        + Send;
1474    fn r#enable_beaconing(
1475        &self,
1476        payload: &WlanSoftmacBaseEnableBeaconingRequest,
1477    ) -> Self::EnableBeaconingResponseFut;
1478    type DisableBeaconingResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error>>
1479        + Send;
1480    fn r#disable_beaconing(&self) -> Self::DisableBeaconingResponseFut;
1481    type InstallKeyResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseInstallKeyResult, fidl::Error>>
1482        + Send;
1483    fn r#install_key(&self, payload: &WlanKeyConfiguration) -> Self::InstallKeyResponseFut;
1484    type NotifyAssociationCompleteResponseFut: std::future::Future<
1485            Output = Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error>,
1486        > + Send;
1487    fn r#notify_association_complete(
1488        &self,
1489        assoc_cfg: &WlanAssociationConfig,
1490    ) -> Self::NotifyAssociationCompleteResponseFut;
1491    type ClearAssociationResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseClearAssociationResult, fidl::Error>>
1492        + Send;
1493    fn r#clear_association(
1494        &self,
1495        payload: &WlanSoftmacBaseClearAssociationRequest,
1496    ) -> Self::ClearAssociationResponseFut;
1497    type StartPassiveScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error>>
1498        + Send;
1499    fn r#start_passive_scan(
1500        &self,
1501        payload: &WlanSoftmacBaseStartPassiveScanRequest,
1502    ) -> Self::StartPassiveScanResponseFut;
1503    type StartActiveScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error>>
1504        + Send;
1505    fn r#start_active_scan(
1506        &self,
1507        payload: &WlanSoftmacStartActiveScanRequest,
1508    ) -> Self::StartActiveScanResponseFut;
1509    type CancelScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseCancelScanResult, fidl::Error>>
1510        + Send;
1511    fn r#cancel_scan(
1512        &self,
1513        payload: &WlanSoftmacBaseCancelScanRequest,
1514    ) -> Self::CancelScanResponseFut;
1515    type UpdateWmmParametersResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error>>
1516        + Send;
1517    fn r#update_wmm_parameters(
1518        &self,
1519        payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
1520    ) -> Self::UpdateWmmParametersResponseFut;
1521}
1522#[derive(Debug)]
1523#[cfg(target_os = "fuchsia")]
1524pub struct WlanSoftmacBaseSynchronousProxy {
1525    client: fidl::client::sync::Client,
1526}
1527
1528#[cfg(target_os = "fuchsia")]
1529impl fidl::endpoints::SynchronousProxy for WlanSoftmacBaseSynchronousProxy {
1530    type Proxy = WlanSoftmacBaseProxy;
1531    type Protocol = WlanSoftmacBaseMarker;
1532
1533    fn from_channel(inner: fidl::Channel) -> Self {
1534        Self::new(inner)
1535    }
1536
1537    fn into_channel(self) -> fidl::Channel {
1538        self.client.into_channel()
1539    }
1540
1541    fn as_channel(&self) -> &fidl::Channel {
1542        self.client.as_channel()
1543    }
1544}
1545
1546#[cfg(target_os = "fuchsia")]
1547impl WlanSoftmacBaseSynchronousProxy {
1548    pub fn new(channel: fidl::Channel) -> Self {
1549        let protocol_name = <WlanSoftmacBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1550        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1551    }
1552
1553    pub fn into_channel(self) -> fidl::Channel {
1554        self.client.into_channel()
1555    }
1556
1557    /// Waits until an event arrives and returns it. It is safe for other
1558    /// threads to make concurrent requests while waiting for an event.
1559    pub fn wait_for_event(
1560        &self,
1561        deadline: zx::MonotonicInstant,
1562    ) -> Result<WlanSoftmacBaseEvent, fidl::Error> {
1563        WlanSoftmacBaseEvent::decode(self.client.wait_for_event(deadline)?)
1564    }
1565
1566    /// Gets general information about the device and its supported features.
1567    /// This method is safe to call even when the SoftMAC has not yet started.
1568    ///
1569    /// Note: The implementation of this method must not depend on a response
1570    /// from an ethernet driver, otherwise there is a risk of deadlock.
1571    /// The wlansoftmac driver calls this method synchronously while
1572    /// serving the fuchsia.hardware.ethernet/EthernetImpl.Query method.
1573    pub fn r#query(
1574        &self,
1575        ___deadline: zx::MonotonicInstant,
1576    ) -> Result<WlanSoftmacBaseQueryResult, fidl::Error> {
1577        let _response = self.client.send_query::<
1578            fidl::encoding::EmptyPayload,
1579            fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>,
1580        >(
1581            (),
1582            0x18231a638e508f9d,
1583            fidl::encoding::DynamicFlags::empty(),
1584            ___deadline,
1585        )?;
1586        Ok(_response.map(|x| x))
1587    }
1588
1589    /// Gets information about the station discovery (e.g., scanning and
1590    /// probing) features supported by the device. This method is safe to call
1591    /// even when the SoftMAC has not yet started.
1592    pub fn r#query_discovery_support(
1593        &self,
1594        ___deadline: zx::MonotonicInstant,
1595    ) -> Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error> {
1596        let _response =
1597            self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
1598                WlanSoftmacBaseQueryDiscoverySupportResponse,
1599                i32,
1600            >>(
1601                (),
1602                0x16797affc0cb58ae,
1603                fidl::encoding::DynamicFlags::empty(),
1604                ___deadline,
1605            )?;
1606        Ok(_response.map(|x| x.resp))
1607    }
1608
1609    /// Gets information about the MAC features supported by the device. This
1610    /// method is safe to call even when the SoftMAC has not yet started.
1611    ///
1612    /// Note: The implementation of this method must not depend on a response
1613    /// from an ethernet driver, otherwise there is a risk of deadlock.
1614    /// The wlansoftmac driver calls this method synchronously while
1615    /// serving the fuchsia.hardware.ethernet/EthernetImpl.Query method.
1616    pub fn r#query_mac_sublayer_support(
1617        &self,
1618        ___deadline: zx::MonotonicInstant,
1619    ) -> Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error> {
1620        let _response =
1621            self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
1622                WlanSoftmacBaseQueryMacSublayerSupportResponse,
1623                i32,
1624            >>(
1625                (),
1626                0x7302c3f8c131f075,
1627                fidl::encoding::DynamicFlags::empty(),
1628                ___deadline,
1629            )?;
1630        Ok(_response.map(|x| x.resp))
1631    }
1632
1633    /// Gets information about the security features supported by the device.
1634    /// This method is safe to call even when the SoftMAC has not yet started.
1635    pub fn r#query_security_support(
1636        &self,
1637        ___deadline: zx::MonotonicInstant,
1638    ) -> Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error> {
1639        let _response =
1640            self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
1641                WlanSoftmacBaseQuerySecuritySupportResponse,
1642                i32,
1643            >>(
1644                (),
1645                0x3691bb75abf6354,
1646                fidl::encoding::DynamicFlags::empty(),
1647                ___deadline,
1648            )?;
1649        Ok(_response.map(|x| x.resp))
1650    }
1651
1652    /// Gets information about the spectrum usage (e.g., DFS) features supported
1653    /// by the device. This method is safe to call even when the SoftMAC has not
1654    /// yet started.
1655    pub fn r#query_spectrum_management_support(
1656        &self,
1657        ___deadline: zx::MonotonicInstant,
1658    ) -> Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error> {
1659        let _response = self
1660            .client
1661            .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
1662                WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
1663                i32,
1664            >>(
1665                (), 0x347d78dc1d4d27bf, fidl::encoding::DynamicFlags::empty(), ___deadline
1666            )?;
1667        Ok(_response.map(|x| x.resp))
1668    }
1669
1670    /// Set the primary radio channel, e.g. in response to a channel switch event.
1671    /// If successful, this will trigger the channel switch immediately. This may
1672    /// impact the transmission of any frames that are in-flight, and might also
1673    /// interfere with an ongoing scan request.
1674    ///
1675    /// Common errors include: \
1676    ///   ZX_ERR_NOT_SUPPORTED: The device cannot switch to the requested channel.
1677    pub fn r#set_channel(
1678        &self,
1679        mut payload: &WlanSoftmacBaseSetChannelRequest,
1680        ___deadline: zx::MonotonicInstant,
1681    ) -> Result<WlanSoftmacBaseSetChannelResult, fidl::Error> {
1682        let _response = self.client.send_query::<
1683            WlanSoftmacBaseSetChannelRequest,
1684            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1685        >(
1686            payload,
1687            0x12836b533cd63ece,
1688            fidl::encoding::DynamicFlags::empty(),
1689            ___deadline,
1690        )?;
1691        Ok(_response.map(|x| x))
1692    }
1693
1694    /// Join a specific BSS in which we will participate.
1695    /// This applies regardless of if we are hosting the BSS or joining it
1696    /// (indicated by the `remote` flag in `JoinBssRequest`).
1697    /// If successful, the device will switch to the correct channel and perform
1698    /// any internal filtering/timing operations required to join the BSS.
1699    /// For client STAs, this is the first step before authenticating.
1700    ///
1701    /// Common errors include: \
1702    ///   ZX_ERR_NOT_SUPPORTED: The device does not support the given bss config.
1703    pub fn r#join_bss(
1704        &self,
1705        mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
1706        ___deadline: zx::MonotonicInstant,
1707    ) -> Result<WlanSoftmacBaseJoinBssResult, fidl::Error> {
1708        let _response = self.client.send_query::<
1709            WlanSoftmacBaseJoinBssRequest,
1710            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1711        >(
1712            (join_request,),
1713            0x1336fb5455b77a6e,
1714            fidl::encoding::DynamicFlags::empty(),
1715            ___deadline,
1716        )?;
1717        Ok(_response.map(|x| x))
1718    }
1719
1720    /// Enables hardware Beaconing.
1721    ///
1722    /// This method cannot be called while beaconing is enabled and so
1723    /// `DisableBeaconing` must be called prior to this method if beaconing is
1724    /// enabled.
1725    ///
1726    /// All request fields are required.
1727    ///
1728    /// Common errors include:
1729    ///
1730    /// - `ZX_ERR_NOT_SUPPORTED`: The device does not support hardware beacons.
1731    /// - `ZX_ERR_INVALID_ARGS`: The device cannot transmit the requested
1732    ///                          beacon.
1733    /// - `ZX_ERR_BAD_STATE`: The device is already beaconing.
1734    pub fn r#enable_beaconing(
1735        &self,
1736        mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
1737        ___deadline: zx::MonotonicInstant,
1738    ) -> Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error> {
1739        let _response = self.client.send_query::<
1740            WlanSoftmacBaseEnableBeaconingRequest,
1741            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1742        >(
1743            payload,
1744            0x6c35807632c64576,
1745            fidl::encoding::DynamicFlags::empty(),
1746            ___deadline,
1747        )?;
1748        Ok(_response.map(|x| x))
1749    }
1750
1751    /// Disables hardware beaconing.
1752    pub fn r#disable_beaconing(
1753        &self,
1754        ___deadline: zx::MonotonicInstant,
1755    ) -> Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error> {
1756        let _response = self.client.send_query::<
1757            fidl::encoding::EmptyPayload,
1758            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1759        >(
1760            (),
1761            0x3303b30f99dbb406,
1762            fidl::encoding::DynamicFlags::empty(),
1763            ___deadline,
1764        )?;
1765        Ok(_response.map(|x| x))
1766    }
1767
1768    /// Install a key for encryption when transmitting or receiving protected
1769    /// frames.
1770    ///
1771    /// Common errors include:
1772    ///   ZX_ERR_INVALID_ARGS: The given config does not specify a valid key.
1773    ///   ZX_ERR_NOT_SUPPORTED: The device does not support the given cipher.
1774    pub fn r#install_key(
1775        &self,
1776        mut payload: &WlanKeyConfiguration,
1777        ___deadline: zx::MonotonicInstant,
1778    ) -> Result<WlanSoftmacBaseInstallKeyResult, fidl::Error> {
1779        let _response = self.client.send_query::<
1780            WlanKeyConfiguration,
1781            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1782        >(
1783            payload,
1784            0x7decf9b4200b9131,
1785            fidl::encoding::DynamicFlags::empty(),
1786            ___deadline,
1787        )?;
1788        Ok(_response.map(|x| x))
1789    }
1790
1791    /// Notifies the device of a successful association and configures
1792    /// additional parameters necessary to participate in that association.
1793    ///
1794    /// # Errors
1795    ///
1796    /// Common errors include:
1797    ///
1798    /// - `ZX_ERR_BAD_STATE`: The device was not previously informed of this BSS
1799    ///                       via `WlanSoftmac.JoinBss`.
1800    pub fn r#notify_association_complete(
1801        &self,
1802        mut assoc_cfg: &WlanAssociationConfig,
1803        ___deadline: zx::MonotonicInstant,
1804    ) -> Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error> {
1805        let _response = self.client.send_query::<
1806            WlanSoftmacBaseNotifyAssociationCompleteRequest,
1807            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1808        >(
1809            (assoc_cfg,),
1810            0x436ffe3ba461d6cd,
1811            fidl::encoding::DynamicFlags::empty(),
1812            ___deadline,
1813        )?;
1814        Ok(_response.map(|x| x))
1815    }
1816
1817    /// Notifies MAC and PHY that the peer has been de-associated.
1818    pub fn r#clear_association(
1819        &self,
1820        mut payload: &WlanSoftmacBaseClearAssociationRequest,
1821        ___deadline: zx::MonotonicInstant,
1822    ) -> Result<WlanSoftmacBaseClearAssociationResult, fidl::Error> {
1823        let _response = self.client.send_query::<
1824            WlanSoftmacBaseClearAssociationRequest,
1825            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1826        >(
1827            payload,
1828            0x581d76c39190a7dd,
1829            fidl::encoding::DynamicFlags::empty(),
1830            ___deadline,
1831        )?;
1832        Ok(_response.map(|x| x))
1833    }
1834
1835    /// Starts a passive scan. The server will deliver scan results
1836    /// as Beacon frames using WlanSoftmacIfc.Recv(). When complete,
1837    /// the server will call WlanSoftmacIfc.ScanComplete() with the
1838    /// same `scan_id` returned by StartPassiveScan().
1839    ///
1840    /// The server indicates support for `StartPassiveScan()` using
1841    /// `fuchsia.wlan.common/ScanOffloadExtension.supported`.
1842    ///
1843    /// Common errors include:
1844    ///   ZX_ERR_INVALID_ARGS: The device is not capable of performing the
1845    ///       requested scan, e.g. because an incompatible channel was requested.
1846    ///   ZX_ERR_UNAVAILABLE: The device cannot currently perform scans.
1847    ///   ZX_ERR_SHOULD_WAIT: Another scan is already in-progress.
1848    pub fn r#start_passive_scan(
1849        &self,
1850        mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
1851        ___deadline: zx::MonotonicInstant,
1852    ) -> Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error> {
1853        let _response = self.client.send_query::<
1854            WlanSoftmacBaseStartPassiveScanRequest,
1855            fidl::encoding::ResultType<WlanSoftmacBaseStartPassiveScanResponse, i32>,
1856        >(
1857            payload,
1858            0x5662f989cb4083bb,
1859            fidl::encoding::DynamicFlags::empty(),
1860            ___deadline,
1861        )?;
1862        Ok(_response.map(|x| x))
1863    }
1864
1865    /// Starts an active scan. The server will deliver scan results
1866    /// as Beacon or Probe Response frames using WlanSoftmacIfc.Recv().
1867    /// When complete, the server will call WlanSoftmacIfc.ScanComplete()
1868    /// with the same `scan_id` returned by StartActiveScan().
1869    ///
1870    /// A device driver indicates support for `StartActiveScan()` using
1871    /// `fuchsia.wlan.common/ProbeRequestOffloadExtension.supported`.
1872    ///
1873    /// Common errors include:
1874    ///   ZX_ERR_INVALID_ARGS: The device is not capable of performing the
1875    ///       requested scan, e.g. because an incompatible channel was requested.
1876    ///   ZX_ERR_UNAVAILABLE: The device cannot currently perform scans.
1877    ///   ZX_ERR_SHOULD_WAIT: Another scan is already in-progress.
1878    pub fn r#start_active_scan(
1879        &self,
1880        mut payload: &WlanSoftmacStartActiveScanRequest,
1881        ___deadline: zx::MonotonicInstant,
1882    ) -> Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error> {
1883        let _response = self.client.send_query::<
1884            WlanSoftmacStartActiveScanRequest,
1885            fidl::encoding::ResultType<WlanSoftmacBaseStartActiveScanResponse, i32>,
1886        >(
1887            payload,
1888            0x4896eafa9937751e,
1889            fidl::encoding::DynamicFlags::empty(),
1890            ___deadline,
1891        )?;
1892        Ok(_response.map(|x| x))
1893    }
1894
1895    /// Cancels the ongoing scan corresponding to `scan_id`,
1896    /// where `scan_id` is an identifier returned by
1897    /// `StartPassiveScan()` or `StartActiveScan()`. If cancellation succeeds,
1898    /// the server will soon call WlanSoftmacIfc.ScanComplete() with the same
1899    /// `scan_id`.
1900    ///
1901    /// A device driver indicates support for `CancelScan()` using
1902    /// `fuchsia.wlan.common/ScanOffloadExtension.scan_cancel_supported`.
1903    ///
1904    /// Common errors include:
1905    ///
1906    /// - `ZX_ERR_NOT_FOUND`: `scan_id` does not match an ongoing scan.
1907    /// - `ZX_ERR_NOT_SUPPORTED`: Server does not support scan cancellation.
1908    pub fn r#cancel_scan(
1909        &self,
1910        mut payload: &WlanSoftmacBaseCancelScanRequest,
1911        ___deadline: zx::MonotonicInstant,
1912    ) -> Result<WlanSoftmacBaseCancelScanResult, fidl::Error> {
1913        let _response = self.client.send_query::<
1914            WlanSoftmacBaseCancelScanRequest,
1915            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1916        >(
1917            payload,
1918            0xf7d859369764556,
1919            fidl::encoding::DynamicFlags::empty(),
1920            ___deadline,
1921        )?;
1922        Ok(_response.map(|x| x))
1923    }
1924
1925    /// Indicate the device of modified WiFi Multimedia (WMM) parameters for a
1926    /// particular access category (AC).
1927    pub fn r#update_wmm_parameters(
1928        &self,
1929        mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
1930        ___deadline: zx::MonotonicInstant,
1931    ) -> Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error> {
1932        let _response = self.client.send_query::<
1933            WlanSoftmacBaseUpdateWmmParametersRequest,
1934            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1935        >(
1936            payload,
1937            0x68522c7122d5f78c,
1938            fidl::encoding::DynamicFlags::empty(),
1939            ___deadline,
1940        )?;
1941        Ok(_response.map(|x| x))
1942    }
1943}
1944
1945#[cfg(target_os = "fuchsia")]
1946impl From<WlanSoftmacBaseSynchronousProxy> for zx::Handle {
1947    fn from(value: WlanSoftmacBaseSynchronousProxy) -> Self {
1948        value.into_channel().into()
1949    }
1950}
1951
1952#[cfg(target_os = "fuchsia")]
1953impl From<fidl::Channel> for WlanSoftmacBaseSynchronousProxy {
1954    fn from(value: fidl::Channel) -> Self {
1955        Self::new(value)
1956    }
1957}
1958
1959#[cfg(target_os = "fuchsia")]
1960impl fidl::endpoints::FromClient for WlanSoftmacBaseSynchronousProxy {
1961    type Protocol = WlanSoftmacBaseMarker;
1962
1963    fn from_client(value: fidl::endpoints::ClientEnd<WlanSoftmacBaseMarker>) -> Self {
1964        Self::new(value.into_channel())
1965    }
1966}
1967
1968#[derive(Debug, Clone)]
1969pub struct WlanSoftmacBaseProxy {
1970    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1971}
1972
1973impl fidl::endpoints::Proxy for WlanSoftmacBaseProxy {
1974    type Protocol = WlanSoftmacBaseMarker;
1975
1976    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1977        Self::new(inner)
1978    }
1979
1980    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1981        self.client.into_channel().map_err(|client| Self { client })
1982    }
1983
1984    fn as_channel(&self) -> &::fidl::AsyncChannel {
1985        self.client.as_channel()
1986    }
1987}
1988
1989impl WlanSoftmacBaseProxy {
1990    /// Create a new Proxy for fuchsia.wlan.softmac/WlanSoftmacBase.
1991    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1992        let protocol_name = <WlanSoftmacBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1993        Self { client: fidl::client::Client::new(channel, protocol_name) }
1994    }
1995
1996    /// Get a Stream of events from the remote end of the protocol.
1997    ///
1998    /// # Panics
1999    ///
2000    /// Panics if the event stream was already taken.
2001    pub fn take_event_stream(&self) -> WlanSoftmacBaseEventStream {
2002        WlanSoftmacBaseEventStream { event_receiver: self.client.take_event_receiver() }
2003    }
2004
2005    /// Gets general information about the device and its supported features.
2006    /// This method is safe to call even when the SoftMAC has not yet started.
2007    ///
2008    /// Note: The implementation of this method must not depend on a response
2009    /// from an ethernet driver, otherwise there is a risk of deadlock.
2010    /// The wlansoftmac driver calls this method synchronously while
2011    /// serving the fuchsia.hardware.ethernet/EthernetImpl.Query method.
2012    pub fn r#query(
2013        &self,
2014    ) -> fidl::client::QueryResponseFut<
2015        WlanSoftmacBaseQueryResult,
2016        fidl::encoding::DefaultFuchsiaResourceDialect,
2017    > {
2018        WlanSoftmacBaseProxyInterface::r#query(self)
2019    }
2020
2021    /// Gets information about the station discovery (e.g., scanning and
2022    /// probing) features supported by the device. This method is safe to call
2023    /// even when the SoftMAC has not yet started.
2024    pub fn r#query_discovery_support(
2025        &self,
2026    ) -> fidl::client::QueryResponseFut<
2027        WlanSoftmacBaseQueryDiscoverySupportResult,
2028        fidl::encoding::DefaultFuchsiaResourceDialect,
2029    > {
2030        WlanSoftmacBaseProxyInterface::r#query_discovery_support(self)
2031    }
2032
2033    /// Gets information about the MAC features supported by the device. This
2034    /// method is safe to call even when the SoftMAC has not yet started.
2035    ///
2036    /// Note: The implementation of this method must not depend on a response
2037    /// from an ethernet driver, otherwise there is a risk of deadlock.
2038    /// The wlansoftmac driver calls this method synchronously while
2039    /// serving the fuchsia.hardware.ethernet/EthernetImpl.Query method.
2040    pub fn r#query_mac_sublayer_support(
2041        &self,
2042    ) -> fidl::client::QueryResponseFut<
2043        WlanSoftmacBaseQueryMacSublayerSupportResult,
2044        fidl::encoding::DefaultFuchsiaResourceDialect,
2045    > {
2046        WlanSoftmacBaseProxyInterface::r#query_mac_sublayer_support(self)
2047    }
2048
2049    /// Gets information about the security features supported by the device.
2050    /// This method is safe to call even when the SoftMAC has not yet started.
2051    pub fn r#query_security_support(
2052        &self,
2053    ) -> fidl::client::QueryResponseFut<
2054        WlanSoftmacBaseQuerySecuritySupportResult,
2055        fidl::encoding::DefaultFuchsiaResourceDialect,
2056    > {
2057        WlanSoftmacBaseProxyInterface::r#query_security_support(self)
2058    }
2059
2060    /// Gets information about the spectrum usage (e.g., DFS) features supported
2061    /// by the device. This method is safe to call even when the SoftMAC has not
2062    /// yet started.
2063    pub fn r#query_spectrum_management_support(
2064        &self,
2065    ) -> fidl::client::QueryResponseFut<
2066        WlanSoftmacBaseQuerySpectrumManagementSupportResult,
2067        fidl::encoding::DefaultFuchsiaResourceDialect,
2068    > {
2069        WlanSoftmacBaseProxyInterface::r#query_spectrum_management_support(self)
2070    }
2071
2072    /// Set the primary radio channel, e.g. in response to a channel switch event.
2073    /// If successful, this will trigger the channel switch immediately. This may
2074    /// impact the transmission of any frames that are in-flight, and might also
2075    /// interfere with an ongoing scan request.
2076    ///
2077    /// Common errors include: \
2078    ///   ZX_ERR_NOT_SUPPORTED: The device cannot switch to the requested channel.
2079    pub fn r#set_channel(
2080        &self,
2081        mut payload: &WlanSoftmacBaseSetChannelRequest,
2082    ) -> fidl::client::QueryResponseFut<
2083        WlanSoftmacBaseSetChannelResult,
2084        fidl::encoding::DefaultFuchsiaResourceDialect,
2085    > {
2086        WlanSoftmacBaseProxyInterface::r#set_channel(self, payload)
2087    }
2088
2089    /// Join a specific BSS in which we will participate.
2090    /// This applies regardless of if we are hosting the BSS or joining it
2091    /// (indicated by the `remote` flag in `JoinBssRequest`).
2092    /// If successful, the device will switch to the correct channel and perform
2093    /// any internal filtering/timing operations required to join the BSS.
2094    /// For client STAs, this is the first step before authenticating.
2095    ///
2096    /// Common errors include: \
2097    ///   ZX_ERR_NOT_SUPPORTED: The device does not support the given bss config.
2098    pub fn r#join_bss(
2099        &self,
2100        mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
2101    ) -> fidl::client::QueryResponseFut<
2102        WlanSoftmacBaseJoinBssResult,
2103        fidl::encoding::DefaultFuchsiaResourceDialect,
2104    > {
2105        WlanSoftmacBaseProxyInterface::r#join_bss(self, join_request)
2106    }
2107
2108    /// Enables hardware Beaconing.
2109    ///
2110    /// This method cannot be called while beaconing is enabled and so
2111    /// `DisableBeaconing` must be called prior to this method if beaconing is
2112    /// enabled.
2113    ///
2114    /// All request fields are required.
2115    ///
2116    /// Common errors include:
2117    ///
2118    /// - `ZX_ERR_NOT_SUPPORTED`: The device does not support hardware beacons.
2119    /// - `ZX_ERR_INVALID_ARGS`: The device cannot transmit the requested
2120    ///                          beacon.
2121    /// - `ZX_ERR_BAD_STATE`: The device is already beaconing.
2122    pub fn r#enable_beaconing(
2123        &self,
2124        mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
2125    ) -> fidl::client::QueryResponseFut<
2126        WlanSoftmacBaseEnableBeaconingResult,
2127        fidl::encoding::DefaultFuchsiaResourceDialect,
2128    > {
2129        WlanSoftmacBaseProxyInterface::r#enable_beaconing(self, payload)
2130    }
2131
2132    /// Disables hardware beaconing.
2133    pub fn r#disable_beaconing(
2134        &self,
2135    ) -> fidl::client::QueryResponseFut<
2136        WlanSoftmacBaseDisableBeaconingResult,
2137        fidl::encoding::DefaultFuchsiaResourceDialect,
2138    > {
2139        WlanSoftmacBaseProxyInterface::r#disable_beaconing(self)
2140    }
2141
2142    /// Install a key for encryption when transmitting or receiving protected
2143    /// frames.
2144    ///
2145    /// Common errors include:
2146    ///   ZX_ERR_INVALID_ARGS: The given config does not specify a valid key.
2147    ///   ZX_ERR_NOT_SUPPORTED: The device does not support the given cipher.
2148    pub fn r#install_key(
2149        &self,
2150        mut payload: &WlanKeyConfiguration,
2151    ) -> fidl::client::QueryResponseFut<
2152        WlanSoftmacBaseInstallKeyResult,
2153        fidl::encoding::DefaultFuchsiaResourceDialect,
2154    > {
2155        WlanSoftmacBaseProxyInterface::r#install_key(self, payload)
2156    }
2157
2158    /// Notifies the device of a successful association and configures
2159    /// additional parameters necessary to participate in that association.
2160    ///
2161    /// # Errors
2162    ///
2163    /// Common errors include:
2164    ///
2165    /// - `ZX_ERR_BAD_STATE`: The device was not previously informed of this BSS
2166    ///                       via `WlanSoftmac.JoinBss`.
2167    pub fn r#notify_association_complete(
2168        &self,
2169        mut assoc_cfg: &WlanAssociationConfig,
2170    ) -> fidl::client::QueryResponseFut<
2171        WlanSoftmacBaseNotifyAssociationCompleteResult,
2172        fidl::encoding::DefaultFuchsiaResourceDialect,
2173    > {
2174        WlanSoftmacBaseProxyInterface::r#notify_association_complete(self, assoc_cfg)
2175    }
2176
2177    /// Notifies MAC and PHY that the peer has been de-associated.
2178    pub fn r#clear_association(
2179        &self,
2180        mut payload: &WlanSoftmacBaseClearAssociationRequest,
2181    ) -> fidl::client::QueryResponseFut<
2182        WlanSoftmacBaseClearAssociationResult,
2183        fidl::encoding::DefaultFuchsiaResourceDialect,
2184    > {
2185        WlanSoftmacBaseProxyInterface::r#clear_association(self, payload)
2186    }
2187
2188    /// Starts a passive scan. The server will deliver scan results
2189    /// as Beacon frames using WlanSoftmacIfc.Recv(). When complete,
2190    /// the server will call WlanSoftmacIfc.ScanComplete() with the
2191    /// same `scan_id` returned by StartPassiveScan().
2192    ///
2193    /// The server indicates support for `StartPassiveScan()` using
2194    /// `fuchsia.wlan.common/ScanOffloadExtension.supported`.
2195    ///
2196    /// Common errors include:
2197    ///   ZX_ERR_INVALID_ARGS: The device is not capable of performing the
2198    ///       requested scan, e.g. because an incompatible channel was requested.
2199    ///   ZX_ERR_UNAVAILABLE: The device cannot currently perform scans.
2200    ///   ZX_ERR_SHOULD_WAIT: Another scan is already in-progress.
2201    pub fn r#start_passive_scan(
2202        &self,
2203        mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
2204    ) -> fidl::client::QueryResponseFut<
2205        WlanSoftmacBaseStartPassiveScanResult,
2206        fidl::encoding::DefaultFuchsiaResourceDialect,
2207    > {
2208        WlanSoftmacBaseProxyInterface::r#start_passive_scan(self, payload)
2209    }
2210
2211    /// Starts an active scan. The server will deliver scan results
2212    /// as Beacon or Probe Response frames using WlanSoftmacIfc.Recv().
2213    /// When complete, the server will call WlanSoftmacIfc.ScanComplete()
2214    /// with the same `scan_id` returned by StartActiveScan().
2215    ///
2216    /// A device driver indicates support for `StartActiveScan()` using
2217    /// `fuchsia.wlan.common/ProbeRequestOffloadExtension.supported`.
2218    ///
2219    /// Common errors include:
2220    ///   ZX_ERR_INVALID_ARGS: The device is not capable of performing the
2221    ///       requested scan, e.g. because an incompatible channel was requested.
2222    ///   ZX_ERR_UNAVAILABLE: The device cannot currently perform scans.
2223    ///   ZX_ERR_SHOULD_WAIT: Another scan is already in-progress.
2224    pub fn r#start_active_scan(
2225        &self,
2226        mut payload: &WlanSoftmacStartActiveScanRequest,
2227    ) -> fidl::client::QueryResponseFut<
2228        WlanSoftmacBaseStartActiveScanResult,
2229        fidl::encoding::DefaultFuchsiaResourceDialect,
2230    > {
2231        WlanSoftmacBaseProxyInterface::r#start_active_scan(self, payload)
2232    }
2233
2234    /// Cancels the ongoing scan corresponding to `scan_id`,
2235    /// where `scan_id` is an identifier returned by
2236    /// `StartPassiveScan()` or `StartActiveScan()`. If cancellation succeeds,
2237    /// the server will soon call WlanSoftmacIfc.ScanComplete() with the same
2238    /// `scan_id`.
2239    ///
2240    /// A device driver indicates support for `CancelScan()` using
2241    /// `fuchsia.wlan.common/ScanOffloadExtension.scan_cancel_supported`.
2242    ///
2243    /// Common errors include:
2244    ///
2245    /// - `ZX_ERR_NOT_FOUND`: `scan_id` does not match an ongoing scan.
2246    /// - `ZX_ERR_NOT_SUPPORTED`: Server does not support scan cancellation.
2247    pub fn r#cancel_scan(
2248        &self,
2249        mut payload: &WlanSoftmacBaseCancelScanRequest,
2250    ) -> fidl::client::QueryResponseFut<
2251        WlanSoftmacBaseCancelScanResult,
2252        fidl::encoding::DefaultFuchsiaResourceDialect,
2253    > {
2254        WlanSoftmacBaseProxyInterface::r#cancel_scan(self, payload)
2255    }
2256
2257    /// Indicate the device of modified WiFi Multimedia (WMM) parameters for a
2258    /// particular access category (AC).
2259    pub fn r#update_wmm_parameters(
2260        &self,
2261        mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
2262    ) -> fidl::client::QueryResponseFut<
2263        WlanSoftmacBaseUpdateWmmParametersResult,
2264        fidl::encoding::DefaultFuchsiaResourceDialect,
2265    > {
2266        WlanSoftmacBaseProxyInterface::r#update_wmm_parameters(self, payload)
2267    }
2268}
2269
2270impl WlanSoftmacBaseProxyInterface for WlanSoftmacBaseProxy {
2271    type QueryResponseFut = fidl::client::QueryResponseFut<
2272        WlanSoftmacBaseQueryResult,
2273        fidl::encoding::DefaultFuchsiaResourceDialect,
2274    >;
2275    fn r#query(&self) -> Self::QueryResponseFut {
2276        fn _decode(
2277            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2278        ) -> Result<WlanSoftmacBaseQueryResult, fidl::Error> {
2279            let _response = fidl::client::decode_transaction_body::<
2280                fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>,
2281                fidl::encoding::DefaultFuchsiaResourceDialect,
2282                0x18231a638e508f9d,
2283            >(_buf?)?;
2284            Ok(_response.map(|x| x))
2285        }
2286        self.client
2287            .send_query_and_decode::<fidl::encoding::EmptyPayload, WlanSoftmacBaseQueryResult>(
2288                (),
2289                0x18231a638e508f9d,
2290                fidl::encoding::DynamicFlags::empty(),
2291                _decode,
2292            )
2293    }
2294
2295    type QueryDiscoverySupportResponseFut = fidl::client::QueryResponseFut<
2296        WlanSoftmacBaseQueryDiscoverySupportResult,
2297        fidl::encoding::DefaultFuchsiaResourceDialect,
2298    >;
2299    fn r#query_discovery_support(&self) -> Self::QueryDiscoverySupportResponseFut {
2300        fn _decode(
2301            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2302        ) -> Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error> {
2303            let _response = fidl::client::decode_transaction_body::<
2304                fidl::encoding::ResultType<WlanSoftmacBaseQueryDiscoverySupportResponse, i32>,
2305                fidl::encoding::DefaultFuchsiaResourceDialect,
2306                0x16797affc0cb58ae,
2307            >(_buf?)?;
2308            Ok(_response.map(|x| x.resp))
2309        }
2310        self.client.send_query_and_decode::<
2311            fidl::encoding::EmptyPayload,
2312            WlanSoftmacBaseQueryDiscoverySupportResult,
2313        >(
2314            (),
2315            0x16797affc0cb58ae,
2316            fidl::encoding::DynamicFlags::empty(),
2317            _decode,
2318        )
2319    }
2320
2321    type QueryMacSublayerSupportResponseFut = fidl::client::QueryResponseFut<
2322        WlanSoftmacBaseQueryMacSublayerSupportResult,
2323        fidl::encoding::DefaultFuchsiaResourceDialect,
2324    >;
2325    fn r#query_mac_sublayer_support(&self) -> Self::QueryMacSublayerSupportResponseFut {
2326        fn _decode(
2327            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2328        ) -> Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error> {
2329            let _response = fidl::client::decode_transaction_body::<
2330                fidl::encoding::ResultType<WlanSoftmacBaseQueryMacSublayerSupportResponse, i32>,
2331                fidl::encoding::DefaultFuchsiaResourceDialect,
2332                0x7302c3f8c131f075,
2333            >(_buf?)?;
2334            Ok(_response.map(|x| x.resp))
2335        }
2336        self.client.send_query_and_decode::<
2337            fidl::encoding::EmptyPayload,
2338            WlanSoftmacBaseQueryMacSublayerSupportResult,
2339        >(
2340            (),
2341            0x7302c3f8c131f075,
2342            fidl::encoding::DynamicFlags::empty(),
2343            _decode,
2344        )
2345    }
2346
2347    type QuerySecuritySupportResponseFut = fidl::client::QueryResponseFut<
2348        WlanSoftmacBaseQuerySecuritySupportResult,
2349        fidl::encoding::DefaultFuchsiaResourceDialect,
2350    >;
2351    fn r#query_security_support(&self) -> Self::QuerySecuritySupportResponseFut {
2352        fn _decode(
2353            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2354        ) -> Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error> {
2355            let _response = fidl::client::decode_transaction_body::<
2356                fidl::encoding::ResultType<WlanSoftmacBaseQuerySecuritySupportResponse, i32>,
2357                fidl::encoding::DefaultFuchsiaResourceDialect,
2358                0x3691bb75abf6354,
2359            >(_buf?)?;
2360            Ok(_response.map(|x| x.resp))
2361        }
2362        self.client.send_query_and_decode::<
2363            fidl::encoding::EmptyPayload,
2364            WlanSoftmacBaseQuerySecuritySupportResult,
2365        >(
2366            (),
2367            0x3691bb75abf6354,
2368            fidl::encoding::DynamicFlags::empty(),
2369            _decode,
2370        )
2371    }
2372
2373    type QuerySpectrumManagementSupportResponseFut = fidl::client::QueryResponseFut<
2374        WlanSoftmacBaseQuerySpectrumManagementSupportResult,
2375        fidl::encoding::DefaultFuchsiaResourceDialect,
2376    >;
2377    fn r#query_spectrum_management_support(
2378        &self,
2379    ) -> Self::QuerySpectrumManagementSupportResponseFut {
2380        fn _decode(
2381            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2382        ) -> Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error> {
2383            let _response = fidl::client::decode_transaction_body::<
2384                fidl::encoding::ResultType<
2385                    WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
2386                    i32,
2387                >,
2388                fidl::encoding::DefaultFuchsiaResourceDialect,
2389                0x347d78dc1d4d27bf,
2390            >(_buf?)?;
2391            Ok(_response.map(|x| x.resp))
2392        }
2393        self.client.send_query_and_decode::<
2394            fidl::encoding::EmptyPayload,
2395            WlanSoftmacBaseQuerySpectrumManagementSupportResult,
2396        >(
2397            (),
2398            0x347d78dc1d4d27bf,
2399            fidl::encoding::DynamicFlags::empty(),
2400            _decode,
2401        )
2402    }
2403
2404    type SetChannelResponseFut = fidl::client::QueryResponseFut<
2405        WlanSoftmacBaseSetChannelResult,
2406        fidl::encoding::DefaultFuchsiaResourceDialect,
2407    >;
2408    fn r#set_channel(
2409        &self,
2410        mut payload: &WlanSoftmacBaseSetChannelRequest,
2411    ) -> Self::SetChannelResponseFut {
2412        fn _decode(
2413            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2414        ) -> Result<WlanSoftmacBaseSetChannelResult, fidl::Error> {
2415            let _response = fidl::client::decode_transaction_body::<
2416                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2417                fidl::encoding::DefaultFuchsiaResourceDialect,
2418                0x12836b533cd63ece,
2419            >(_buf?)?;
2420            Ok(_response.map(|x| x))
2421        }
2422        self.client.send_query_and_decode::<
2423            WlanSoftmacBaseSetChannelRequest,
2424            WlanSoftmacBaseSetChannelResult,
2425        >(
2426            payload,
2427            0x12836b533cd63ece,
2428            fidl::encoding::DynamicFlags::empty(),
2429            _decode,
2430        )
2431    }
2432
2433    type JoinBssResponseFut = fidl::client::QueryResponseFut<
2434        WlanSoftmacBaseJoinBssResult,
2435        fidl::encoding::DefaultFuchsiaResourceDialect,
2436    >;
2437    fn r#join_bss(
2438        &self,
2439        mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
2440    ) -> Self::JoinBssResponseFut {
2441        fn _decode(
2442            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2443        ) -> Result<WlanSoftmacBaseJoinBssResult, fidl::Error> {
2444            let _response = fidl::client::decode_transaction_body::<
2445                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2446                fidl::encoding::DefaultFuchsiaResourceDialect,
2447                0x1336fb5455b77a6e,
2448            >(_buf?)?;
2449            Ok(_response.map(|x| x))
2450        }
2451        self.client
2452            .send_query_and_decode::<WlanSoftmacBaseJoinBssRequest, WlanSoftmacBaseJoinBssResult>(
2453                (join_request,),
2454                0x1336fb5455b77a6e,
2455                fidl::encoding::DynamicFlags::empty(),
2456                _decode,
2457            )
2458    }
2459
2460    type EnableBeaconingResponseFut = fidl::client::QueryResponseFut<
2461        WlanSoftmacBaseEnableBeaconingResult,
2462        fidl::encoding::DefaultFuchsiaResourceDialect,
2463    >;
2464    fn r#enable_beaconing(
2465        &self,
2466        mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
2467    ) -> Self::EnableBeaconingResponseFut {
2468        fn _decode(
2469            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2470        ) -> Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error> {
2471            let _response = fidl::client::decode_transaction_body::<
2472                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2473                fidl::encoding::DefaultFuchsiaResourceDialect,
2474                0x6c35807632c64576,
2475            >(_buf?)?;
2476            Ok(_response.map(|x| x))
2477        }
2478        self.client.send_query_and_decode::<
2479            WlanSoftmacBaseEnableBeaconingRequest,
2480            WlanSoftmacBaseEnableBeaconingResult,
2481        >(
2482            payload,
2483            0x6c35807632c64576,
2484            fidl::encoding::DynamicFlags::empty(),
2485            _decode,
2486        )
2487    }
2488
2489    type DisableBeaconingResponseFut = fidl::client::QueryResponseFut<
2490        WlanSoftmacBaseDisableBeaconingResult,
2491        fidl::encoding::DefaultFuchsiaResourceDialect,
2492    >;
2493    fn r#disable_beaconing(&self) -> Self::DisableBeaconingResponseFut {
2494        fn _decode(
2495            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2496        ) -> Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error> {
2497            let _response = fidl::client::decode_transaction_body::<
2498                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2499                fidl::encoding::DefaultFuchsiaResourceDialect,
2500                0x3303b30f99dbb406,
2501            >(_buf?)?;
2502            Ok(_response.map(|x| x))
2503        }
2504        self.client.send_query_and_decode::<
2505            fidl::encoding::EmptyPayload,
2506            WlanSoftmacBaseDisableBeaconingResult,
2507        >(
2508            (),
2509            0x3303b30f99dbb406,
2510            fidl::encoding::DynamicFlags::empty(),
2511            _decode,
2512        )
2513    }
2514
2515    type InstallKeyResponseFut = fidl::client::QueryResponseFut<
2516        WlanSoftmacBaseInstallKeyResult,
2517        fidl::encoding::DefaultFuchsiaResourceDialect,
2518    >;
2519    fn r#install_key(&self, mut payload: &WlanKeyConfiguration) -> Self::InstallKeyResponseFut {
2520        fn _decode(
2521            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2522        ) -> Result<WlanSoftmacBaseInstallKeyResult, fidl::Error> {
2523            let _response = fidl::client::decode_transaction_body::<
2524                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2525                fidl::encoding::DefaultFuchsiaResourceDialect,
2526                0x7decf9b4200b9131,
2527            >(_buf?)?;
2528            Ok(_response.map(|x| x))
2529        }
2530        self.client.send_query_and_decode::<WlanKeyConfiguration, WlanSoftmacBaseInstallKeyResult>(
2531            payload,
2532            0x7decf9b4200b9131,
2533            fidl::encoding::DynamicFlags::empty(),
2534            _decode,
2535        )
2536    }
2537
2538    type NotifyAssociationCompleteResponseFut = fidl::client::QueryResponseFut<
2539        WlanSoftmacBaseNotifyAssociationCompleteResult,
2540        fidl::encoding::DefaultFuchsiaResourceDialect,
2541    >;
2542    fn r#notify_association_complete(
2543        &self,
2544        mut assoc_cfg: &WlanAssociationConfig,
2545    ) -> Self::NotifyAssociationCompleteResponseFut {
2546        fn _decode(
2547            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2548        ) -> Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error> {
2549            let _response = fidl::client::decode_transaction_body::<
2550                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2551                fidl::encoding::DefaultFuchsiaResourceDialect,
2552                0x436ffe3ba461d6cd,
2553            >(_buf?)?;
2554            Ok(_response.map(|x| x))
2555        }
2556        self.client.send_query_and_decode::<
2557            WlanSoftmacBaseNotifyAssociationCompleteRequest,
2558            WlanSoftmacBaseNotifyAssociationCompleteResult,
2559        >(
2560            (assoc_cfg,),
2561            0x436ffe3ba461d6cd,
2562            fidl::encoding::DynamicFlags::empty(),
2563            _decode,
2564        )
2565    }
2566
2567    type ClearAssociationResponseFut = fidl::client::QueryResponseFut<
2568        WlanSoftmacBaseClearAssociationResult,
2569        fidl::encoding::DefaultFuchsiaResourceDialect,
2570    >;
2571    fn r#clear_association(
2572        &self,
2573        mut payload: &WlanSoftmacBaseClearAssociationRequest,
2574    ) -> Self::ClearAssociationResponseFut {
2575        fn _decode(
2576            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2577        ) -> Result<WlanSoftmacBaseClearAssociationResult, fidl::Error> {
2578            let _response = fidl::client::decode_transaction_body::<
2579                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2580                fidl::encoding::DefaultFuchsiaResourceDialect,
2581                0x581d76c39190a7dd,
2582            >(_buf?)?;
2583            Ok(_response.map(|x| x))
2584        }
2585        self.client.send_query_and_decode::<
2586            WlanSoftmacBaseClearAssociationRequest,
2587            WlanSoftmacBaseClearAssociationResult,
2588        >(
2589            payload,
2590            0x581d76c39190a7dd,
2591            fidl::encoding::DynamicFlags::empty(),
2592            _decode,
2593        )
2594    }
2595
2596    type StartPassiveScanResponseFut = fidl::client::QueryResponseFut<
2597        WlanSoftmacBaseStartPassiveScanResult,
2598        fidl::encoding::DefaultFuchsiaResourceDialect,
2599    >;
2600    fn r#start_passive_scan(
2601        &self,
2602        mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
2603    ) -> Self::StartPassiveScanResponseFut {
2604        fn _decode(
2605            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2606        ) -> Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error> {
2607            let _response = fidl::client::decode_transaction_body::<
2608                fidl::encoding::ResultType<WlanSoftmacBaseStartPassiveScanResponse, i32>,
2609                fidl::encoding::DefaultFuchsiaResourceDialect,
2610                0x5662f989cb4083bb,
2611            >(_buf?)?;
2612            Ok(_response.map(|x| x))
2613        }
2614        self.client.send_query_and_decode::<
2615            WlanSoftmacBaseStartPassiveScanRequest,
2616            WlanSoftmacBaseStartPassiveScanResult,
2617        >(
2618            payload,
2619            0x5662f989cb4083bb,
2620            fidl::encoding::DynamicFlags::empty(),
2621            _decode,
2622        )
2623    }
2624
2625    type StartActiveScanResponseFut = fidl::client::QueryResponseFut<
2626        WlanSoftmacBaseStartActiveScanResult,
2627        fidl::encoding::DefaultFuchsiaResourceDialect,
2628    >;
2629    fn r#start_active_scan(
2630        &self,
2631        mut payload: &WlanSoftmacStartActiveScanRequest,
2632    ) -> Self::StartActiveScanResponseFut {
2633        fn _decode(
2634            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2635        ) -> Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error> {
2636            let _response = fidl::client::decode_transaction_body::<
2637                fidl::encoding::ResultType<WlanSoftmacBaseStartActiveScanResponse, i32>,
2638                fidl::encoding::DefaultFuchsiaResourceDialect,
2639                0x4896eafa9937751e,
2640            >(_buf?)?;
2641            Ok(_response.map(|x| x))
2642        }
2643        self.client.send_query_and_decode::<
2644            WlanSoftmacStartActiveScanRequest,
2645            WlanSoftmacBaseStartActiveScanResult,
2646        >(
2647            payload,
2648            0x4896eafa9937751e,
2649            fidl::encoding::DynamicFlags::empty(),
2650            _decode,
2651        )
2652    }
2653
2654    type CancelScanResponseFut = fidl::client::QueryResponseFut<
2655        WlanSoftmacBaseCancelScanResult,
2656        fidl::encoding::DefaultFuchsiaResourceDialect,
2657    >;
2658    fn r#cancel_scan(
2659        &self,
2660        mut payload: &WlanSoftmacBaseCancelScanRequest,
2661    ) -> Self::CancelScanResponseFut {
2662        fn _decode(
2663            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2664        ) -> Result<WlanSoftmacBaseCancelScanResult, fidl::Error> {
2665            let _response = fidl::client::decode_transaction_body::<
2666                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2667                fidl::encoding::DefaultFuchsiaResourceDialect,
2668                0xf7d859369764556,
2669            >(_buf?)?;
2670            Ok(_response.map(|x| x))
2671        }
2672        self.client.send_query_and_decode::<
2673            WlanSoftmacBaseCancelScanRequest,
2674            WlanSoftmacBaseCancelScanResult,
2675        >(
2676            payload,
2677            0xf7d859369764556,
2678            fidl::encoding::DynamicFlags::empty(),
2679            _decode,
2680        )
2681    }
2682
2683    type UpdateWmmParametersResponseFut = fidl::client::QueryResponseFut<
2684        WlanSoftmacBaseUpdateWmmParametersResult,
2685        fidl::encoding::DefaultFuchsiaResourceDialect,
2686    >;
2687    fn r#update_wmm_parameters(
2688        &self,
2689        mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
2690    ) -> Self::UpdateWmmParametersResponseFut {
2691        fn _decode(
2692            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2693        ) -> Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error> {
2694            let _response = fidl::client::decode_transaction_body::<
2695                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2696                fidl::encoding::DefaultFuchsiaResourceDialect,
2697                0x68522c7122d5f78c,
2698            >(_buf?)?;
2699            Ok(_response.map(|x| x))
2700        }
2701        self.client.send_query_and_decode::<
2702            WlanSoftmacBaseUpdateWmmParametersRequest,
2703            WlanSoftmacBaseUpdateWmmParametersResult,
2704        >(
2705            payload,
2706            0x68522c7122d5f78c,
2707            fidl::encoding::DynamicFlags::empty(),
2708            _decode,
2709        )
2710    }
2711}
2712
2713pub struct WlanSoftmacBaseEventStream {
2714    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2715}
2716
2717impl std::marker::Unpin for WlanSoftmacBaseEventStream {}
2718
2719impl futures::stream::FusedStream for WlanSoftmacBaseEventStream {
2720    fn is_terminated(&self) -> bool {
2721        self.event_receiver.is_terminated()
2722    }
2723}
2724
2725impl futures::Stream for WlanSoftmacBaseEventStream {
2726    type Item = Result<WlanSoftmacBaseEvent, fidl::Error>;
2727
2728    fn poll_next(
2729        mut self: std::pin::Pin<&mut Self>,
2730        cx: &mut std::task::Context<'_>,
2731    ) -> std::task::Poll<Option<Self::Item>> {
2732        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2733            &mut self.event_receiver,
2734            cx
2735        )?) {
2736            Some(buf) => std::task::Poll::Ready(Some(WlanSoftmacBaseEvent::decode(buf))),
2737            None => std::task::Poll::Ready(None),
2738        }
2739    }
2740}
2741
2742#[derive(Debug)]
2743pub enum WlanSoftmacBaseEvent {}
2744
2745impl WlanSoftmacBaseEvent {
2746    /// Decodes a message buffer as a [`WlanSoftmacBaseEvent`].
2747    fn decode(
2748        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2749    ) -> Result<WlanSoftmacBaseEvent, fidl::Error> {
2750        let (bytes, _handles) = buf.split_mut();
2751        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2752        debug_assert_eq!(tx_header.tx_id, 0);
2753        match tx_header.ordinal {
2754            _ => Err(fidl::Error::UnknownOrdinal {
2755                ordinal: tx_header.ordinal,
2756                protocol_name:
2757                    <WlanSoftmacBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2758            }),
2759        }
2760    }
2761}
2762
2763/// A Stream of incoming requests for fuchsia.wlan.softmac/WlanSoftmacBase.
2764pub struct WlanSoftmacBaseRequestStream {
2765    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2766    is_terminated: bool,
2767}
2768
2769impl std::marker::Unpin for WlanSoftmacBaseRequestStream {}
2770
2771impl futures::stream::FusedStream for WlanSoftmacBaseRequestStream {
2772    fn is_terminated(&self) -> bool {
2773        self.is_terminated
2774    }
2775}
2776
2777impl fidl::endpoints::RequestStream for WlanSoftmacBaseRequestStream {
2778    type Protocol = WlanSoftmacBaseMarker;
2779    type ControlHandle = WlanSoftmacBaseControlHandle;
2780
2781    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2782        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2783    }
2784
2785    fn control_handle(&self) -> Self::ControlHandle {
2786        WlanSoftmacBaseControlHandle { inner: self.inner.clone() }
2787    }
2788
2789    fn into_inner(
2790        self,
2791    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2792    {
2793        (self.inner, self.is_terminated)
2794    }
2795
2796    fn from_inner(
2797        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2798        is_terminated: bool,
2799    ) -> Self {
2800        Self { inner, is_terminated }
2801    }
2802}
2803
2804impl futures::Stream for WlanSoftmacBaseRequestStream {
2805    type Item = Result<WlanSoftmacBaseRequest, fidl::Error>;
2806
2807    fn poll_next(
2808        mut self: std::pin::Pin<&mut Self>,
2809        cx: &mut std::task::Context<'_>,
2810    ) -> std::task::Poll<Option<Self::Item>> {
2811        let this = &mut *self;
2812        if this.inner.check_shutdown(cx) {
2813            this.is_terminated = true;
2814            return std::task::Poll::Ready(None);
2815        }
2816        if this.is_terminated {
2817            panic!("polled WlanSoftmacBaseRequestStream after completion");
2818        }
2819        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
2820            |bytes, handles| {
2821                match this.inner.channel().read_etc(cx, bytes, handles) {
2822                    std::task::Poll::Ready(Ok(())) => {}
2823                    std::task::Poll::Pending => return std::task::Poll::Pending,
2824                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
2825                        this.is_terminated = true;
2826                        return std::task::Poll::Ready(None);
2827                    }
2828                    std::task::Poll::Ready(Err(e)) => {
2829                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2830                            e.into(),
2831                        ))))
2832                    }
2833                }
2834
2835                // A message has been received from the channel
2836                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2837
2838                std::task::Poll::Ready(Some(match header.ordinal {
2839                    0x18231a638e508f9d => {
2840                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2841                        let mut req = fidl::new_empty!(
2842                            fidl::encoding::EmptyPayload,
2843                            fidl::encoding::DefaultFuchsiaResourceDialect
2844                        );
2845                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2846                        let control_handle =
2847                            WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
2848                        Ok(WlanSoftmacBaseRequest::Query {
2849                            responder: WlanSoftmacBaseQueryResponder {
2850                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2851                                tx_id: header.tx_id,
2852                            },
2853                        })
2854                    }
2855                    0x16797affc0cb58ae => {
2856                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2857                        let mut req = fidl::new_empty!(
2858                            fidl::encoding::EmptyPayload,
2859                            fidl::encoding::DefaultFuchsiaResourceDialect
2860                        );
2861                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2862                        let control_handle =
2863                            WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
2864                        Ok(WlanSoftmacBaseRequest::QueryDiscoverySupport {
2865                            responder: WlanSoftmacBaseQueryDiscoverySupportResponder {
2866                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2867                                tx_id: header.tx_id,
2868                            },
2869                        })
2870                    }
2871                    0x7302c3f8c131f075 => {
2872                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2873                        let mut req = fidl::new_empty!(
2874                            fidl::encoding::EmptyPayload,
2875                            fidl::encoding::DefaultFuchsiaResourceDialect
2876                        );
2877                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2878                        let control_handle =
2879                            WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
2880                        Ok(WlanSoftmacBaseRequest::QueryMacSublayerSupport {
2881                            responder: WlanSoftmacBaseQueryMacSublayerSupportResponder {
2882                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2883                                tx_id: header.tx_id,
2884                            },
2885                        })
2886                    }
2887                    0x3691bb75abf6354 => {
2888                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2889                        let mut req = fidl::new_empty!(
2890                            fidl::encoding::EmptyPayload,
2891                            fidl::encoding::DefaultFuchsiaResourceDialect
2892                        );
2893                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2894                        let control_handle =
2895                            WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
2896                        Ok(WlanSoftmacBaseRequest::QuerySecuritySupport {
2897                            responder: WlanSoftmacBaseQuerySecuritySupportResponder {
2898                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2899                                tx_id: header.tx_id,
2900                            },
2901                        })
2902                    }
2903                    0x347d78dc1d4d27bf => {
2904                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2905                        let mut req = fidl::new_empty!(
2906                            fidl::encoding::EmptyPayload,
2907                            fidl::encoding::DefaultFuchsiaResourceDialect
2908                        );
2909                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2910                        let control_handle =
2911                            WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
2912                        Ok(WlanSoftmacBaseRequest::QuerySpectrumManagementSupport {
2913                            responder: WlanSoftmacBaseQuerySpectrumManagementSupportResponder {
2914                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2915                                tx_id: header.tx_id,
2916                            },
2917                        })
2918                    }
2919                    0x12836b533cd63ece => {
2920                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2921                        let mut req = fidl::new_empty!(
2922                            WlanSoftmacBaseSetChannelRequest,
2923                            fidl::encoding::DefaultFuchsiaResourceDialect
2924                        );
2925                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseSetChannelRequest>(&header, _body_bytes, handles, &mut req)?;
2926                        let control_handle =
2927                            WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
2928                        Ok(WlanSoftmacBaseRequest::SetChannel {
2929                            payload: req,
2930                            responder: WlanSoftmacBaseSetChannelResponder {
2931                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2932                                tx_id: header.tx_id,
2933                            },
2934                        })
2935                    }
2936                    0x1336fb5455b77a6e => {
2937                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2938                        let mut req = fidl::new_empty!(
2939                            WlanSoftmacBaseJoinBssRequest,
2940                            fidl::encoding::DefaultFuchsiaResourceDialect
2941                        );
2942                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseJoinBssRequest>(&header, _body_bytes, handles, &mut req)?;
2943                        let control_handle =
2944                            WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
2945                        Ok(WlanSoftmacBaseRequest::JoinBss {
2946                            join_request: req.join_request,
2947
2948                            responder: WlanSoftmacBaseJoinBssResponder {
2949                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2950                                tx_id: header.tx_id,
2951                            },
2952                        })
2953                    }
2954                    0x6c35807632c64576 => {
2955                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2956                        let mut req = fidl::new_empty!(
2957                            WlanSoftmacBaseEnableBeaconingRequest,
2958                            fidl::encoding::DefaultFuchsiaResourceDialect
2959                        );
2960                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseEnableBeaconingRequest>(&header, _body_bytes, handles, &mut req)?;
2961                        let control_handle =
2962                            WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
2963                        Ok(WlanSoftmacBaseRequest::EnableBeaconing {
2964                            payload: req,
2965                            responder: WlanSoftmacBaseEnableBeaconingResponder {
2966                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2967                                tx_id: header.tx_id,
2968                            },
2969                        })
2970                    }
2971                    0x3303b30f99dbb406 => {
2972                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2973                        let mut req = fidl::new_empty!(
2974                            fidl::encoding::EmptyPayload,
2975                            fidl::encoding::DefaultFuchsiaResourceDialect
2976                        );
2977                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2978                        let control_handle =
2979                            WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
2980                        Ok(WlanSoftmacBaseRequest::DisableBeaconing {
2981                            responder: WlanSoftmacBaseDisableBeaconingResponder {
2982                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2983                                tx_id: header.tx_id,
2984                            },
2985                        })
2986                    }
2987                    0x7decf9b4200b9131 => {
2988                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2989                        let mut req = fidl::new_empty!(
2990                            WlanKeyConfiguration,
2991                            fidl::encoding::DefaultFuchsiaResourceDialect
2992                        );
2993                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanKeyConfiguration>(&header, _body_bytes, handles, &mut req)?;
2994                        let control_handle =
2995                            WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
2996                        Ok(WlanSoftmacBaseRequest::InstallKey {
2997                            payload: req,
2998                            responder: WlanSoftmacBaseInstallKeyResponder {
2999                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3000                                tx_id: header.tx_id,
3001                            },
3002                        })
3003                    }
3004                    0x436ffe3ba461d6cd => {
3005                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3006                        let mut req = fidl::new_empty!(
3007                            WlanSoftmacBaseNotifyAssociationCompleteRequest,
3008                            fidl::encoding::DefaultFuchsiaResourceDialect
3009                        );
3010                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseNotifyAssociationCompleteRequest>(&header, _body_bytes, handles, &mut req)?;
3011                        let control_handle =
3012                            WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3013                        Ok(WlanSoftmacBaseRequest::NotifyAssociationComplete {
3014                            assoc_cfg: req.assoc_cfg,
3015
3016                            responder: WlanSoftmacBaseNotifyAssociationCompleteResponder {
3017                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3018                                tx_id: header.tx_id,
3019                            },
3020                        })
3021                    }
3022                    0x581d76c39190a7dd => {
3023                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3024                        let mut req = fidl::new_empty!(
3025                            WlanSoftmacBaseClearAssociationRequest,
3026                            fidl::encoding::DefaultFuchsiaResourceDialect
3027                        );
3028                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseClearAssociationRequest>(&header, _body_bytes, handles, &mut req)?;
3029                        let control_handle =
3030                            WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3031                        Ok(WlanSoftmacBaseRequest::ClearAssociation {
3032                            payload: req,
3033                            responder: WlanSoftmacBaseClearAssociationResponder {
3034                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3035                                tx_id: header.tx_id,
3036                            },
3037                        })
3038                    }
3039                    0x5662f989cb4083bb => {
3040                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3041                        let mut req = fidl::new_empty!(
3042                            WlanSoftmacBaseStartPassiveScanRequest,
3043                            fidl::encoding::DefaultFuchsiaResourceDialect
3044                        );
3045                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseStartPassiveScanRequest>(&header, _body_bytes, handles, &mut req)?;
3046                        let control_handle =
3047                            WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3048                        Ok(WlanSoftmacBaseRequest::StartPassiveScan {
3049                            payload: req,
3050                            responder: WlanSoftmacBaseStartPassiveScanResponder {
3051                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3052                                tx_id: header.tx_id,
3053                            },
3054                        })
3055                    }
3056                    0x4896eafa9937751e => {
3057                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3058                        let mut req = fidl::new_empty!(
3059                            WlanSoftmacStartActiveScanRequest,
3060                            fidl::encoding::DefaultFuchsiaResourceDialect
3061                        );
3062                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacStartActiveScanRequest>(&header, _body_bytes, handles, &mut req)?;
3063                        let control_handle =
3064                            WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3065                        Ok(WlanSoftmacBaseRequest::StartActiveScan {
3066                            payload: req,
3067                            responder: WlanSoftmacBaseStartActiveScanResponder {
3068                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3069                                tx_id: header.tx_id,
3070                            },
3071                        })
3072                    }
3073                    0xf7d859369764556 => {
3074                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3075                        let mut req = fidl::new_empty!(
3076                            WlanSoftmacBaseCancelScanRequest,
3077                            fidl::encoding::DefaultFuchsiaResourceDialect
3078                        );
3079                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseCancelScanRequest>(&header, _body_bytes, handles, &mut req)?;
3080                        let control_handle =
3081                            WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3082                        Ok(WlanSoftmacBaseRequest::CancelScan {
3083                            payload: req,
3084                            responder: WlanSoftmacBaseCancelScanResponder {
3085                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3086                                tx_id: header.tx_id,
3087                            },
3088                        })
3089                    }
3090                    0x68522c7122d5f78c => {
3091                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3092                        let mut req = fidl::new_empty!(
3093                            WlanSoftmacBaseUpdateWmmParametersRequest,
3094                            fidl::encoding::DefaultFuchsiaResourceDialect
3095                        );
3096                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseUpdateWmmParametersRequest>(&header, _body_bytes, handles, &mut req)?;
3097                        let control_handle =
3098                            WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3099                        Ok(WlanSoftmacBaseRequest::UpdateWmmParameters {
3100                            payload: req,
3101                            responder: WlanSoftmacBaseUpdateWmmParametersResponder {
3102                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3103                                tx_id: header.tx_id,
3104                            },
3105                        })
3106                    }
3107                    _ => Err(fidl::Error::UnknownOrdinal {
3108                        ordinal: header.ordinal,
3109                        protocol_name:
3110                            <WlanSoftmacBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3111                    }),
3112                }))
3113            },
3114        )
3115    }
3116}
3117
3118/// `WlanSoftmacBase` is a template protocol intended to be composed into
3119/// `WlanSoftmacBridge` and `WlanSoftmac`. `WlanSoftmacBase` contains all method
3120/// that both `WlanSoftmacBridge` and `WlanSoftmac` have in common.
3121/// `WlanSoftmacBase` should not be implemented directly.
3122///
3123/// NOTE: All methods use a `selector` attribute to maintain their ordinal
3124///       following migration from `WlanSoftmac` into this protocol. This is necessary
3125///       to preserve API compatibility.
3126#[derive(Debug)]
3127pub enum WlanSoftmacBaseRequest {
3128    /// Gets general information about the device and its supported features.
3129    /// This method is safe to call even when the SoftMAC has not yet started.
3130    ///
3131    /// Note: The implementation of this method must not depend on a response
3132    /// from an ethernet driver, otherwise there is a risk of deadlock.
3133    /// The wlansoftmac driver calls this method synchronously while
3134    /// serving the fuchsia.hardware.ethernet/EthernetImpl.Query method.
3135    Query { responder: WlanSoftmacBaseQueryResponder },
3136    /// Gets information about the station discovery (e.g., scanning and
3137    /// probing) features supported by the device. This method is safe to call
3138    /// even when the SoftMAC has not yet started.
3139    QueryDiscoverySupport { responder: WlanSoftmacBaseQueryDiscoverySupportResponder },
3140    /// Gets information about the MAC features supported by the device. This
3141    /// method is safe to call even when the SoftMAC has not yet started.
3142    ///
3143    /// Note: The implementation of this method must not depend on a response
3144    /// from an ethernet driver, otherwise there is a risk of deadlock.
3145    /// The wlansoftmac driver calls this method synchronously while
3146    /// serving the fuchsia.hardware.ethernet/EthernetImpl.Query method.
3147    QueryMacSublayerSupport { responder: WlanSoftmacBaseQueryMacSublayerSupportResponder },
3148    /// Gets information about the security features supported by the device.
3149    /// This method is safe to call even when the SoftMAC has not yet started.
3150    QuerySecuritySupport { responder: WlanSoftmacBaseQuerySecuritySupportResponder },
3151    /// Gets information about the spectrum usage (e.g., DFS) features supported
3152    /// by the device. This method is safe to call even when the SoftMAC has not
3153    /// yet started.
3154    QuerySpectrumManagementSupport {
3155        responder: WlanSoftmacBaseQuerySpectrumManagementSupportResponder,
3156    },
3157    /// Set the primary radio channel, e.g. in response to a channel switch event.
3158    /// If successful, this will trigger the channel switch immediately. This may
3159    /// impact the transmission of any frames that are in-flight, and might also
3160    /// interfere with an ongoing scan request.
3161    ///
3162    /// Common errors include: \
3163    ///   ZX_ERR_NOT_SUPPORTED: The device cannot switch to the requested channel.
3164    SetChannel {
3165        payload: WlanSoftmacBaseSetChannelRequest,
3166        responder: WlanSoftmacBaseSetChannelResponder,
3167    },
3168    /// Join a specific BSS in which we will participate.
3169    /// This applies regardless of if we are hosting the BSS or joining it
3170    /// (indicated by the `remote` flag in `JoinBssRequest`).
3171    /// If successful, the device will switch to the correct channel and perform
3172    /// any internal filtering/timing operations required to join the BSS.
3173    /// For client STAs, this is the first step before authenticating.
3174    ///
3175    /// Common errors include: \
3176    ///   ZX_ERR_NOT_SUPPORTED: The device does not support the given bss config.
3177    JoinBss {
3178        join_request: fidl_fuchsia_wlan_common::JoinBssRequest,
3179        responder: WlanSoftmacBaseJoinBssResponder,
3180    },
3181    /// Enables hardware Beaconing.
3182    ///
3183    /// This method cannot be called while beaconing is enabled and so
3184    /// `DisableBeaconing` must be called prior to this method if beaconing is
3185    /// enabled.
3186    ///
3187    /// All request fields are required.
3188    ///
3189    /// Common errors include:
3190    ///
3191    /// - `ZX_ERR_NOT_SUPPORTED`: The device does not support hardware beacons.
3192    /// - `ZX_ERR_INVALID_ARGS`: The device cannot transmit the requested
3193    ///                          beacon.
3194    /// - `ZX_ERR_BAD_STATE`: The device is already beaconing.
3195    EnableBeaconing {
3196        payload: WlanSoftmacBaseEnableBeaconingRequest,
3197        responder: WlanSoftmacBaseEnableBeaconingResponder,
3198    },
3199    /// Disables hardware beaconing.
3200    DisableBeaconing { responder: WlanSoftmacBaseDisableBeaconingResponder },
3201    /// Install a key for encryption when transmitting or receiving protected
3202    /// frames.
3203    ///
3204    /// Common errors include:
3205    ///   ZX_ERR_INVALID_ARGS: The given config does not specify a valid key.
3206    ///   ZX_ERR_NOT_SUPPORTED: The device does not support the given cipher.
3207    InstallKey { payload: WlanKeyConfiguration, responder: WlanSoftmacBaseInstallKeyResponder },
3208    /// Notifies the device of a successful association and configures
3209    /// additional parameters necessary to participate in that association.
3210    ///
3211    /// # Errors
3212    ///
3213    /// Common errors include:
3214    ///
3215    /// - `ZX_ERR_BAD_STATE`: The device was not previously informed of this BSS
3216    ///                       via `WlanSoftmac.JoinBss`.
3217    NotifyAssociationComplete {
3218        assoc_cfg: WlanAssociationConfig,
3219        responder: WlanSoftmacBaseNotifyAssociationCompleteResponder,
3220    },
3221    /// Notifies MAC and PHY that the peer has been de-associated.
3222    ClearAssociation {
3223        payload: WlanSoftmacBaseClearAssociationRequest,
3224        responder: WlanSoftmacBaseClearAssociationResponder,
3225    },
3226    /// Starts a passive scan. The server will deliver scan results
3227    /// as Beacon frames using WlanSoftmacIfc.Recv(). When complete,
3228    /// the server will call WlanSoftmacIfc.ScanComplete() with the
3229    /// same `scan_id` returned by StartPassiveScan().
3230    ///
3231    /// The server indicates support for `StartPassiveScan()` using
3232    /// `fuchsia.wlan.common/ScanOffloadExtension.supported`.
3233    ///
3234    /// Common errors include:
3235    ///   ZX_ERR_INVALID_ARGS: The device is not capable of performing the
3236    ///       requested scan, e.g. because an incompatible channel was requested.
3237    ///   ZX_ERR_UNAVAILABLE: The device cannot currently perform scans.
3238    ///   ZX_ERR_SHOULD_WAIT: Another scan is already in-progress.
3239    StartPassiveScan {
3240        payload: WlanSoftmacBaseStartPassiveScanRequest,
3241        responder: WlanSoftmacBaseStartPassiveScanResponder,
3242    },
3243    /// Starts an active scan. The server will deliver scan results
3244    /// as Beacon or Probe Response frames using WlanSoftmacIfc.Recv().
3245    /// When complete, the server will call WlanSoftmacIfc.ScanComplete()
3246    /// with the same `scan_id` returned by StartActiveScan().
3247    ///
3248    /// A device driver indicates support for `StartActiveScan()` using
3249    /// `fuchsia.wlan.common/ProbeRequestOffloadExtension.supported`.
3250    ///
3251    /// Common errors include:
3252    ///   ZX_ERR_INVALID_ARGS: The device is not capable of performing the
3253    ///       requested scan, e.g. because an incompatible channel was requested.
3254    ///   ZX_ERR_UNAVAILABLE: The device cannot currently perform scans.
3255    ///   ZX_ERR_SHOULD_WAIT: Another scan is already in-progress.
3256    StartActiveScan {
3257        payload: WlanSoftmacStartActiveScanRequest,
3258        responder: WlanSoftmacBaseStartActiveScanResponder,
3259    },
3260    /// Cancels the ongoing scan corresponding to `scan_id`,
3261    /// where `scan_id` is an identifier returned by
3262    /// `StartPassiveScan()` or `StartActiveScan()`. If cancellation succeeds,
3263    /// the server will soon call WlanSoftmacIfc.ScanComplete() with the same
3264    /// `scan_id`.
3265    ///
3266    /// A device driver indicates support for `CancelScan()` using
3267    /// `fuchsia.wlan.common/ScanOffloadExtension.scan_cancel_supported`.
3268    ///
3269    /// Common errors include:
3270    ///
3271    /// - `ZX_ERR_NOT_FOUND`: `scan_id` does not match an ongoing scan.
3272    /// - `ZX_ERR_NOT_SUPPORTED`: Server does not support scan cancellation.
3273    CancelScan {
3274        payload: WlanSoftmacBaseCancelScanRequest,
3275        responder: WlanSoftmacBaseCancelScanResponder,
3276    },
3277    /// Indicate the device of modified WiFi Multimedia (WMM) parameters for a
3278    /// particular access category (AC).
3279    UpdateWmmParameters {
3280        payload: WlanSoftmacBaseUpdateWmmParametersRequest,
3281        responder: WlanSoftmacBaseUpdateWmmParametersResponder,
3282    },
3283}
3284
3285impl WlanSoftmacBaseRequest {
3286    #[allow(irrefutable_let_patterns)]
3287    pub fn into_query(self) -> Option<(WlanSoftmacBaseQueryResponder)> {
3288        if let WlanSoftmacBaseRequest::Query { responder } = self {
3289            Some((responder))
3290        } else {
3291            None
3292        }
3293    }
3294
3295    #[allow(irrefutable_let_patterns)]
3296    pub fn into_query_discovery_support(
3297        self,
3298    ) -> Option<(WlanSoftmacBaseQueryDiscoverySupportResponder)> {
3299        if let WlanSoftmacBaseRequest::QueryDiscoverySupport { responder } = self {
3300            Some((responder))
3301        } else {
3302            None
3303        }
3304    }
3305
3306    #[allow(irrefutable_let_patterns)]
3307    pub fn into_query_mac_sublayer_support(
3308        self,
3309    ) -> Option<(WlanSoftmacBaseQueryMacSublayerSupportResponder)> {
3310        if let WlanSoftmacBaseRequest::QueryMacSublayerSupport { responder } = self {
3311            Some((responder))
3312        } else {
3313            None
3314        }
3315    }
3316
3317    #[allow(irrefutable_let_patterns)]
3318    pub fn into_query_security_support(
3319        self,
3320    ) -> Option<(WlanSoftmacBaseQuerySecuritySupportResponder)> {
3321        if let WlanSoftmacBaseRequest::QuerySecuritySupport { responder } = self {
3322            Some((responder))
3323        } else {
3324            None
3325        }
3326    }
3327
3328    #[allow(irrefutable_let_patterns)]
3329    pub fn into_query_spectrum_management_support(
3330        self,
3331    ) -> Option<(WlanSoftmacBaseQuerySpectrumManagementSupportResponder)> {
3332        if let WlanSoftmacBaseRequest::QuerySpectrumManagementSupport { responder } = self {
3333            Some((responder))
3334        } else {
3335            None
3336        }
3337    }
3338
3339    #[allow(irrefutable_let_patterns)]
3340    pub fn into_set_channel(
3341        self,
3342    ) -> Option<(WlanSoftmacBaseSetChannelRequest, WlanSoftmacBaseSetChannelResponder)> {
3343        if let WlanSoftmacBaseRequest::SetChannel { payload, responder } = self {
3344            Some((payload, responder))
3345        } else {
3346            None
3347        }
3348    }
3349
3350    #[allow(irrefutable_let_patterns)]
3351    pub fn into_join_bss(
3352        self,
3353    ) -> Option<(fidl_fuchsia_wlan_common::JoinBssRequest, WlanSoftmacBaseJoinBssResponder)> {
3354        if let WlanSoftmacBaseRequest::JoinBss { join_request, responder } = self {
3355            Some((join_request, responder))
3356        } else {
3357            None
3358        }
3359    }
3360
3361    #[allow(irrefutable_let_patterns)]
3362    pub fn into_enable_beaconing(
3363        self,
3364    ) -> Option<(WlanSoftmacBaseEnableBeaconingRequest, WlanSoftmacBaseEnableBeaconingResponder)>
3365    {
3366        if let WlanSoftmacBaseRequest::EnableBeaconing { payload, responder } = self {
3367            Some((payload, responder))
3368        } else {
3369            None
3370        }
3371    }
3372
3373    #[allow(irrefutable_let_patterns)]
3374    pub fn into_disable_beaconing(self) -> Option<(WlanSoftmacBaseDisableBeaconingResponder)> {
3375        if let WlanSoftmacBaseRequest::DisableBeaconing { responder } = self {
3376            Some((responder))
3377        } else {
3378            None
3379        }
3380    }
3381
3382    #[allow(irrefutable_let_patterns)]
3383    pub fn into_install_key(
3384        self,
3385    ) -> Option<(WlanKeyConfiguration, WlanSoftmacBaseInstallKeyResponder)> {
3386        if let WlanSoftmacBaseRequest::InstallKey { payload, responder } = self {
3387            Some((payload, responder))
3388        } else {
3389            None
3390        }
3391    }
3392
3393    #[allow(irrefutable_let_patterns)]
3394    pub fn into_notify_association_complete(
3395        self,
3396    ) -> Option<(WlanAssociationConfig, WlanSoftmacBaseNotifyAssociationCompleteResponder)> {
3397        if let WlanSoftmacBaseRequest::NotifyAssociationComplete { assoc_cfg, responder } = self {
3398            Some((assoc_cfg, responder))
3399        } else {
3400            None
3401        }
3402    }
3403
3404    #[allow(irrefutable_let_patterns)]
3405    pub fn into_clear_association(
3406        self,
3407    ) -> Option<(WlanSoftmacBaseClearAssociationRequest, WlanSoftmacBaseClearAssociationResponder)>
3408    {
3409        if let WlanSoftmacBaseRequest::ClearAssociation { payload, responder } = self {
3410            Some((payload, responder))
3411        } else {
3412            None
3413        }
3414    }
3415
3416    #[allow(irrefutable_let_patterns)]
3417    pub fn into_start_passive_scan(
3418        self,
3419    ) -> Option<(WlanSoftmacBaseStartPassiveScanRequest, WlanSoftmacBaseStartPassiveScanResponder)>
3420    {
3421        if let WlanSoftmacBaseRequest::StartPassiveScan { payload, responder } = self {
3422            Some((payload, responder))
3423        } else {
3424            None
3425        }
3426    }
3427
3428    #[allow(irrefutable_let_patterns)]
3429    pub fn into_start_active_scan(
3430        self,
3431    ) -> Option<(WlanSoftmacStartActiveScanRequest, WlanSoftmacBaseStartActiveScanResponder)> {
3432        if let WlanSoftmacBaseRequest::StartActiveScan { payload, responder } = self {
3433            Some((payload, responder))
3434        } else {
3435            None
3436        }
3437    }
3438
3439    #[allow(irrefutable_let_patterns)]
3440    pub fn into_cancel_scan(
3441        self,
3442    ) -> Option<(WlanSoftmacBaseCancelScanRequest, WlanSoftmacBaseCancelScanResponder)> {
3443        if let WlanSoftmacBaseRequest::CancelScan { payload, responder } = self {
3444            Some((payload, responder))
3445        } else {
3446            None
3447        }
3448    }
3449
3450    #[allow(irrefutable_let_patterns)]
3451    pub fn into_update_wmm_parameters(
3452        self,
3453    ) -> Option<(
3454        WlanSoftmacBaseUpdateWmmParametersRequest,
3455        WlanSoftmacBaseUpdateWmmParametersResponder,
3456    )> {
3457        if let WlanSoftmacBaseRequest::UpdateWmmParameters { payload, responder } = self {
3458            Some((payload, responder))
3459        } else {
3460            None
3461        }
3462    }
3463
3464    /// Name of the method defined in FIDL
3465    pub fn method_name(&self) -> &'static str {
3466        match *self {
3467            WlanSoftmacBaseRequest::Query { .. } => "query",
3468            WlanSoftmacBaseRequest::QueryDiscoverySupport { .. } => "query_discovery_support",
3469            WlanSoftmacBaseRequest::QueryMacSublayerSupport { .. } => "query_mac_sublayer_support",
3470            WlanSoftmacBaseRequest::QuerySecuritySupport { .. } => "query_security_support",
3471            WlanSoftmacBaseRequest::QuerySpectrumManagementSupport { .. } => {
3472                "query_spectrum_management_support"
3473            }
3474            WlanSoftmacBaseRequest::SetChannel { .. } => "set_channel",
3475            WlanSoftmacBaseRequest::JoinBss { .. } => "join_bss",
3476            WlanSoftmacBaseRequest::EnableBeaconing { .. } => "enable_beaconing",
3477            WlanSoftmacBaseRequest::DisableBeaconing { .. } => "disable_beaconing",
3478            WlanSoftmacBaseRequest::InstallKey { .. } => "install_key",
3479            WlanSoftmacBaseRequest::NotifyAssociationComplete { .. } => {
3480                "notify_association_complete"
3481            }
3482            WlanSoftmacBaseRequest::ClearAssociation { .. } => "clear_association",
3483            WlanSoftmacBaseRequest::StartPassiveScan { .. } => "start_passive_scan",
3484            WlanSoftmacBaseRequest::StartActiveScan { .. } => "start_active_scan",
3485            WlanSoftmacBaseRequest::CancelScan { .. } => "cancel_scan",
3486            WlanSoftmacBaseRequest::UpdateWmmParameters { .. } => "update_wmm_parameters",
3487        }
3488    }
3489}
3490
3491#[derive(Debug, Clone)]
3492pub struct WlanSoftmacBaseControlHandle {
3493    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3494}
3495
3496impl fidl::endpoints::ControlHandle for WlanSoftmacBaseControlHandle {
3497    fn shutdown(&self) {
3498        self.inner.shutdown()
3499    }
3500    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3501        self.inner.shutdown_with_epitaph(status)
3502    }
3503
3504    fn is_closed(&self) -> bool {
3505        self.inner.channel().is_closed()
3506    }
3507    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3508        self.inner.channel().on_closed()
3509    }
3510
3511    #[cfg(target_os = "fuchsia")]
3512    fn signal_peer(
3513        &self,
3514        clear_mask: zx::Signals,
3515        set_mask: zx::Signals,
3516    ) -> Result<(), zx_status::Status> {
3517        use fidl::Peered;
3518        self.inner.channel().signal_peer(clear_mask, set_mask)
3519    }
3520}
3521
3522impl WlanSoftmacBaseControlHandle {}
3523
3524#[must_use = "FIDL methods require a response to be sent"]
3525#[derive(Debug)]
3526pub struct WlanSoftmacBaseQueryResponder {
3527    control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
3528    tx_id: u32,
3529}
3530
3531/// Set the the channel to be shutdown (see [`WlanSoftmacBaseControlHandle::shutdown`])
3532/// if the responder is dropped without sending a response, so that the client
3533/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3534impl std::ops::Drop for WlanSoftmacBaseQueryResponder {
3535    fn drop(&mut self) {
3536        self.control_handle.shutdown();
3537        // Safety: drops once, never accessed again
3538        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3539    }
3540}
3541
3542impl fidl::endpoints::Responder for WlanSoftmacBaseQueryResponder {
3543    type ControlHandle = WlanSoftmacBaseControlHandle;
3544
3545    fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
3546        &self.control_handle
3547    }
3548
3549    fn drop_without_shutdown(mut self) {
3550        // Safety: drops once, never accessed again due to mem::forget
3551        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3552        // Prevent Drop from running (which would shut down the channel)
3553        std::mem::forget(self);
3554    }
3555}
3556
3557impl WlanSoftmacBaseQueryResponder {
3558    /// Sends a response to the FIDL transaction.
3559    ///
3560    /// Sets the channel to shutdown if an error occurs.
3561    pub fn send(
3562        self,
3563        mut result: Result<&WlanSoftmacQueryResponse, i32>,
3564    ) -> Result<(), fidl::Error> {
3565        let _result = self.send_raw(result);
3566        if _result.is_err() {
3567            self.control_handle.shutdown();
3568        }
3569        self.drop_without_shutdown();
3570        _result
3571    }
3572
3573    /// Similar to "send" but does not shutdown the channel if an error occurs.
3574    pub fn send_no_shutdown_on_err(
3575        self,
3576        mut result: Result<&WlanSoftmacQueryResponse, i32>,
3577    ) -> Result<(), fidl::Error> {
3578        let _result = self.send_raw(result);
3579        self.drop_without_shutdown();
3580        _result
3581    }
3582
3583    fn send_raw(
3584        &self,
3585        mut result: Result<&WlanSoftmacQueryResponse, i32>,
3586    ) -> Result<(), fidl::Error> {
3587        self.control_handle.inner.send::<fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>>(
3588            result,
3589            self.tx_id,
3590            0x18231a638e508f9d,
3591            fidl::encoding::DynamicFlags::empty(),
3592        )
3593    }
3594}
3595
3596#[must_use = "FIDL methods require a response to be sent"]
3597#[derive(Debug)]
3598pub struct WlanSoftmacBaseQueryDiscoverySupportResponder {
3599    control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
3600    tx_id: u32,
3601}
3602
3603/// Set the the channel to be shutdown (see [`WlanSoftmacBaseControlHandle::shutdown`])
3604/// if the responder is dropped without sending a response, so that the client
3605/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3606impl std::ops::Drop for WlanSoftmacBaseQueryDiscoverySupportResponder {
3607    fn drop(&mut self) {
3608        self.control_handle.shutdown();
3609        // Safety: drops once, never accessed again
3610        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3611    }
3612}
3613
3614impl fidl::endpoints::Responder for WlanSoftmacBaseQueryDiscoverySupportResponder {
3615    type ControlHandle = WlanSoftmacBaseControlHandle;
3616
3617    fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
3618        &self.control_handle
3619    }
3620
3621    fn drop_without_shutdown(mut self) {
3622        // Safety: drops once, never accessed again due to mem::forget
3623        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3624        // Prevent Drop from running (which would shut down the channel)
3625        std::mem::forget(self);
3626    }
3627}
3628
3629impl WlanSoftmacBaseQueryDiscoverySupportResponder {
3630    /// Sends a response to the FIDL transaction.
3631    ///
3632    /// Sets the channel to shutdown if an error occurs.
3633    pub fn send(self, mut result: Result<&DiscoverySupport, i32>) -> Result<(), fidl::Error> {
3634        let _result = self.send_raw(result);
3635        if _result.is_err() {
3636            self.control_handle.shutdown();
3637        }
3638        self.drop_without_shutdown();
3639        _result
3640    }
3641
3642    /// Similar to "send" but does not shutdown the channel if an error occurs.
3643    pub fn send_no_shutdown_on_err(
3644        self,
3645        mut result: Result<&DiscoverySupport, i32>,
3646    ) -> Result<(), fidl::Error> {
3647        let _result = self.send_raw(result);
3648        self.drop_without_shutdown();
3649        _result
3650    }
3651
3652    fn send_raw(&self, mut result: Result<&DiscoverySupport, i32>) -> Result<(), fidl::Error> {
3653        self.control_handle.inner.send::<fidl::encoding::ResultType<
3654            WlanSoftmacBaseQueryDiscoverySupportResponse,
3655            i32,
3656        >>(
3657            result.map(|resp| (resp,)),
3658            self.tx_id,
3659            0x16797affc0cb58ae,
3660            fidl::encoding::DynamicFlags::empty(),
3661        )
3662    }
3663}
3664
3665#[must_use = "FIDL methods require a response to be sent"]
3666#[derive(Debug)]
3667pub struct WlanSoftmacBaseQueryMacSublayerSupportResponder {
3668    control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
3669    tx_id: u32,
3670}
3671
3672/// Set the the channel to be shutdown (see [`WlanSoftmacBaseControlHandle::shutdown`])
3673/// if the responder is dropped without sending a response, so that the client
3674/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3675impl std::ops::Drop for WlanSoftmacBaseQueryMacSublayerSupportResponder {
3676    fn drop(&mut self) {
3677        self.control_handle.shutdown();
3678        // Safety: drops once, never accessed again
3679        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3680    }
3681}
3682
3683impl fidl::endpoints::Responder for WlanSoftmacBaseQueryMacSublayerSupportResponder {
3684    type ControlHandle = WlanSoftmacBaseControlHandle;
3685
3686    fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
3687        &self.control_handle
3688    }
3689
3690    fn drop_without_shutdown(mut self) {
3691        // Safety: drops once, never accessed again due to mem::forget
3692        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3693        // Prevent Drop from running (which would shut down the channel)
3694        std::mem::forget(self);
3695    }
3696}
3697
3698impl WlanSoftmacBaseQueryMacSublayerSupportResponder {
3699    /// Sends a response to the FIDL transaction.
3700    ///
3701    /// Sets the channel to shutdown if an error occurs.
3702    pub fn send(
3703        self,
3704        mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
3705    ) -> Result<(), fidl::Error> {
3706        let _result = self.send_raw(result);
3707        if _result.is_err() {
3708            self.control_handle.shutdown();
3709        }
3710        self.drop_without_shutdown();
3711        _result
3712    }
3713
3714    /// Similar to "send" but does not shutdown the channel if an error occurs.
3715    pub fn send_no_shutdown_on_err(
3716        self,
3717        mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
3718    ) -> Result<(), fidl::Error> {
3719        let _result = self.send_raw(result);
3720        self.drop_without_shutdown();
3721        _result
3722    }
3723
3724    fn send_raw(
3725        &self,
3726        mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
3727    ) -> Result<(), fidl::Error> {
3728        self.control_handle.inner.send::<fidl::encoding::ResultType<
3729            WlanSoftmacBaseQueryMacSublayerSupportResponse,
3730            i32,
3731        >>(
3732            result.map(|resp| (resp,)),
3733            self.tx_id,
3734            0x7302c3f8c131f075,
3735            fidl::encoding::DynamicFlags::empty(),
3736        )
3737    }
3738}
3739
3740#[must_use = "FIDL methods require a response to be sent"]
3741#[derive(Debug)]
3742pub struct WlanSoftmacBaseQuerySecuritySupportResponder {
3743    control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
3744    tx_id: u32,
3745}
3746
3747/// Set the the channel to be shutdown (see [`WlanSoftmacBaseControlHandle::shutdown`])
3748/// if the responder is dropped without sending a response, so that the client
3749/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3750impl std::ops::Drop for WlanSoftmacBaseQuerySecuritySupportResponder {
3751    fn drop(&mut self) {
3752        self.control_handle.shutdown();
3753        // Safety: drops once, never accessed again
3754        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3755    }
3756}
3757
3758impl fidl::endpoints::Responder for WlanSoftmacBaseQuerySecuritySupportResponder {
3759    type ControlHandle = WlanSoftmacBaseControlHandle;
3760
3761    fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
3762        &self.control_handle
3763    }
3764
3765    fn drop_without_shutdown(mut self) {
3766        // Safety: drops once, never accessed again due to mem::forget
3767        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3768        // Prevent Drop from running (which would shut down the channel)
3769        std::mem::forget(self);
3770    }
3771}
3772
3773impl WlanSoftmacBaseQuerySecuritySupportResponder {
3774    /// Sends a response to the FIDL transaction.
3775    ///
3776    /// Sets the channel to shutdown if an error occurs.
3777    pub fn send(
3778        self,
3779        mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
3780    ) -> Result<(), fidl::Error> {
3781        let _result = self.send_raw(result);
3782        if _result.is_err() {
3783            self.control_handle.shutdown();
3784        }
3785        self.drop_without_shutdown();
3786        _result
3787    }
3788
3789    /// Similar to "send" but does not shutdown the channel if an error occurs.
3790    pub fn send_no_shutdown_on_err(
3791        self,
3792        mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
3793    ) -> Result<(), fidl::Error> {
3794        let _result = self.send_raw(result);
3795        self.drop_without_shutdown();
3796        _result
3797    }
3798
3799    fn send_raw(
3800        &self,
3801        mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
3802    ) -> Result<(), fidl::Error> {
3803        self.control_handle.inner.send::<fidl::encoding::ResultType<
3804            WlanSoftmacBaseQuerySecuritySupportResponse,
3805            i32,
3806        >>(
3807            result.map(|resp| (resp,)),
3808            self.tx_id,
3809            0x3691bb75abf6354,
3810            fidl::encoding::DynamicFlags::empty(),
3811        )
3812    }
3813}
3814
3815#[must_use = "FIDL methods require a response to be sent"]
3816#[derive(Debug)]
3817pub struct WlanSoftmacBaseQuerySpectrumManagementSupportResponder {
3818    control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
3819    tx_id: u32,
3820}
3821
3822/// Set the the channel to be shutdown (see [`WlanSoftmacBaseControlHandle::shutdown`])
3823/// if the responder is dropped without sending a response, so that the client
3824/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3825impl std::ops::Drop for WlanSoftmacBaseQuerySpectrumManagementSupportResponder {
3826    fn drop(&mut self) {
3827        self.control_handle.shutdown();
3828        // Safety: drops once, never accessed again
3829        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3830    }
3831}
3832
3833impl fidl::endpoints::Responder for WlanSoftmacBaseQuerySpectrumManagementSupportResponder {
3834    type ControlHandle = WlanSoftmacBaseControlHandle;
3835
3836    fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
3837        &self.control_handle
3838    }
3839
3840    fn drop_without_shutdown(mut self) {
3841        // Safety: drops once, never accessed again due to mem::forget
3842        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3843        // Prevent Drop from running (which would shut down the channel)
3844        std::mem::forget(self);
3845    }
3846}
3847
3848impl WlanSoftmacBaseQuerySpectrumManagementSupportResponder {
3849    /// Sends a response to the FIDL transaction.
3850    ///
3851    /// Sets the channel to shutdown if an error occurs.
3852    pub fn send(
3853        self,
3854        mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
3855    ) -> Result<(), fidl::Error> {
3856        let _result = self.send_raw(result);
3857        if _result.is_err() {
3858            self.control_handle.shutdown();
3859        }
3860        self.drop_without_shutdown();
3861        _result
3862    }
3863
3864    /// Similar to "send" but does not shutdown the channel if an error occurs.
3865    pub fn send_no_shutdown_on_err(
3866        self,
3867        mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
3868    ) -> Result<(), fidl::Error> {
3869        let _result = self.send_raw(result);
3870        self.drop_without_shutdown();
3871        _result
3872    }
3873
3874    fn send_raw(
3875        &self,
3876        mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
3877    ) -> Result<(), fidl::Error> {
3878        self.control_handle.inner.send::<fidl::encoding::ResultType<
3879            WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
3880            i32,
3881        >>(
3882            result.map(|resp| (resp,)),
3883            self.tx_id,
3884            0x347d78dc1d4d27bf,
3885            fidl::encoding::DynamicFlags::empty(),
3886        )
3887    }
3888}
3889
3890#[must_use = "FIDL methods require a response to be sent"]
3891#[derive(Debug)]
3892pub struct WlanSoftmacBaseSetChannelResponder {
3893    control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
3894    tx_id: u32,
3895}
3896
3897/// Set the the channel to be shutdown (see [`WlanSoftmacBaseControlHandle::shutdown`])
3898/// if the responder is dropped without sending a response, so that the client
3899/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3900impl std::ops::Drop for WlanSoftmacBaseSetChannelResponder {
3901    fn drop(&mut self) {
3902        self.control_handle.shutdown();
3903        // Safety: drops once, never accessed again
3904        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3905    }
3906}
3907
3908impl fidl::endpoints::Responder for WlanSoftmacBaseSetChannelResponder {
3909    type ControlHandle = WlanSoftmacBaseControlHandle;
3910
3911    fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
3912        &self.control_handle
3913    }
3914
3915    fn drop_without_shutdown(mut self) {
3916        // Safety: drops once, never accessed again due to mem::forget
3917        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3918        // Prevent Drop from running (which would shut down the channel)
3919        std::mem::forget(self);
3920    }
3921}
3922
3923impl WlanSoftmacBaseSetChannelResponder {
3924    /// Sends a response to the FIDL transaction.
3925    ///
3926    /// Sets the channel to shutdown if an error occurs.
3927    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3928        let _result = self.send_raw(result);
3929        if _result.is_err() {
3930            self.control_handle.shutdown();
3931        }
3932        self.drop_without_shutdown();
3933        _result
3934    }
3935
3936    /// Similar to "send" but does not shutdown the channel if an error occurs.
3937    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3938        let _result = self.send_raw(result);
3939        self.drop_without_shutdown();
3940        _result
3941    }
3942
3943    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3944        self.control_handle
3945            .inner
3946            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3947                result,
3948                self.tx_id,
3949                0x12836b533cd63ece,
3950                fidl::encoding::DynamicFlags::empty(),
3951            )
3952    }
3953}
3954
3955#[must_use = "FIDL methods require a response to be sent"]
3956#[derive(Debug)]
3957pub struct WlanSoftmacBaseJoinBssResponder {
3958    control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
3959    tx_id: u32,
3960}
3961
3962/// Set the the channel to be shutdown (see [`WlanSoftmacBaseControlHandle::shutdown`])
3963/// if the responder is dropped without sending a response, so that the client
3964/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3965impl std::ops::Drop for WlanSoftmacBaseJoinBssResponder {
3966    fn drop(&mut self) {
3967        self.control_handle.shutdown();
3968        // Safety: drops once, never accessed again
3969        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3970    }
3971}
3972
3973impl fidl::endpoints::Responder for WlanSoftmacBaseJoinBssResponder {
3974    type ControlHandle = WlanSoftmacBaseControlHandle;
3975
3976    fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
3977        &self.control_handle
3978    }
3979
3980    fn drop_without_shutdown(mut self) {
3981        // Safety: drops once, never accessed again due to mem::forget
3982        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3983        // Prevent Drop from running (which would shut down the channel)
3984        std::mem::forget(self);
3985    }
3986}
3987
3988impl WlanSoftmacBaseJoinBssResponder {
3989    /// Sends a response to the FIDL transaction.
3990    ///
3991    /// Sets the channel to shutdown if an error occurs.
3992    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3993        let _result = self.send_raw(result);
3994        if _result.is_err() {
3995            self.control_handle.shutdown();
3996        }
3997        self.drop_without_shutdown();
3998        _result
3999    }
4000
4001    /// Similar to "send" but does not shutdown the channel if an error occurs.
4002    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4003        let _result = self.send_raw(result);
4004        self.drop_without_shutdown();
4005        _result
4006    }
4007
4008    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4009        self.control_handle
4010            .inner
4011            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4012                result,
4013                self.tx_id,
4014                0x1336fb5455b77a6e,
4015                fidl::encoding::DynamicFlags::empty(),
4016            )
4017    }
4018}
4019
4020#[must_use = "FIDL methods require a response to be sent"]
4021#[derive(Debug)]
4022pub struct WlanSoftmacBaseEnableBeaconingResponder {
4023    control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4024    tx_id: u32,
4025}
4026
4027/// Set the the channel to be shutdown (see [`WlanSoftmacBaseControlHandle::shutdown`])
4028/// if the responder is dropped without sending a response, so that the client
4029/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4030impl std::ops::Drop for WlanSoftmacBaseEnableBeaconingResponder {
4031    fn drop(&mut self) {
4032        self.control_handle.shutdown();
4033        // Safety: drops once, never accessed again
4034        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4035    }
4036}
4037
4038impl fidl::endpoints::Responder for WlanSoftmacBaseEnableBeaconingResponder {
4039    type ControlHandle = WlanSoftmacBaseControlHandle;
4040
4041    fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4042        &self.control_handle
4043    }
4044
4045    fn drop_without_shutdown(mut self) {
4046        // Safety: drops once, never accessed again due to mem::forget
4047        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4048        // Prevent Drop from running (which would shut down the channel)
4049        std::mem::forget(self);
4050    }
4051}
4052
4053impl WlanSoftmacBaseEnableBeaconingResponder {
4054    /// Sends a response to the FIDL transaction.
4055    ///
4056    /// Sets the channel to shutdown if an error occurs.
4057    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4058        let _result = self.send_raw(result);
4059        if _result.is_err() {
4060            self.control_handle.shutdown();
4061        }
4062        self.drop_without_shutdown();
4063        _result
4064    }
4065
4066    /// Similar to "send" but does not shutdown the channel if an error occurs.
4067    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4068        let _result = self.send_raw(result);
4069        self.drop_without_shutdown();
4070        _result
4071    }
4072
4073    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4074        self.control_handle
4075            .inner
4076            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4077                result,
4078                self.tx_id,
4079                0x6c35807632c64576,
4080                fidl::encoding::DynamicFlags::empty(),
4081            )
4082    }
4083}
4084
4085#[must_use = "FIDL methods require a response to be sent"]
4086#[derive(Debug)]
4087pub struct WlanSoftmacBaseDisableBeaconingResponder {
4088    control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4089    tx_id: u32,
4090}
4091
4092/// Set the the channel to be shutdown (see [`WlanSoftmacBaseControlHandle::shutdown`])
4093/// if the responder is dropped without sending a response, so that the client
4094/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4095impl std::ops::Drop for WlanSoftmacBaseDisableBeaconingResponder {
4096    fn drop(&mut self) {
4097        self.control_handle.shutdown();
4098        // Safety: drops once, never accessed again
4099        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4100    }
4101}
4102
4103impl fidl::endpoints::Responder for WlanSoftmacBaseDisableBeaconingResponder {
4104    type ControlHandle = WlanSoftmacBaseControlHandle;
4105
4106    fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4107        &self.control_handle
4108    }
4109
4110    fn drop_without_shutdown(mut self) {
4111        // Safety: drops once, never accessed again due to mem::forget
4112        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4113        // Prevent Drop from running (which would shut down the channel)
4114        std::mem::forget(self);
4115    }
4116}
4117
4118impl WlanSoftmacBaseDisableBeaconingResponder {
4119    /// Sends a response to the FIDL transaction.
4120    ///
4121    /// Sets the channel to shutdown if an error occurs.
4122    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4123        let _result = self.send_raw(result);
4124        if _result.is_err() {
4125            self.control_handle.shutdown();
4126        }
4127        self.drop_without_shutdown();
4128        _result
4129    }
4130
4131    /// Similar to "send" but does not shutdown the channel if an error occurs.
4132    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4133        let _result = self.send_raw(result);
4134        self.drop_without_shutdown();
4135        _result
4136    }
4137
4138    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4139        self.control_handle
4140            .inner
4141            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4142                result,
4143                self.tx_id,
4144                0x3303b30f99dbb406,
4145                fidl::encoding::DynamicFlags::empty(),
4146            )
4147    }
4148}
4149
4150#[must_use = "FIDL methods require a response to be sent"]
4151#[derive(Debug)]
4152pub struct WlanSoftmacBaseInstallKeyResponder {
4153    control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4154    tx_id: u32,
4155}
4156
4157/// Set the the channel to be shutdown (see [`WlanSoftmacBaseControlHandle::shutdown`])
4158/// if the responder is dropped without sending a response, so that the client
4159/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4160impl std::ops::Drop for WlanSoftmacBaseInstallKeyResponder {
4161    fn drop(&mut self) {
4162        self.control_handle.shutdown();
4163        // Safety: drops once, never accessed again
4164        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4165    }
4166}
4167
4168impl fidl::endpoints::Responder for WlanSoftmacBaseInstallKeyResponder {
4169    type ControlHandle = WlanSoftmacBaseControlHandle;
4170
4171    fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4172        &self.control_handle
4173    }
4174
4175    fn drop_without_shutdown(mut self) {
4176        // Safety: drops once, never accessed again due to mem::forget
4177        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4178        // Prevent Drop from running (which would shut down the channel)
4179        std::mem::forget(self);
4180    }
4181}
4182
4183impl WlanSoftmacBaseInstallKeyResponder {
4184    /// Sends a response to the FIDL transaction.
4185    ///
4186    /// Sets the channel to shutdown if an error occurs.
4187    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4188        let _result = self.send_raw(result);
4189        if _result.is_err() {
4190            self.control_handle.shutdown();
4191        }
4192        self.drop_without_shutdown();
4193        _result
4194    }
4195
4196    /// Similar to "send" but does not shutdown the channel if an error occurs.
4197    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4198        let _result = self.send_raw(result);
4199        self.drop_without_shutdown();
4200        _result
4201    }
4202
4203    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4204        self.control_handle
4205            .inner
4206            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4207                result,
4208                self.tx_id,
4209                0x7decf9b4200b9131,
4210                fidl::encoding::DynamicFlags::empty(),
4211            )
4212    }
4213}
4214
4215#[must_use = "FIDL methods require a response to be sent"]
4216#[derive(Debug)]
4217pub struct WlanSoftmacBaseNotifyAssociationCompleteResponder {
4218    control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4219    tx_id: u32,
4220}
4221
4222/// Set the the channel to be shutdown (see [`WlanSoftmacBaseControlHandle::shutdown`])
4223/// if the responder is dropped without sending a response, so that the client
4224/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4225impl std::ops::Drop for WlanSoftmacBaseNotifyAssociationCompleteResponder {
4226    fn drop(&mut self) {
4227        self.control_handle.shutdown();
4228        // Safety: drops once, never accessed again
4229        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4230    }
4231}
4232
4233impl fidl::endpoints::Responder for WlanSoftmacBaseNotifyAssociationCompleteResponder {
4234    type ControlHandle = WlanSoftmacBaseControlHandle;
4235
4236    fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4237        &self.control_handle
4238    }
4239
4240    fn drop_without_shutdown(mut self) {
4241        // Safety: drops once, never accessed again due to mem::forget
4242        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4243        // Prevent Drop from running (which would shut down the channel)
4244        std::mem::forget(self);
4245    }
4246}
4247
4248impl WlanSoftmacBaseNotifyAssociationCompleteResponder {
4249    /// Sends a response to the FIDL transaction.
4250    ///
4251    /// Sets the channel to shutdown if an error occurs.
4252    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4253        let _result = self.send_raw(result);
4254        if _result.is_err() {
4255            self.control_handle.shutdown();
4256        }
4257        self.drop_without_shutdown();
4258        _result
4259    }
4260
4261    /// Similar to "send" but does not shutdown the channel if an error occurs.
4262    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4263        let _result = self.send_raw(result);
4264        self.drop_without_shutdown();
4265        _result
4266    }
4267
4268    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4269        self.control_handle
4270            .inner
4271            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4272                result,
4273                self.tx_id,
4274                0x436ffe3ba461d6cd,
4275                fidl::encoding::DynamicFlags::empty(),
4276            )
4277    }
4278}
4279
4280#[must_use = "FIDL methods require a response to be sent"]
4281#[derive(Debug)]
4282pub struct WlanSoftmacBaseClearAssociationResponder {
4283    control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4284    tx_id: u32,
4285}
4286
4287/// Set the the channel to be shutdown (see [`WlanSoftmacBaseControlHandle::shutdown`])
4288/// if the responder is dropped without sending a response, so that the client
4289/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4290impl std::ops::Drop for WlanSoftmacBaseClearAssociationResponder {
4291    fn drop(&mut self) {
4292        self.control_handle.shutdown();
4293        // Safety: drops once, never accessed again
4294        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4295    }
4296}
4297
4298impl fidl::endpoints::Responder for WlanSoftmacBaseClearAssociationResponder {
4299    type ControlHandle = WlanSoftmacBaseControlHandle;
4300
4301    fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4302        &self.control_handle
4303    }
4304
4305    fn drop_without_shutdown(mut self) {
4306        // Safety: drops once, never accessed again due to mem::forget
4307        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4308        // Prevent Drop from running (which would shut down the channel)
4309        std::mem::forget(self);
4310    }
4311}
4312
4313impl WlanSoftmacBaseClearAssociationResponder {
4314    /// Sends a response to the FIDL transaction.
4315    ///
4316    /// Sets the channel to shutdown if an error occurs.
4317    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4318        let _result = self.send_raw(result);
4319        if _result.is_err() {
4320            self.control_handle.shutdown();
4321        }
4322        self.drop_without_shutdown();
4323        _result
4324    }
4325
4326    /// Similar to "send" but does not shutdown the channel if an error occurs.
4327    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4328        let _result = self.send_raw(result);
4329        self.drop_without_shutdown();
4330        _result
4331    }
4332
4333    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4334        self.control_handle
4335            .inner
4336            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4337                result,
4338                self.tx_id,
4339                0x581d76c39190a7dd,
4340                fidl::encoding::DynamicFlags::empty(),
4341            )
4342    }
4343}
4344
4345#[must_use = "FIDL methods require a response to be sent"]
4346#[derive(Debug)]
4347pub struct WlanSoftmacBaseStartPassiveScanResponder {
4348    control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4349    tx_id: u32,
4350}
4351
4352/// Set the the channel to be shutdown (see [`WlanSoftmacBaseControlHandle::shutdown`])
4353/// if the responder is dropped without sending a response, so that the client
4354/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4355impl std::ops::Drop for WlanSoftmacBaseStartPassiveScanResponder {
4356    fn drop(&mut self) {
4357        self.control_handle.shutdown();
4358        // Safety: drops once, never accessed again
4359        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4360    }
4361}
4362
4363impl fidl::endpoints::Responder for WlanSoftmacBaseStartPassiveScanResponder {
4364    type ControlHandle = WlanSoftmacBaseControlHandle;
4365
4366    fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4367        &self.control_handle
4368    }
4369
4370    fn drop_without_shutdown(mut self) {
4371        // Safety: drops once, never accessed again due to mem::forget
4372        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4373        // Prevent Drop from running (which would shut down the channel)
4374        std::mem::forget(self);
4375    }
4376}
4377
4378impl WlanSoftmacBaseStartPassiveScanResponder {
4379    /// Sends a response to the FIDL transaction.
4380    ///
4381    /// Sets the channel to shutdown if an error occurs.
4382    pub fn send(
4383        self,
4384        mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
4385    ) -> Result<(), fidl::Error> {
4386        let _result = self.send_raw(result);
4387        if _result.is_err() {
4388            self.control_handle.shutdown();
4389        }
4390        self.drop_without_shutdown();
4391        _result
4392    }
4393
4394    /// Similar to "send" but does not shutdown the channel if an error occurs.
4395    pub fn send_no_shutdown_on_err(
4396        self,
4397        mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
4398    ) -> Result<(), fidl::Error> {
4399        let _result = self.send_raw(result);
4400        self.drop_without_shutdown();
4401        _result
4402    }
4403
4404    fn send_raw(
4405        &self,
4406        mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
4407    ) -> Result<(), fidl::Error> {
4408        self.control_handle.inner.send::<fidl::encoding::ResultType<
4409            WlanSoftmacBaseStartPassiveScanResponse,
4410            i32,
4411        >>(
4412            result,
4413            self.tx_id,
4414            0x5662f989cb4083bb,
4415            fidl::encoding::DynamicFlags::empty(),
4416        )
4417    }
4418}
4419
4420#[must_use = "FIDL methods require a response to be sent"]
4421#[derive(Debug)]
4422pub struct WlanSoftmacBaseStartActiveScanResponder {
4423    control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4424    tx_id: u32,
4425}
4426
4427/// Set the the channel to be shutdown (see [`WlanSoftmacBaseControlHandle::shutdown`])
4428/// if the responder is dropped without sending a response, so that the client
4429/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4430impl std::ops::Drop for WlanSoftmacBaseStartActiveScanResponder {
4431    fn drop(&mut self) {
4432        self.control_handle.shutdown();
4433        // Safety: drops once, never accessed again
4434        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4435    }
4436}
4437
4438impl fidl::endpoints::Responder for WlanSoftmacBaseStartActiveScanResponder {
4439    type ControlHandle = WlanSoftmacBaseControlHandle;
4440
4441    fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4442        &self.control_handle
4443    }
4444
4445    fn drop_without_shutdown(mut self) {
4446        // Safety: drops once, never accessed again due to mem::forget
4447        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4448        // Prevent Drop from running (which would shut down the channel)
4449        std::mem::forget(self);
4450    }
4451}
4452
4453impl WlanSoftmacBaseStartActiveScanResponder {
4454    /// Sends a response to the FIDL transaction.
4455    ///
4456    /// Sets the channel to shutdown if an error occurs.
4457    pub fn send(
4458        self,
4459        mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
4460    ) -> Result<(), fidl::Error> {
4461        let _result = self.send_raw(result);
4462        if _result.is_err() {
4463            self.control_handle.shutdown();
4464        }
4465        self.drop_without_shutdown();
4466        _result
4467    }
4468
4469    /// Similar to "send" but does not shutdown the channel if an error occurs.
4470    pub fn send_no_shutdown_on_err(
4471        self,
4472        mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
4473    ) -> Result<(), fidl::Error> {
4474        let _result = self.send_raw(result);
4475        self.drop_without_shutdown();
4476        _result
4477    }
4478
4479    fn send_raw(
4480        &self,
4481        mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
4482    ) -> Result<(), fidl::Error> {
4483        self.control_handle.inner.send::<fidl::encoding::ResultType<
4484            WlanSoftmacBaseStartActiveScanResponse,
4485            i32,
4486        >>(
4487            result,
4488            self.tx_id,
4489            0x4896eafa9937751e,
4490            fidl::encoding::DynamicFlags::empty(),
4491        )
4492    }
4493}
4494
4495#[must_use = "FIDL methods require a response to be sent"]
4496#[derive(Debug)]
4497pub struct WlanSoftmacBaseCancelScanResponder {
4498    control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4499    tx_id: u32,
4500}
4501
4502/// Set the the channel to be shutdown (see [`WlanSoftmacBaseControlHandle::shutdown`])
4503/// if the responder is dropped without sending a response, so that the client
4504/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4505impl std::ops::Drop for WlanSoftmacBaseCancelScanResponder {
4506    fn drop(&mut self) {
4507        self.control_handle.shutdown();
4508        // Safety: drops once, never accessed again
4509        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4510    }
4511}
4512
4513impl fidl::endpoints::Responder for WlanSoftmacBaseCancelScanResponder {
4514    type ControlHandle = WlanSoftmacBaseControlHandle;
4515
4516    fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4517        &self.control_handle
4518    }
4519
4520    fn drop_without_shutdown(mut self) {
4521        // Safety: drops once, never accessed again due to mem::forget
4522        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4523        // Prevent Drop from running (which would shut down the channel)
4524        std::mem::forget(self);
4525    }
4526}
4527
4528impl WlanSoftmacBaseCancelScanResponder {
4529    /// Sends a response to the FIDL transaction.
4530    ///
4531    /// Sets the channel to shutdown if an error occurs.
4532    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4533        let _result = self.send_raw(result);
4534        if _result.is_err() {
4535            self.control_handle.shutdown();
4536        }
4537        self.drop_without_shutdown();
4538        _result
4539    }
4540
4541    /// Similar to "send" but does not shutdown the channel if an error occurs.
4542    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4543        let _result = self.send_raw(result);
4544        self.drop_without_shutdown();
4545        _result
4546    }
4547
4548    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4549        self.control_handle
4550            .inner
4551            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4552                result,
4553                self.tx_id,
4554                0xf7d859369764556,
4555                fidl::encoding::DynamicFlags::empty(),
4556            )
4557    }
4558}
4559
4560#[must_use = "FIDL methods require a response to be sent"]
4561#[derive(Debug)]
4562pub struct WlanSoftmacBaseUpdateWmmParametersResponder {
4563    control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4564    tx_id: u32,
4565}
4566
4567/// Set the the channel to be shutdown (see [`WlanSoftmacBaseControlHandle::shutdown`])
4568/// if the responder is dropped without sending a response, so that the client
4569/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4570impl std::ops::Drop for WlanSoftmacBaseUpdateWmmParametersResponder {
4571    fn drop(&mut self) {
4572        self.control_handle.shutdown();
4573        // Safety: drops once, never accessed again
4574        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4575    }
4576}
4577
4578impl fidl::endpoints::Responder for WlanSoftmacBaseUpdateWmmParametersResponder {
4579    type ControlHandle = WlanSoftmacBaseControlHandle;
4580
4581    fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4582        &self.control_handle
4583    }
4584
4585    fn drop_without_shutdown(mut self) {
4586        // Safety: drops once, never accessed again due to mem::forget
4587        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4588        // Prevent Drop from running (which would shut down the channel)
4589        std::mem::forget(self);
4590    }
4591}
4592
4593impl WlanSoftmacBaseUpdateWmmParametersResponder {
4594    /// Sends a response to the FIDL transaction.
4595    ///
4596    /// Sets the channel to shutdown if an error occurs.
4597    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4598        let _result = self.send_raw(result);
4599        if _result.is_err() {
4600            self.control_handle.shutdown();
4601        }
4602        self.drop_without_shutdown();
4603        _result
4604    }
4605
4606    /// Similar to "send" but does not shutdown the channel if an error occurs.
4607    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4608        let _result = self.send_raw(result);
4609        self.drop_without_shutdown();
4610        _result
4611    }
4612
4613    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4614        self.control_handle
4615            .inner
4616            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4617                result,
4618                self.tx_id,
4619                0x68522c7122d5f78c,
4620                fidl::encoding::DynamicFlags::empty(),
4621            )
4622    }
4623}
4624
4625#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4626pub struct WlanSoftmacBridgeMarker;
4627
4628impl fidl::endpoints::ProtocolMarker for WlanSoftmacBridgeMarker {
4629    type Proxy = WlanSoftmacBridgeProxy;
4630    type RequestStream = WlanSoftmacBridgeRequestStream;
4631    #[cfg(target_os = "fuchsia")]
4632    type SynchronousProxy = WlanSoftmacBridgeSynchronousProxy;
4633
4634    const DEBUG_NAME: &'static str = "(anonymous) WlanSoftmacBridge";
4635}
4636pub type WlanSoftmacBridgeStartResult = Result<fidl::Channel, i32>;
4637
4638pub trait WlanSoftmacBridgeProxyInterface: Send + Sync {
4639    type QueryResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseQueryResult, fidl::Error>>
4640        + Send;
4641    fn r#query(&self) -> Self::QueryResponseFut;
4642    type QueryDiscoverySupportResponseFut: std::future::Future<
4643            Output = Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error>,
4644        > + Send;
4645    fn r#query_discovery_support(&self) -> Self::QueryDiscoverySupportResponseFut;
4646    type QueryMacSublayerSupportResponseFut: std::future::Future<
4647            Output = Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error>,
4648        > + Send;
4649    fn r#query_mac_sublayer_support(&self) -> Self::QueryMacSublayerSupportResponseFut;
4650    type QuerySecuritySupportResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error>>
4651        + Send;
4652    fn r#query_security_support(&self) -> Self::QuerySecuritySupportResponseFut;
4653    type QuerySpectrumManagementSupportResponseFut: std::future::Future<
4654            Output = Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error>,
4655        > + Send;
4656    fn r#query_spectrum_management_support(
4657        &self,
4658    ) -> Self::QuerySpectrumManagementSupportResponseFut;
4659    type SetChannelResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseSetChannelResult, fidl::Error>>
4660        + Send;
4661    fn r#set_channel(
4662        &self,
4663        payload: &WlanSoftmacBaseSetChannelRequest,
4664    ) -> Self::SetChannelResponseFut;
4665    type JoinBssResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseJoinBssResult, fidl::Error>>
4666        + Send;
4667    fn r#join_bss(
4668        &self,
4669        join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
4670    ) -> Self::JoinBssResponseFut;
4671    type EnableBeaconingResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error>>
4672        + Send;
4673    fn r#enable_beaconing(
4674        &self,
4675        payload: &WlanSoftmacBaseEnableBeaconingRequest,
4676    ) -> Self::EnableBeaconingResponseFut;
4677    type DisableBeaconingResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error>>
4678        + Send;
4679    fn r#disable_beaconing(&self) -> Self::DisableBeaconingResponseFut;
4680    type InstallKeyResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseInstallKeyResult, fidl::Error>>
4681        + Send;
4682    fn r#install_key(&self, payload: &WlanKeyConfiguration) -> Self::InstallKeyResponseFut;
4683    type NotifyAssociationCompleteResponseFut: std::future::Future<
4684            Output = Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error>,
4685        > + Send;
4686    fn r#notify_association_complete(
4687        &self,
4688        assoc_cfg: &WlanAssociationConfig,
4689    ) -> Self::NotifyAssociationCompleteResponseFut;
4690    type ClearAssociationResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseClearAssociationResult, fidl::Error>>
4691        + Send;
4692    fn r#clear_association(
4693        &self,
4694        payload: &WlanSoftmacBaseClearAssociationRequest,
4695    ) -> Self::ClearAssociationResponseFut;
4696    type StartPassiveScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error>>
4697        + Send;
4698    fn r#start_passive_scan(
4699        &self,
4700        payload: &WlanSoftmacBaseStartPassiveScanRequest,
4701    ) -> Self::StartPassiveScanResponseFut;
4702    type StartActiveScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error>>
4703        + Send;
4704    fn r#start_active_scan(
4705        &self,
4706        payload: &WlanSoftmacStartActiveScanRequest,
4707    ) -> Self::StartActiveScanResponseFut;
4708    type CancelScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseCancelScanResult, fidl::Error>>
4709        + Send;
4710    fn r#cancel_scan(
4711        &self,
4712        payload: &WlanSoftmacBaseCancelScanRequest,
4713    ) -> Self::CancelScanResponseFut;
4714    type UpdateWmmParametersResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error>>
4715        + Send;
4716    fn r#update_wmm_parameters(
4717        &self,
4718        payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
4719    ) -> Self::UpdateWmmParametersResponseFut;
4720    type StartResponseFut: std::future::Future<Output = Result<WlanSoftmacBridgeStartResult, fidl::Error>>
4721        + Send;
4722    fn r#start(
4723        &self,
4724        ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
4725        ethernet_tx: u64,
4726        wlan_rx: u64,
4727    ) -> Self::StartResponseFut;
4728    type SetEthernetStatusResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
4729    fn r#set_ethernet_status(&self, status: u32) -> Self::SetEthernetStatusResponseFut;
4730}
4731#[derive(Debug)]
4732#[cfg(target_os = "fuchsia")]
4733pub struct WlanSoftmacBridgeSynchronousProxy {
4734    client: fidl::client::sync::Client,
4735}
4736
4737#[cfg(target_os = "fuchsia")]
4738impl fidl::endpoints::SynchronousProxy for WlanSoftmacBridgeSynchronousProxy {
4739    type Proxy = WlanSoftmacBridgeProxy;
4740    type Protocol = WlanSoftmacBridgeMarker;
4741
4742    fn from_channel(inner: fidl::Channel) -> Self {
4743        Self::new(inner)
4744    }
4745
4746    fn into_channel(self) -> fidl::Channel {
4747        self.client.into_channel()
4748    }
4749
4750    fn as_channel(&self) -> &fidl::Channel {
4751        self.client.as_channel()
4752    }
4753}
4754
4755#[cfg(target_os = "fuchsia")]
4756impl WlanSoftmacBridgeSynchronousProxy {
4757    pub fn new(channel: fidl::Channel) -> Self {
4758        let protocol_name =
4759            <WlanSoftmacBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4760        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
4761    }
4762
4763    pub fn into_channel(self) -> fidl::Channel {
4764        self.client.into_channel()
4765    }
4766
4767    /// Waits until an event arrives and returns it. It is safe for other
4768    /// threads to make concurrent requests while waiting for an event.
4769    pub fn wait_for_event(
4770        &self,
4771        deadline: zx::MonotonicInstant,
4772    ) -> Result<WlanSoftmacBridgeEvent, fidl::Error> {
4773        WlanSoftmacBridgeEvent::decode(self.client.wait_for_event(deadline)?)
4774    }
4775
4776    /// Gets general information about the device and its supported features.
4777    /// This method is safe to call even when the SoftMAC has not yet started.
4778    ///
4779    /// Note: The implementation of this method must not depend on a response
4780    /// from an ethernet driver, otherwise there is a risk of deadlock.
4781    /// The wlansoftmac driver calls this method synchronously while
4782    /// serving the fuchsia.hardware.ethernet/EthernetImpl.Query method.
4783    pub fn r#query(
4784        &self,
4785        ___deadline: zx::MonotonicInstant,
4786    ) -> Result<WlanSoftmacBaseQueryResult, fidl::Error> {
4787        let _response = self.client.send_query::<
4788            fidl::encoding::EmptyPayload,
4789            fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>,
4790        >(
4791            (),
4792            0x18231a638e508f9d,
4793            fidl::encoding::DynamicFlags::empty(),
4794            ___deadline,
4795        )?;
4796        Ok(_response.map(|x| x))
4797    }
4798
4799    /// Gets information about the station discovery (e.g., scanning and
4800    /// probing) features supported by the device. This method is safe to call
4801    /// even when the SoftMAC has not yet started.
4802    pub fn r#query_discovery_support(
4803        &self,
4804        ___deadline: zx::MonotonicInstant,
4805    ) -> Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error> {
4806        let _response =
4807            self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
4808                WlanSoftmacBaseQueryDiscoverySupportResponse,
4809                i32,
4810            >>(
4811                (),
4812                0x16797affc0cb58ae,
4813                fidl::encoding::DynamicFlags::empty(),
4814                ___deadline,
4815            )?;
4816        Ok(_response.map(|x| x.resp))
4817    }
4818
4819    /// Gets information about the MAC features supported by the device. This
4820    /// method is safe to call even when the SoftMAC has not yet started.
4821    ///
4822    /// Note: The implementation of this method must not depend on a response
4823    /// from an ethernet driver, otherwise there is a risk of deadlock.
4824    /// The wlansoftmac driver calls this method synchronously while
4825    /// serving the fuchsia.hardware.ethernet/EthernetImpl.Query method.
4826    pub fn r#query_mac_sublayer_support(
4827        &self,
4828        ___deadline: zx::MonotonicInstant,
4829    ) -> Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error> {
4830        let _response =
4831            self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
4832                WlanSoftmacBaseQueryMacSublayerSupportResponse,
4833                i32,
4834            >>(
4835                (),
4836                0x7302c3f8c131f075,
4837                fidl::encoding::DynamicFlags::empty(),
4838                ___deadline,
4839            )?;
4840        Ok(_response.map(|x| x.resp))
4841    }
4842
4843    /// Gets information about the security features supported by the device.
4844    /// This method is safe to call even when the SoftMAC has not yet started.
4845    pub fn r#query_security_support(
4846        &self,
4847        ___deadline: zx::MonotonicInstant,
4848    ) -> Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error> {
4849        let _response =
4850            self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
4851                WlanSoftmacBaseQuerySecuritySupportResponse,
4852                i32,
4853            >>(
4854                (),
4855                0x3691bb75abf6354,
4856                fidl::encoding::DynamicFlags::empty(),
4857                ___deadline,
4858            )?;
4859        Ok(_response.map(|x| x.resp))
4860    }
4861
4862    /// Gets information about the spectrum usage (e.g., DFS) features supported
4863    /// by the device. This method is safe to call even when the SoftMAC has not
4864    /// yet started.
4865    pub fn r#query_spectrum_management_support(
4866        &self,
4867        ___deadline: zx::MonotonicInstant,
4868    ) -> Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error> {
4869        let _response = self
4870            .client
4871            .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
4872                WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
4873                i32,
4874            >>(
4875                (), 0x347d78dc1d4d27bf, fidl::encoding::DynamicFlags::empty(), ___deadline
4876            )?;
4877        Ok(_response.map(|x| x.resp))
4878    }
4879
4880    /// Set the primary radio channel, e.g. in response to a channel switch event.
4881    /// If successful, this will trigger the channel switch immediately. This may
4882    /// impact the transmission of any frames that are in-flight, and might also
4883    /// interfere with an ongoing scan request.
4884    ///
4885    /// Common errors include: \
4886    ///   ZX_ERR_NOT_SUPPORTED: The device cannot switch to the requested channel.
4887    pub fn r#set_channel(
4888        &self,
4889        mut payload: &WlanSoftmacBaseSetChannelRequest,
4890        ___deadline: zx::MonotonicInstant,
4891    ) -> Result<WlanSoftmacBaseSetChannelResult, fidl::Error> {
4892        let _response = self.client.send_query::<
4893            WlanSoftmacBaseSetChannelRequest,
4894            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4895        >(
4896            payload,
4897            0x12836b533cd63ece,
4898            fidl::encoding::DynamicFlags::empty(),
4899            ___deadline,
4900        )?;
4901        Ok(_response.map(|x| x))
4902    }
4903
4904    /// Join a specific BSS in which we will participate.
4905    /// This applies regardless of if we are hosting the BSS or joining it
4906    /// (indicated by the `remote` flag in `JoinBssRequest`).
4907    /// If successful, the device will switch to the correct channel and perform
4908    /// any internal filtering/timing operations required to join the BSS.
4909    /// For client STAs, this is the first step before authenticating.
4910    ///
4911    /// Common errors include: \
4912    ///   ZX_ERR_NOT_SUPPORTED: The device does not support the given bss config.
4913    pub fn r#join_bss(
4914        &self,
4915        mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
4916        ___deadline: zx::MonotonicInstant,
4917    ) -> Result<WlanSoftmacBaseJoinBssResult, fidl::Error> {
4918        let _response = self.client.send_query::<
4919            WlanSoftmacBaseJoinBssRequest,
4920            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4921        >(
4922            (join_request,),
4923            0x1336fb5455b77a6e,
4924            fidl::encoding::DynamicFlags::empty(),
4925            ___deadline,
4926        )?;
4927        Ok(_response.map(|x| x))
4928    }
4929
4930    /// Enables hardware Beaconing.
4931    ///
4932    /// This method cannot be called while beaconing is enabled and so
4933    /// `DisableBeaconing` must be called prior to this method if beaconing is
4934    /// enabled.
4935    ///
4936    /// All request fields are required.
4937    ///
4938    /// Common errors include:
4939    ///
4940    /// - `ZX_ERR_NOT_SUPPORTED`: The device does not support hardware beacons.
4941    /// - `ZX_ERR_INVALID_ARGS`: The device cannot transmit the requested
4942    ///                          beacon.
4943    /// - `ZX_ERR_BAD_STATE`: The device is already beaconing.
4944    pub fn r#enable_beaconing(
4945        &self,
4946        mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
4947        ___deadline: zx::MonotonicInstant,
4948    ) -> Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error> {
4949        let _response = self.client.send_query::<
4950            WlanSoftmacBaseEnableBeaconingRequest,
4951            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4952        >(
4953            payload,
4954            0x6c35807632c64576,
4955            fidl::encoding::DynamicFlags::empty(),
4956            ___deadline,
4957        )?;
4958        Ok(_response.map(|x| x))
4959    }
4960
4961    /// Disables hardware beaconing.
4962    pub fn r#disable_beaconing(
4963        &self,
4964        ___deadline: zx::MonotonicInstant,
4965    ) -> Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error> {
4966        let _response = self.client.send_query::<
4967            fidl::encoding::EmptyPayload,
4968            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4969        >(
4970            (),
4971            0x3303b30f99dbb406,
4972            fidl::encoding::DynamicFlags::empty(),
4973            ___deadline,
4974        )?;
4975        Ok(_response.map(|x| x))
4976    }
4977
4978    /// Install a key for encryption when transmitting or receiving protected
4979    /// frames.
4980    ///
4981    /// Common errors include:
4982    ///   ZX_ERR_INVALID_ARGS: The given config does not specify a valid key.
4983    ///   ZX_ERR_NOT_SUPPORTED: The device does not support the given cipher.
4984    pub fn r#install_key(
4985        &self,
4986        mut payload: &WlanKeyConfiguration,
4987        ___deadline: zx::MonotonicInstant,
4988    ) -> Result<WlanSoftmacBaseInstallKeyResult, fidl::Error> {
4989        let _response = self.client.send_query::<
4990            WlanKeyConfiguration,
4991            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4992        >(
4993            payload,
4994            0x7decf9b4200b9131,
4995            fidl::encoding::DynamicFlags::empty(),
4996            ___deadline,
4997        )?;
4998        Ok(_response.map(|x| x))
4999    }
5000
5001    /// Notifies the device of a successful association and configures
5002    /// additional parameters necessary to participate in that association.
5003    ///
5004    /// # Errors
5005    ///
5006    /// Common errors include:
5007    ///
5008    /// - `ZX_ERR_BAD_STATE`: The device was not previously informed of this BSS
5009    ///                       via `WlanSoftmac.JoinBss`.
5010    pub fn r#notify_association_complete(
5011        &self,
5012        mut assoc_cfg: &WlanAssociationConfig,
5013        ___deadline: zx::MonotonicInstant,
5014    ) -> Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error> {
5015        let _response = self.client.send_query::<
5016            WlanSoftmacBaseNotifyAssociationCompleteRequest,
5017            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5018        >(
5019            (assoc_cfg,),
5020            0x436ffe3ba461d6cd,
5021            fidl::encoding::DynamicFlags::empty(),
5022            ___deadline,
5023        )?;
5024        Ok(_response.map(|x| x))
5025    }
5026
5027    /// Notifies MAC and PHY that the peer has been de-associated.
5028    pub fn r#clear_association(
5029        &self,
5030        mut payload: &WlanSoftmacBaseClearAssociationRequest,
5031        ___deadline: zx::MonotonicInstant,
5032    ) -> Result<WlanSoftmacBaseClearAssociationResult, fidl::Error> {
5033        let _response = self.client.send_query::<
5034            WlanSoftmacBaseClearAssociationRequest,
5035            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5036        >(
5037            payload,
5038            0x581d76c39190a7dd,
5039            fidl::encoding::DynamicFlags::empty(),
5040            ___deadline,
5041        )?;
5042        Ok(_response.map(|x| x))
5043    }
5044
5045    /// Starts a passive scan. The server will deliver scan results
5046    /// as Beacon frames using WlanSoftmacIfc.Recv(). When complete,
5047    /// the server will call WlanSoftmacIfc.ScanComplete() with the
5048    /// same `scan_id` returned by StartPassiveScan().
5049    ///
5050    /// The server indicates support for `StartPassiveScan()` using
5051    /// `fuchsia.wlan.common/ScanOffloadExtension.supported`.
5052    ///
5053    /// Common errors include:
5054    ///   ZX_ERR_INVALID_ARGS: The device is not capable of performing the
5055    ///       requested scan, e.g. because an incompatible channel was requested.
5056    ///   ZX_ERR_UNAVAILABLE: The device cannot currently perform scans.
5057    ///   ZX_ERR_SHOULD_WAIT: Another scan is already in-progress.
5058    pub fn r#start_passive_scan(
5059        &self,
5060        mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
5061        ___deadline: zx::MonotonicInstant,
5062    ) -> Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error> {
5063        let _response = self.client.send_query::<
5064            WlanSoftmacBaseStartPassiveScanRequest,
5065            fidl::encoding::ResultType<WlanSoftmacBaseStartPassiveScanResponse, i32>,
5066        >(
5067            payload,
5068            0x5662f989cb4083bb,
5069            fidl::encoding::DynamicFlags::empty(),
5070            ___deadline,
5071        )?;
5072        Ok(_response.map(|x| x))
5073    }
5074
5075    /// Starts an active scan. The server will deliver scan results
5076    /// as Beacon or Probe Response frames using WlanSoftmacIfc.Recv().
5077    /// When complete, the server will call WlanSoftmacIfc.ScanComplete()
5078    /// with the same `scan_id` returned by StartActiveScan().
5079    ///
5080    /// A device driver indicates support for `StartActiveScan()` using
5081    /// `fuchsia.wlan.common/ProbeRequestOffloadExtension.supported`.
5082    ///
5083    /// Common errors include:
5084    ///   ZX_ERR_INVALID_ARGS: The device is not capable of performing the
5085    ///       requested scan, e.g. because an incompatible channel was requested.
5086    ///   ZX_ERR_UNAVAILABLE: The device cannot currently perform scans.
5087    ///   ZX_ERR_SHOULD_WAIT: Another scan is already in-progress.
5088    pub fn r#start_active_scan(
5089        &self,
5090        mut payload: &WlanSoftmacStartActiveScanRequest,
5091        ___deadline: zx::MonotonicInstant,
5092    ) -> Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error> {
5093        let _response = self.client.send_query::<
5094            WlanSoftmacStartActiveScanRequest,
5095            fidl::encoding::ResultType<WlanSoftmacBaseStartActiveScanResponse, i32>,
5096        >(
5097            payload,
5098            0x4896eafa9937751e,
5099            fidl::encoding::DynamicFlags::empty(),
5100            ___deadline,
5101        )?;
5102        Ok(_response.map(|x| x))
5103    }
5104
5105    /// Cancels the ongoing scan corresponding to `scan_id`,
5106    /// where `scan_id` is an identifier returned by
5107    /// `StartPassiveScan()` or `StartActiveScan()`. If cancellation succeeds,
5108    /// the server will soon call WlanSoftmacIfc.ScanComplete() with the same
5109    /// `scan_id`.
5110    ///
5111    /// A device driver indicates support for `CancelScan()` using
5112    /// `fuchsia.wlan.common/ScanOffloadExtension.scan_cancel_supported`.
5113    ///
5114    /// Common errors include:
5115    ///
5116    /// - `ZX_ERR_NOT_FOUND`: `scan_id` does not match an ongoing scan.
5117    /// - `ZX_ERR_NOT_SUPPORTED`: Server does not support scan cancellation.
5118    pub fn r#cancel_scan(
5119        &self,
5120        mut payload: &WlanSoftmacBaseCancelScanRequest,
5121        ___deadline: zx::MonotonicInstant,
5122    ) -> Result<WlanSoftmacBaseCancelScanResult, fidl::Error> {
5123        let _response = self.client.send_query::<
5124            WlanSoftmacBaseCancelScanRequest,
5125            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5126        >(
5127            payload,
5128            0xf7d859369764556,
5129            fidl::encoding::DynamicFlags::empty(),
5130            ___deadline,
5131        )?;
5132        Ok(_response.map(|x| x))
5133    }
5134
5135    /// Indicate the device of modified WiFi Multimedia (WMM) parameters for a
5136    /// particular access category (AC).
5137    pub fn r#update_wmm_parameters(
5138        &self,
5139        mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
5140        ___deadline: zx::MonotonicInstant,
5141    ) -> Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error> {
5142        let _response = self.client.send_query::<
5143            WlanSoftmacBaseUpdateWmmParametersRequest,
5144            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5145        >(
5146            payload,
5147            0x68522c7122d5f78c,
5148            fidl::encoding::DynamicFlags::empty(),
5149            ___deadline,
5150        )?;
5151        Ok(_response.map(|x| x))
5152    }
5153
5154    /// Signal to the server that the MLME for the iface is ready to send and receive
5155    /// frames.
5156    ///
5157    /// The client provides the following arguments:
5158    ///
5159    ///   - `ifc_bridge`: The client end of a `WlanSoftmacIfcBridge` server which the
5160    ///     `wlansoftmac` driver will use to forward `WlanSoftmacIfc` events to
5161    ///     the bridged driver.
5162    ///   - `ethernet_tx`: A `ethernet_tx_t*` casted to a `uint64`. The
5163    ///     `ethernet_tx_t` is defined in
5164    ///     `//src/connectivity/wlan/drivers/wlansoftmac/rust_driver/c-binding/bindings.h`.
5165    ///   - `wlan_rx`: A `wlan_rx_t*` casted to a `uint64`. The
5166    ///     `wlan_rx_t` is defined in
5167    ///     `//src/connectivity/wlan/drivers/wlansoftmac/rust_driver/c-binding/bindings.h`.
5168    ///
5169    /// The server must copy the contents of `ethernet_tx_t` and `wlan_rx_t` before
5170    /// returning from this method. The lifetimes of `ethernet_tx_t*` and `wlan_rx_t*` are only as
5171    /// long as this method call, but the contents of `ethernet_tx_t` and `wlan_rx_t` will
5172    /// live until the server stops the MLME.
5173    ///
5174    /// The server returns a server end of a `fuchsia.wlan.mlme/MLME` protocol. The SME
5175    /// for the iface owns the client end. Thus, this channel is used for SME <-> MLME
5176    /// communication.
5177    ///
5178    /// The `WlanSoftmacBridge.Start` method is different from `WlanSoftmac.Start`
5179    /// for two reasons. First, Rust bindings do not exist for Driver transported
5180    /// protocols, so `WlanSoftmacIfcBridge` protocol must be Zircon transported to be
5181    /// usable by the bridged driver. Second, the Zircon transport adds
5182    /// significant latency compared to the Driver transport. As a result, the
5183    /// `ethernet_tx` and `wlan_rx` arguments provide an FFI for the wlansoftmac driver
5184    /// to send Ethernet and receive WLAN packets to the bridged driver with
5185    /// latency comparable or better than a Driver transported protocol.
5186    ///
5187    /// Except where noted, `WlanSoftmacBridge` methods must only be called after
5188    /// a successful call to `WlanSoftmacBridge.Start`.
5189    ///
5190    /// Common errors include:
5191    ///
5192    ///   - `ZX_ERR_ALREADY_BOUND`: `Start` was already called on this softmac.
5193    pub fn r#start(
5194        &self,
5195        mut ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
5196        mut ethernet_tx: u64,
5197        mut wlan_rx: u64,
5198        ___deadline: zx::MonotonicInstant,
5199    ) -> Result<WlanSoftmacBridgeStartResult, fidl::Error> {
5200        let _response = self.client.send_query::<
5201            WlanSoftmacBridgeStartRequest,
5202            fidl::encoding::ResultType<WlanSoftmacBridgeStartResponse, i32>,
5203        >(
5204            (ifc_bridge, ethernet_tx, wlan_rx,),
5205            0x7b2c15a507020d4d,
5206            fidl::encoding::DynamicFlags::empty(),
5207            ___deadline,
5208        )?;
5209        Ok(_response.map(|x| x.sme_channel))
5210    }
5211
5212    /// Forwards a status containing `ETHERNET_STATUS_*` flags to the
5213    /// `fuchsia.hardware.ethernet/EthernetImplIfc` proxy owned by
5214    /// the C++ portion of wlansoftmac.
5215    ///
5216    /// As documented, the value of `status` is set by bits defined in
5217    /// `ETHERNET_STATUS_*` flags. However, there is only one flag named
5218    /// `ETHERNET_STATUS_ONLINE` and no specification of for the meaning
5219    /// of specifying no flags. In practice, `0x1` means the status is up,
5220    /// and `0x0` means the status is down.
5221    ///
5222    /// While this method should belong in something like an
5223    /// "`EthernetImplIfcBridge` protocol", it's included in the
5224    /// `WlanSoftmacBridge` protocol as a convenience. The wlansoftmac driver
5225    /// will eventually cease using a `fuchsia.hardware.ethernet/EthernetImplIfc`
5226    /// proxy and use a `fuchsia.hardware.network.driver/NetworkDeviceIfc`
5227    /// proxy instead. At that time, an equivalent of this method should be
5228    /// refactored into a separate bridge.
5229    pub fn r#set_ethernet_status(
5230        &self,
5231        mut status: u32,
5232        ___deadline: zx::MonotonicInstant,
5233    ) -> Result<(), fidl::Error> {
5234        let _response = self
5235            .client
5236            .send_query::<WlanSoftmacBridgeSetEthernetStatusRequest, fidl::encoding::EmptyPayload>(
5237                (status,),
5238                0x412503cb3aaa350b,
5239                fidl::encoding::DynamicFlags::empty(),
5240                ___deadline,
5241            )?;
5242        Ok(_response)
5243    }
5244}
5245
5246#[cfg(target_os = "fuchsia")]
5247impl From<WlanSoftmacBridgeSynchronousProxy> for zx::Handle {
5248    fn from(value: WlanSoftmacBridgeSynchronousProxy) -> Self {
5249        value.into_channel().into()
5250    }
5251}
5252
5253#[cfg(target_os = "fuchsia")]
5254impl From<fidl::Channel> for WlanSoftmacBridgeSynchronousProxy {
5255    fn from(value: fidl::Channel) -> Self {
5256        Self::new(value)
5257    }
5258}
5259
5260#[cfg(target_os = "fuchsia")]
5261impl fidl::endpoints::FromClient for WlanSoftmacBridgeSynchronousProxy {
5262    type Protocol = WlanSoftmacBridgeMarker;
5263
5264    fn from_client(value: fidl::endpoints::ClientEnd<WlanSoftmacBridgeMarker>) -> Self {
5265        Self::new(value.into_channel())
5266    }
5267}
5268
5269#[derive(Debug, Clone)]
5270pub struct WlanSoftmacBridgeProxy {
5271    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
5272}
5273
5274impl fidl::endpoints::Proxy for WlanSoftmacBridgeProxy {
5275    type Protocol = WlanSoftmacBridgeMarker;
5276
5277    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
5278        Self::new(inner)
5279    }
5280
5281    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
5282        self.client.into_channel().map_err(|client| Self { client })
5283    }
5284
5285    fn as_channel(&self) -> &::fidl::AsyncChannel {
5286        self.client.as_channel()
5287    }
5288}
5289
5290impl WlanSoftmacBridgeProxy {
5291    /// Create a new Proxy for fuchsia.wlan.softmac/WlanSoftmacBridge.
5292    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
5293        let protocol_name =
5294            <WlanSoftmacBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5295        Self { client: fidl::client::Client::new(channel, protocol_name) }
5296    }
5297
5298    /// Get a Stream of events from the remote end of the protocol.
5299    ///
5300    /// # Panics
5301    ///
5302    /// Panics if the event stream was already taken.
5303    pub fn take_event_stream(&self) -> WlanSoftmacBridgeEventStream {
5304        WlanSoftmacBridgeEventStream { event_receiver: self.client.take_event_receiver() }
5305    }
5306
5307    /// Gets general information about the device and its supported features.
5308    /// This method is safe to call even when the SoftMAC has not yet started.
5309    ///
5310    /// Note: The implementation of this method must not depend on a response
5311    /// from an ethernet driver, otherwise there is a risk of deadlock.
5312    /// The wlansoftmac driver calls this method synchronously while
5313    /// serving the fuchsia.hardware.ethernet/EthernetImpl.Query method.
5314    pub fn r#query(
5315        &self,
5316    ) -> fidl::client::QueryResponseFut<
5317        WlanSoftmacBaseQueryResult,
5318        fidl::encoding::DefaultFuchsiaResourceDialect,
5319    > {
5320        WlanSoftmacBridgeProxyInterface::r#query(self)
5321    }
5322
5323    /// Gets information about the station discovery (e.g., scanning and
5324    /// probing) features supported by the device. This method is safe to call
5325    /// even when the SoftMAC has not yet started.
5326    pub fn r#query_discovery_support(
5327        &self,
5328    ) -> fidl::client::QueryResponseFut<
5329        WlanSoftmacBaseQueryDiscoverySupportResult,
5330        fidl::encoding::DefaultFuchsiaResourceDialect,
5331    > {
5332        WlanSoftmacBridgeProxyInterface::r#query_discovery_support(self)
5333    }
5334
5335    /// Gets information about the MAC features supported by the device. This
5336    /// method is safe to call even when the SoftMAC has not yet started.
5337    ///
5338    /// Note: The implementation of this method must not depend on a response
5339    /// from an ethernet driver, otherwise there is a risk of deadlock.
5340    /// The wlansoftmac driver calls this method synchronously while
5341    /// serving the fuchsia.hardware.ethernet/EthernetImpl.Query method.
5342    pub fn r#query_mac_sublayer_support(
5343        &self,
5344    ) -> fidl::client::QueryResponseFut<
5345        WlanSoftmacBaseQueryMacSublayerSupportResult,
5346        fidl::encoding::DefaultFuchsiaResourceDialect,
5347    > {
5348        WlanSoftmacBridgeProxyInterface::r#query_mac_sublayer_support(self)
5349    }
5350
5351    /// Gets information about the security features supported by the device.
5352    /// This method is safe to call even when the SoftMAC has not yet started.
5353    pub fn r#query_security_support(
5354        &self,
5355    ) -> fidl::client::QueryResponseFut<
5356        WlanSoftmacBaseQuerySecuritySupportResult,
5357        fidl::encoding::DefaultFuchsiaResourceDialect,
5358    > {
5359        WlanSoftmacBridgeProxyInterface::r#query_security_support(self)
5360    }
5361
5362    /// Gets information about the spectrum usage (e.g., DFS) features supported
5363    /// by the device. This method is safe to call even when the SoftMAC has not
5364    /// yet started.
5365    pub fn r#query_spectrum_management_support(
5366        &self,
5367    ) -> fidl::client::QueryResponseFut<
5368        WlanSoftmacBaseQuerySpectrumManagementSupportResult,
5369        fidl::encoding::DefaultFuchsiaResourceDialect,
5370    > {
5371        WlanSoftmacBridgeProxyInterface::r#query_spectrum_management_support(self)
5372    }
5373
5374    /// Set the primary radio channel, e.g. in response to a channel switch event.
5375    /// If successful, this will trigger the channel switch immediately. This may
5376    /// impact the transmission of any frames that are in-flight, and might also
5377    /// interfere with an ongoing scan request.
5378    ///
5379    /// Common errors include: \
5380    ///   ZX_ERR_NOT_SUPPORTED: The device cannot switch to the requested channel.
5381    pub fn r#set_channel(
5382        &self,
5383        mut payload: &WlanSoftmacBaseSetChannelRequest,
5384    ) -> fidl::client::QueryResponseFut<
5385        WlanSoftmacBaseSetChannelResult,
5386        fidl::encoding::DefaultFuchsiaResourceDialect,
5387    > {
5388        WlanSoftmacBridgeProxyInterface::r#set_channel(self, payload)
5389    }
5390
5391    /// Join a specific BSS in which we will participate.
5392    /// This applies regardless of if we are hosting the BSS or joining it
5393    /// (indicated by the `remote` flag in `JoinBssRequest`).
5394    /// If successful, the device will switch to the correct channel and perform
5395    /// any internal filtering/timing operations required to join the BSS.
5396    /// For client STAs, this is the first step before authenticating.
5397    ///
5398    /// Common errors include: \
5399    ///   ZX_ERR_NOT_SUPPORTED: The device does not support the given bss config.
5400    pub fn r#join_bss(
5401        &self,
5402        mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
5403    ) -> fidl::client::QueryResponseFut<
5404        WlanSoftmacBaseJoinBssResult,
5405        fidl::encoding::DefaultFuchsiaResourceDialect,
5406    > {
5407        WlanSoftmacBridgeProxyInterface::r#join_bss(self, join_request)
5408    }
5409
5410    /// Enables hardware Beaconing.
5411    ///
5412    /// This method cannot be called while beaconing is enabled and so
5413    /// `DisableBeaconing` must be called prior to this method if beaconing is
5414    /// enabled.
5415    ///
5416    /// All request fields are required.
5417    ///
5418    /// Common errors include:
5419    ///
5420    /// - `ZX_ERR_NOT_SUPPORTED`: The device does not support hardware beacons.
5421    /// - `ZX_ERR_INVALID_ARGS`: The device cannot transmit the requested
5422    ///                          beacon.
5423    /// - `ZX_ERR_BAD_STATE`: The device is already beaconing.
5424    pub fn r#enable_beaconing(
5425        &self,
5426        mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
5427    ) -> fidl::client::QueryResponseFut<
5428        WlanSoftmacBaseEnableBeaconingResult,
5429        fidl::encoding::DefaultFuchsiaResourceDialect,
5430    > {
5431        WlanSoftmacBridgeProxyInterface::r#enable_beaconing(self, payload)
5432    }
5433
5434    /// Disables hardware beaconing.
5435    pub fn r#disable_beaconing(
5436        &self,
5437    ) -> fidl::client::QueryResponseFut<
5438        WlanSoftmacBaseDisableBeaconingResult,
5439        fidl::encoding::DefaultFuchsiaResourceDialect,
5440    > {
5441        WlanSoftmacBridgeProxyInterface::r#disable_beaconing(self)
5442    }
5443
5444    /// Install a key for encryption when transmitting or receiving protected
5445    /// frames.
5446    ///
5447    /// Common errors include:
5448    ///   ZX_ERR_INVALID_ARGS: The given config does not specify a valid key.
5449    ///   ZX_ERR_NOT_SUPPORTED: The device does not support the given cipher.
5450    pub fn r#install_key(
5451        &self,
5452        mut payload: &WlanKeyConfiguration,
5453    ) -> fidl::client::QueryResponseFut<
5454        WlanSoftmacBaseInstallKeyResult,
5455        fidl::encoding::DefaultFuchsiaResourceDialect,
5456    > {
5457        WlanSoftmacBridgeProxyInterface::r#install_key(self, payload)
5458    }
5459
5460    /// Notifies the device of a successful association and configures
5461    /// additional parameters necessary to participate in that association.
5462    ///
5463    /// # Errors
5464    ///
5465    /// Common errors include:
5466    ///
5467    /// - `ZX_ERR_BAD_STATE`: The device was not previously informed of this BSS
5468    ///                       via `WlanSoftmac.JoinBss`.
5469    pub fn r#notify_association_complete(
5470        &self,
5471        mut assoc_cfg: &WlanAssociationConfig,
5472    ) -> fidl::client::QueryResponseFut<
5473        WlanSoftmacBaseNotifyAssociationCompleteResult,
5474        fidl::encoding::DefaultFuchsiaResourceDialect,
5475    > {
5476        WlanSoftmacBridgeProxyInterface::r#notify_association_complete(self, assoc_cfg)
5477    }
5478
5479    /// Notifies MAC and PHY that the peer has been de-associated.
5480    pub fn r#clear_association(
5481        &self,
5482        mut payload: &WlanSoftmacBaseClearAssociationRequest,
5483    ) -> fidl::client::QueryResponseFut<
5484        WlanSoftmacBaseClearAssociationResult,
5485        fidl::encoding::DefaultFuchsiaResourceDialect,
5486    > {
5487        WlanSoftmacBridgeProxyInterface::r#clear_association(self, payload)
5488    }
5489
5490    /// Starts a passive scan. The server will deliver scan results
5491    /// as Beacon frames using WlanSoftmacIfc.Recv(). When complete,
5492    /// the server will call WlanSoftmacIfc.ScanComplete() with the
5493    /// same `scan_id` returned by StartPassiveScan().
5494    ///
5495    /// The server indicates support for `StartPassiveScan()` using
5496    /// `fuchsia.wlan.common/ScanOffloadExtension.supported`.
5497    ///
5498    /// Common errors include:
5499    ///   ZX_ERR_INVALID_ARGS: The device is not capable of performing the
5500    ///       requested scan, e.g. because an incompatible channel was requested.
5501    ///   ZX_ERR_UNAVAILABLE: The device cannot currently perform scans.
5502    ///   ZX_ERR_SHOULD_WAIT: Another scan is already in-progress.
5503    pub fn r#start_passive_scan(
5504        &self,
5505        mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
5506    ) -> fidl::client::QueryResponseFut<
5507        WlanSoftmacBaseStartPassiveScanResult,
5508        fidl::encoding::DefaultFuchsiaResourceDialect,
5509    > {
5510        WlanSoftmacBridgeProxyInterface::r#start_passive_scan(self, payload)
5511    }
5512
5513    /// Starts an active scan. The server will deliver scan results
5514    /// as Beacon or Probe Response frames using WlanSoftmacIfc.Recv().
5515    /// When complete, the server will call WlanSoftmacIfc.ScanComplete()
5516    /// with the same `scan_id` returned by StartActiveScan().
5517    ///
5518    /// A device driver indicates support for `StartActiveScan()` using
5519    /// `fuchsia.wlan.common/ProbeRequestOffloadExtension.supported`.
5520    ///
5521    /// Common errors include:
5522    ///   ZX_ERR_INVALID_ARGS: The device is not capable of performing the
5523    ///       requested scan, e.g. because an incompatible channel was requested.
5524    ///   ZX_ERR_UNAVAILABLE: The device cannot currently perform scans.
5525    ///   ZX_ERR_SHOULD_WAIT: Another scan is already in-progress.
5526    pub fn r#start_active_scan(
5527        &self,
5528        mut payload: &WlanSoftmacStartActiveScanRequest,
5529    ) -> fidl::client::QueryResponseFut<
5530        WlanSoftmacBaseStartActiveScanResult,
5531        fidl::encoding::DefaultFuchsiaResourceDialect,
5532    > {
5533        WlanSoftmacBridgeProxyInterface::r#start_active_scan(self, payload)
5534    }
5535
5536    /// Cancels the ongoing scan corresponding to `scan_id`,
5537    /// where `scan_id` is an identifier returned by
5538    /// `StartPassiveScan()` or `StartActiveScan()`. If cancellation succeeds,
5539    /// the server will soon call WlanSoftmacIfc.ScanComplete() with the same
5540    /// `scan_id`.
5541    ///
5542    /// A device driver indicates support for `CancelScan()` using
5543    /// `fuchsia.wlan.common/ScanOffloadExtension.scan_cancel_supported`.
5544    ///
5545    /// Common errors include:
5546    ///
5547    /// - `ZX_ERR_NOT_FOUND`: `scan_id` does not match an ongoing scan.
5548    /// - `ZX_ERR_NOT_SUPPORTED`: Server does not support scan cancellation.
5549    pub fn r#cancel_scan(
5550        &self,
5551        mut payload: &WlanSoftmacBaseCancelScanRequest,
5552    ) -> fidl::client::QueryResponseFut<
5553        WlanSoftmacBaseCancelScanResult,
5554        fidl::encoding::DefaultFuchsiaResourceDialect,
5555    > {
5556        WlanSoftmacBridgeProxyInterface::r#cancel_scan(self, payload)
5557    }
5558
5559    /// Indicate the device of modified WiFi Multimedia (WMM) parameters for a
5560    /// particular access category (AC).
5561    pub fn r#update_wmm_parameters(
5562        &self,
5563        mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
5564    ) -> fidl::client::QueryResponseFut<
5565        WlanSoftmacBaseUpdateWmmParametersResult,
5566        fidl::encoding::DefaultFuchsiaResourceDialect,
5567    > {
5568        WlanSoftmacBridgeProxyInterface::r#update_wmm_parameters(self, payload)
5569    }
5570
5571    /// Signal to the server that the MLME for the iface is ready to send and receive
5572    /// frames.
5573    ///
5574    /// The client provides the following arguments:
5575    ///
5576    ///   - `ifc_bridge`: The client end of a `WlanSoftmacIfcBridge` server which the
5577    ///     `wlansoftmac` driver will use to forward `WlanSoftmacIfc` events to
5578    ///     the bridged driver.
5579    ///   - `ethernet_tx`: A `ethernet_tx_t*` casted to a `uint64`. The
5580    ///     `ethernet_tx_t` is defined in
5581    ///     `//src/connectivity/wlan/drivers/wlansoftmac/rust_driver/c-binding/bindings.h`.
5582    ///   - `wlan_rx`: A `wlan_rx_t*` casted to a `uint64`. The
5583    ///     `wlan_rx_t` is defined in
5584    ///     `//src/connectivity/wlan/drivers/wlansoftmac/rust_driver/c-binding/bindings.h`.
5585    ///
5586    /// The server must copy the contents of `ethernet_tx_t` and `wlan_rx_t` before
5587    /// returning from this method. The lifetimes of `ethernet_tx_t*` and `wlan_rx_t*` are only as
5588    /// long as this method call, but the contents of `ethernet_tx_t` and `wlan_rx_t` will
5589    /// live until the server stops the MLME.
5590    ///
5591    /// The server returns a server end of a `fuchsia.wlan.mlme/MLME` protocol. The SME
5592    /// for the iface owns the client end. Thus, this channel is used for SME <-> MLME
5593    /// communication.
5594    ///
5595    /// The `WlanSoftmacBridge.Start` method is different from `WlanSoftmac.Start`
5596    /// for two reasons. First, Rust bindings do not exist for Driver transported
5597    /// protocols, so `WlanSoftmacIfcBridge` protocol must be Zircon transported to be
5598    /// usable by the bridged driver. Second, the Zircon transport adds
5599    /// significant latency compared to the Driver transport. As a result, the
5600    /// `ethernet_tx` and `wlan_rx` arguments provide an FFI for the wlansoftmac driver
5601    /// to send Ethernet and receive WLAN packets to the bridged driver with
5602    /// latency comparable or better than a Driver transported protocol.
5603    ///
5604    /// Except where noted, `WlanSoftmacBridge` methods must only be called after
5605    /// a successful call to `WlanSoftmacBridge.Start`.
5606    ///
5607    /// Common errors include:
5608    ///
5609    ///   - `ZX_ERR_ALREADY_BOUND`: `Start` was already called on this softmac.
5610    pub fn r#start(
5611        &self,
5612        mut ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
5613        mut ethernet_tx: u64,
5614        mut wlan_rx: u64,
5615    ) -> fidl::client::QueryResponseFut<
5616        WlanSoftmacBridgeStartResult,
5617        fidl::encoding::DefaultFuchsiaResourceDialect,
5618    > {
5619        WlanSoftmacBridgeProxyInterface::r#start(self, ifc_bridge, ethernet_tx, wlan_rx)
5620    }
5621
5622    /// Forwards a status containing `ETHERNET_STATUS_*` flags to the
5623    /// `fuchsia.hardware.ethernet/EthernetImplIfc` proxy owned by
5624    /// the C++ portion of wlansoftmac.
5625    ///
5626    /// As documented, the value of `status` is set by bits defined in
5627    /// `ETHERNET_STATUS_*` flags. However, there is only one flag named
5628    /// `ETHERNET_STATUS_ONLINE` and no specification of for the meaning
5629    /// of specifying no flags. In practice, `0x1` means the status is up,
5630    /// and `0x0` means the status is down.
5631    ///
5632    /// While this method should belong in something like an
5633    /// "`EthernetImplIfcBridge` protocol", it's included in the
5634    /// `WlanSoftmacBridge` protocol as a convenience. The wlansoftmac driver
5635    /// will eventually cease using a `fuchsia.hardware.ethernet/EthernetImplIfc`
5636    /// proxy and use a `fuchsia.hardware.network.driver/NetworkDeviceIfc`
5637    /// proxy instead. At that time, an equivalent of this method should be
5638    /// refactored into a separate bridge.
5639    pub fn r#set_ethernet_status(
5640        &self,
5641        mut status: u32,
5642    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
5643        WlanSoftmacBridgeProxyInterface::r#set_ethernet_status(self, status)
5644    }
5645}
5646
5647impl WlanSoftmacBridgeProxyInterface for WlanSoftmacBridgeProxy {
5648    type QueryResponseFut = fidl::client::QueryResponseFut<
5649        WlanSoftmacBaseQueryResult,
5650        fidl::encoding::DefaultFuchsiaResourceDialect,
5651    >;
5652    fn r#query(&self) -> Self::QueryResponseFut {
5653        fn _decode(
5654            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5655        ) -> Result<WlanSoftmacBaseQueryResult, fidl::Error> {
5656            let _response = fidl::client::decode_transaction_body::<
5657                fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>,
5658                fidl::encoding::DefaultFuchsiaResourceDialect,
5659                0x18231a638e508f9d,
5660            >(_buf?)?;
5661            Ok(_response.map(|x| x))
5662        }
5663        self.client
5664            .send_query_and_decode::<fidl::encoding::EmptyPayload, WlanSoftmacBaseQueryResult>(
5665                (),
5666                0x18231a638e508f9d,
5667                fidl::encoding::DynamicFlags::empty(),
5668                _decode,
5669            )
5670    }
5671
5672    type QueryDiscoverySupportResponseFut = fidl::client::QueryResponseFut<
5673        WlanSoftmacBaseQueryDiscoverySupportResult,
5674        fidl::encoding::DefaultFuchsiaResourceDialect,
5675    >;
5676    fn r#query_discovery_support(&self) -> Self::QueryDiscoverySupportResponseFut {
5677        fn _decode(
5678            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5679        ) -> Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error> {
5680            let _response = fidl::client::decode_transaction_body::<
5681                fidl::encoding::ResultType<WlanSoftmacBaseQueryDiscoverySupportResponse, i32>,
5682                fidl::encoding::DefaultFuchsiaResourceDialect,
5683                0x16797affc0cb58ae,
5684            >(_buf?)?;
5685            Ok(_response.map(|x| x.resp))
5686        }
5687        self.client.send_query_and_decode::<
5688            fidl::encoding::EmptyPayload,
5689            WlanSoftmacBaseQueryDiscoverySupportResult,
5690        >(
5691            (),
5692            0x16797affc0cb58ae,
5693            fidl::encoding::DynamicFlags::empty(),
5694            _decode,
5695        )
5696    }
5697
5698    type QueryMacSublayerSupportResponseFut = fidl::client::QueryResponseFut<
5699        WlanSoftmacBaseQueryMacSublayerSupportResult,
5700        fidl::encoding::DefaultFuchsiaResourceDialect,
5701    >;
5702    fn r#query_mac_sublayer_support(&self) -> Self::QueryMacSublayerSupportResponseFut {
5703        fn _decode(
5704            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5705        ) -> Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error> {
5706            let _response = fidl::client::decode_transaction_body::<
5707                fidl::encoding::ResultType<WlanSoftmacBaseQueryMacSublayerSupportResponse, i32>,
5708                fidl::encoding::DefaultFuchsiaResourceDialect,
5709                0x7302c3f8c131f075,
5710            >(_buf?)?;
5711            Ok(_response.map(|x| x.resp))
5712        }
5713        self.client.send_query_and_decode::<
5714            fidl::encoding::EmptyPayload,
5715            WlanSoftmacBaseQueryMacSublayerSupportResult,
5716        >(
5717            (),
5718            0x7302c3f8c131f075,
5719            fidl::encoding::DynamicFlags::empty(),
5720            _decode,
5721        )
5722    }
5723
5724    type QuerySecuritySupportResponseFut = fidl::client::QueryResponseFut<
5725        WlanSoftmacBaseQuerySecuritySupportResult,
5726        fidl::encoding::DefaultFuchsiaResourceDialect,
5727    >;
5728    fn r#query_security_support(&self) -> Self::QuerySecuritySupportResponseFut {
5729        fn _decode(
5730            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5731        ) -> Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error> {
5732            let _response = fidl::client::decode_transaction_body::<
5733                fidl::encoding::ResultType<WlanSoftmacBaseQuerySecuritySupportResponse, i32>,
5734                fidl::encoding::DefaultFuchsiaResourceDialect,
5735                0x3691bb75abf6354,
5736            >(_buf?)?;
5737            Ok(_response.map(|x| x.resp))
5738        }
5739        self.client.send_query_and_decode::<
5740            fidl::encoding::EmptyPayload,
5741            WlanSoftmacBaseQuerySecuritySupportResult,
5742        >(
5743            (),
5744            0x3691bb75abf6354,
5745            fidl::encoding::DynamicFlags::empty(),
5746            _decode,
5747        )
5748    }
5749
5750    type QuerySpectrumManagementSupportResponseFut = fidl::client::QueryResponseFut<
5751        WlanSoftmacBaseQuerySpectrumManagementSupportResult,
5752        fidl::encoding::DefaultFuchsiaResourceDialect,
5753    >;
5754    fn r#query_spectrum_management_support(
5755        &self,
5756    ) -> Self::QuerySpectrumManagementSupportResponseFut {
5757        fn _decode(
5758            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5759        ) -> Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error> {
5760            let _response = fidl::client::decode_transaction_body::<
5761                fidl::encoding::ResultType<
5762                    WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
5763                    i32,
5764                >,
5765                fidl::encoding::DefaultFuchsiaResourceDialect,
5766                0x347d78dc1d4d27bf,
5767            >(_buf?)?;
5768            Ok(_response.map(|x| x.resp))
5769        }
5770        self.client.send_query_and_decode::<
5771            fidl::encoding::EmptyPayload,
5772            WlanSoftmacBaseQuerySpectrumManagementSupportResult,
5773        >(
5774            (),
5775            0x347d78dc1d4d27bf,
5776            fidl::encoding::DynamicFlags::empty(),
5777            _decode,
5778        )
5779    }
5780
5781    type SetChannelResponseFut = fidl::client::QueryResponseFut<
5782        WlanSoftmacBaseSetChannelResult,
5783        fidl::encoding::DefaultFuchsiaResourceDialect,
5784    >;
5785    fn r#set_channel(
5786        &self,
5787        mut payload: &WlanSoftmacBaseSetChannelRequest,
5788    ) -> Self::SetChannelResponseFut {
5789        fn _decode(
5790            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5791        ) -> Result<WlanSoftmacBaseSetChannelResult, fidl::Error> {
5792            let _response = fidl::client::decode_transaction_body::<
5793                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5794                fidl::encoding::DefaultFuchsiaResourceDialect,
5795                0x12836b533cd63ece,
5796            >(_buf?)?;
5797            Ok(_response.map(|x| x))
5798        }
5799        self.client.send_query_and_decode::<
5800            WlanSoftmacBaseSetChannelRequest,
5801            WlanSoftmacBaseSetChannelResult,
5802        >(
5803            payload,
5804            0x12836b533cd63ece,
5805            fidl::encoding::DynamicFlags::empty(),
5806            _decode,
5807        )
5808    }
5809
5810    type JoinBssResponseFut = fidl::client::QueryResponseFut<
5811        WlanSoftmacBaseJoinBssResult,
5812        fidl::encoding::DefaultFuchsiaResourceDialect,
5813    >;
5814    fn r#join_bss(
5815        &self,
5816        mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
5817    ) -> Self::JoinBssResponseFut {
5818        fn _decode(
5819            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5820        ) -> Result<WlanSoftmacBaseJoinBssResult, fidl::Error> {
5821            let _response = fidl::client::decode_transaction_body::<
5822                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5823                fidl::encoding::DefaultFuchsiaResourceDialect,
5824                0x1336fb5455b77a6e,
5825            >(_buf?)?;
5826            Ok(_response.map(|x| x))
5827        }
5828        self.client
5829            .send_query_and_decode::<WlanSoftmacBaseJoinBssRequest, WlanSoftmacBaseJoinBssResult>(
5830                (join_request,),
5831                0x1336fb5455b77a6e,
5832                fidl::encoding::DynamicFlags::empty(),
5833                _decode,
5834            )
5835    }
5836
5837    type EnableBeaconingResponseFut = fidl::client::QueryResponseFut<
5838        WlanSoftmacBaseEnableBeaconingResult,
5839        fidl::encoding::DefaultFuchsiaResourceDialect,
5840    >;
5841    fn r#enable_beaconing(
5842        &self,
5843        mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
5844    ) -> Self::EnableBeaconingResponseFut {
5845        fn _decode(
5846            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5847        ) -> Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error> {
5848            let _response = fidl::client::decode_transaction_body::<
5849                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5850                fidl::encoding::DefaultFuchsiaResourceDialect,
5851                0x6c35807632c64576,
5852            >(_buf?)?;
5853            Ok(_response.map(|x| x))
5854        }
5855        self.client.send_query_and_decode::<
5856            WlanSoftmacBaseEnableBeaconingRequest,
5857            WlanSoftmacBaseEnableBeaconingResult,
5858        >(
5859            payload,
5860            0x6c35807632c64576,
5861            fidl::encoding::DynamicFlags::empty(),
5862            _decode,
5863        )
5864    }
5865
5866    type DisableBeaconingResponseFut = fidl::client::QueryResponseFut<
5867        WlanSoftmacBaseDisableBeaconingResult,
5868        fidl::encoding::DefaultFuchsiaResourceDialect,
5869    >;
5870    fn r#disable_beaconing(&self) -> Self::DisableBeaconingResponseFut {
5871        fn _decode(
5872            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5873        ) -> Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error> {
5874            let _response = fidl::client::decode_transaction_body::<
5875                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5876                fidl::encoding::DefaultFuchsiaResourceDialect,
5877                0x3303b30f99dbb406,
5878            >(_buf?)?;
5879            Ok(_response.map(|x| x))
5880        }
5881        self.client.send_query_and_decode::<
5882            fidl::encoding::EmptyPayload,
5883            WlanSoftmacBaseDisableBeaconingResult,
5884        >(
5885            (),
5886            0x3303b30f99dbb406,
5887            fidl::encoding::DynamicFlags::empty(),
5888            _decode,
5889        )
5890    }
5891
5892    type InstallKeyResponseFut = fidl::client::QueryResponseFut<
5893        WlanSoftmacBaseInstallKeyResult,
5894        fidl::encoding::DefaultFuchsiaResourceDialect,
5895    >;
5896    fn r#install_key(&self, mut payload: &WlanKeyConfiguration) -> Self::InstallKeyResponseFut {
5897        fn _decode(
5898            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5899        ) -> Result<WlanSoftmacBaseInstallKeyResult, fidl::Error> {
5900            let _response = fidl::client::decode_transaction_body::<
5901                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5902                fidl::encoding::DefaultFuchsiaResourceDialect,
5903                0x7decf9b4200b9131,
5904            >(_buf?)?;
5905            Ok(_response.map(|x| x))
5906        }
5907        self.client.send_query_and_decode::<WlanKeyConfiguration, WlanSoftmacBaseInstallKeyResult>(
5908            payload,
5909            0x7decf9b4200b9131,
5910            fidl::encoding::DynamicFlags::empty(),
5911            _decode,
5912        )
5913    }
5914
5915    type NotifyAssociationCompleteResponseFut = fidl::client::QueryResponseFut<
5916        WlanSoftmacBaseNotifyAssociationCompleteResult,
5917        fidl::encoding::DefaultFuchsiaResourceDialect,
5918    >;
5919    fn r#notify_association_complete(
5920        &self,
5921        mut assoc_cfg: &WlanAssociationConfig,
5922    ) -> Self::NotifyAssociationCompleteResponseFut {
5923        fn _decode(
5924            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5925        ) -> Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error> {
5926            let _response = fidl::client::decode_transaction_body::<
5927                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5928                fidl::encoding::DefaultFuchsiaResourceDialect,
5929                0x436ffe3ba461d6cd,
5930            >(_buf?)?;
5931            Ok(_response.map(|x| x))
5932        }
5933        self.client.send_query_and_decode::<
5934            WlanSoftmacBaseNotifyAssociationCompleteRequest,
5935            WlanSoftmacBaseNotifyAssociationCompleteResult,
5936        >(
5937            (assoc_cfg,),
5938            0x436ffe3ba461d6cd,
5939            fidl::encoding::DynamicFlags::empty(),
5940            _decode,
5941        )
5942    }
5943
5944    type ClearAssociationResponseFut = fidl::client::QueryResponseFut<
5945        WlanSoftmacBaseClearAssociationResult,
5946        fidl::encoding::DefaultFuchsiaResourceDialect,
5947    >;
5948    fn r#clear_association(
5949        &self,
5950        mut payload: &WlanSoftmacBaseClearAssociationRequest,
5951    ) -> Self::ClearAssociationResponseFut {
5952        fn _decode(
5953            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5954        ) -> Result<WlanSoftmacBaseClearAssociationResult, fidl::Error> {
5955            let _response = fidl::client::decode_transaction_body::<
5956                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5957                fidl::encoding::DefaultFuchsiaResourceDialect,
5958                0x581d76c39190a7dd,
5959            >(_buf?)?;
5960            Ok(_response.map(|x| x))
5961        }
5962        self.client.send_query_and_decode::<
5963            WlanSoftmacBaseClearAssociationRequest,
5964            WlanSoftmacBaseClearAssociationResult,
5965        >(
5966            payload,
5967            0x581d76c39190a7dd,
5968            fidl::encoding::DynamicFlags::empty(),
5969            _decode,
5970        )
5971    }
5972
5973    type StartPassiveScanResponseFut = fidl::client::QueryResponseFut<
5974        WlanSoftmacBaseStartPassiveScanResult,
5975        fidl::encoding::DefaultFuchsiaResourceDialect,
5976    >;
5977    fn r#start_passive_scan(
5978        &self,
5979        mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
5980    ) -> Self::StartPassiveScanResponseFut {
5981        fn _decode(
5982            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5983        ) -> Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error> {
5984            let _response = fidl::client::decode_transaction_body::<
5985                fidl::encoding::ResultType<WlanSoftmacBaseStartPassiveScanResponse, i32>,
5986                fidl::encoding::DefaultFuchsiaResourceDialect,
5987                0x5662f989cb4083bb,
5988            >(_buf?)?;
5989            Ok(_response.map(|x| x))
5990        }
5991        self.client.send_query_and_decode::<
5992            WlanSoftmacBaseStartPassiveScanRequest,
5993            WlanSoftmacBaseStartPassiveScanResult,
5994        >(
5995            payload,
5996            0x5662f989cb4083bb,
5997            fidl::encoding::DynamicFlags::empty(),
5998            _decode,
5999        )
6000    }
6001
6002    type StartActiveScanResponseFut = fidl::client::QueryResponseFut<
6003        WlanSoftmacBaseStartActiveScanResult,
6004        fidl::encoding::DefaultFuchsiaResourceDialect,
6005    >;
6006    fn r#start_active_scan(
6007        &self,
6008        mut payload: &WlanSoftmacStartActiveScanRequest,
6009    ) -> Self::StartActiveScanResponseFut {
6010        fn _decode(
6011            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6012        ) -> Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error> {
6013            let _response = fidl::client::decode_transaction_body::<
6014                fidl::encoding::ResultType<WlanSoftmacBaseStartActiveScanResponse, i32>,
6015                fidl::encoding::DefaultFuchsiaResourceDialect,
6016                0x4896eafa9937751e,
6017            >(_buf?)?;
6018            Ok(_response.map(|x| x))
6019        }
6020        self.client.send_query_and_decode::<
6021            WlanSoftmacStartActiveScanRequest,
6022            WlanSoftmacBaseStartActiveScanResult,
6023        >(
6024            payload,
6025            0x4896eafa9937751e,
6026            fidl::encoding::DynamicFlags::empty(),
6027            _decode,
6028        )
6029    }
6030
6031    type CancelScanResponseFut = fidl::client::QueryResponseFut<
6032        WlanSoftmacBaseCancelScanResult,
6033        fidl::encoding::DefaultFuchsiaResourceDialect,
6034    >;
6035    fn r#cancel_scan(
6036        &self,
6037        mut payload: &WlanSoftmacBaseCancelScanRequest,
6038    ) -> Self::CancelScanResponseFut {
6039        fn _decode(
6040            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6041        ) -> Result<WlanSoftmacBaseCancelScanResult, fidl::Error> {
6042            let _response = fidl::client::decode_transaction_body::<
6043                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6044                fidl::encoding::DefaultFuchsiaResourceDialect,
6045                0xf7d859369764556,
6046            >(_buf?)?;
6047            Ok(_response.map(|x| x))
6048        }
6049        self.client.send_query_and_decode::<
6050            WlanSoftmacBaseCancelScanRequest,
6051            WlanSoftmacBaseCancelScanResult,
6052        >(
6053            payload,
6054            0xf7d859369764556,
6055            fidl::encoding::DynamicFlags::empty(),
6056            _decode,
6057        )
6058    }
6059
6060    type UpdateWmmParametersResponseFut = fidl::client::QueryResponseFut<
6061        WlanSoftmacBaseUpdateWmmParametersResult,
6062        fidl::encoding::DefaultFuchsiaResourceDialect,
6063    >;
6064    fn r#update_wmm_parameters(
6065        &self,
6066        mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
6067    ) -> Self::UpdateWmmParametersResponseFut {
6068        fn _decode(
6069            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6070        ) -> Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error> {
6071            let _response = fidl::client::decode_transaction_body::<
6072                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6073                fidl::encoding::DefaultFuchsiaResourceDialect,
6074                0x68522c7122d5f78c,
6075            >(_buf?)?;
6076            Ok(_response.map(|x| x))
6077        }
6078        self.client.send_query_and_decode::<
6079            WlanSoftmacBaseUpdateWmmParametersRequest,
6080            WlanSoftmacBaseUpdateWmmParametersResult,
6081        >(
6082            payload,
6083            0x68522c7122d5f78c,
6084            fidl::encoding::DynamicFlags::empty(),
6085            _decode,
6086        )
6087    }
6088
6089    type StartResponseFut = fidl::client::QueryResponseFut<
6090        WlanSoftmacBridgeStartResult,
6091        fidl::encoding::DefaultFuchsiaResourceDialect,
6092    >;
6093    fn r#start(
6094        &self,
6095        mut ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
6096        mut ethernet_tx: u64,
6097        mut wlan_rx: u64,
6098    ) -> Self::StartResponseFut {
6099        fn _decode(
6100            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6101        ) -> Result<WlanSoftmacBridgeStartResult, fidl::Error> {
6102            let _response = fidl::client::decode_transaction_body::<
6103                fidl::encoding::ResultType<WlanSoftmacBridgeStartResponse, i32>,
6104                fidl::encoding::DefaultFuchsiaResourceDialect,
6105                0x7b2c15a507020d4d,
6106            >(_buf?)?;
6107            Ok(_response.map(|x| x.sme_channel))
6108        }
6109        self.client
6110            .send_query_and_decode::<WlanSoftmacBridgeStartRequest, WlanSoftmacBridgeStartResult>(
6111                (ifc_bridge, ethernet_tx, wlan_rx),
6112                0x7b2c15a507020d4d,
6113                fidl::encoding::DynamicFlags::empty(),
6114                _decode,
6115            )
6116    }
6117
6118    type SetEthernetStatusResponseFut =
6119        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
6120    fn r#set_ethernet_status(&self, mut status: u32) -> Self::SetEthernetStatusResponseFut {
6121        fn _decode(
6122            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6123        ) -> Result<(), fidl::Error> {
6124            let _response = fidl::client::decode_transaction_body::<
6125                fidl::encoding::EmptyPayload,
6126                fidl::encoding::DefaultFuchsiaResourceDialect,
6127                0x412503cb3aaa350b,
6128            >(_buf?)?;
6129            Ok(_response)
6130        }
6131        self.client.send_query_and_decode::<WlanSoftmacBridgeSetEthernetStatusRequest, ()>(
6132            (status,),
6133            0x412503cb3aaa350b,
6134            fidl::encoding::DynamicFlags::empty(),
6135            _decode,
6136        )
6137    }
6138}
6139
6140pub struct WlanSoftmacBridgeEventStream {
6141    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6142}
6143
6144impl std::marker::Unpin for WlanSoftmacBridgeEventStream {}
6145
6146impl futures::stream::FusedStream for WlanSoftmacBridgeEventStream {
6147    fn is_terminated(&self) -> bool {
6148        self.event_receiver.is_terminated()
6149    }
6150}
6151
6152impl futures::Stream for WlanSoftmacBridgeEventStream {
6153    type Item = Result<WlanSoftmacBridgeEvent, fidl::Error>;
6154
6155    fn poll_next(
6156        mut self: std::pin::Pin<&mut Self>,
6157        cx: &mut std::task::Context<'_>,
6158    ) -> std::task::Poll<Option<Self::Item>> {
6159        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6160            &mut self.event_receiver,
6161            cx
6162        )?) {
6163            Some(buf) => std::task::Poll::Ready(Some(WlanSoftmacBridgeEvent::decode(buf))),
6164            None => std::task::Poll::Ready(None),
6165        }
6166    }
6167}
6168
6169#[derive(Debug)]
6170pub enum WlanSoftmacBridgeEvent {}
6171
6172impl WlanSoftmacBridgeEvent {
6173    /// Decodes a message buffer as a [`WlanSoftmacBridgeEvent`].
6174    fn decode(
6175        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6176    ) -> Result<WlanSoftmacBridgeEvent, fidl::Error> {
6177        let (bytes, _handles) = buf.split_mut();
6178        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6179        debug_assert_eq!(tx_header.tx_id, 0);
6180        match tx_header.ordinal {
6181            _ => Err(fidl::Error::UnknownOrdinal {
6182                ordinal: tx_header.ordinal,
6183                protocol_name:
6184                    <WlanSoftmacBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6185            }),
6186        }
6187    }
6188}
6189
6190/// A Stream of incoming requests for fuchsia.wlan.softmac/WlanSoftmacBridge.
6191pub struct WlanSoftmacBridgeRequestStream {
6192    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6193    is_terminated: bool,
6194}
6195
6196impl std::marker::Unpin for WlanSoftmacBridgeRequestStream {}
6197
6198impl futures::stream::FusedStream for WlanSoftmacBridgeRequestStream {
6199    fn is_terminated(&self) -> bool {
6200        self.is_terminated
6201    }
6202}
6203
6204impl fidl::endpoints::RequestStream for WlanSoftmacBridgeRequestStream {
6205    type Protocol = WlanSoftmacBridgeMarker;
6206    type ControlHandle = WlanSoftmacBridgeControlHandle;
6207
6208    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6209        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6210    }
6211
6212    fn control_handle(&self) -> Self::ControlHandle {
6213        WlanSoftmacBridgeControlHandle { inner: self.inner.clone() }
6214    }
6215
6216    fn into_inner(
6217        self,
6218    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6219    {
6220        (self.inner, self.is_terminated)
6221    }
6222
6223    fn from_inner(
6224        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6225        is_terminated: bool,
6226    ) -> Self {
6227        Self { inner, is_terminated }
6228    }
6229}
6230
6231impl futures::Stream for WlanSoftmacBridgeRequestStream {
6232    type Item = Result<WlanSoftmacBridgeRequest, fidl::Error>;
6233
6234    fn poll_next(
6235        mut self: std::pin::Pin<&mut Self>,
6236        cx: &mut std::task::Context<'_>,
6237    ) -> std::task::Poll<Option<Self::Item>> {
6238        let this = &mut *self;
6239        if this.inner.check_shutdown(cx) {
6240            this.is_terminated = true;
6241            return std::task::Poll::Ready(None);
6242        }
6243        if this.is_terminated {
6244            panic!("polled WlanSoftmacBridgeRequestStream after completion");
6245        }
6246        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6247            |bytes, handles| {
6248                match this.inner.channel().read_etc(cx, bytes, handles) {
6249                    std::task::Poll::Ready(Ok(())) => {}
6250                    std::task::Poll::Pending => return std::task::Poll::Pending,
6251                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6252                        this.is_terminated = true;
6253                        return std::task::Poll::Ready(None);
6254                    }
6255                    std::task::Poll::Ready(Err(e)) => {
6256                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6257                            e.into(),
6258                        ))))
6259                    }
6260                }
6261
6262                // A message has been received from the channel
6263                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6264
6265                std::task::Poll::Ready(Some(match header.ordinal {
6266                    0x18231a638e508f9d => {
6267                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6268                        let mut req = fidl::new_empty!(
6269                            fidl::encoding::EmptyPayload,
6270                            fidl::encoding::DefaultFuchsiaResourceDialect
6271                        );
6272                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6273                        let control_handle =
6274                            WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6275                        Ok(WlanSoftmacBridgeRequest::Query {
6276                            responder: WlanSoftmacBridgeQueryResponder {
6277                                control_handle: std::mem::ManuallyDrop::new(control_handle),
6278                                tx_id: header.tx_id,
6279                            },
6280                        })
6281                    }
6282                    0x16797affc0cb58ae => {
6283                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6284                        let mut req = fidl::new_empty!(
6285                            fidl::encoding::EmptyPayload,
6286                            fidl::encoding::DefaultFuchsiaResourceDialect
6287                        );
6288                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6289                        let control_handle =
6290                            WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6291                        Ok(WlanSoftmacBridgeRequest::QueryDiscoverySupport {
6292                            responder: WlanSoftmacBridgeQueryDiscoverySupportResponder {
6293                                control_handle: std::mem::ManuallyDrop::new(control_handle),
6294                                tx_id: header.tx_id,
6295                            },
6296                        })
6297                    }
6298                    0x7302c3f8c131f075 => {
6299                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6300                        let mut req = fidl::new_empty!(
6301                            fidl::encoding::EmptyPayload,
6302                            fidl::encoding::DefaultFuchsiaResourceDialect
6303                        );
6304                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6305                        let control_handle =
6306                            WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6307                        Ok(WlanSoftmacBridgeRequest::QueryMacSublayerSupport {
6308                            responder: WlanSoftmacBridgeQueryMacSublayerSupportResponder {
6309                                control_handle: std::mem::ManuallyDrop::new(control_handle),
6310                                tx_id: header.tx_id,
6311                            },
6312                        })
6313                    }
6314                    0x3691bb75abf6354 => {
6315                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6316                        let mut req = fidl::new_empty!(
6317                            fidl::encoding::EmptyPayload,
6318                            fidl::encoding::DefaultFuchsiaResourceDialect
6319                        );
6320                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6321                        let control_handle =
6322                            WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6323                        Ok(WlanSoftmacBridgeRequest::QuerySecuritySupport {
6324                            responder: WlanSoftmacBridgeQuerySecuritySupportResponder {
6325                                control_handle: std::mem::ManuallyDrop::new(control_handle),
6326                                tx_id: header.tx_id,
6327                            },
6328                        })
6329                    }
6330                    0x347d78dc1d4d27bf => {
6331                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6332                        let mut req = fidl::new_empty!(
6333                            fidl::encoding::EmptyPayload,
6334                            fidl::encoding::DefaultFuchsiaResourceDialect
6335                        );
6336                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6337                        let control_handle =
6338                            WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6339                        Ok(WlanSoftmacBridgeRequest::QuerySpectrumManagementSupport {
6340                            responder: WlanSoftmacBridgeQuerySpectrumManagementSupportResponder {
6341                                control_handle: std::mem::ManuallyDrop::new(control_handle),
6342                                tx_id: header.tx_id,
6343                            },
6344                        })
6345                    }
6346                    0x12836b533cd63ece => {
6347                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6348                        let mut req = fidl::new_empty!(
6349                            WlanSoftmacBaseSetChannelRequest,
6350                            fidl::encoding::DefaultFuchsiaResourceDialect
6351                        );
6352                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseSetChannelRequest>(&header, _body_bytes, handles, &mut req)?;
6353                        let control_handle =
6354                            WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6355                        Ok(WlanSoftmacBridgeRequest::SetChannel {
6356                            payload: req,
6357                            responder: WlanSoftmacBridgeSetChannelResponder {
6358                                control_handle: std::mem::ManuallyDrop::new(control_handle),
6359                                tx_id: header.tx_id,
6360                            },
6361                        })
6362                    }
6363                    0x1336fb5455b77a6e => {
6364                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6365                        let mut req = fidl::new_empty!(
6366                            WlanSoftmacBaseJoinBssRequest,
6367                            fidl::encoding::DefaultFuchsiaResourceDialect
6368                        );
6369                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseJoinBssRequest>(&header, _body_bytes, handles, &mut req)?;
6370                        let control_handle =
6371                            WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6372                        Ok(WlanSoftmacBridgeRequest::JoinBss {
6373                            join_request: req.join_request,
6374
6375                            responder: WlanSoftmacBridgeJoinBssResponder {
6376                                control_handle: std::mem::ManuallyDrop::new(control_handle),
6377                                tx_id: header.tx_id,
6378                            },
6379                        })
6380                    }
6381                    0x6c35807632c64576 => {
6382                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6383                        let mut req = fidl::new_empty!(
6384                            WlanSoftmacBaseEnableBeaconingRequest,
6385                            fidl::encoding::DefaultFuchsiaResourceDialect
6386                        );
6387                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseEnableBeaconingRequest>(&header, _body_bytes, handles, &mut req)?;
6388                        let control_handle =
6389                            WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6390                        Ok(WlanSoftmacBridgeRequest::EnableBeaconing {
6391                            payload: req,
6392                            responder: WlanSoftmacBridgeEnableBeaconingResponder {
6393                                control_handle: std::mem::ManuallyDrop::new(control_handle),
6394                                tx_id: header.tx_id,
6395                            },
6396                        })
6397                    }
6398                    0x3303b30f99dbb406 => {
6399                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6400                        let mut req = fidl::new_empty!(
6401                            fidl::encoding::EmptyPayload,
6402                            fidl::encoding::DefaultFuchsiaResourceDialect
6403                        );
6404                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6405                        let control_handle =
6406                            WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6407                        Ok(WlanSoftmacBridgeRequest::DisableBeaconing {
6408                            responder: WlanSoftmacBridgeDisableBeaconingResponder {
6409                                control_handle: std::mem::ManuallyDrop::new(control_handle),
6410                                tx_id: header.tx_id,
6411                            },
6412                        })
6413                    }
6414                    0x7decf9b4200b9131 => {
6415                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6416                        let mut req = fidl::new_empty!(
6417                            WlanKeyConfiguration,
6418                            fidl::encoding::DefaultFuchsiaResourceDialect
6419                        );
6420                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanKeyConfiguration>(&header, _body_bytes, handles, &mut req)?;
6421                        let control_handle =
6422                            WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6423                        Ok(WlanSoftmacBridgeRequest::InstallKey {
6424                            payload: req,
6425                            responder: WlanSoftmacBridgeInstallKeyResponder {
6426                                control_handle: std::mem::ManuallyDrop::new(control_handle),
6427                                tx_id: header.tx_id,
6428                            },
6429                        })
6430                    }
6431                    0x436ffe3ba461d6cd => {
6432                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6433                        let mut req = fidl::new_empty!(
6434                            WlanSoftmacBaseNotifyAssociationCompleteRequest,
6435                            fidl::encoding::DefaultFuchsiaResourceDialect
6436                        );
6437                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseNotifyAssociationCompleteRequest>(&header, _body_bytes, handles, &mut req)?;
6438                        let control_handle =
6439                            WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6440                        Ok(WlanSoftmacBridgeRequest::NotifyAssociationComplete {
6441                            assoc_cfg: req.assoc_cfg,
6442
6443                            responder: WlanSoftmacBridgeNotifyAssociationCompleteResponder {
6444                                control_handle: std::mem::ManuallyDrop::new(control_handle),
6445                                tx_id: header.tx_id,
6446                            },
6447                        })
6448                    }
6449                    0x581d76c39190a7dd => {
6450                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6451                        let mut req = fidl::new_empty!(
6452                            WlanSoftmacBaseClearAssociationRequest,
6453                            fidl::encoding::DefaultFuchsiaResourceDialect
6454                        );
6455                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseClearAssociationRequest>(&header, _body_bytes, handles, &mut req)?;
6456                        let control_handle =
6457                            WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6458                        Ok(WlanSoftmacBridgeRequest::ClearAssociation {
6459                            payload: req,
6460                            responder: WlanSoftmacBridgeClearAssociationResponder {
6461                                control_handle: std::mem::ManuallyDrop::new(control_handle),
6462                                tx_id: header.tx_id,
6463                            },
6464                        })
6465                    }
6466                    0x5662f989cb4083bb => {
6467                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6468                        let mut req = fidl::new_empty!(
6469                            WlanSoftmacBaseStartPassiveScanRequest,
6470                            fidl::encoding::DefaultFuchsiaResourceDialect
6471                        );
6472                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseStartPassiveScanRequest>(&header, _body_bytes, handles, &mut req)?;
6473                        let control_handle =
6474                            WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6475                        Ok(WlanSoftmacBridgeRequest::StartPassiveScan {
6476                            payload: req,
6477                            responder: WlanSoftmacBridgeStartPassiveScanResponder {
6478                                control_handle: std::mem::ManuallyDrop::new(control_handle),
6479                                tx_id: header.tx_id,
6480                            },
6481                        })
6482                    }
6483                    0x4896eafa9937751e => {
6484                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6485                        let mut req = fidl::new_empty!(
6486                            WlanSoftmacStartActiveScanRequest,
6487                            fidl::encoding::DefaultFuchsiaResourceDialect
6488                        );
6489                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacStartActiveScanRequest>(&header, _body_bytes, handles, &mut req)?;
6490                        let control_handle =
6491                            WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6492                        Ok(WlanSoftmacBridgeRequest::StartActiveScan {
6493                            payload: req,
6494                            responder: WlanSoftmacBridgeStartActiveScanResponder {
6495                                control_handle: std::mem::ManuallyDrop::new(control_handle),
6496                                tx_id: header.tx_id,
6497                            },
6498                        })
6499                    }
6500                    0xf7d859369764556 => {
6501                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6502                        let mut req = fidl::new_empty!(
6503                            WlanSoftmacBaseCancelScanRequest,
6504                            fidl::encoding::DefaultFuchsiaResourceDialect
6505                        );
6506                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseCancelScanRequest>(&header, _body_bytes, handles, &mut req)?;
6507                        let control_handle =
6508                            WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6509                        Ok(WlanSoftmacBridgeRequest::CancelScan {
6510                            payload: req,
6511                            responder: WlanSoftmacBridgeCancelScanResponder {
6512                                control_handle: std::mem::ManuallyDrop::new(control_handle),
6513                                tx_id: header.tx_id,
6514                            },
6515                        })
6516                    }
6517                    0x68522c7122d5f78c => {
6518                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6519                        let mut req = fidl::new_empty!(
6520                            WlanSoftmacBaseUpdateWmmParametersRequest,
6521                            fidl::encoding::DefaultFuchsiaResourceDialect
6522                        );
6523                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseUpdateWmmParametersRequest>(&header, _body_bytes, handles, &mut req)?;
6524                        let control_handle =
6525                            WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6526                        Ok(WlanSoftmacBridgeRequest::UpdateWmmParameters {
6527                            payload: req,
6528                            responder: WlanSoftmacBridgeUpdateWmmParametersResponder {
6529                                control_handle: std::mem::ManuallyDrop::new(control_handle),
6530                                tx_id: header.tx_id,
6531                            },
6532                        })
6533                    }
6534                    0x7b2c15a507020d4d => {
6535                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6536                        let mut req = fidl::new_empty!(
6537                            WlanSoftmacBridgeStartRequest,
6538                            fidl::encoding::DefaultFuchsiaResourceDialect
6539                        );
6540                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBridgeStartRequest>(&header, _body_bytes, handles, &mut req)?;
6541                        let control_handle =
6542                            WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6543                        Ok(WlanSoftmacBridgeRequest::Start {
6544                            ifc_bridge: req.ifc_bridge,
6545                            ethernet_tx: req.ethernet_tx,
6546                            wlan_rx: req.wlan_rx,
6547
6548                            responder: WlanSoftmacBridgeStartResponder {
6549                                control_handle: std::mem::ManuallyDrop::new(control_handle),
6550                                tx_id: header.tx_id,
6551                            },
6552                        })
6553                    }
6554                    0x412503cb3aaa350b => {
6555                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6556                        let mut req = fidl::new_empty!(
6557                            WlanSoftmacBridgeSetEthernetStatusRequest,
6558                            fidl::encoding::DefaultFuchsiaResourceDialect
6559                        );
6560                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBridgeSetEthernetStatusRequest>(&header, _body_bytes, handles, &mut req)?;
6561                        let control_handle =
6562                            WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6563                        Ok(WlanSoftmacBridgeRequest::SetEthernetStatus {
6564                            status: req.status,
6565
6566                            responder: WlanSoftmacBridgeSetEthernetStatusResponder {
6567                                control_handle: std::mem::ManuallyDrop::new(control_handle),
6568                                tx_id: header.tx_id,
6569                            },
6570                        })
6571                    }
6572                    _ => Err(fidl::Error::UnknownOrdinal {
6573                        ordinal: header.ordinal,
6574                        protocol_name:
6575                            <WlanSoftmacBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6576                    }),
6577                }))
6578            },
6579        )
6580    }
6581}
6582
6583/// `WlanSoftmacBridge` is the protocol the `wlansoftmac` driver serves
6584/// to the bridged driver. This protocol **should not** be implemented
6585/// by a vendor driver.
6586#[derive(Debug)]
6587pub enum WlanSoftmacBridgeRequest {
6588    /// Gets general information about the device and its supported features.
6589    /// This method is safe to call even when the SoftMAC has not yet started.
6590    ///
6591    /// Note: The implementation of this method must not depend on a response
6592    /// from an ethernet driver, otherwise there is a risk of deadlock.
6593    /// The wlansoftmac driver calls this method synchronously while
6594    /// serving the fuchsia.hardware.ethernet/EthernetImpl.Query method.
6595    Query { responder: WlanSoftmacBridgeQueryResponder },
6596    /// Gets information about the station discovery (e.g., scanning and
6597    /// probing) features supported by the device. This method is safe to call
6598    /// even when the SoftMAC has not yet started.
6599    QueryDiscoverySupport { responder: WlanSoftmacBridgeQueryDiscoverySupportResponder },
6600    /// Gets information about the MAC features supported by the device. This
6601    /// method is safe to call even when the SoftMAC has not yet started.
6602    ///
6603    /// Note: The implementation of this method must not depend on a response
6604    /// from an ethernet driver, otherwise there is a risk of deadlock.
6605    /// The wlansoftmac driver calls this method synchronously while
6606    /// serving the fuchsia.hardware.ethernet/EthernetImpl.Query method.
6607    QueryMacSublayerSupport { responder: WlanSoftmacBridgeQueryMacSublayerSupportResponder },
6608    /// Gets information about the security features supported by the device.
6609    /// This method is safe to call even when the SoftMAC has not yet started.
6610    QuerySecuritySupport { responder: WlanSoftmacBridgeQuerySecuritySupportResponder },
6611    /// Gets information about the spectrum usage (e.g., DFS) features supported
6612    /// by the device. This method is safe to call even when the SoftMAC has not
6613    /// yet started.
6614    QuerySpectrumManagementSupport {
6615        responder: WlanSoftmacBridgeQuerySpectrumManagementSupportResponder,
6616    },
6617    /// Set the primary radio channel, e.g. in response to a channel switch event.
6618    /// If successful, this will trigger the channel switch immediately. This may
6619    /// impact the transmission of any frames that are in-flight, and might also
6620    /// interfere with an ongoing scan request.
6621    ///
6622    /// Common errors include: \
6623    ///   ZX_ERR_NOT_SUPPORTED: The device cannot switch to the requested channel.
6624    SetChannel {
6625        payload: WlanSoftmacBaseSetChannelRequest,
6626        responder: WlanSoftmacBridgeSetChannelResponder,
6627    },
6628    /// Join a specific BSS in which we will participate.
6629    /// This applies regardless of if we are hosting the BSS or joining it
6630    /// (indicated by the `remote` flag in `JoinBssRequest`).
6631    /// If successful, the device will switch to the correct channel and perform
6632    /// any internal filtering/timing operations required to join the BSS.
6633    /// For client STAs, this is the first step before authenticating.
6634    ///
6635    /// Common errors include: \
6636    ///   ZX_ERR_NOT_SUPPORTED: The device does not support the given bss config.
6637    JoinBss {
6638        join_request: fidl_fuchsia_wlan_common::JoinBssRequest,
6639        responder: WlanSoftmacBridgeJoinBssResponder,
6640    },
6641    /// Enables hardware Beaconing.
6642    ///
6643    /// This method cannot be called while beaconing is enabled and so
6644    /// `DisableBeaconing` must be called prior to this method if beaconing is
6645    /// enabled.
6646    ///
6647    /// All request fields are required.
6648    ///
6649    /// Common errors include:
6650    ///
6651    /// - `ZX_ERR_NOT_SUPPORTED`: The device does not support hardware beacons.
6652    /// - `ZX_ERR_INVALID_ARGS`: The device cannot transmit the requested
6653    ///                          beacon.
6654    /// - `ZX_ERR_BAD_STATE`: The device is already beaconing.
6655    EnableBeaconing {
6656        payload: WlanSoftmacBaseEnableBeaconingRequest,
6657        responder: WlanSoftmacBridgeEnableBeaconingResponder,
6658    },
6659    /// Disables hardware beaconing.
6660    DisableBeaconing { responder: WlanSoftmacBridgeDisableBeaconingResponder },
6661    /// Install a key for encryption when transmitting or receiving protected
6662    /// frames.
6663    ///
6664    /// Common errors include:
6665    ///   ZX_ERR_INVALID_ARGS: The given config does not specify a valid key.
6666    ///   ZX_ERR_NOT_SUPPORTED: The device does not support the given cipher.
6667    InstallKey { payload: WlanKeyConfiguration, responder: WlanSoftmacBridgeInstallKeyResponder },
6668    /// Notifies the device of a successful association and configures
6669    /// additional parameters necessary to participate in that association.
6670    ///
6671    /// # Errors
6672    ///
6673    /// Common errors include:
6674    ///
6675    /// - `ZX_ERR_BAD_STATE`: The device was not previously informed of this BSS
6676    ///                       via `WlanSoftmac.JoinBss`.
6677    NotifyAssociationComplete {
6678        assoc_cfg: WlanAssociationConfig,
6679        responder: WlanSoftmacBridgeNotifyAssociationCompleteResponder,
6680    },
6681    /// Notifies MAC and PHY that the peer has been de-associated.
6682    ClearAssociation {
6683        payload: WlanSoftmacBaseClearAssociationRequest,
6684        responder: WlanSoftmacBridgeClearAssociationResponder,
6685    },
6686    /// Starts a passive scan. The server will deliver scan results
6687    /// as Beacon frames using WlanSoftmacIfc.Recv(). When complete,
6688    /// the server will call WlanSoftmacIfc.ScanComplete() with the
6689    /// same `scan_id` returned by StartPassiveScan().
6690    ///
6691    /// The server indicates support for `StartPassiveScan()` using
6692    /// `fuchsia.wlan.common/ScanOffloadExtension.supported`.
6693    ///
6694    /// Common errors include:
6695    ///   ZX_ERR_INVALID_ARGS: The device is not capable of performing the
6696    ///       requested scan, e.g. because an incompatible channel was requested.
6697    ///   ZX_ERR_UNAVAILABLE: The device cannot currently perform scans.
6698    ///   ZX_ERR_SHOULD_WAIT: Another scan is already in-progress.
6699    StartPassiveScan {
6700        payload: WlanSoftmacBaseStartPassiveScanRequest,
6701        responder: WlanSoftmacBridgeStartPassiveScanResponder,
6702    },
6703    /// Starts an active scan. The server will deliver scan results
6704    /// as Beacon or Probe Response frames using WlanSoftmacIfc.Recv().
6705    /// When complete, the server will call WlanSoftmacIfc.ScanComplete()
6706    /// with the same `scan_id` returned by StartActiveScan().
6707    ///
6708    /// A device driver indicates support for `StartActiveScan()` using
6709    /// `fuchsia.wlan.common/ProbeRequestOffloadExtension.supported`.
6710    ///
6711    /// Common errors include:
6712    ///   ZX_ERR_INVALID_ARGS: The device is not capable of performing the
6713    ///       requested scan, e.g. because an incompatible channel was requested.
6714    ///   ZX_ERR_UNAVAILABLE: The device cannot currently perform scans.
6715    ///   ZX_ERR_SHOULD_WAIT: Another scan is already in-progress.
6716    StartActiveScan {
6717        payload: WlanSoftmacStartActiveScanRequest,
6718        responder: WlanSoftmacBridgeStartActiveScanResponder,
6719    },
6720    /// Cancels the ongoing scan corresponding to `scan_id`,
6721    /// where `scan_id` is an identifier returned by
6722    /// `StartPassiveScan()` or `StartActiveScan()`. If cancellation succeeds,
6723    /// the server will soon call WlanSoftmacIfc.ScanComplete() with the same
6724    /// `scan_id`.
6725    ///
6726    /// A device driver indicates support for `CancelScan()` using
6727    /// `fuchsia.wlan.common/ScanOffloadExtension.scan_cancel_supported`.
6728    ///
6729    /// Common errors include:
6730    ///
6731    /// - `ZX_ERR_NOT_FOUND`: `scan_id` does not match an ongoing scan.
6732    /// - `ZX_ERR_NOT_SUPPORTED`: Server does not support scan cancellation.
6733    CancelScan {
6734        payload: WlanSoftmacBaseCancelScanRequest,
6735        responder: WlanSoftmacBridgeCancelScanResponder,
6736    },
6737    /// Indicate the device of modified WiFi Multimedia (WMM) parameters for a
6738    /// particular access category (AC).
6739    UpdateWmmParameters {
6740        payload: WlanSoftmacBaseUpdateWmmParametersRequest,
6741        responder: WlanSoftmacBridgeUpdateWmmParametersResponder,
6742    },
6743    /// Signal to the server that the MLME for the iface is ready to send and receive
6744    /// frames.
6745    ///
6746    /// The client provides the following arguments:
6747    ///
6748    ///   - `ifc_bridge`: The client end of a `WlanSoftmacIfcBridge` server which the
6749    ///     `wlansoftmac` driver will use to forward `WlanSoftmacIfc` events to
6750    ///     the bridged driver.
6751    ///   - `ethernet_tx`: A `ethernet_tx_t*` casted to a `uint64`. The
6752    ///     `ethernet_tx_t` is defined in
6753    ///     `//src/connectivity/wlan/drivers/wlansoftmac/rust_driver/c-binding/bindings.h`.
6754    ///   - `wlan_rx`: A `wlan_rx_t*` casted to a `uint64`. The
6755    ///     `wlan_rx_t` is defined in
6756    ///     `//src/connectivity/wlan/drivers/wlansoftmac/rust_driver/c-binding/bindings.h`.
6757    ///
6758    /// The server must copy the contents of `ethernet_tx_t` and `wlan_rx_t` before
6759    /// returning from this method. The lifetimes of `ethernet_tx_t*` and `wlan_rx_t*` are only as
6760    /// long as this method call, but the contents of `ethernet_tx_t` and `wlan_rx_t` will
6761    /// live until the server stops the MLME.
6762    ///
6763    /// The server returns a server end of a `fuchsia.wlan.mlme/MLME` protocol. The SME
6764    /// for the iface owns the client end. Thus, this channel is used for SME <-> MLME
6765    /// communication.
6766    ///
6767    /// The `WlanSoftmacBridge.Start` method is different from `WlanSoftmac.Start`
6768    /// for two reasons. First, Rust bindings do not exist for Driver transported
6769    /// protocols, so `WlanSoftmacIfcBridge` protocol must be Zircon transported to be
6770    /// usable by the bridged driver. Second, the Zircon transport adds
6771    /// significant latency compared to the Driver transport. As a result, the
6772    /// `ethernet_tx` and `wlan_rx` arguments provide an FFI for the wlansoftmac driver
6773    /// to send Ethernet and receive WLAN packets to the bridged driver with
6774    /// latency comparable or better than a Driver transported protocol.
6775    ///
6776    /// Except where noted, `WlanSoftmacBridge` methods must only be called after
6777    /// a successful call to `WlanSoftmacBridge.Start`.
6778    ///
6779    /// Common errors include:
6780    ///
6781    ///   - `ZX_ERR_ALREADY_BOUND`: `Start` was already called on this softmac.
6782    Start {
6783        ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
6784        ethernet_tx: u64,
6785        wlan_rx: u64,
6786        responder: WlanSoftmacBridgeStartResponder,
6787    },
6788    /// Forwards a status containing `ETHERNET_STATUS_*` flags to the
6789    /// `fuchsia.hardware.ethernet/EthernetImplIfc` proxy owned by
6790    /// the C++ portion of wlansoftmac.
6791    ///
6792    /// As documented, the value of `status` is set by bits defined in
6793    /// `ETHERNET_STATUS_*` flags. However, there is only one flag named
6794    /// `ETHERNET_STATUS_ONLINE` and no specification of for the meaning
6795    /// of specifying no flags. In practice, `0x1` means the status is up,
6796    /// and `0x0` means the status is down.
6797    ///
6798    /// While this method should belong in something like an
6799    /// "`EthernetImplIfcBridge` protocol", it's included in the
6800    /// `WlanSoftmacBridge` protocol as a convenience. The wlansoftmac driver
6801    /// will eventually cease using a `fuchsia.hardware.ethernet/EthernetImplIfc`
6802    /// proxy and use a `fuchsia.hardware.network.driver/NetworkDeviceIfc`
6803    /// proxy instead. At that time, an equivalent of this method should be
6804    /// refactored into a separate bridge.
6805    SetEthernetStatus { status: u32, responder: WlanSoftmacBridgeSetEthernetStatusResponder },
6806}
6807
6808impl WlanSoftmacBridgeRequest {
6809    #[allow(irrefutable_let_patterns)]
6810    pub fn into_query(self) -> Option<(WlanSoftmacBridgeQueryResponder)> {
6811        if let WlanSoftmacBridgeRequest::Query { responder } = self {
6812            Some((responder))
6813        } else {
6814            None
6815        }
6816    }
6817
6818    #[allow(irrefutable_let_patterns)]
6819    pub fn into_query_discovery_support(
6820        self,
6821    ) -> Option<(WlanSoftmacBridgeQueryDiscoverySupportResponder)> {
6822        if let WlanSoftmacBridgeRequest::QueryDiscoverySupport { responder } = self {
6823            Some((responder))
6824        } else {
6825            None
6826        }
6827    }
6828
6829    #[allow(irrefutable_let_patterns)]
6830    pub fn into_query_mac_sublayer_support(
6831        self,
6832    ) -> Option<(WlanSoftmacBridgeQueryMacSublayerSupportResponder)> {
6833        if let WlanSoftmacBridgeRequest::QueryMacSublayerSupport { responder } = self {
6834            Some((responder))
6835        } else {
6836            None
6837        }
6838    }
6839
6840    #[allow(irrefutable_let_patterns)]
6841    pub fn into_query_security_support(
6842        self,
6843    ) -> Option<(WlanSoftmacBridgeQuerySecuritySupportResponder)> {
6844        if let WlanSoftmacBridgeRequest::QuerySecuritySupport { responder } = self {
6845            Some((responder))
6846        } else {
6847            None
6848        }
6849    }
6850
6851    #[allow(irrefutable_let_patterns)]
6852    pub fn into_query_spectrum_management_support(
6853        self,
6854    ) -> Option<(WlanSoftmacBridgeQuerySpectrumManagementSupportResponder)> {
6855        if let WlanSoftmacBridgeRequest::QuerySpectrumManagementSupport { responder } = self {
6856            Some((responder))
6857        } else {
6858            None
6859        }
6860    }
6861
6862    #[allow(irrefutable_let_patterns)]
6863    pub fn into_set_channel(
6864        self,
6865    ) -> Option<(WlanSoftmacBaseSetChannelRequest, WlanSoftmacBridgeSetChannelResponder)> {
6866        if let WlanSoftmacBridgeRequest::SetChannel { payload, responder } = self {
6867            Some((payload, responder))
6868        } else {
6869            None
6870        }
6871    }
6872
6873    #[allow(irrefutable_let_patterns)]
6874    pub fn into_join_bss(
6875        self,
6876    ) -> Option<(fidl_fuchsia_wlan_common::JoinBssRequest, WlanSoftmacBridgeJoinBssResponder)> {
6877        if let WlanSoftmacBridgeRequest::JoinBss { join_request, responder } = self {
6878            Some((join_request, responder))
6879        } else {
6880            None
6881        }
6882    }
6883
6884    #[allow(irrefutable_let_patterns)]
6885    pub fn into_enable_beaconing(
6886        self,
6887    ) -> Option<(WlanSoftmacBaseEnableBeaconingRequest, WlanSoftmacBridgeEnableBeaconingResponder)>
6888    {
6889        if let WlanSoftmacBridgeRequest::EnableBeaconing { payload, responder } = self {
6890            Some((payload, responder))
6891        } else {
6892            None
6893        }
6894    }
6895
6896    #[allow(irrefutable_let_patterns)]
6897    pub fn into_disable_beaconing(self) -> Option<(WlanSoftmacBridgeDisableBeaconingResponder)> {
6898        if let WlanSoftmacBridgeRequest::DisableBeaconing { responder } = self {
6899            Some((responder))
6900        } else {
6901            None
6902        }
6903    }
6904
6905    #[allow(irrefutable_let_patterns)]
6906    pub fn into_install_key(
6907        self,
6908    ) -> Option<(WlanKeyConfiguration, WlanSoftmacBridgeInstallKeyResponder)> {
6909        if let WlanSoftmacBridgeRequest::InstallKey { payload, responder } = self {
6910            Some((payload, responder))
6911        } else {
6912            None
6913        }
6914    }
6915
6916    #[allow(irrefutable_let_patterns)]
6917    pub fn into_notify_association_complete(
6918        self,
6919    ) -> Option<(WlanAssociationConfig, WlanSoftmacBridgeNotifyAssociationCompleteResponder)> {
6920        if let WlanSoftmacBridgeRequest::NotifyAssociationComplete { assoc_cfg, responder } = self {
6921            Some((assoc_cfg, responder))
6922        } else {
6923            None
6924        }
6925    }
6926
6927    #[allow(irrefutable_let_patterns)]
6928    pub fn into_clear_association(
6929        self,
6930    ) -> Option<(WlanSoftmacBaseClearAssociationRequest, WlanSoftmacBridgeClearAssociationResponder)>
6931    {
6932        if let WlanSoftmacBridgeRequest::ClearAssociation { payload, responder } = self {
6933            Some((payload, responder))
6934        } else {
6935            None
6936        }
6937    }
6938
6939    #[allow(irrefutable_let_patterns)]
6940    pub fn into_start_passive_scan(
6941        self,
6942    ) -> Option<(WlanSoftmacBaseStartPassiveScanRequest, WlanSoftmacBridgeStartPassiveScanResponder)>
6943    {
6944        if let WlanSoftmacBridgeRequest::StartPassiveScan { payload, responder } = self {
6945            Some((payload, responder))
6946        } else {
6947            None
6948        }
6949    }
6950
6951    #[allow(irrefutable_let_patterns)]
6952    pub fn into_start_active_scan(
6953        self,
6954    ) -> Option<(WlanSoftmacStartActiveScanRequest, WlanSoftmacBridgeStartActiveScanResponder)>
6955    {
6956        if let WlanSoftmacBridgeRequest::StartActiveScan { payload, responder } = self {
6957            Some((payload, responder))
6958        } else {
6959            None
6960        }
6961    }
6962
6963    #[allow(irrefutable_let_patterns)]
6964    pub fn into_cancel_scan(
6965        self,
6966    ) -> Option<(WlanSoftmacBaseCancelScanRequest, WlanSoftmacBridgeCancelScanResponder)> {
6967        if let WlanSoftmacBridgeRequest::CancelScan { payload, responder } = self {
6968            Some((payload, responder))
6969        } else {
6970            None
6971        }
6972    }
6973
6974    #[allow(irrefutable_let_patterns)]
6975    pub fn into_update_wmm_parameters(
6976        self,
6977    ) -> Option<(
6978        WlanSoftmacBaseUpdateWmmParametersRequest,
6979        WlanSoftmacBridgeUpdateWmmParametersResponder,
6980    )> {
6981        if let WlanSoftmacBridgeRequest::UpdateWmmParameters { payload, responder } = self {
6982            Some((payload, responder))
6983        } else {
6984            None
6985        }
6986    }
6987
6988    #[allow(irrefutable_let_patterns)]
6989    pub fn into_start(
6990        self,
6991    ) -> Option<(
6992        fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
6993        u64,
6994        u64,
6995        WlanSoftmacBridgeStartResponder,
6996    )> {
6997        if let WlanSoftmacBridgeRequest::Start { ifc_bridge, ethernet_tx, wlan_rx, responder } =
6998            self
6999        {
7000            Some((ifc_bridge, ethernet_tx, wlan_rx, responder))
7001        } else {
7002            None
7003        }
7004    }
7005
7006    #[allow(irrefutable_let_patterns)]
7007    pub fn into_set_ethernet_status(
7008        self,
7009    ) -> Option<(u32, WlanSoftmacBridgeSetEthernetStatusResponder)> {
7010        if let WlanSoftmacBridgeRequest::SetEthernetStatus { status, responder } = self {
7011            Some((status, responder))
7012        } else {
7013            None
7014        }
7015    }
7016
7017    /// Name of the method defined in FIDL
7018    pub fn method_name(&self) -> &'static str {
7019        match *self {
7020            WlanSoftmacBridgeRequest::Query { .. } => "query",
7021            WlanSoftmacBridgeRequest::QueryDiscoverySupport { .. } => "query_discovery_support",
7022            WlanSoftmacBridgeRequest::QueryMacSublayerSupport { .. } => {
7023                "query_mac_sublayer_support"
7024            }
7025            WlanSoftmacBridgeRequest::QuerySecuritySupport { .. } => "query_security_support",
7026            WlanSoftmacBridgeRequest::QuerySpectrumManagementSupport { .. } => {
7027                "query_spectrum_management_support"
7028            }
7029            WlanSoftmacBridgeRequest::SetChannel { .. } => "set_channel",
7030            WlanSoftmacBridgeRequest::JoinBss { .. } => "join_bss",
7031            WlanSoftmacBridgeRequest::EnableBeaconing { .. } => "enable_beaconing",
7032            WlanSoftmacBridgeRequest::DisableBeaconing { .. } => "disable_beaconing",
7033            WlanSoftmacBridgeRequest::InstallKey { .. } => "install_key",
7034            WlanSoftmacBridgeRequest::NotifyAssociationComplete { .. } => {
7035                "notify_association_complete"
7036            }
7037            WlanSoftmacBridgeRequest::ClearAssociation { .. } => "clear_association",
7038            WlanSoftmacBridgeRequest::StartPassiveScan { .. } => "start_passive_scan",
7039            WlanSoftmacBridgeRequest::StartActiveScan { .. } => "start_active_scan",
7040            WlanSoftmacBridgeRequest::CancelScan { .. } => "cancel_scan",
7041            WlanSoftmacBridgeRequest::UpdateWmmParameters { .. } => "update_wmm_parameters",
7042            WlanSoftmacBridgeRequest::Start { .. } => "start",
7043            WlanSoftmacBridgeRequest::SetEthernetStatus { .. } => "set_ethernet_status",
7044        }
7045    }
7046}
7047
7048#[derive(Debug, Clone)]
7049pub struct WlanSoftmacBridgeControlHandle {
7050    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7051}
7052
7053impl fidl::endpoints::ControlHandle for WlanSoftmacBridgeControlHandle {
7054    fn shutdown(&self) {
7055        self.inner.shutdown()
7056    }
7057    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7058        self.inner.shutdown_with_epitaph(status)
7059    }
7060
7061    fn is_closed(&self) -> bool {
7062        self.inner.channel().is_closed()
7063    }
7064    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
7065        self.inner.channel().on_closed()
7066    }
7067
7068    #[cfg(target_os = "fuchsia")]
7069    fn signal_peer(
7070        &self,
7071        clear_mask: zx::Signals,
7072        set_mask: zx::Signals,
7073    ) -> Result<(), zx_status::Status> {
7074        use fidl::Peered;
7075        self.inner.channel().signal_peer(clear_mask, set_mask)
7076    }
7077}
7078
7079impl WlanSoftmacBridgeControlHandle {}
7080
7081#[must_use = "FIDL methods require a response to be sent"]
7082#[derive(Debug)]
7083pub struct WlanSoftmacBridgeQueryResponder {
7084    control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7085    tx_id: u32,
7086}
7087
7088/// Set the the channel to be shutdown (see [`WlanSoftmacBridgeControlHandle::shutdown`])
7089/// if the responder is dropped without sending a response, so that the client
7090/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
7091impl std::ops::Drop for WlanSoftmacBridgeQueryResponder {
7092    fn drop(&mut self) {
7093        self.control_handle.shutdown();
7094        // Safety: drops once, never accessed again
7095        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7096    }
7097}
7098
7099impl fidl::endpoints::Responder for WlanSoftmacBridgeQueryResponder {
7100    type ControlHandle = WlanSoftmacBridgeControlHandle;
7101
7102    fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7103        &self.control_handle
7104    }
7105
7106    fn drop_without_shutdown(mut self) {
7107        // Safety: drops once, never accessed again due to mem::forget
7108        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7109        // Prevent Drop from running (which would shut down the channel)
7110        std::mem::forget(self);
7111    }
7112}
7113
7114impl WlanSoftmacBridgeQueryResponder {
7115    /// Sends a response to the FIDL transaction.
7116    ///
7117    /// Sets the channel to shutdown if an error occurs.
7118    pub fn send(
7119        self,
7120        mut result: Result<&WlanSoftmacQueryResponse, i32>,
7121    ) -> Result<(), fidl::Error> {
7122        let _result = self.send_raw(result);
7123        if _result.is_err() {
7124            self.control_handle.shutdown();
7125        }
7126        self.drop_without_shutdown();
7127        _result
7128    }
7129
7130    /// Similar to "send" but does not shutdown the channel if an error occurs.
7131    pub fn send_no_shutdown_on_err(
7132        self,
7133        mut result: Result<&WlanSoftmacQueryResponse, i32>,
7134    ) -> Result<(), fidl::Error> {
7135        let _result = self.send_raw(result);
7136        self.drop_without_shutdown();
7137        _result
7138    }
7139
7140    fn send_raw(
7141        &self,
7142        mut result: Result<&WlanSoftmacQueryResponse, i32>,
7143    ) -> Result<(), fidl::Error> {
7144        self.control_handle.inner.send::<fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>>(
7145            result,
7146            self.tx_id,
7147            0x18231a638e508f9d,
7148            fidl::encoding::DynamicFlags::empty(),
7149        )
7150    }
7151}
7152
7153#[must_use = "FIDL methods require a response to be sent"]
7154#[derive(Debug)]
7155pub struct WlanSoftmacBridgeQueryDiscoverySupportResponder {
7156    control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7157    tx_id: u32,
7158}
7159
7160/// Set the the channel to be shutdown (see [`WlanSoftmacBridgeControlHandle::shutdown`])
7161/// if the responder is dropped without sending a response, so that the client
7162/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
7163impl std::ops::Drop for WlanSoftmacBridgeQueryDiscoverySupportResponder {
7164    fn drop(&mut self) {
7165        self.control_handle.shutdown();
7166        // Safety: drops once, never accessed again
7167        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7168    }
7169}
7170
7171impl fidl::endpoints::Responder for WlanSoftmacBridgeQueryDiscoverySupportResponder {
7172    type ControlHandle = WlanSoftmacBridgeControlHandle;
7173
7174    fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7175        &self.control_handle
7176    }
7177
7178    fn drop_without_shutdown(mut self) {
7179        // Safety: drops once, never accessed again due to mem::forget
7180        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7181        // Prevent Drop from running (which would shut down the channel)
7182        std::mem::forget(self);
7183    }
7184}
7185
7186impl WlanSoftmacBridgeQueryDiscoverySupportResponder {
7187    /// Sends a response to the FIDL transaction.
7188    ///
7189    /// Sets the channel to shutdown if an error occurs.
7190    pub fn send(self, mut result: Result<&DiscoverySupport, i32>) -> Result<(), fidl::Error> {
7191        let _result = self.send_raw(result);
7192        if _result.is_err() {
7193            self.control_handle.shutdown();
7194        }
7195        self.drop_without_shutdown();
7196        _result
7197    }
7198
7199    /// Similar to "send" but does not shutdown the channel if an error occurs.
7200    pub fn send_no_shutdown_on_err(
7201        self,
7202        mut result: Result<&DiscoverySupport, i32>,
7203    ) -> Result<(), fidl::Error> {
7204        let _result = self.send_raw(result);
7205        self.drop_without_shutdown();
7206        _result
7207    }
7208
7209    fn send_raw(&self, mut result: Result<&DiscoverySupport, i32>) -> Result<(), fidl::Error> {
7210        self.control_handle.inner.send::<fidl::encoding::ResultType<
7211            WlanSoftmacBaseQueryDiscoverySupportResponse,
7212            i32,
7213        >>(
7214            result.map(|resp| (resp,)),
7215            self.tx_id,
7216            0x16797affc0cb58ae,
7217            fidl::encoding::DynamicFlags::empty(),
7218        )
7219    }
7220}
7221
7222#[must_use = "FIDL methods require a response to be sent"]
7223#[derive(Debug)]
7224pub struct WlanSoftmacBridgeQueryMacSublayerSupportResponder {
7225    control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7226    tx_id: u32,
7227}
7228
7229/// Set the the channel to be shutdown (see [`WlanSoftmacBridgeControlHandle::shutdown`])
7230/// if the responder is dropped without sending a response, so that the client
7231/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
7232impl std::ops::Drop for WlanSoftmacBridgeQueryMacSublayerSupportResponder {
7233    fn drop(&mut self) {
7234        self.control_handle.shutdown();
7235        // Safety: drops once, never accessed again
7236        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7237    }
7238}
7239
7240impl fidl::endpoints::Responder for WlanSoftmacBridgeQueryMacSublayerSupportResponder {
7241    type ControlHandle = WlanSoftmacBridgeControlHandle;
7242
7243    fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7244        &self.control_handle
7245    }
7246
7247    fn drop_without_shutdown(mut self) {
7248        // Safety: drops once, never accessed again due to mem::forget
7249        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7250        // Prevent Drop from running (which would shut down the channel)
7251        std::mem::forget(self);
7252    }
7253}
7254
7255impl WlanSoftmacBridgeQueryMacSublayerSupportResponder {
7256    /// Sends a response to the FIDL transaction.
7257    ///
7258    /// Sets the channel to shutdown if an error occurs.
7259    pub fn send(
7260        self,
7261        mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
7262    ) -> Result<(), fidl::Error> {
7263        let _result = self.send_raw(result);
7264        if _result.is_err() {
7265            self.control_handle.shutdown();
7266        }
7267        self.drop_without_shutdown();
7268        _result
7269    }
7270
7271    /// Similar to "send" but does not shutdown the channel if an error occurs.
7272    pub fn send_no_shutdown_on_err(
7273        self,
7274        mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
7275    ) -> Result<(), fidl::Error> {
7276        let _result = self.send_raw(result);
7277        self.drop_without_shutdown();
7278        _result
7279    }
7280
7281    fn send_raw(
7282        &self,
7283        mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
7284    ) -> Result<(), fidl::Error> {
7285        self.control_handle.inner.send::<fidl::encoding::ResultType<
7286            WlanSoftmacBaseQueryMacSublayerSupportResponse,
7287            i32,
7288        >>(
7289            result.map(|resp| (resp,)),
7290            self.tx_id,
7291            0x7302c3f8c131f075,
7292            fidl::encoding::DynamicFlags::empty(),
7293        )
7294    }
7295}
7296
7297#[must_use = "FIDL methods require a response to be sent"]
7298#[derive(Debug)]
7299pub struct WlanSoftmacBridgeQuerySecuritySupportResponder {
7300    control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7301    tx_id: u32,
7302}
7303
7304/// Set the the channel to be shutdown (see [`WlanSoftmacBridgeControlHandle::shutdown`])
7305/// if the responder is dropped without sending a response, so that the client
7306/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
7307impl std::ops::Drop for WlanSoftmacBridgeQuerySecuritySupportResponder {
7308    fn drop(&mut self) {
7309        self.control_handle.shutdown();
7310        // Safety: drops once, never accessed again
7311        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7312    }
7313}
7314
7315impl fidl::endpoints::Responder for WlanSoftmacBridgeQuerySecuritySupportResponder {
7316    type ControlHandle = WlanSoftmacBridgeControlHandle;
7317
7318    fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7319        &self.control_handle
7320    }
7321
7322    fn drop_without_shutdown(mut self) {
7323        // Safety: drops once, never accessed again due to mem::forget
7324        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7325        // Prevent Drop from running (which would shut down the channel)
7326        std::mem::forget(self);
7327    }
7328}
7329
7330impl WlanSoftmacBridgeQuerySecuritySupportResponder {
7331    /// Sends a response to the FIDL transaction.
7332    ///
7333    /// Sets the channel to shutdown if an error occurs.
7334    pub fn send(
7335        self,
7336        mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
7337    ) -> Result<(), fidl::Error> {
7338        let _result = self.send_raw(result);
7339        if _result.is_err() {
7340            self.control_handle.shutdown();
7341        }
7342        self.drop_without_shutdown();
7343        _result
7344    }
7345
7346    /// Similar to "send" but does not shutdown the channel if an error occurs.
7347    pub fn send_no_shutdown_on_err(
7348        self,
7349        mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
7350    ) -> Result<(), fidl::Error> {
7351        let _result = self.send_raw(result);
7352        self.drop_without_shutdown();
7353        _result
7354    }
7355
7356    fn send_raw(
7357        &self,
7358        mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
7359    ) -> Result<(), fidl::Error> {
7360        self.control_handle.inner.send::<fidl::encoding::ResultType<
7361            WlanSoftmacBaseQuerySecuritySupportResponse,
7362            i32,
7363        >>(
7364            result.map(|resp| (resp,)),
7365            self.tx_id,
7366            0x3691bb75abf6354,
7367            fidl::encoding::DynamicFlags::empty(),
7368        )
7369    }
7370}
7371
7372#[must_use = "FIDL methods require a response to be sent"]
7373#[derive(Debug)]
7374pub struct WlanSoftmacBridgeQuerySpectrumManagementSupportResponder {
7375    control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7376    tx_id: u32,
7377}
7378
7379/// Set the the channel to be shutdown (see [`WlanSoftmacBridgeControlHandle::shutdown`])
7380/// if the responder is dropped without sending a response, so that the client
7381/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
7382impl std::ops::Drop for WlanSoftmacBridgeQuerySpectrumManagementSupportResponder {
7383    fn drop(&mut self) {
7384        self.control_handle.shutdown();
7385        // Safety: drops once, never accessed again
7386        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7387    }
7388}
7389
7390impl fidl::endpoints::Responder for WlanSoftmacBridgeQuerySpectrumManagementSupportResponder {
7391    type ControlHandle = WlanSoftmacBridgeControlHandle;
7392
7393    fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7394        &self.control_handle
7395    }
7396
7397    fn drop_without_shutdown(mut self) {
7398        // Safety: drops once, never accessed again due to mem::forget
7399        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7400        // Prevent Drop from running (which would shut down the channel)
7401        std::mem::forget(self);
7402    }
7403}
7404
7405impl WlanSoftmacBridgeQuerySpectrumManagementSupportResponder {
7406    /// Sends a response to the FIDL transaction.
7407    ///
7408    /// Sets the channel to shutdown if an error occurs.
7409    pub fn send(
7410        self,
7411        mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
7412    ) -> Result<(), fidl::Error> {
7413        let _result = self.send_raw(result);
7414        if _result.is_err() {
7415            self.control_handle.shutdown();
7416        }
7417        self.drop_without_shutdown();
7418        _result
7419    }
7420
7421    /// Similar to "send" but does not shutdown the channel if an error occurs.
7422    pub fn send_no_shutdown_on_err(
7423        self,
7424        mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
7425    ) -> Result<(), fidl::Error> {
7426        let _result = self.send_raw(result);
7427        self.drop_without_shutdown();
7428        _result
7429    }
7430
7431    fn send_raw(
7432        &self,
7433        mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
7434    ) -> Result<(), fidl::Error> {
7435        self.control_handle.inner.send::<fidl::encoding::ResultType<
7436            WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
7437            i32,
7438        >>(
7439            result.map(|resp| (resp,)),
7440            self.tx_id,
7441            0x347d78dc1d4d27bf,
7442            fidl::encoding::DynamicFlags::empty(),
7443        )
7444    }
7445}
7446
7447#[must_use = "FIDL methods require a response to be sent"]
7448#[derive(Debug)]
7449pub struct WlanSoftmacBridgeSetChannelResponder {
7450    control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7451    tx_id: u32,
7452}
7453
7454/// Set the the channel to be shutdown (see [`WlanSoftmacBridgeControlHandle::shutdown`])
7455/// if the responder is dropped without sending a response, so that the client
7456/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
7457impl std::ops::Drop for WlanSoftmacBridgeSetChannelResponder {
7458    fn drop(&mut self) {
7459        self.control_handle.shutdown();
7460        // Safety: drops once, never accessed again
7461        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7462    }
7463}
7464
7465impl fidl::endpoints::Responder for WlanSoftmacBridgeSetChannelResponder {
7466    type ControlHandle = WlanSoftmacBridgeControlHandle;
7467
7468    fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7469        &self.control_handle
7470    }
7471
7472    fn drop_without_shutdown(mut self) {
7473        // Safety: drops once, never accessed again due to mem::forget
7474        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7475        // Prevent Drop from running (which would shut down the channel)
7476        std::mem::forget(self);
7477    }
7478}
7479
7480impl WlanSoftmacBridgeSetChannelResponder {
7481    /// Sends a response to the FIDL transaction.
7482    ///
7483    /// Sets the channel to shutdown if an error occurs.
7484    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7485        let _result = self.send_raw(result);
7486        if _result.is_err() {
7487            self.control_handle.shutdown();
7488        }
7489        self.drop_without_shutdown();
7490        _result
7491    }
7492
7493    /// Similar to "send" but does not shutdown the channel if an error occurs.
7494    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7495        let _result = self.send_raw(result);
7496        self.drop_without_shutdown();
7497        _result
7498    }
7499
7500    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7501        self.control_handle
7502            .inner
7503            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
7504                result,
7505                self.tx_id,
7506                0x12836b533cd63ece,
7507                fidl::encoding::DynamicFlags::empty(),
7508            )
7509    }
7510}
7511
7512#[must_use = "FIDL methods require a response to be sent"]
7513#[derive(Debug)]
7514pub struct WlanSoftmacBridgeJoinBssResponder {
7515    control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7516    tx_id: u32,
7517}
7518
7519/// Set the the channel to be shutdown (see [`WlanSoftmacBridgeControlHandle::shutdown`])
7520/// if the responder is dropped without sending a response, so that the client
7521/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
7522impl std::ops::Drop for WlanSoftmacBridgeJoinBssResponder {
7523    fn drop(&mut self) {
7524        self.control_handle.shutdown();
7525        // Safety: drops once, never accessed again
7526        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7527    }
7528}
7529
7530impl fidl::endpoints::Responder for WlanSoftmacBridgeJoinBssResponder {
7531    type ControlHandle = WlanSoftmacBridgeControlHandle;
7532
7533    fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7534        &self.control_handle
7535    }
7536
7537    fn drop_without_shutdown(mut self) {
7538        // Safety: drops once, never accessed again due to mem::forget
7539        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7540        // Prevent Drop from running (which would shut down the channel)
7541        std::mem::forget(self);
7542    }
7543}
7544
7545impl WlanSoftmacBridgeJoinBssResponder {
7546    /// Sends a response to the FIDL transaction.
7547    ///
7548    /// Sets the channel to shutdown if an error occurs.
7549    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7550        let _result = self.send_raw(result);
7551        if _result.is_err() {
7552            self.control_handle.shutdown();
7553        }
7554        self.drop_without_shutdown();
7555        _result
7556    }
7557
7558    /// Similar to "send" but does not shutdown the channel if an error occurs.
7559    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7560        let _result = self.send_raw(result);
7561        self.drop_without_shutdown();
7562        _result
7563    }
7564
7565    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7566        self.control_handle
7567            .inner
7568            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
7569                result,
7570                self.tx_id,
7571                0x1336fb5455b77a6e,
7572                fidl::encoding::DynamicFlags::empty(),
7573            )
7574    }
7575}
7576
7577#[must_use = "FIDL methods require a response to be sent"]
7578#[derive(Debug)]
7579pub struct WlanSoftmacBridgeEnableBeaconingResponder {
7580    control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7581    tx_id: u32,
7582}
7583
7584/// Set the the channel to be shutdown (see [`WlanSoftmacBridgeControlHandle::shutdown`])
7585/// if the responder is dropped without sending a response, so that the client
7586/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
7587impl std::ops::Drop for WlanSoftmacBridgeEnableBeaconingResponder {
7588    fn drop(&mut self) {
7589        self.control_handle.shutdown();
7590        // Safety: drops once, never accessed again
7591        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7592    }
7593}
7594
7595impl fidl::endpoints::Responder for WlanSoftmacBridgeEnableBeaconingResponder {
7596    type ControlHandle = WlanSoftmacBridgeControlHandle;
7597
7598    fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7599        &self.control_handle
7600    }
7601
7602    fn drop_without_shutdown(mut self) {
7603        // Safety: drops once, never accessed again due to mem::forget
7604        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7605        // Prevent Drop from running (which would shut down the channel)
7606        std::mem::forget(self);
7607    }
7608}
7609
7610impl WlanSoftmacBridgeEnableBeaconingResponder {
7611    /// Sends a response to the FIDL transaction.
7612    ///
7613    /// Sets the channel to shutdown if an error occurs.
7614    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7615        let _result = self.send_raw(result);
7616        if _result.is_err() {
7617            self.control_handle.shutdown();
7618        }
7619        self.drop_without_shutdown();
7620        _result
7621    }
7622
7623    /// Similar to "send" but does not shutdown the channel if an error occurs.
7624    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7625        let _result = self.send_raw(result);
7626        self.drop_without_shutdown();
7627        _result
7628    }
7629
7630    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7631        self.control_handle
7632            .inner
7633            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
7634                result,
7635                self.tx_id,
7636                0x6c35807632c64576,
7637                fidl::encoding::DynamicFlags::empty(),
7638            )
7639    }
7640}
7641
7642#[must_use = "FIDL methods require a response to be sent"]
7643#[derive(Debug)]
7644pub struct WlanSoftmacBridgeDisableBeaconingResponder {
7645    control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7646    tx_id: u32,
7647}
7648
7649/// Set the the channel to be shutdown (see [`WlanSoftmacBridgeControlHandle::shutdown`])
7650/// if the responder is dropped without sending a response, so that the client
7651/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
7652impl std::ops::Drop for WlanSoftmacBridgeDisableBeaconingResponder {
7653    fn drop(&mut self) {
7654        self.control_handle.shutdown();
7655        // Safety: drops once, never accessed again
7656        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7657    }
7658}
7659
7660impl fidl::endpoints::Responder for WlanSoftmacBridgeDisableBeaconingResponder {
7661    type ControlHandle = WlanSoftmacBridgeControlHandle;
7662
7663    fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7664        &self.control_handle
7665    }
7666
7667    fn drop_without_shutdown(mut self) {
7668        // Safety: drops once, never accessed again due to mem::forget
7669        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7670        // Prevent Drop from running (which would shut down the channel)
7671        std::mem::forget(self);
7672    }
7673}
7674
7675impl WlanSoftmacBridgeDisableBeaconingResponder {
7676    /// Sends a response to the FIDL transaction.
7677    ///
7678    /// Sets the channel to shutdown if an error occurs.
7679    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7680        let _result = self.send_raw(result);
7681        if _result.is_err() {
7682            self.control_handle.shutdown();
7683        }
7684        self.drop_without_shutdown();
7685        _result
7686    }
7687
7688    /// Similar to "send" but does not shutdown the channel if an error occurs.
7689    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7690        let _result = self.send_raw(result);
7691        self.drop_without_shutdown();
7692        _result
7693    }
7694
7695    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7696        self.control_handle
7697            .inner
7698            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
7699                result,
7700                self.tx_id,
7701                0x3303b30f99dbb406,
7702                fidl::encoding::DynamicFlags::empty(),
7703            )
7704    }
7705}
7706
7707#[must_use = "FIDL methods require a response to be sent"]
7708#[derive(Debug)]
7709pub struct WlanSoftmacBridgeInstallKeyResponder {
7710    control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7711    tx_id: u32,
7712}
7713
7714/// Set the the channel to be shutdown (see [`WlanSoftmacBridgeControlHandle::shutdown`])
7715/// if the responder is dropped without sending a response, so that the client
7716/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
7717impl std::ops::Drop for WlanSoftmacBridgeInstallKeyResponder {
7718    fn drop(&mut self) {
7719        self.control_handle.shutdown();
7720        // Safety: drops once, never accessed again
7721        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7722    }
7723}
7724
7725impl fidl::endpoints::Responder for WlanSoftmacBridgeInstallKeyResponder {
7726    type ControlHandle = WlanSoftmacBridgeControlHandle;
7727
7728    fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7729        &self.control_handle
7730    }
7731
7732    fn drop_without_shutdown(mut self) {
7733        // Safety: drops once, never accessed again due to mem::forget
7734        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7735        // Prevent Drop from running (which would shut down the channel)
7736        std::mem::forget(self);
7737    }
7738}
7739
7740impl WlanSoftmacBridgeInstallKeyResponder {
7741    /// Sends a response to the FIDL transaction.
7742    ///
7743    /// Sets the channel to shutdown if an error occurs.
7744    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7745        let _result = self.send_raw(result);
7746        if _result.is_err() {
7747            self.control_handle.shutdown();
7748        }
7749        self.drop_without_shutdown();
7750        _result
7751    }
7752
7753    /// Similar to "send" but does not shutdown the channel if an error occurs.
7754    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7755        let _result = self.send_raw(result);
7756        self.drop_without_shutdown();
7757        _result
7758    }
7759
7760    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7761        self.control_handle
7762            .inner
7763            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
7764                result,
7765                self.tx_id,
7766                0x7decf9b4200b9131,
7767                fidl::encoding::DynamicFlags::empty(),
7768            )
7769    }
7770}
7771
7772#[must_use = "FIDL methods require a response to be sent"]
7773#[derive(Debug)]
7774pub struct WlanSoftmacBridgeNotifyAssociationCompleteResponder {
7775    control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7776    tx_id: u32,
7777}
7778
7779/// Set the the channel to be shutdown (see [`WlanSoftmacBridgeControlHandle::shutdown`])
7780/// if the responder is dropped without sending a response, so that the client
7781/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
7782impl std::ops::Drop for WlanSoftmacBridgeNotifyAssociationCompleteResponder {
7783    fn drop(&mut self) {
7784        self.control_handle.shutdown();
7785        // Safety: drops once, never accessed again
7786        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7787    }
7788}
7789
7790impl fidl::endpoints::Responder for WlanSoftmacBridgeNotifyAssociationCompleteResponder {
7791    type ControlHandle = WlanSoftmacBridgeControlHandle;
7792
7793    fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7794        &self.control_handle
7795    }
7796
7797    fn drop_without_shutdown(mut self) {
7798        // Safety: drops once, never accessed again due to mem::forget
7799        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7800        // Prevent Drop from running (which would shut down the channel)
7801        std::mem::forget(self);
7802    }
7803}
7804
7805impl WlanSoftmacBridgeNotifyAssociationCompleteResponder {
7806    /// Sends a response to the FIDL transaction.
7807    ///
7808    /// Sets the channel to shutdown if an error occurs.
7809    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7810        let _result = self.send_raw(result);
7811        if _result.is_err() {
7812            self.control_handle.shutdown();
7813        }
7814        self.drop_without_shutdown();
7815        _result
7816    }
7817
7818    /// Similar to "send" but does not shutdown the channel if an error occurs.
7819    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7820        let _result = self.send_raw(result);
7821        self.drop_without_shutdown();
7822        _result
7823    }
7824
7825    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7826        self.control_handle
7827            .inner
7828            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
7829                result,
7830                self.tx_id,
7831                0x436ffe3ba461d6cd,
7832                fidl::encoding::DynamicFlags::empty(),
7833            )
7834    }
7835}
7836
7837#[must_use = "FIDL methods require a response to be sent"]
7838#[derive(Debug)]
7839pub struct WlanSoftmacBridgeClearAssociationResponder {
7840    control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7841    tx_id: u32,
7842}
7843
7844/// Set the the channel to be shutdown (see [`WlanSoftmacBridgeControlHandle::shutdown`])
7845/// if the responder is dropped without sending a response, so that the client
7846/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
7847impl std::ops::Drop for WlanSoftmacBridgeClearAssociationResponder {
7848    fn drop(&mut self) {
7849        self.control_handle.shutdown();
7850        // Safety: drops once, never accessed again
7851        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7852    }
7853}
7854
7855impl fidl::endpoints::Responder for WlanSoftmacBridgeClearAssociationResponder {
7856    type ControlHandle = WlanSoftmacBridgeControlHandle;
7857
7858    fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7859        &self.control_handle
7860    }
7861
7862    fn drop_without_shutdown(mut self) {
7863        // Safety: drops once, never accessed again due to mem::forget
7864        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7865        // Prevent Drop from running (which would shut down the channel)
7866        std::mem::forget(self);
7867    }
7868}
7869
7870impl WlanSoftmacBridgeClearAssociationResponder {
7871    /// Sends a response to the FIDL transaction.
7872    ///
7873    /// Sets the channel to shutdown if an error occurs.
7874    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7875        let _result = self.send_raw(result);
7876        if _result.is_err() {
7877            self.control_handle.shutdown();
7878        }
7879        self.drop_without_shutdown();
7880        _result
7881    }
7882
7883    /// Similar to "send" but does not shutdown the channel if an error occurs.
7884    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7885        let _result = self.send_raw(result);
7886        self.drop_without_shutdown();
7887        _result
7888    }
7889
7890    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7891        self.control_handle
7892            .inner
7893            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
7894                result,
7895                self.tx_id,
7896                0x581d76c39190a7dd,
7897                fidl::encoding::DynamicFlags::empty(),
7898            )
7899    }
7900}
7901
7902#[must_use = "FIDL methods require a response to be sent"]
7903#[derive(Debug)]
7904pub struct WlanSoftmacBridgeStartPassiveScanResponder {
7905    control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7906    tx_id: u32,
7907}
7908
7909/// Set the the channel to be shutdown (see [`WlanSoftmacBridgeControlHandle::shutdown`])
7910/// if the responder is dropped without sending a response, so that the client
7911/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
7912impl std::ops::Drop for WlanSoftmacBridgeStartPassiveScanResponder {
7913    fn drop(&mut self) {
7914        self.control_handle.shutdown();
7915        // Safety: drops once, never accessed again
7916        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7917    }
7918}
7919
7920impl fidl::endpoints::Responder for WlanSoftmacBridgeStartPassiveScanResponder {
7921    type ControlHandle = WlanSoftmacBridgeControlHandle;
7922
7923    fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7924        &self.control_handle
7925    }
7926
7927    fn drop_without_shutdown(mut self) {
7928        // Safety: drops once, never accessed again due to mem::forget
7929        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7930        // Prevent Drop from running (which would shut down the channel)
7931        std::mem::forget(self);
7932    }
7933}
7934
7935impl WlanSoftmacBridgeStartPassiveScanResponder {
7936    /// Sends a response to the FIDL transaction.
7937    ///
7938    /// Sets the channel to shutdown if an error occurs.
7939    pub fn send(
7940        self,
7941        mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
7942    ) -> Result<(), fidl::Error> {
7943        let _result = self.send_raw(result);
7944        if _result.is_err() {
7945            self.control_handle.shutdown();
7946        }
7947        self.drop_without_shutdown();
7948        _result
7949    }
7950
7951    /// Similar to "send" but does not shutdown the channel if an error occurs.
7952    pub fn send_no_shutdown_on_err(
7953        self,
7954        mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
7955    ) -> Result<(), fidl::Error> {
7956        let _result = self.send_raw(result);
7957        self.drop_without_shutdown();
7958        _result
7959    }
7960
7961    fn send_raw(
7962        &self,
7963        mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
7964    ) -> Result<(), fidl::Error> {
7965        self.control_handle.inner.send::<fidl::encoding::ResultType<
7966            WlanSoftmacBaseStartPassiveScanResponse,
7967            i32,
7968        >>(
7969            result,
7970            self.tx_id,
7971            0x5662f989cb4083bb,
7972            fidl::encoding::DynamicFlags::empty(),
7973        )
7974    }
7975}
7976
7977#[must_use = "FIDL methods require a response to be sent"]
7978#[derive(Debug)]
7979pub struct WlanSoftmacBridgeStartActiveScanResponder {
7980    control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7981    tx_id: u32,
7982}
7983
7984/// Set the the channel to be shutdown (see [`WlanSoftmacBridgeControlHandle::shutdown`])
7985/// if the responder is dropped without sending a response, so that the client
7986/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
7987impl std::ops::Drop for WlanSoftmacBridgeStartActiveScanResponder {
7988    fn drop(&mut self) {
7989        self.control_handle.shutdown();
7990        // Safety: drops once, never accessed again
7991        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7992    }
7993}
7994
7995impl fidl::endpoints::Responder for WlanSoftmacBridgeStartActiveScanResponder {
7996    type ControlHandle = WlanSoftmacBridgeControlHandle;
7997
7998    fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7999        &self.control_handle
8000    }
8001
8002    fn drop_without_shutdown(mut self) {
8003        // Safety: drops once, never accessed again due to mem::forget
8004        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8005        // Prevent Drop from running (which would shut down the channel)
8006        std::mem::forget(self);
8007    }
8008}
8009
8010impl WlanSoftmacBridgeStartActiveScanResponder {
8011    /// Sends a response to the FIDL transaction.
8012    ///
8013    /// Sets the channel to shutdown if an error occurs.
8014    pub fn send(
8015        self,
8016        mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
8017    ) -> Result<(), fidl::Error> {
8018        let _result = self.send_raw(result);
8019        if _result.is_err() {
8020            self.control_handle.shutdown();
8021        }
8022        self.drop_without_shutdown();
8023        _result
8024    }
8025
8026    /// Similar to "send" but does not shutdown the channel if an error occurs.
8027    pub fn send_no_shutdown_on_err(
8028        self,
8029        mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
8030    ) -> Result<(), fidl::Error> {
8031        let _result = self.send_raw(result);
8032        self.drop_without_shutdown();
8033        _result
8034    }
8035
8036    fn send_raw(
8037        &self,
8038        mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
8039    ) -> Result<(), fidl::Error> {
8040        self.control_handle.inner.send::<fidl::encoding::ResultType<
8041            WlanSoftmacBaseStartActiveScanResponse,
8042            i32,
8043        >>(
8044            result,
8045            self.tx_id,
8046            0x4896eafa9937751e,
8047            fidl::encoding::DynamicFlags::empty(),
8048        )
8049    }
8050}
8051
8052#[must_use = "FIDL methods require a response to be sent"]
8053#[derive(Debug)]
8054pub struct WlanSoftmacBridgeCancelScanResponder {
8055    control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
8056    tx_id: u32,
8057}
8058
8059/// Set the the channel to be shutdown (see [`WlanSoftmacBridgeControlHandle::shutdown`])
8060/// if the responder is dropped without sending a response, so that the client
8061/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
8062impl std::ops::Drop for WlanSoftmacBridgeCancelScanResponder {
8063    fn drop(&mut self) {
8064        self.control_handle.shutdown();
8065        // Safety: drops once, never accessed again
8066        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8067    }
8068}
8069
8070impl fidl::endpoints::Responder for WlanSoftmacBridgeCancelScanResponder {
8071    type ControlHandle = WlanSoftmacBridgeControlHandle;
8072
8073    fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8074        &self.control_handle
8075    }
8076
8077    fn drop_without_shutdown(mut self) {
8078        // Safety: drops once, never accessed again due to mem::forget
8079        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8080        // Prevent Drop from running (which would shut down the channel)
8081        std::mem::forget(self);
8082    }
8083}
8084
8085impl WlanSoftmacBridgeCancelScanResponder {
8086    /// Sends a response to the FIDL transaction.
8087    ///
8088    /// Sets the channel to shutdown if an error occurs.
8089    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8090        let _result = self.send_raw(result);
8091        if _result.is_err() {
8092            self.control_handle.shutdown();
8093        }
8094        self.drop_without_shutdown();
8095        _result
8096    }
8097
8098    /// Similar to "send" but does not shutdown the channel if an error occurs.
8099    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8100        let _result = self.send_raw(result);
8101        self.drop_without_shutdown();
8102        _result
8103    }
8104
8105    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8106        self.control_handle
8107            .inner
8108            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8109                result,
8110                self.tx_id,
8111                0xf7d859369764556,
8112                fidl::encoding::DynamicFlags::empty(),
8113            )
8114    }
8115}
8116
8117#[must_use = "FIDL methods require a response to be sent"]
8118#[derive(Debug)]
8119pub struct WlanSoftmacBridgeUpdateWmmParametersResponder {
8120    control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
8121    tx_id: u32,
8122}
8123
8124/// Set the the channel to be shutdown (see [`WlanSoftmacBridgeControlHandle::shutdown`])
8125/// if the responder is dropped without sending a response, so that the client
8126/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
8127impl std::ops::Drop for WlanSoftmacBridgeUpdateWmmParametersResponder {
8128    fn drop(&mut self) {
8129        self.control_handle.shutdown();
8130        // Safety: drops once, never accessed again
8131        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8132    }
8133}
8134
8135impl fidl::endpoints::Responder for WlanSoftmacBridgeUpdateWmmParametersResponder {
8136    type ControlHandle = WlanSoftmacBridgeControlHandle;
8137
8138    fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8139        &self.control_handle
8140    }
8141
8142    fn drop_without_shutdown(mut self) {
8143        // Safety: drops once, never accessed again due to mem::forget
8144        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8145        // Prevent Drop from running (which would shut down the channel)
8146        std::mem::forget(self);
8147    }
8148}
8149
8150impl WlanSoftmacBridgeUpdateWmmParametersResponder {
8151    /// Sends a response to the FIDL transaction.
8152    ///
8153    /// Sets the channel to shutdown if an error occurs.
8154    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8155        let _result = self.send_raw(result);
8156        if _result.is_err() {
8157            self.control_handle.shutdown();
8158        }
8159        self.drop_without_shutdown();
8160        _result
8161    }
8162
8163    /// Similar to "send" but does not shutdown the channel if an error occurs.
8164    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8165        let _result = self.send_raw(result);
8166        self.drop_without_shutdown();
8167        _result
8168    }
8169
8170    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8171        self.control_handle
8172            .inner
8173            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8174                result,
8175                self.tx_id,
8176                0x68522c7122d5f78c,
8177                fidl::encoding::DynamicFlags::empty(),
8178            )
8179    }
8180}
8181
8182#[must_use = "FIDL methods require a response to be sent"]
8183#[derive(Debug)]
8184pub struct WlanSoftmacBridgeStartResponder {
8185    control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
8186    tx_id: u32,
8187}
8188
8189/// Set the the channel to be shutdown (see [`WlanSoftmacBridgeControlHandle::shutdown`])
8190/// if the responder is dropped without sending a response, so that the client
8191/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
8192impl std::ops::Drop for WlanSoftmacBridgeStartResponder {
8193    fn drop(&mut self) {
8194        self.control_handle.shutdown();
8195        // Safety: drops once, never accessed again
8196        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8197    }
8198}
8199
8200impl fidl::endpoints::Responder for WlanSoftmacBridgeStartResponder {
8201    type ControlHandle = WlanSoftmacBridgeControlHandle;
8202
8203    fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8204        &self.control_handle
8205    }
8206
8207    fn drop_without_shutdown(mut self) {
8208        // Safety: drops once, never accessed again due to mem::forget
8209        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8210        // Prevent Drop from running (which would shut down the channel)
8211        std::mem::forget(self);
8212    }
8213}
8214
8215impl WlanSoftmacBridgeStartResponder {
8216    /// Sends a response to the FIDL transaction.
8217    ///
8218    /// Sets the channel to shutdown if an error occurs.
8219    pub fn send(self, mut result: Result<fidl::Channel, i32>) -> Result<(), fidl::Error> {
8220        let _result = self.send_raw(result);
8221        if _result.is_err() {
8222            self.control_handle.shutdown();
8223        }
8224        self.drop_without_shutdown();
8225        _result
8226    }
8227
8228    /// Similar to "send" but does not shutdown the channel if an error occurs.
8229    pub fn send_no_shutdown_on_err(
8230        self,
8231        mut result: Result<fidl::Channel, i32>,
8232    ) -> Result<(), fidl::Error> {
8233        let _result = self.send_raw(result);
8234        self.drop_without_shutdown();
8235        _result
8236    }
8237
8238    fn send_raw(&self, mut result: Result<fidl::Channel, i32>) -> Result<(), fidl::Error> {
8239        self.control_handle
8240            .inner
8241            .send::<fidl::encoding::ResultType<WlanSoftmacBridgeStartResponse, i32>>(
8242                result.map(|sme_channel| (sme_channel,)),
8243                self.tx_id,
8244                0x7b2c15a507020d4d,
8245                fidl::encoding::DynamicFlags::empty(),
8246            )
8247    }
8248}
8249
8250#[must_use = "FIDL methods require a response to be sent"]
8251#[derive(Debug)]
8252pub struct WlanSoftmacBridgeSetEthernetStatusResponder {
8253    control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
8254    tx_id: u32,
8255}
8256
8257/// Set the the channel to be shutdown (see [`WlanSoftmacBridgeControlHandle::shutdown`])
8258/// if the responder is dropped without sending a response, so that the client
8259/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
8260impl std::ops::Drop for WlanSoftmacBridgeSetEthernetStatusResponder {
8261    fn drop(&mut self) {
8262        self.control_handle.shutdown();
8263        // Safety: drops once, never accessed again
8264        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8265    }
8266}
8267
8268impl fidl::endpoints::Responder for WlanSoftmacBridgeSetEthernetStatusResponder {
8269    type ControlHandle = WlanSoftmacBridgeControlHandle;
8270
8271    fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8272        &self.control_handle
8273    }
8274
8275    fn drop_without_shutdown(mut self) {
8276        // Safety: drops once, never accessed again due to mem::forget
8277        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8278        // Prevent Drop from running (which would shut down the channel)
8279        std::mem::forget(self);
8280    }
8281}
8282
8283impl WlanSoftmacBridgeSetEthernetStatusResponder {
8284    /// Sends a response to the FIDL transaction.
8285    ///
8286    /// Sets the channel to shutdown if an error occurs.
8287    pub fn send(self) -> Result<(), fidl::Error> {
8288        let _result = self.send_raw();
8289        if _result.is_err() {
8290            self.control_handle.shutdown();
8291        }
8292        self.drop_without_shutdown();
8293        _result
8294    }
8295
8296    /// Similar to "send" but does not shutdown the channel if an error occurs.
8297    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
8298        let _result = self.send_raw();
8299        self.drop_without_shutdown();
8300        _result
8301    }
8302
8303    fn send_raw(&self) -> Result<(), fidl::Error> {
8304        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
8305            (),
8306            self.tx_id,
8307            0x412503cb3aaa350b,
8308            fidl::encoding::DynamicFlags::empty(),
8309        )
8310    }
8311}
8312
8313#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
8314pub struct WlanSoftmacIfcBaseMarker;
8315
8316impl fidl::endpoints::ProtocolMarker for WlanSoftmacIfcBaseMarker {
8317    type Proxy = WlanSoftmacIfcBaseProxy;
8318    type RequestStream = WlanSoftmacIfcBaseRequestStream;
8319    #[cfg(target_os = "fuchsia")]
8320    type SynchronousProxy = WlanSoftmacIfcBaseSynchronousProxy;
8321
8322    const DEBUG_NAME: &'static str = "(anonymous) WlanSoftmacIfcBase";
8323}
8324
8325pub trait WlanSoftmacIfcBaseProxyInterface: Send + Sync {
8326    type ReportTxResultResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
8327    fn r#report_tx_result(
8328        &self,
8329        tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
8330    ) -> Self::ReportTxResultResponseFut;
8331    type NotifyScanCompleteResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
8332    fn r#notify_scan_complete(
8333        &self,
8334        payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
8335    ) -> Self::NotifyScanCompleteResponseFut;
8336}
8337#[derive(Debug)]
8338#[cfg(target_os = "fuchsia")]
8339pub struct WlanSoftmacIfcBaseSynchronousProxy {
8340    client: fidl::client::sync::Client,
8341}
8342
8343#[cfg(target_os = "fuchsia")]
8344impl fidl::endpoints::SynchronousProxy for WlanSoftmacIfcBaseSynchronousProxy {
8345    type Proxy = WlanSoftmacIfcBaseProxy;
8346    type Protocol = WlanSoftmacIfcBaseMarker;
8347
8348    fn from_channel(inner: fidl::Channel) -> Self {
8349        Self::new(inner)
8350    }
8351
8352    fn into_channel(self) -> fidl::Channel {
8353        self.client.into_channel()
8354    }
8355
8356    fn as_channel(&self) -> &fidl::Channel {
8357        self.client.as_channel()
8358    }
8359}
8360
8361#[cfg(target_os = "fuchsia")]
8362impl WlanSoftmacIfcBaseSynchronousProxy {
8363    pub fn new(channel: fidl::Channel) -> Self {
8364        let protocol_name =
8365            <WlanSoftmacIfcBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
8366        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
8367    }
8368
8369    pub fn into_channel(self) -> fidl::Channel {
8370        self.client.into_channel()
8371    }
8372
8373    /// Waits until an event arrives and returns it. It is safe for other
8374    /// threads to make concurrent requests while waiting for an event.
8375    pub fn wait_for_event(
8376        &self,
8377        deadline: zx::MonotonicInstant,
8378    ) -> Result<WlanSoftmacIfcBaseEvent, fidl::Error> {
8379        WlanSoftmacIfcBaseEvent::decode(self.client.wait_for_event(deadline)?)
8380    }
8381
8382    /// Reports the result of an attempted transmission.
8383    ///
8384    /// A device driver indicates support for `ReportTxResult()` using
8385    /// `fuchsia.wlan.common/DeviceExtension.report_tx_result_supported`.
8386    pub fn r#report_tx_result(
8387        &self,
8388        mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
8389        ___deadline: zx::MonotonicInstant,
8390    ) -> Result<(), fidl::Error> {
8391        let _response = self
8392            .client
8393            .send_query::<WlanSoftmacIfcBaseReportTxResultRequest, fidl::encoding::EmptyPayload>(
8394                (tx_result,),
8395                0x5835c2f13d94e09a,
8396                fidl::encoding::DynamicFlags::empty(),
8397                ___deadline,
8398            )?;
8399        Ok(_response)
8400    }
8401
8402    /// Reports completion of a scan associated with the unique `scan_id`. `status`
8403    /// indicates whether the scan completed successfully, failed due to an error,
8404    /// or was cancelled.
8405    ///
8406    /// Return status indicates the reason for scan completion:
8407    ///   ZX_OK: All channels were scanned successfully.
8408    ///   ZX_ERR_CANCELLED: The scan was terminated by a user request, either an
8409    ///       explicit WlanSoftmac.CancelScan() or the initiation of an
8410    ///       incompatible request (e.g. connect).
8411    ///   ZX_ERR_OUT_OF_RANGE: The scan request included a prohibited channel.
8412    ///       This may be due to the current country setting.
8413    pub fn r#notify_scan_complete(
8414        &self,
8415        mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
8416        ___deadline: zx::MonotonicInstant,
8417    ) -> Result<(), fidl::Error> {
8418        let _response = self.client.send_query::<
8419            WlanSoftmacIfcBaseNotifyScanCompleteRequest,
8420            fidl::encoding::EmptyPayload,
8421        >(
8422            payload,
8423            0x7045e3cd460dc42c,
8424            fidl::encoding::DynamicFlags::empty(),
8425            ___deadline,
8426        )?;
8427        Ok(_response)
8428    }
8429}
8430
8431#[cfg(target_os = "fuchsia")]
8432impl From<WlanSoftmacIfcBaseSynchronousProxy> for zx::Handle {
8433    fn from(value: WlanSoftmacIfcBaseSynchronousProxy) -> Self {
8434        value.into_channel().into()
8435    }
8436}
8437
8438#[cfg(target_os = "fuchsia")]
8439impl From<fidl::Channel> for WlanSoftmacIfcBaseSynchronousProxy {
8440    fn from(value: fidl::Channel) -> Self {
8441        Self::new(value)
8442    }
8443}
8444
8445#[cfg(target_os = "fuchsia")]
8446impl fidl::endpoints::FromClient for WlanSoftmacIfcBaseSynchronousProxy {
8447    type Protocol = WlanSoftmacIfcBaseMarker;
8448
8449    fn from_client(value: fidl::endpoints::ClientEnd<WlanSoftmacIfcBaseMarker>) -> Self {
8450        Self::new(value.into_channel())
8451    }
8452}
8453
8454#[derive(Debug, Clone)]
8455pub struct WlanSoftmacIfcBaseProxy {
8456    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
8457}
8458
8459impl fidl::endpoints::Proxy for WlanSoftmacIfcBaseProxy {
8460    type Protocol = WlanSoftmacIfcBaseMarker;
8461
8462    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
8463        Self::new(inner)
8464    }
8465
8466    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
8467        self.client.into_channel().map_err(|client| Self { client })
8468    }
8469
8470    fn as_channel(&self) -> &::fidl::AsyncChannel {
8471        self.client.as_channel()
8472    }
8473}
8474
8475impl WlanSoftmacIfcBaseProxy {
8476    /// Create a new Proxy for fuchsia.wlan.softmac/WlanSoftmacIfcBase.
8477    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
8478        let protocol_name =
8479            <WlanSoftmacIfcBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
8480        Self { client: fidl::client::Client::new(channel, protocol_name) }
8481    }
8482
8483    /// Get a Stream of events from the remote end of the protocol.
8484    ///
8485    /// # Panics
8486    ///
8487    /// Panics if the event stream was already taken.
8488    pub fn take_event_stream(&self) -> WlanSoftmacIfcBaseEventStream {
8489        WlanSoftmacIfcBaseEventStream { event_receiver: self.client.take_event_receiver() }
8490    }
8491
8492    /// Reports the result of an attempted transmission.
8493    ///
8494    /// A device driver indicates support for `ReportTxResult()` using
8495    /// `fuchsia.wlan.common/DeviceExtension.report_tx_result_supported`.
8496    pub fn r#report_tx_result(
8497        &self,
8498        mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
8499    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
8500        WlanSoftmacIfcBaseProxyInterface::r#report_tx_result(self, tx_result)
8501    }
8502
8503    /// Reports completion of a scan associated with the unique `scan_id`. `status`
8504    /// indicates whether the scan completed successfully, failed due to an error,
8505    /// or was cancelled.
8506    ///
8507    /// Return status indicates the reason for scan completion:
8508    ///   ZX_OK: All channels were scanned successfully.
8509    ///   ZX_ERR_CANCELLED: The scan was terminated by a user request, either an
8510    ///       explicit WlanSoftmac.CancelScan() or the initiation of an
8511    ///       incompatible request (e.g. connect).
8512    ///   ZX_ERR_OUT_OF_RANGE: The scan request included a prohibited channel.
8513    ///       This may be due to the current country setting.
8514    pub fn r#notify_scan_complete(
8515        &self,
8516        mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
8517    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
8518        WlanSoftmacIfcBaseProxyInterface::r#notify_scan_complete(self, payload)
8519    }
8520}
8521
8522impl WlanSoftmacIfcBaseProxyInterface for WlanSoftmacIfcBaseProxy {
8523    type ReportTxResultResponseFut =
8524        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
8525    fn r#report_tx_result(
8526        &self,
8527        mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
8528    ) -> Self::ReportTxResultResponseFut {
8529        fn _decode(
8530            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8531        ) -> Result<(), fidl::Error> {
8532            let _response = fidl::client::decode_transaction_body::<
8533                fidl::encoding::EmptyPayload,
8534                fidl::encoding::DefaultFuchsiaResourceDialect,
8535                0x5835c2f13d94e09a,
8536            >(_buf?)?;
8537            Ok(_response)
8538        }
8539        self.client.send_query_and_decode::<WlanSoftmacIfcBaseReportTxResultRequest, ()>(
8540            (tx_result,),
8541            0x5835c2f13d94e09a,
8542            fidl::encoding::DynamicFlags::empty(),
8543            _decode,
8544        )
8545    }
8546
8547    type NotifyScanCompleteResponseFut =
8548        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
8549    fn r#notify_scan_complete(
8550        &self,
8551        mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
8552    ) -> Self::NotifyScanCompleteResponseFut {
8553        fn _decode(
8554            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8555        ) -> Result<(), fidl::Error> {
8556            let _response = fidl::client::decode_transaction_body::<
8557                fidl::encoding::EmptyPayload,
8558                fidl::encoding::DefaultFuchsiaResourceDialect,
8559                0x7045e3cd460dc42c,
8560            >(_buf?)?;
8561            Ok(_response)
8562        }
8563        self.client.send_query_and_decode::<WlanSoftmacIfcBaseNotifyScanCompleteRequest, ()>(
8564            payload,
8565            0x7045e3cd460dc42c,
8566            fidl::encoding::DynamicFlags::empty(),
8567            _decode,
8568        )
8569    }
8570}
8571
8572pub struct WlanSoftmacIfcBaseEventStream {
8573    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
8574}
8575
8576impl std::marker::Unpin for WlanSoftmacIfcBaseEventStream {}
8577
8578impl futures::stream::FusedStream for WlanSoftmacIfcBaseEventStream {
8579    fn is_terminated(&self) -> bool {
8580        self.event_receiver.is_terminated()
8581    }
8582}
8583
8584impl futures::Stream for WlanSoftmacIfcBaseEventStream {
8585    type Item = Result<WlanSoftmacIfcBaseEvent, fidl::Error>;
8586
8587    fn poll_next(
8588        mut self: std::pin::Pin<&mut Self>,
8589        cx: &mut std::task::Context<'_>,
8590    ) -> std::task::Poll<Option<Self::Item>> {
8591        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
8592            &mut self.event_receiver,
8593            cx
8594        )?) {
8595            Some(buf) => std::task::Poll::Ready(Some(WlanSoftmacIfcBaseEvent::decode(buf))),
8596            None => std::task::Poll::Ready(None),
8597        }
8598    }
8599}
8600
8601#[derive(Debug)]
8602pub enum WlanSoftmacIfcBaseEvent {}
8603
8604impl WlanSoftmacIfcBaseEvent {
8605    /// Decodes a message buffer as a [`WlanSoftmacIfcBaseEvent`].
8606    fn decode(
8607        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
8608    ) -> Result<WlanSoftmacIfcBaseEvent, fidl::Error> {
8609        let (bytes, _handles) = buf.split_mut();
8610        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8611        debug_assert_eq!(tx_header.tx_id, 0);
8612        match tx_header.ordinal {
8613            _ => Err(fidl::Error::UnknownOrdinal {
8614                ordinal: tx_header.ordinal,
8615                protocol_name:
8616                    <WlanSoftmacIfcBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
8617            }),
8618        }
8619    }
8620}
8621
8622/// A Stream of incoming requests for fuchsia.wlan.softmac/WlanSoftmacIfcBase.
8623pub struct WlanSoftmacIfcBaseRequestStream {
8624    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8625    is_terminated: bool,
8626}
8627
8628impl std::marker::Unpin for WlanSoftmacIfcBaseRequestStream {}
8629
8630impl futures::stream::FusedStream for WlanSoftmacIfcBaseRequestStream {
8631    fn is_terminated(&self) -> bool {
8632        self.is_terminated
8633    }
8634}
8635
8636impl fidl::endpoints::RequestStream for WlanSoftmacIfcBaseRequestStream {
8637    type Protocol = WlanSoftmacIfcBaseMarker;
8638    type ControlHandle = WlanSoftmacIfcBaseControlHandle;
8639
8640    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
8641        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
8642    }
8643
8644    fn control_handle(&self) -> Self::ControlHandle {
8645        WlanSoftmacIfcBaseControlHandle { inner: self.inner.clone() }
8646    }
8647
8648    fn into_inner(
8649        self,
8650    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
8651    {
8652        (self.inner, self.is_terminated)
8653    }
8654
8655    fn from_inner(
8656        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8657        is_terminated: bool,
8658    ) -> Self {
8659        Self { inner, is_terminated }
8660    }
8661}
8662
8663impl futures::Stream for WlanSoftmacIfcBaseRequestStream {
8664    type Item = Result<WlanSoftmacIfcBaseRequest, fidl::Error>;
8665
8666    fn poll_next(
8667        mut self: std::pin::Pin<&mut Self>,
8668        cx: &mut std::task::Context<'_>,
8669    ) -> std::task::Poll<Option<Self::Item>> {
8670        let this = &mut *self;
8671        if this.inner.check_shutdown(cx) {
8672            this.is_terminated = true;
8673            return std::task::Poll::Ready(None);
8674        }
8675        if this.is_terminated {
8676            panic!("polled WlanSoftmacIfcBaseRequestStream after completion");
8677        }
8678        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
8679            |bytes, handles| {
8680                match this.inner.channel().read_etc(cx, bytes, handles) {
8681                    std::task::Poll::Ready(Ok(())) => {}
8682                    std::task::Poll::Pending => return std::task::Poll::Pending,
8683                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
8684                        this.is_terminated = true;
8685                        return std::task::Poll::Ready(None);
8686                    }
8687                    std::task::Poll::Ready(Err(e)) => {
8688                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
8689                            e.into(),
8690                        ))))
8691                    }
8692                }
8693
8694                // A message has been received from the channel
8695                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8696
8697                std::task::Poll::Ready(Some(match header.ordinal {
8698                0x5835c2f13d94e09a => {
8699                    header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
8700                    let mut req = fidl::new_empty!(WlanSoftmacIfcBaseReportTxResultRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
8701                    fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacIfcBaseReportTxResultRequest>(&header, _body_bytes, handles, &mut req)?;
8702                    let control_handle = WlanSoftmacIfcBaseControlHandle {
8703                        inner: this.inner.clone(),
8704                    };
8705                    Ok(WlanSoftmacIfcBaseRequest::ReportTxResult {tx_result: req.tx_result,
8706
8707                        responder: WlanSoftmacIfcBaseReportTxResultResponder {
8708                            control_handle: std::mem::ManuallyDrop::new(control_handle),
8709                            tx_id: header.tx_id,
8710                        },
8711                    })
8712                }
8713                0x7045e3cd460dc42c => {
8714                    header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
8715                    let mut req = fidl::new_empty!(WlanSoftmacIfcBaseNotifyScanCompleteRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
8716                    fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacIfcBaseNotifyScanCompleteRequest>(&header, _body_bytes, handles, &mut req)?;
8717                    let control_handle = WlanSoftmacIfcBaseControlHandle {
8718                        inner: this.inner.clone(),
8719                    };
8720                    Ok(WlanSoftmacIfcBaseRequest::NotifyScanComplete {payload: req,
8721                        responder: WlanSoftmacIfcBaseNotifyScanCompleteResponder {
8722                            control_handle: std::mem::ManuallyDrop::new(control_handle),
8723                            tx_id: header.tx_id,
8724                        },
8725                    })
8726                }
8727                _ => Err(fidl::Error::UnknownOrdinal {
8728                    ordinal: header.ordinal,
8729                    protocol_name: <WlanSoftmacIfcBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
8730                }),
8731            }))
8732            },
8733        )
8734    }
8735}
8736
8737/// Protocol containing methods common to both `WlanSoftmacIfc` and `WlanSoftmacIfcBridge`.
8738///
8739/// The `WlanSoftmacIfc` and `WlanSoftmacIfcBridge` protocols have common methods, as the latter
8740/// generally forwards `WlanSoftmacIfc` requests received in the wlansoftmac driver
8741/// to `WlanSoftmacIfcBridge` requests in the bridged driver. Composing this
8742/// protocol into `WlanSoftmacIfc` and `WlanSoftmacIfcBridge` minimizes the duplication of method
8743/// definitions (and associated request conversions that would be caused by such duplication).
8744///
8745/// **This protocol is not implemented directly by any component.** It is composed into `WlanSoftmacIfc`
8746/// and `WlanSoftmacIfcBridge`.
8747#[derive(Debug)]
8748pub enum WlanSoftmacIfcBaseRequest {
8749    /// Reports the result of an attempted transmission.
8750    ///
8751    /// A device driver indicates support for `ReportTxResult()` using
8752    /// `fuchsia.wlan.common/DeviceExtension.report_tx_result_supported`.
8753    ReportTxResult {
8754        tx_result: fidl_fuchsia_wlan_common::WlanTxResult,
8755        responder: WlanSoftmacIfcBaseReportTxResultResponder,
8756    },
8757    /// Reports completion of a scan associated with the unique `scan_id`. `status`
8758    /// indicates whether the scan completed successfully, failed due to an error,
8759    /// or was cancelled.
8760    ///
8761    /// Return status indicates the reason for scan completion:
8762    ///   ZX_OK: All channels were scanned successfully.
8763    ///   ZX_ERR_CANCELLED: The scan was terminated by a user request, either an
8764    ///       explicit WlanSoftmac.CancelScan() or the initiation of an
8765    ///       incompatible request (e.g. connect).
8766    ///   ZX_ERR_OUT_OF_RANGE: The scan request included a prohibited channel.
8767    ///       This may be due to the current country setting.
8768    NotifyScanComplete {
8769        payload: WlanSoftmacIfcBaseNotifyScanCompleteRequest,
8770        responder: WlanSoftmacIfcBaseNotifyScanCompleteResponder,
8771    },
8772}
8773
8774impl WlanSoftmacIfcBaseRequest {
8775    #[allow(irrefutable_let_patterns)]
8776    pub fn into_report_tx_result(
8777        self,
8778    ) -> Option<(fidl_fuchsia_wlan_common::WlanTxResult, WlanSoftmacIfcBaseReportTxResultResponder)>
8779    {
8780        if let WlanSoftmacIfcBaseRequest::ReportTxResult { tx_result, responder } = self {
8781            Some((tx_result, responder))
8782        } else {
8783            None
8784        }
8785    }
8786
8787    #[allow(irrefutable_let_patterns)]
8788    pub fn into_notify_scan_complete(
8789        self,
8790    ) -> Option<(
8791        WlanSoftmacIfcBaseNotifyScanCompleteRequest,
8792        WlanSoftmacIfcBaseNotifyScanCompleteResponder,
8793    )> {
8794        if let WlanSoftmacIfcBaseRequest::NotifyScanComplete { payload, responder } = self {
8795            Some((payload, responder))
8796        } else {
8797            None
8798        }
8799    }
8800
8801    /// Name of the method defined in FIDL
8802    pub fn method_name(&self) -> &'static str {
8803        match *self {
8804            WlanSoftmacIfcBaseRequest::ReportTxResult { .. } => "report_tx_result",
8805            WlanSoftmacIfcBaseRequest::NotifyScanComplete { .. } => "notify_scan_complete",
8806        }
8807    }
8808}
8809
8810#[derive(Debug, Clone)]
8811pub struct WlanSoftmacIfcBaseControlHandle {
8812    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8813}
8814
8815impl fidl::endpoints::ControlHandle for WlanSoftmacIfcBaseControlHandle {
8816    fn shutdown(&self) {
8817        self.inner.shutdown()
8818    }
8819    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
8820        self.inner.shutdown_with_epitaph(status)
8821    }
8822
8823    fn is_closed(&self) -> bool {
8824        self.inner.channel().is_closed()
8825    }
8826    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
8827        self.inner.channel().on_closed()
8828    }
8829
8830    #[cfg(target_os = "fuchsia")]
8831    fn signal_peer(
8832        &self,
8833        clear_mask: zx::Signals,
8834        set_mask: zx::Signals,
8835    ) -> Result<(), zx_status::Status> {
8836        use fidl::Peered;
8837        self.inner.channel().signal_peer(clear_mask, set_mask)
8838    }
8839}
8840
8841impl WlanSoftmacIfcBaseControlHandle {}
8842
8843#[must_use = "FIDL methods require a response to be sent"]
8844#[derive(Debug)]
8845pub struct WlanSoftmacIfcBaseReportTxResultResponder {
8846    control_handle: std::mem::ManuallyDrop<WlanSoftmacIfcBaseControlHandle>,
8847    tx_id: u32,
8848}
8849
8850/// Set the the channel to be shutdown (see [`WlanSoftmacIfcBaseControlHandle::shutdown`])
8851/// if the responder is dropped without sending a response, so that the client
8852/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
8853impl std::ops::Drop for WlanSoftmacIfcBaseReportTxResultResponder {
8854    fn drop(&mut self) {
8855        self.control_handle.shutdown();
8856        // Safety: drops once, never accessed again
8857        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8858    }
8859}
8860
8861impl fidl::endpoints::Responder for WlanSoftmacIfcBaseReportTxResultResponder {
8862    type ControlHandle = WlanSoftmacIfcBaseControlHandle;
8863
8864    fn control_handle(&self) -> &WlanSoftmacIfcBaseControlHandle {
8865        &self.control_handle
8866    }
8867
8868    fn drop_without_shutdown(mut self) {
8869        // Safety: drops once, never accessed again due to mem::forget
8870        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8871        // Prevent Drop from running (which would shut down the channel)
8872        std::mem::forget(self);
8873    }
8874}
8875
8876impl WlanSoftmacIfcBaseReportTxResultResponder {
8877    /// Sends a response to the FIDL transaction.
8878    ///
8879    /// Sets the channel to shutdown if an error occurs.
8880    pub fn send(self) -> Result<(), fidl::Error> {
8881        let _result = self.send_raw();
8882        if _result.is_err() {
8883            self.control_handle.shutdown();
8884        }
8885        self.drop_without_shutdown();
8886        _result
8887    }
8888
8889    /// Similar to "send" but does not shutdown the channel if an error occurs.
8890    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
8891        let _result = self.send_raw();
8892        self.drop_without_shutdown();
8893        _result
8894    }
8895
8896    fn send_raw(&self) -> Result<(), fidl::Error> {
8897        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
8898            (),
8899            self.tx_id,
8900            0x5835c2f13d94e09a,
8901            fidl::encoding::DynamicFlags::empty(),
8902        )
8903    }
8904}
8905
8906#[must_use = "FIDL methods require a response to be sent"]
8907#[derive(Debug)]
8908pub struct WlanSoftmacIfcBaseNotifyScanCompleteResponder {
8909    control_handle: std::mem::ManuallyDrop<WlanSoftmacIfcBaseControlHandle>,
8910    tx_id: u32,
8911}
8912
8913/// Set the the channel to be shutdown (see [`WlanSoftmacIfcBaseControlHandle::shutdown`])
8914/// if the responder is dropped without sending a response, so that the client
8915/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
8916impl std::ops::Drop for WlanSoftmacIfcBaseNotifyScanCompleteResponder {
8917    fn drop(&mut self) {
8918        self.control_handle.shutdown();
8919        // Safety: drops once, never accessed again
8920        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8921    }
8922}
8923
8924impl fidl::endpoints::Responder for WlanSoftmacIfcBaseNotifyScanCompleteResponder {
8925    type ControlHandle = WlanSoftmacIfcBaseControlHandle;
8926
8927    fn control_handle(&self) -> &WlanSoftmacIfcBaseControlHandle {
8928        &self.control_handle
8929    }
8930
8931    fn drop_without_shutdown(mut self) {
8932        // Safety: drops once, never accessed again due to mem::forget
8933        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8934        // Prevent Drop from running (which would shut down the channel)
8935        std::mem::forget(self);
8936    }
8937}
8938
8939impl WlanSoftmacIfcBaseNotifyScanCompleteResponder {
8940    /// Sends a response to the FIDL transaction.
8941    ///
8942    /// Sets the channel to shutdown if an error occurs.
8943    pub fn send(self) -> Result<(), fidl::Error> {
8944        let _result = self.send_raw();
8945        if _result.is_err() {
8946            self.control_handle.shutdown();
8947        }
8948        self.drop_without_shutdown();
8949        _result
8950    }
8951
8952    /// Similar to "send" but does not shutdown the channel if an error occurs.
8953    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
8954        let _result = self.send_raw();
8955        self.drop_without_shutdown();
8956        _result
8957    }
8958
8959    fn send_raw(&self) -> Result<(), fidl::Error> {
8960        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
8961            (),
8962            self.tx_id,
8963            0x7045e3cd460dc42c,
8964            fidl::encoding::DynamicFlags::empty(),
8965        )
8966    }
8967}
8968
8969#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
8970pub struct WlanSoftmacIfcBridgeMarker;
8971
8972impl fidl::endpoints::ProtocolMarker for WlanSoftmacIfcBridgeMarker {
8973    type Proxy = WlanSoftmacIfcBridgeProxy;
8974    type RequestStream = WlanSoftmacIfcBridgeRequestStream;
8975    #[cfg(target_os = "fuchsia")]
8976    type SynchronousProxy = WlanSoftmacIfcBridgeSynchronousProxy;
8977
8978    const DEBUG_NAME: &'static str = "(anonymous) WlanSoftmacIfcBridge";
8979}
8980
8981pub trait WlanSoftmacIfcBridgeProxyInterface: Send + Sync {
8982    type ReportTxResultResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
8983    fn r#report_tx_result(
8984        &self,
8985        tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
8986    ) -> Self::ReportTxResultResponseFut;
8987    type NotifyScanCompleteResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
8988    fn r#notify_scan_complete(
8989        &self,
8990        payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
8991    ) -> Self::NotifyScanCompleteResponseFut;
8992    type StopBridgedDriverResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
8993    fn r#stop_bridged_driver(&self) -> Self::StopBridgedDriverResponseFut;
8994}
8995#[derive(Debug)]
8996#[cfg(target_os = "fuchsia")]
8997pub struct WlanSoftmacIfcBridgeSynchronousProxy {
8998    client: fidl::client::sync::Client,
8999}
9000
9001#[cfg(target_os = "fuchsia")]
9002impl fidl::endpoints::SynchronousProxy for WlanSoftmacIfcBridgeSynchronousProxy {
9003    type Proxy = WlanSoftmacIfcBridgeProxy;
9004    type Protocol = WlanSoftmacIfcBridgeMarker;
9005
9006    fn from_channel(inner: fidl::Channel) -> Self {
9007        Self::new(inner)
9008    }
9009
9010    fn into_channel(self) -> fidl::Channel {
9011        self.client.into_channel()
9012    }
9013
9014    fn as_channel(&self) -> &fidl::Channel {
9015        self.client.as_channel()
9016    }
9017}
9018
9019#[cfg(target_os = "fuchsia")]
9020impl WlanSoftmacIfcBridgeSynchronousProxy {
9021    pub fn new(channel: fidl::Channel) -> Self {
9022        let protocol_name =
9023            <WlanSoftmacIfcBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
9024        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
9025    }
9026
9027    pub fn into_channel(self) -> fidl::Channel {
9028        self.client.into_channel()
9029    }
9030
9031    /// Waits until an event arrives and returns it. It is safe for other
9032    /// threads to make concurrent requests while waiting for an event.
9033    pub fn wait_for_event(
9034        &self,
9035        deadline: zx::MonotonicInstant,
9036    ) -> Result<WlanSoftmacIfcBridgeEvent, fidl::Error> {
9037        WlanSoftmacIfcBridgeEvent::decode(self.client.wait_for_event(deadline)?)
9038    }
9039
9040    /// Reports the result of an attempted transmission.
9041    ///
9042    /// A device driver indicates support for `ReportTxResult()` using
9043    /// `fuchsia.wlan.common/DeviceExtension.report_tx_result_supported`.
9044    pub fn r#report_tx_result(
9045        &self,
9046        mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
9047        ___deadline: zx::MonotonicInstant,
9048    ) -> Result<(), fidl::Error> {
9049        let _response = self
9050            .client
9051            .send_query::<WlanSoftmacIfcBaseReportTxResultRequest, fidl::encoding::EmptyPayload>(
9052                (tx_result,),
9053                0x5835c2f13d94e09a,
9054                fidl::encoding::DynamicFlags::empty(),
9055                ___deadline,
9056            )?;
9057        Ok(_response)
9058    }
9059
9060    /// Reports completion of a scan associated with the unique `scan_id`. `status`
9061    /// indicates whether the scan completed successfully, failed due to an error,
9062    /// or was cancelled.
9063    ///
9064    /// Return status indicates the reason for scan completion:
9065    ///   ZX_OK: All channels were scanned successfully.
9066    ///   ZX_ERR_CANCELLED: The scan was terminated by a user request, either an
9067    ///       explicit WlanSoftmac.CancelScan() or the initiation of an
9068    ///       incompatible request (e.g. connect).
9069    ///   ZX_ERR_OUT_OF_RANGE: The scan request included a prohibited channel.
9070    ///       This may be due to the current country setting.
9071    pub fn r#notify_scan_complete(
9072        &self,
9073        mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
9074        ___deadline: zx::MonotonicInstant,
9075    ) -> Result<(), fidl::Error> {
9076        let _response = self.client.send_query::<
9077            WlanSoftmacIfcBaseNotifyScanCompleteRequest,
9078            fidl::encoding::EmptyPayload,
9079        >(
9080            payload,
9081            0x7045e3cd460dc42c,
9082            fidl::encoding::DynamicFlags::empty(),
9083            ___deadline,
9084        )?;
9085        Ok(_response)
9086    }
9087
9088    /// Stop the bridged driver.
9089    ///
9090    /// Calling this method causes both the server end of this protocol (`WlanSoftmacIfcBridge`)
9091    /// to close and the client end of `WlanSoftmacBridge` to close. The server will not return a
9092    /// response from this method until after processing all queued events.
9093    ///
9094    /// In practice, the wlansoftmac driver calls this method during unbind.
9095    pub fn r#stop_bridged_driver(
9096        &self,
9097        ___deadline: zx::MonotonicInstant,
9098    ) -> Result<(), fidl::Error> {
9099        let _response =
9100            self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
9101                (),
9102                0x112dbd0cc2251151,
9103                fidl::encoding::DynamicFlags::empty(),
9104                ___deadline,
9105            )?;
9106        Ok(_response)
9107    }
9108}
9109
9110#[cfg(target_os = "fuchsia")]
9111impl From<WlanSoftmacIfcBridgeSynchronousProxy> for zx::Handle {
9112    fn from(value: WlanSoftmacIfcBridgeSynchronousProxy) -> Self {
9113        value.into_channel().into()
9114    }
9115}
9116
9117#[cfg(target_os = "fuchsia")]
9118impl From<fidl::Channel> for WlanSoftmacIfcBridgeSynchronousProxy {
9119    fn from(value: fidl::Channel) -> Self {
9120        Self::new(value)
9121    }
9122}
9123
9124#[cfg(target_os = "fuchsia")]
9125impl fidl::endpoints::FromClient for WlanSoftmacIfcBridgeSynchronousProxy {
9126    type Protocol = WlanSoftmacIfcBridgeMarker;
9127
9128    fn from_client(value: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>) -> Self {
9129        Self::new(value.into_channel())
9130    }
9131}
9132
9133#[derive(Debug, Clone)]
9134pub struct WlanSoftmacIfcBridgeProxy {
9135    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
9136}
9137
9138impl fidl::endpoints::Proxy for WlanSoftmacIfcBridgeProxy {
9139    type Protocol = WlanSoftmacIfcBridgeMarker;
9140
9141    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
9142        Self::new(inner)
9143    }
9144
9145    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
9146        self.client.into_channel().map_err(|client| Self { client })
9147    }
9148
9149    fn as_channel(&self) -> &::fidl::AsyncChannel {
9150        self.client.as_channel()
9151    }
9152}
9153
9154impl WlanSoftmacIfcBridgeProxy {
9155    /// Create a new Proxy for fuchsia.wlan.softmac/WlanSoftmacIfcBridge.
9156    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
9157        let protocol_name =
9158            <WlanSoftmacIfcBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
9159        Self { client: fidl::client::Client::new(channel, protocol_name) }
9160    }
9161
9162    /// Get a Stream of events from the remote end of the protocol.
9163    ///
9164    /// # Panics
9165    ///
9166    /// Panics if the event stream was already taken.
9167    pub fn take_event_stream(&self) -> WlanSoftmacIfcBridgeEventStream {
9168        WlanSoftmacIfcBridgeEventStream { event_receiver: self.client.take_event_receiver() }
9169    }
9170
9171    /// Reports the result of an attempted transmission.
9172    ///
9173    /// A device driver indicates support for `ReportTxResult()` using
9174    /// `fuchsia.wlan.common/DeviceExtension.report_tx_result_supported`.
9175    pub fn r#report_tx_result(
9176        &self,
9177        mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
9178    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
9179        WlanSoftmacIfcBridgeProxyInterface::r#report_tx_result(self, tx_result)
9180    }
9181
9182    /// Reports completion of a scan associated with the unique `scan_id`. `status`
9183    /// indicates whether the scan completed successfully, failed due to an error,
9184    /// or was cancelled.
9185    ///
9186    /// Return status indicates the reason for scan completion:
9187    ///   ZX_OK: All channels were scanned successfully.
9188    ///   ZX_ERR_CANCELLED: The scan was terminated by a user request, either an
9189    ///       explicit WlanSoftmac.CancelScan() or the initiation of an
9190    ///       incompatible request (e.g. connect).
9191    ///   ZX_ERR_OUT_OF_RANGE: The scan request included a prohibited channel.
9192    ///       This may be due to the current country setting.
9193    pub fn r#notify_scan_complete(
9194        &self,
9195        mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
9196    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
9197        WlanSoftmacIfcBridgeProxyInterface::r#notify_scan_complete(self, payload)
9198    }
9199
9200    /// Stop the bridged driver.
9201    ///
9202    /// Calling this method causes both the server end of this protocol (`WlanSoftmacIfcBridge`)
9203    /// to close and the client end of `WlanSoftmacBridge` to close. The server will not return a
9204    /// response from this method until after processing all queued events.
9205    ///
9206    /// In practice, the wlansoftmac driver calls this method during unbind.
9207    pub fn r#stop_bridged_driver(
9208        &self,
9209    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
9210        WlanSoftmacIfcBridgeProxyInterface::r#stop_bridged_driver(self)
9211    }
9212}
9213
9214impl WlanSoftmacIfcBridgeProxyInterface for WlanSoftmacIfcBridgeProxy {
9215    type ReportTxResultResponseFut =
9216        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
9217    fn r#report_tx_result(
9218        &self,
9219        mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
9220    ) -> Self::ReportTxResultResponseFut {
9221        fn _decode(
9222            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9223        ) -> Result<(), fidl::Error> {
9224            let _response = fidl::client::decode_transaction_body::<
9225                fidl::encoding::EmptyPayload,
9226                fidl::encoding::DefaultFuchsiaResourceDialect,
9227                0x5835c2f13d94e09a,
9228            >(_buf?)?;
9229            Ok(_response)
9230        }
9231        self.client.send_query_and_decode::<WlanSoftmacIfcBaseReportTxResultRequest, ()>(
9232            (tx_result,),
9233            0x5835c2f13d94e09a,
9234            fidl::encoding::DynamicFlags::empty(),
9235            _decode,
9236        )
9237    }
9238
9239    type NotifyScanCompleteResponseFut =
9240        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
9241    fn r#notify_scan_complete(
9242        &self,
9243        mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
9244    ) -> Self::NotifyScanCompleteResponseFut {
9245        fn _decode(
9246            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9247        ) -> Result<(), fidl::Error> {
9248            let _response = fidl::client::decode_transaction_body::<
9249                fidl::encoding::EmptyPayload,
9250                fidl::encoding::DefaultFuchsiaResourceDialect,
9251                0x7045e3cd460dc42c,
9252            >(_buf?)?;
9253            Ok(_response)
9254        }
9255        self.client.send_query_and_decode::<WlanSoftmacIfcBaseNotifyScanCompleteRequest, ()>(
9256            payload,
9257            0x7045e3cd460dc42c,
9258            fidl::encoding::DynamicFlags::empty(),
9259            _decode,
9260        )
9261    }
9262
9263    type StopBridgedDriverResponseFut =
9264        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
9265    fn r#stop_bridged_driver(&self) -> Self::StopBridgedDriverResponseFut {
9266        fn _decode(
9267            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9268        ) -> Result<(), fidl::Error> {
9269            let _response = fidl::client::decode_transaction_body::<
9270                fidl::encoding::EmptyPayload,
9271                fidl::encoding::DefaultFuchsiaResourceDialect,
9272                0x112dbd0cc2251151,
9273            >(_buf?)?;
9274            Ok(_response)
9275        }
9276        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
9277            (),
9278            0x112dbd0cc2251151,
9279            fidl::encoding::DynamicFlags::empty(),
9280            _decode,
9281        )
9282    }
9283}
9284
9285pub struct WlanSoftmacIfcBridgeEventStream {
9286    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
9287}
9288
9289impl std::marker::Unpin for WlanSoftmacIfcBridgeEventStream {}
9290
9291impl futures::stream::FusedStream for WlanSoftmacIfcBridgeEventStream {
9292    fn is_terminated(&self) -> bool {
9293        self.event_receiver.is_terminated()
9294    }
9295}
9296
9297impl futures::Stream for WlanSoftmacIfcBridgeEventStream {
9298    type Item = Result<WlanSoftmacIfcBridgeEvent, fidl::Error>;
9299
9300    fn poll_next(
9301        mut self: std::pin::Pin<&mut Self>,
9302        cx: &mut std::task::Context<'_>,
9303    ) -> std::task::Poll<Option<Self::Item>> {
9304        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
9305            &mut self.event_receiver,
9306            cx
9307        )?) {
9308            Some(buf) => std::task::Poll::Ready(Some(WlanSoftmacIfcBridgeEvent::decode(buf))),
9309            None => std::task::Poll::Ready(None),
9310        }
9311    }
9312}
9313
9314#[derive(Debug)]
9315pub enum WlanSoftmacIfcBridgeEvent {}
9316
9317impl WlanSoftmacIfcBridgeEvent {
9318    /// Decodes a message buffer as a [`WlanSoftmacIfcBridgeEvent`].
9319    fn decode(
9320        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
9321    ) -> Result<WlanSoftmacIfcBridgeEvent, fidl::Error> {
9322        let (bytes, _handles) = buf.split_mut();
9323        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9324        debug_assert_eq!(tx_header.tx_id, 0);
9325        match tx_header.ordinal {
9326            _ => Err(fidl::Error::UnknownOrdinal {
9327                ordinal: tx_header.ordinal,
9328                protocol_name:
9329                    <WlanSoftmacIfcBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9330            }),
9331        }
9332    }
9333}
9334
9335/// A Stream of incoming requests for fuchsia.wlan.softmac/WlanSoftmacIfcBridge.
9336pub struct WlanSoftmacIfcBridgeRequestStream {
9337    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9338    is_terminated: bool,
9339}
9340
9341impl std::marker::Unpin for WlanSoftmacIfcBridgeRequestStream {}
9342
9343impl futures::stream::FusedStream for WlanSoftmacIfcBridgeRequestStream {
9344    fn is_terminated(&self) -> bool {
9345        self.is_terminated
9346    }
9347}
9348
9349impl fidl::endpoints::RequestStream for WlanSoftmacIfcBridgeRequestStream {
9350    type Protocol = WlanSoftmacIfcBridgeMarker;
9351    type ControlHandle = WlanSoftmacIfcBridgeControlHandle;
9352
9353    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
9354        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
9355    }
9356
9357    fn control_handle(&self) -> Self::ControlHandle {
9358        WlanSoftmacIfcBridgeControlHandle { inner: self.inner.clone() }
9359    }
9360
9361    fn into_inner(
9362        self,
9363    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
9364    {
9365        (self.inner, self.is_terminated)
9366    }
9367
9368    fn from_inner(
9369        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9370        is_terminated: bool,
9371    ) -> Self {
9372        Self { inner, is_terminated }
9373    }
9374}
9375
9376impl futures::Stream for WlanSoftmacIfcBridgeRequestStream {
9377    type Item = Result<WlanSoftmacIfcBridgeRequest, fidl::Error>;
9378
9379    fn poll_next(
9380        mut self: std::pin::Pin<&mut Self>,
9381        cx: &mut std::task::Context<'_>,
9382    ) -> std::task::Poll<Option<Self::Item>> {
9383        let this = &mut *self;
9384        if this.inner.check_shutdown(cx) {
9385            this.is_terminated = true;
9386            return std::task::Poll::Ready(None);
9387        }
9388        if this.is_terminated {
9389            panic!("polled WlanSoftmacIfcBridgeRequestStream after completion");
9390        }
9391        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
9392            |bytes, handles| {
9393                match this.inner.channel().read_etc(cx, bytes, handles) {
9394                    std::task::Poll::Ready(Ok(())) => {}
9395                    std::task::Poll::Pending => return std::task::Poll::Pending,
9396                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
9397                        this.is_terminated = true;
9398                        return std::task::Poll::Ready(None);
9399                    }
9400                    std::task::Poll::Ready(Err(e)) => {
9401                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
9402                            e.into(),
9403                        ))))
9404                    }
9405                }
9406
9407                // A message has been received from the channel
9408                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9409
9410                std::task::Poll::Ready(Some(match header.ordinal {
9411                0x5835c2f13d94e09a => {
9412                    header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9413                    let mut req = fidl::new_empty!(WlanSoftmacIfcBaseReportTxResultRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
9414                    fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacIfcBaseReportTxResultRequest>(&header, _body_bytes, handles, &mut req)?;
9415                    let control_handle = WlanSoftmacIfcBridgeControlHandle {
9416                        inner: this.inner.clone(),
9417                    };
9418                    Ok(WlanSoftmacIfcBridgeRequest::ReportTxResult {tx_result: req.tx_result,
9419
9420                        responder: WlanSoftmacIfcBridgeReportTxResultResponder {
9421                            control_handle: std::mem::ManuallyDrop::new(control_handle),
9422                            tx_id: header.tx_id,
9423                        },
9424                    })
9425                }
9426                0x7045e3cd460dc42c => {
9427                    header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9428                    let mut req = fidl::new_empty!(WlanSoftmacIfcBaseNotifyScanCompleteRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
9429                    fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacIfcBaseNotifyScanCompleteRequest>(&header, _body_bytes, handles, &mut req)?;
9430                    let control_handle = WlanSoftmacIfcBridgeControlHandle {
9431                        inner: this.inner.clone(),
9432                    };
9433                    Ok(WlanSoftmacIfcBridgeRequest::NotifyScanComplete {payload: req,
9434                        responder: WlanSoftmacIfcBridgeNotifyScanCompleteResponder {
9435                            control_handle: std::mem::ManuallyDrop::new(control_handle),
9436                            tx_id: header.tx_id,
9437                        },
9438                    })
9439                }
9440                0x112dbd0cc2251151 => {
9441                    header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9442                    let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
9443                    fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9444                    let control_handle = WlanSoftmacIfcBridgeControlHandle {
9445                        inner: this.inner.clone(),
9446                    };
9447                    Ok(WlanSoftmacIfcBridgeRequest::StopBridgedDriver {
9448                        responder: WlanSoftmacIfcBridgeStopBridgedDriverResponder {
9449                            control_handle: std::mem::ManuallyDrop::new(control_handle),
9450                            tx_id: header.tx_id,
9451                        },
9452                    })
9453                }
9454                _ => Err(fidl::Error::UnknownOrdinal {
9455                    ordinal: header.ordinal,
9456                    protocol_name: <WlanSoftmacIfcBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9457                }),
9458            }))
9459            },
9460        )
9461    }
9462}
9463
9464/// Protocol that transports `WlanSoftmacIfc` requests from the wlansoftmac driver to
9465/// the bridged driver.
9466///
9467/// This protocol should always be available at HEAD since it's intended to be an in-tree only protocol.
9468/// This protocol only exists because wlansoftmac cannot be implemented in Rust and must interact with
9469/// the wlansoftmac-c, wlansoftmac-rust, and wlan-mlme Rust crates.
9470#[derive(Debug)]
9471pub enum WlanSoftmacIfcBridgeRequest {
9472    /// Reports the result of an attempted transmission.
9473    ///
9474    /// A device driver indicates support for `ReportTxResult()` using
9475    /// `fuchsia.wlan.common/DeviceExtension.report_tx_result_supported`.
9476    ReportTxResult {
9477        tx_result: fidl_fuchsia_wlan_common::WlanTxResult,
9478        responder: WlanSoftmacIfcBridgeReportTxResultResponder,
9479    },
9480    /// Reports completion of a scan associated with the unique `scan_id`. `status`
9481    /// indicates whether the scan completed successfully, failed due to an error,
9482    /// or was cancelled.
9483    ///
9484    /// Return status indicates the reason for scan completion:
9485    ///   ZX_OK: All channels were scanned successfully.
9486    ///   ZX_ERR_CANCELLED: The scan was terminated by a user request, either an
9487    ///       explicit WlanSoftmac.CancelScan() or the initiation of an
9488    ///       incompatible request (e.g. connect).
9489    ///   ZX_ERR_OUT_OF_RANGE: The scan request included a prohibited channel.
9490    ///       This may be due to the current country setting.
9491    NotifyScanComplete {
9492        payload: WlanSoftmacIfcBaseNotifyScanCompleteRequest,
9493        responder: WlanSoftmacIfcBridgeNotifyScanCompleteResponder,
9494    },
9495    /// Stop the bridged driver.
9496    ///
9497    /// Calling this method causes both the server end of this protocol (`WlanSoftmacIfcBridge`)
9498    /// to close and the client end of `WlanSoftmacBridge` to close. The server will not return a
9499    /// response from this method until after processing all queued events.
9500    ///
9501    /// In practice, the wlansoftmac driver calls this method during unbind.
9502    StopBridgedDriver { responder: WlanSoftmacIfcBridgeStopBridgedDriverResponder },
9503}
9504
9505impl WlanSoftmacIfcBridgeRequest {
9506    #[allow(irrefutable_let_patterns)]
9507    pub fn into_report_tx_result(
9508        self,
9509    ) -> Option<(fidl_fuchsia_wlan_common::WlanTxResult, WlanSoftmacIfcBridgeReportTxResultResponder)>
9510    {
9511        if let WlanSoftmacIfcBridgeRequest::ReportTxResult { tx_result, responder } = self {
9512            Some((tx_result, responder))
9513        } else {
9514            None
9515        }
9516    }
9517
9518    #[allow(irrefutable_let_patterns)]
9519    pub fn into_notify_scan_complete(
9520        self,
9521    ) -> Option<(
9522        WlanSoftmacIfcBaseNotifyScanCompleteRequest,
9523        WlanSoftmacIfcBridgeNotifyScanCompleteResponder,
9524    )> {
9525        if let WlanSoftmacIfcBridgeRequest::NotifyScanComplete { payload, responder } = self {
9526            Some((payload, responder))
9527        } else {
9528            None
9529        }
9530    }
9531
9532    #[allow(irrefutable_let_patterns)]
9533    pub fn into_stop_bridged_driver(
9534        self,
9535    ) -> Option<(WlanSoftmacIfcBridgeStopBridgedDriverResponder)> {
9536        if let WlanSoftmacIfcBridgeRequest::StopBridgedDriver { responder } = self {
9537            Some((responder))
9538        } else {
9539            None
9540        }
9541    }
9542
9543    /// Name of the method defined in FIDL
9544    pub fn method_name(&self) -> &'static str {
9545        match *self {
9546            WlanSoftmacIfcBridgeRequest::ReportTxResult { .. } => "report_tx_result",
9547            WlanSoftmacIfcBridgeRequest::NotifyScanComplete { .. } => "notify_scan_complete",
9548            WlanSoftmacIfcBridgeRequest::StopBridgedDriver { .. } => "stop_bridged_driver",
9549        }
9550    }
9551}
9552
9553#[derive(Debug, Clone)]
9554pub struct WlanSoftmacIfcBridgeControlHandle {
9555    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9556}
9557
9558impl fidl::endpoints::ControlHandle for WlanSoftmacIfcBridgeControlHandle {
9559    fn shutdown(&self) {
9560        self.inner.shutdown()
9561    }
9562    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
9563        self.inner.shutdown_with_epitaph(status)
9564    }
9565
9566    fn is_closed(&self) -> bool {
9567        self.inner.channel().is_closed()
9568    }
9569    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
9570        self.inner.channel().on_closed()
9571    }
9572
9573    #[cfg(target_os = "fuchsia")]
9574    fn signal_peer(
9575        &self,
9576        clear_mask: zx::Signals,
9577        set_mask: zx::Signals,
9578    ) -> Result<(), zx_status::Status> {
9579        use fidl::Peered;
9580        self.inner.channel().signal_peer(clear_mask, set_mask)
9581    }
9582}
9583
9584impl WlanSoftmacIfcBridgeControlHandle {}
9585
9586#[must_use = "FIDL methods require a response to be sent"]
9587#[derive(Debug)]
9588pub struct WlanSoftmacIfcBridgeReportTxResultResponder {
9589    control_handle: std::mem::ManuallyDrop<WlanSoftmacIfcBridgeControlHandle>,
9590    tx_id: u32,
9591}
9592
9593/// Set the the channel to be shutdown (see [`WlanSoftmacIfcBridgeControlHandle::shutdown`])
9594/// if the responder is dropped without sending a response, so that the client
9595/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9596impl std::ops::Drop for WlanSoftmacIfcBridgeReportTxResultResponder {
9597    fn drop(&mut self) {
9598        self.control_handle.shutdown();
9599        // Safety: drops once, never accessed again
9600        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9601    }
9602}
9603
9604impl fidl::endpoints::Responder for WlanSoftmacIfcBridgeReportTxResultResponder {
9605    type ControlHandle = WlanSoftmacIfcBridgeControlHandle;
9606
9607    fn control_handle(&self) -> &WlanSoftmacIfcBridgeControlHandle {
9608        &self.control_handle
9609    }
9610
9611    fn drop_without_shutdown(mut self) {
9612        // Safety: drops once, never accessed again due to mem::forget
9613        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9614        // Prevent Drop from running (which would shut down the channel)
9615        std::mem::forget(self);
9616    }
9617}
9618
9619impl WlanSoftmacIfcBridgeReportTxResultResponder {
9620    /// Sends a response to the FIDL transaction.
9621    ///
9622    /// Sets the channel to shutdown if an error occurs.
9623    pub fn send(self) -> Result<(), fidl::Error> {
9624        let _result = self.send_raw();
9625        if _result.is_err() {
9626            self.control_handle.shutdown();
9627        }
9628        self.drop_without_shutdown();
9629        _result
9630    }
9631
9632    /// Similar to "send" but does not shutdown the channel if an error occurs.
9633    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
9634        let _result = self.send_raw();
9635        self.drop_without_shutdown();
9636        _result
9637    }
9638
9639    fn send_raw(&self) -> Result<(), fidl::Error> {
9640        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
9641            (),
9642            self.tx_id,
9643            0x5835c2f13d94e09a,
9644            fidl::encoding::DynamicFlags::empty(),
9645        )
9646    }
9647}
9648
9649#[must_use = "FIDL methods require a response to be sent"]
9650#[derive(Debug)]
9651pub struct WlanSoftmacIfcBridgeNotifyScanCompleteResponder {
9652    control_handle: std::mem::ManuallyDrop<WlanSoftmacIfcBridgeControlHandle>,
9653    tx_id: u32,
9654}
9655
9656/// Set the the channel to be shutdown (see [`WlanSoftmacIfcBridgeControlHandle::shutdown`])
9657/// if the responder is dropped without sending a response, so that the client
9658/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9659impl std::ops::Drop for WlanSoftmacIfcBridgeNotifyScanCompleteResponder {
9660    fn drop(&mut self) {
9661        self.control_handle.shutdown();
9662        // Safety: drops once, never accessed again
9663        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9664    }
9665}
9666
9667impl fidl::endpoints::Responder for WlanSoftmacIfcBridgeNotifyScanCompleteResponder {
9668    type ControlHandle = WlanSoftmacIfcBridgeControlHandle;
9669
9670    fn control_handle(&self) -> &WlanSoftmacIfcBridgeControlHandle {
9671        &self.control_handle
9672    }
9673
9674    fn drop_without_shutdown(mut self) {
9675        // Safety: drops once, never accessed again due to mem::forget
9676        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9677        // Prevent Drop from running (which would shut down the channel)
9678        std::mem::forget(self);
9679    }
9680}
9681
9682impl WlanSoftmacIfcBridgeNotifyScanCompleteResponder {
9683    /// Sends a response to the FIDL transaction.
9684    ///
9685    /// Sets the channel to shutdown if an error occurs.
9686    pub fn send(self) -> Result<(), fidl::Error> {
9687        let _result = self.send_raw();
9688        if _result.is_err() {
9689            self.control_handle.shutdown();
9690        }
9691        self.drop_without_shutdown();
9692        _result
9693    }
9694
9695    /// Similar to "send" but does not shutdown the channel if an error occurs.
9696    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
9697        let _result = self.send_raw();
9698        self.drop_without_shutdown();
9699        _result
9700    }
9701
9702    fn send_raw(&self) -> Result<(), fidl::Error> {
9703        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
9704            (),
9705            self.tx_id,
9706            0x7045e3cd460dc42c,
9707            fidl::encoding::DynamicFlags::empty(),
9708        )
9709    }
9710}
9711
9712#[must_use = "FIDL methods require a response to be sent"]
9713#[derive(Debug)]
9714pub struct WlanSoftmacIfcBridgeStopBridgedDriverResponder {
9715    control_handle: std::mem::ManuallyDrop<WlanSoftmacIfcBridgeControlHandle>,
9716    tx_id: u32,
9717}
9718
9719/// Set the the channel to be shutdown (see [`WlanSoftmacIfcBridgeControlHandle::shutdown`])
9720/// if the responder is dropped without sending a response, so that the client
9721/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9722impl std::ops::Drop for WlanSoftmacIfcBridgeStopBridgedDriverResponder {
9723    fn drop(&mut self) {
9724        self.control_handle.shutdown();
9725        // Safety: drops once, never accessed again
9726        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9727    }
9728}
9729
9730impl fidl::endpoints::Responder for WlanSoftmacIfcBridgeStopBridgedDriverResponder {
9731    type ControlHandle = WlanSoftmacIfcBridgeControlHandle;
9732
9733    fn control_handle(&self) -> &WlanSoftmacIfcBridgeControlHandle {
9734        &self.control_handle
9735    }
9736
9737    fn drop_without_shutdown(mut self) {
9738        // Safety: drops once, never accessed again due to mem::forget
9739        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9740        // Prevent Drop from running (which would shut down the channel)
9741        std::mem::forget(self);
9742    }
9743}
9744
9745impl WlanSoftmacIfcBridgeStopBridgedDriverResponder {
9746    /// Sends a response to the FIDL transaction.
9747    ///
9748    /// Sets the channel to shutdown if an error occurs.
9749    pub fn send(self) -> Result<(), fidl::Error> {
9750        let _result = self.send_raw();
9751        if _result.is_err() {
9752            self.control_handle.shutdown();
9753        }
9754        self.drop_without_shutdown();
9755        _result
9756    }
9757
9758    /// Similar to "send" but does not shutdown the channel if an error occurs.
9759    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
9760        let _result = self.send_raw();
9761        self.drop_without_shutdown();
9762        _result
9763    }
9764
9765    fn send_raw(&self) -> Result<(), fidl::Error> {
9766        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
9767            (),
9768            self.tx_id,
9769            0x112dbd0cc2251151,
9770            fidl::encoding::DynamicFlags::empty(),
9771        )
9772    }
9773}
9774
9775#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
9776pub struct WlanTxMarker;
9777
9778impl fidl::endpoints::ProtocolMarker for WlanTxMarker {
9779    type Proxy = WlanTxProxy;
9780    type RequestStream = WlanTxRequestStream;
9781    #[cfg(target_os = "fuchsia")]
9782    type SynchronousProxy = WlanTxSynchronousProxy;
9783
9784    const DEBUG_NAME: &'static str = "(anonymous) WlanTx";
9785}
9786pub type WlanTxTransferResult = Result<(), i32>;
9787
9788pub trait WlanTxProxyInterface: Send + Sync {
9789    type TransferResponseFut: std::future::Future<Output = Result<WlanTxTransferResult, fidl::Error>>
9790        + Send;
9791    fn r#transfer(&self, payload: &WlanTxTransferRequest) -> Self::TransferResponseFut;
9792}
9793#[derive(Debug)]
9794#[cfg(target_os = "fuchsia")]
9795pub struct WlanTxSynchronousProxy {
9796    client: fidl::client::sync::Client,
9797}
9798
9799#[cfg(target_os = "fuchsia")]
9800impl fidl::endpoints::SynchronousProxy for WlanTxSynchronousProxy {
9801    type Proxy = WlanTxProxy;
9802    type Protocol = WlanTxMarker;
9803
9804    fn from_channel(inner: fidl::Channel) -> Self {
9805        Self::new(inner)
9806    }
9807
9808    fn into_channel(self) -> fidl::Channel {
9809        self.client.into_channel()
9810    }
9811
9812    fn as_channel(&self) -> &fidl::Channel {
9813        self.client.as_channel()
9814    }
9815}
9816
9817#[cfg(target_os = "fuchsia")]
9818impl WlanTxSynchronousProxy {
9819    pub fn new(channel: fidl::Channel) -> Self {
9820        let protocol_name = <WlanTxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
9821        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
9822    }
9823
9824    pub fn into_channel(self) -> fidl::Channel {
9825        self.client.into_channel()
9826    }
9827
9828    /// Waits until an event arrives and returns it. It is safe for other
9829    /// threads to make concurrent requests while waiting for an event.
9830    pub fn wait_for_event(
9831        &self,
9832        deadline: zx::MonotonicInstant,
9833    ) -> Result<WlanTxEvent, fidl::Error> {
9834        WlanTxEvent::decode(self.client.wait_for_event(deadline)?)
9835    }
9836
9837    pub fn r#transfer(
9838        &self,
9839        mut payload: &WlanTxTransferRequest,
9840        ___deadline: zx::MonotonicInstant,
9841    ) -> Result<WlanTxTransferResult, fidl::Error> {
9842        let _response = self.client.send_query::<
9843            WlanTxTransferRequest,
9844            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
9845        >(
9846            payload,
9847            0x19f8ff7a8b910ab3,
9848            fidl::encoding::DynamicFlags::empty(),
9849            ___deadline,
9850        )?;
9851        Ok(_response.map(|x| x))
9852    }
9853}
9854
9855#[cfg(target_os = "fuchsia")]
9856impl From<WlanTxSynchronousProxy> for zx::Handle {
9857    fn from(value: WlanTxSynchronousProxy) -> Self {
9858        value.into_channel().into()
9859    }
9860}
9861
9862#[cfg(target_os = "fuchsia")]
9863impl From<fidl::Channel> for WlanTxSynchronousProxy {
9864    fn from(value: fidl::Channel) -> Self {
9865        Self::new(value)
9866    }
9867}
9868
9869#[cfg(target_os = "fuchsia")]
9870impl fidl::endpoints::FromClient for WlanTxSynchronousProxy {
9871    type Protocol = WlanTxMarker;
9872
9873    fn from_client(value: fidl::endpoints::ClientEnd<WlanTxMarker>) -> Self {
9874        Self::new(value.into_channel())
9875    }
9876}
9877
9878#[derive(Debug, Clone)]
9879pub struct WlanTxProxy {
9880    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
9881}
9882
9883impl fidl::endpoints::Proxy for WlanTxProxy {
9884    type Protocol = WlanTxMarker;
9885
9886    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
9887        Self::new(inner)
9888    }
9889
9890    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
9891        self.client.into_channel().map_err(|client| Self { client })
9892    }
9893
9894    fn as_channel(&self) -> &::fidl::AsyncChannel {
9895        self.client.as_channel()
9896    }
9897}
9898
9899impl WlanTxProxy {
9900    /// Create a new Proxy for fuchsia.wlan.softmac/WlanTx.
9901    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
9902        let protocol_name = <WlanTxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
9903        Self { client: fidl::client::Client::new(channel, protocol_name) }
9904    }
9905
9906    /// Get a Stream of events from the remote end of the protocol.
9907    ///
9908    /// # Panics
9909    ///
9910    /// Panics if the event stream was already taken.
9911    pub fn take_event_stream(&self) -> WlanTxEventStream {
9912        WlanTxEventStream { event_receiver: self.client.take_event_receiver() }
9913    }
9914
9915    pub fn r#transfer(
9916        &self,
9917        mut payload: &WlanTxTransferRequest,
9918    ) -> fidl::client::QueryResponseFut<
9919        WlanTxTransferResult,
9920        fidl::encoding::DefaultFuchsiaResourceDialect,
9921    > {
9922        WlanTxProxyInterface::r#transfer(self, payload)
9923    }
9924}
9925
9926impl WlanTxProxyInterface for WlanTxProxy {
9927    type TransferResponseFut = fidl::client::QueryResponseFut<
9928        WlanTxTransferResult,
9929        fidl::encoding::DefaultFuchsiaResourceDialect,
9930    >;
9931    fn r#transfer(&self, mut payload: &WlanTxTransferRequest) -> Self::TransferResponseFut {
9932        fn _decode(
9933            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9934        ) -> Result<WlanTxTransferResult, fidl::Error> {
9935            let _response = fidl::client::decode_transaction_body::<
9936                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
9937                fidl::encoding::DefaultFuchsiaResourceDialect,
9938                0x19f8ff7a8b910ab3,
9939            >(_buf?)?;
9940            Ok(_response.map(|x| x))
9941        }
9942        self.client.send_query_and_decode::<WlanTxTransferRequest, WlanTxTransferResult>(
9943            payload,
9944            0x19f8ff7a8b910ab3,
9945            fidl::encoding::DynamicFlags::empty(),
9946            _decode,
9947        )
9948    }
9949}
9950
9951pub struct WlanTxEventStream {
9952    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
9953}
9954
9955impl std::marker::Unpin for WlanTxEventStream {}
9956
9957impl futures::stream::FusedStream for WlanTxEventStream {
9958    fn is_terminated(&self) -> bool {
9959        self.event_receiver.is_terminated()
9960    }
9961}
9962
9963impl futures::Stream for WlanTxEventStream {
9964    type Item = Result<WlanTxEvent, fidl::Error>;
9965
9966    fn poll_next(
9967        mut self: std::pin::Pin<&mut Self>,
9968        cx: &mut std::task::Context<'_>,
9969    ) -> std::task::Poll<Option<Self::Item>> {
9970        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
9971            &mut self.event_receiver,
9972            cx
9973        )?) {
9974            Some(buf) => std::task::Poll::Ready(Some(WlanTxEvent::decode(buf))),
9975            None => std::task::Poll::Ready(None),
9976        }
9977    }
9978}
9979
9980#[derive(Debug)]
9981pub enum WlanTxEvent {}
9982
9983impl WlanTxEvent {
9984    /// Decodes a message buffer as a [`WlanTxEvent`].
9985    fn decode(
9986        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
9987    ) -> Result<WlanTxEvent, fidl::Error> {
9988        let (bytes, _handles) = buf.split_mut();
9989        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9990        debug_assert_eq!(tx_header.tx_id, 0);
9991        match tx_header.ordinal {
9992            _ => Err(fidl::Error::UnknownOrdinal {
9993                ordinal: tx_header.ordinal,
9994                protocol_name: <WlanTxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9995            }),
9996        }
9997    }
9998}
9999
10000/// A Stream of incoming requests for fuchsia.wlan.softmac/WlanTx.
10001pub struct WlanTxRequestStream {
10002    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10003    is_terminated: bool,
10004}
10005
10006impl std::marker::Unpin for WlanTxRequestStream {}
10007
10008impl futures::stream::FusedStream for WlanTxRequestStream {
10009    fn is_terminated(&self) -> bool {
10010        self.is_terminated
10011    }
10012}
10013
10014impl fidl::endpoints::RequestStream for WlanTxRequestStream {
10015    type Protocol = WlanTxMarker;
10016    type ControlHandle = WlanTxControlHandle;
10017
10018    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
10019        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
10020    }
10021
10022    fn control_handle(&self) -> Self::ControlHandle {
10023        WlanTxControlHandle { inner: self.inner.clone() }
10024    }
10025
10026    fn into_inner(
10027        self,
10028    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
10029    {
10030        (self.inner, self.is_terminated)
10031    }
10032
10033    fn from_inner(
10034        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10035        is_terminated: bool,
10036    ) -> Self {
10037        Self { inner, is_terminated }
10038    }
10039}
10040
10041impl futures::Stream for WlanTxRequestStream {
10042    type Item = Result<WlanTxRequest, fidl::Error>;
10043
10044    fn poll_next(
10045        mut self: std::pin::Pin<&mut Self>,
10046        cx: &mut std::task::Context<'_>,
10047    ) -> std::task::Poll<Option<Self::Item>> {
10048        let this = &mut *self;
10049        if this.inner.check_shutdown(cx) {
10050            this.is_terminated = true;
10051            return std::task::Poll::Ready(None);
10052        }
10053        if this.is_terminated {
10054            panic!("polled WlanTxRequestStream after completion");
10055        }
10056        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
10057            |bytes, handles| {
10058                match this.inner.channel().read_etc(cx, bytes, handles) {
10059                    std::task::Poll::Ready(Ok(())) => {}
10060                    std::task::Poll::Pending => return std::task::Poll::Pending,
10061                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
10062                        this.is_terminated = true;
10063                        return std::task::Poll::Ready(None);
10064                    }
10065                    std::task::Poll::Ready(Err(e)) => {
10066                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
10067                            e.into(),
10068                        ))))
10069                    }
10070                }
10071
10072                // A message has been received from the channel
10073                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
10074
10075                std::task::Poll::Ready(Some(match header.ordinal {
10076                    0x19f8ff7a8b910ab3 => {
10077                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
10078                        let mut req = fidl::new_empty!(
10079                            WlanTxTransferRequest,
10080                            fidl::encoding::DefaultFuchsiaResourceDialect
10081                        );
10082                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanTxTransferRequest>(&header, _body_bytes, handles, &mut req)?;
10083                        let control_handle = WlanTxControlHandle { inner: this.inner.clone() };
10084                        Ok(WlanTxRequest::Transfer {
10085                            payload: req,
10086                            responder: WlanTxTransferResponder {
10087                                control_handle: std::mem::ManuallyDrop::new(control_handle),
10088                                tx_id: header.tx_id,
10089                            },
10090                        })
10091                    }
10092                    _ => Err(fidl::Error::UnknownOrdinal {
10093                        ordinal: header.ordinal,
10094                        protocol_name:
10095                            <WlanTxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
10096                    }),
10097                }))
10098            },
10099        )
10100    }
10101}
10102
10103/// Protocol for sending a WLAN frame from the bridged wlansoftmac
10104/// driver to the wlansoftmac driver.
10105///
10106/// # Experimental
10107///
10108/// This protocol is implemented as a foreign function interface (FFI)
10109/// between the wlansoftmac driver and the bridged driver solely to improve
10110/// the performance of processing data frames through the wlan-mlme library.
10111#[derive(Debug)]
10112pub enum WlanTxRequest {
10113    Transfer { payload: WlanTxTransferRequest, responder: WlanTxTransferResponder },
10114}
10115
10116impl WlanTxRequest {
10117    #[allow(irrefutable_let_patterns)]
10118    pub fn into_transfer(self) -> Option<(WlanTxTransferRequest, WlanTxTransferResponder)> {
10119        if let WlanTxRequest::Transfer { payload, responder } = self {
10120            Some((payload, responder))
10121        } else {
10122            None
10123        }
10124    }
10125
10126    /// Name of the method defined in FIDL
10127    pub fn method_name(&self) -> &'static str {
10128        match *self {
10129            WlanTxRequest::Transfer { .. } => "transfer",
10130        }
10131    }
10132}
10133
10134#[derive(Debug, Clone)]
10135pub struct WlanTxControlHandle {
10136    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10137}
10138
10139impl fidl::endpoints::ControlHandle for WlanTxControlHandle {
10140    fn shutdown(&self) {
10141        self.inner.shutdown()
10142    }
10143    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
10144        self.inner.shutdown_with_epitaph(status)
10145    }
10146
10147    fn is_closed(&self) -> bool {
10148        self.inner.channel().is_closed()
10149    }
10150    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
10151        self.inner.channel().on_closed()
10152    }
10153
10154    #[cfg(target_os = "fuchsia")]
10155    fn signal_peer(
10156        &self,
10157        clear_mask: zx::Signals,
10158        set_mask: zx::Signals,
10159    ) -> Result<(), zx_status::Status> {
10160        use fidl::Peered;
10161        self.inner.channel().signal_peer(clear_mask, set_mask)
10162    }
10163}
10164
10165impl WlanTxControlHandle {}
10166
10167#[must_use = "FIDL methods require a response to be sent"]
10168#[derive(Debug)]
10169pub struct WlanTxTransferResponder {
10170    control_handle: std::mem::ManuallyDrop<WlanTxControlHandle>,
10171    tx_id: u32,
10172}
10173
10174/// Set the the channel to be shutdown (see [`WlanTxControlHandle::shutdown`])
10175/// if the responder is dropped without sending a response, so that the client
10176/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
10177impl std::ops::Drop for WlanTxTransferResponder {
10178    fn drop(&mut self) {
10179        self.control_handle.shutdown();
10180        // Safety: drops once, never accessed again
10181        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10182    }
10183}
10184
10185impl fidl::endpoints::Responder for WlanTxTransferResponder {
10186    type ControlHandle = WlanTxControlHandle;
10187
10188    fn control_handle(&self) -> &WlanTxControlHandle {
10189        &self.control_handle
10190    }
10191
10192    fn drop_without_shutdown(mut self) {
10193        // Safety: drops once, never accessed again due to mem::forget
10194        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10195        // Prevent Drop from running (which would shut down the channel)
10196        std::mem::forget(self);
10197    }
10198}
10199
10200impl WlanTxTransferResponder {
10201    /// Sends a response to the FIDL transaction.
10202    ///
10203    /// Sets the channel to shutdown if an error occurs.
10204    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10205        let _result = self.send_raw(result);
10206        if _result.is_err() {
10207            self.control_handle.shutdown();
10208        }
10209        self.drop_without_shutdown();
10210        _result
10211    }
10212
10213    /// Similar to "send" but does not shutdown the channel if an error occurs.
10214    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10215        let _result = self.send_raw(result);
10216        self.drop_without_shutdown();
10217        _result
10218    }
10219
10220    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10221        self.control_handle
10222            .inner
10223            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10224                result,
10225                self.tx_id,
10226                0x19f8ff7a8b910ab3,
10227                fidl::encoding::DynamicFlags::empty(),
10228            )
10229    }
10230}
10231
10232mod internal {
10233    use super::*;
10234
10235    impl fidl::encoding::ResourceTypeMarker for WlanSoftmacBridgeStartRequest {
10236        type Borrowed<'a> = &'a mut Self;
10237        fn take_or_borrow<'a>(
10238            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10239        ) -> Self::Borrowed<'a> {
10240            value
10241        }
10242    }
10243
10244    unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBridgeStartRequest {
10245        type Owned = Self;
10246
10247        #[inline(always)]
10248        fn inline_align(_context: fidl::encoding::Context) -> usize {
10249            8
10250        }
10251
10252        #[inline(always)]
10253        fn inline_size(_context: fidl::encoding::Context) -> usize {
10254            24
10255        }
10256    }
10257
10258    unsafe impl
10259        fidl::encoding::Encode<
10260            WlanSoftmacBridgeStartRequest,
10261            fidl::encoding::DefaultFuchsiaResourceDialect,
10262        > for &mut WlanSoftmacBridgeStartRequest
10263    {
10264        #[inline]
10265        unsafe fn encode(
10266            self,
10267            encoder: &mut fidl::encoding::Encoder<
10268                '_,
10269                fidl::encoding::DefaultFuchsiaResourceDialect,
10270            >,
10271            offset: usize,
10272            _depth: fidl::encoding::Depth,
10273        ) -> fidl::Result<()> {
10274            encoder.debug_check_bounds::<WlanSoftmacBridgeStartRequest>(offset);
10275            // Delegate to tuple encoding.
10276            fidl::encoding::Encode::<
10277                WlanSoftmacBridgeStartRequest,
10278                fidl::encoding::DefaultFuchsiaResourceDialect,
10279            >::encode(
10280                (
10281                    <fidl::encoding::Endpoint<
10282                        fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
10283                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10284                        &mut self.ifc_bridge
10285                    ),
10286                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.ethernet_tx),
10287                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.wlan_rx),
10288                ),
10289                encoder,
10290                offset,
10291                _depth,
10292            )
10293        }
10294    }
10295    unsafe impl<
10296            T0: fidl::encoding::Encode<
10297                fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>>,
10298                fidl::encoding::DefaultFuchsiaResourceDialect,
10299            >,
10300            T1: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
10301            T2: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
10302        >
10303        fidl::encoding::Encode<
10304            WlanSoftmacBridgeStartRequest,
10305            fidl::encoding::DefaultFuchsiaResourceDialect,
10306        > for (T0, T1, T2)
10307    {
10308        #[inline]
10309        unsafe fn encode(
10310            self,
10311            encoder: &mut fidl::encoding::Encoder<
10312                '_,
10313                fidl::encoding::DefaultFuchsiaResourceDialect,
10314            >,
10315            offset: usize,
10316            depth: fidl::encoding::Depth,
10317        ) -> fidl::Result<()> {
10318            encoder.debug_check_bounds::<WlanSoftmacBridgeStartRequest>(offset);
10319            // Zero out padding regions. There's no need to apply masks
10320            // because the unmasked parts will be overwritten by fields.
10321            unsafe {
10322                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
10323                (ptr as *mut u64).write_unaligned(0);
10324            }
10325            // Write the fields.
10326            self.0.encode(encoder, offset + 0, depth)?;
10327            self.1.encode(encoder, offset + 8, depth)?;
10328            self.2.encode(encoder, offset + 16, depth)?;
10329            Ok(())
10330        }
10331    }
10332
10333    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10334        for WlanSoftmacBridgeStartRequest
10335    {
10336        #[inline(always)]
10337        fn new_empty() -> Self {
10338            Self {
10339                ifc_bridge: fidl::new_empty!(
10340                    fidl::encoding::Endpoint<
10341                        fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
10342                    >,
10343                    fidl::encoding::DefaultFuchsiaResourceDialect
10344                ),
10345                ethernet_tx: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
10346                wlan_rx: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
10347            }
10348        }
10349
10350        #[inline]
10351        unsafe fn decode(
10352            &mut self,
10353            decoder: &mut fidl::encoding::Decoder<
10354                '_,
10355                fidl::encoding::DefaultFuchsiaResourceDialect,
10356            >,
10357            offset: usize,
10358            _depth: fidl::encoding::Depth,
10359        ) -> fidl::Result<()> {
10360            decoder.debug_check_bounds::<Self>(offset);
10361            // Verify that padding bytes are zero.
10362            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
10363            let padval = unsafe { (ptr as *const u64).read_unaligned() };
10364            let mask = 0xffffffff00000000u64;
10365            let maskedval = padval & mask;
10366            if maskedval != 0 {
10367                return Err(fidl::Error::NonZeroPadding {
10368                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
10369                });
10370            }
10371            fidl::decode!(
10372                fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>>,
10373                fidl::encoding::DefaultFuchsiaResourceDialect,
10374                &mut self.ifc_bridge,
10375                decoder,
10376                offset + 0,
10377                _depth
10378            )?;
10379            fidl::decode!(
10380                u64,
10381                fidl::encoding::DefaultFuchsiaResourceDialect,
10382                &mut self.ethernet_tx,
10383                decoder,
10384                offset + 8,
10385                _depth
10386            )?;
10387            fidl::decode!(
10388                u64,
10389                fidl::encoding::DefaultFuchsiaResourceDialect,
10390                &mut self.wlan_rx,
10391                decoder,
10392                offset + 16,
10393                _depth
10394            )?;
10395            Ok(())
10396        }
10397    }
10398
10399    impl fidl::encoding::ResourceTypeMarker for WlanSoftmacBridgeStartResponse {
10400        type Borrowed<'a> = &'a mut Self;
10401        fn take_or_borrow<'a>(
10402            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10403        ) -> Self::Borrowed<'a> {
10404            value
10405        }
10406    }
10407
10408    unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBridgeStartResponse {
10409        type Owned = Self;
10410
10411        #[inline(always)]
10412        fn inline_align(_context: fidl::encoding::Context) -> usize {
10413            4
10414        }
10415
10416        #[inline(always)]
10417        fn inline_size(_context: fidl::encoding::Context) -> usize {
10418            4
10419        }
10420    }
10421
10422    unsafe impl
10423        fidl::encoding::Encode<
10424            WlanSoftmacBridgeStartResponse,
10425            fidl::encoding::DefaultFuchsiaResourceDialect,
10426        > for &mut WlanSoftmacBridgeStartResponse
10427    {
10428        #[inline]
10429        unsafe fn encode(
10430            self,
10431            encoder: &mut fidl::encoding::Encoder<
10432                '_,
10433                fidl::encoding::DefaultFuchsiaResourceDialect,
10434            >,
10435            offset: usize,
10436            _depth: fidl::encoding::Depth,
10437        ) -> fidl::Result<()> {
10438            encoder.debug_check_bounds::<WlanSoftmacBridgeStartResponse>(offset);
10439            // Delegate to tuple encoding.
10440            fidl::encoding::Encode::<
10441                WlanSoftmacBridgeStartResponse,
10442                fidl::encoding::DefaultFuchsiaResourceDialect,
10443            >::encode(
10444                (<fidl::encoding::HandleType<
10445                    fidl::Channel,
10446                    { fidl::ObjectType::CHANNEL.into_raw() },
10447                    2147483648,
10448                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10449                    &mut self.sme_channel
10450                ),),
10451                encoder,
10452                offset,
10453                _depth,
10454            )
10455        }
10456    }
10457    unsafe impl<
10458            T0: fidl::encoding::Encode<
10459                fidl::encoding::HandleType<
10460                    fidl::Channel,
10461                    { fidl::ObjectType::CHANNEL.into_raw() },
10462                    2147483648,
10463                >,
10464                fidl::encoding::DefaultFuchsiaResourceDialect,
10465            >,
10466        >
10467        fidl::encoding::Encode<
10468            WlanSoftmacBridgeStartResponse,
10469            fidl::encoding::DefaultFuchsiaResourceDialect,
10470        > for (T0,)
10471    {
10472        #[inline]
10473        unsafe fn encode(
10474            self,
10475            encoder: &mut fidl::encoding::Encoder<
10476                '_,
10477                fidl::encoding::DefaultFuchsiaResourceDialect,
10478            >,
10479            offset: usize,
10480            depth: fidl::encoding::Depth,
10481        ) -> fidl::Result<()> {
10482            encoder.debug_check_bounds::<WlanSoftmacBridgeStartResponse>(offset);
10483            // Zero out padding regions. There's no need to apply masks
10484            // because the unmasked parts will be overwritten by fields.
10485            // Write the fields.
10486            self.0.encode(encoder, offset + 0, depth)?;
10487            Ok(())
10488        }
10489    }
10490
10491    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10492        for WlanSoftmacBridgeStartResponse
10493    {
10494        #[inline(always)]
10495        fn new_empty() -> Self {
10496            Self {
10497                sme_channel: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10498            }
10499        }
10500
10501        #[inline]
10502        unsafe fn decode(
10503            &mut self,
10504            decoder: &mut fidl::encoding::Decoder<
10505                '_,
10506                fidl::encoding::DefaultFuchsiaResourceDialect,
10507            >,
10508            offset: usize,
10509            _depth: fidl::encoding::Depth,
10510        ) -> fidl::Result<()> {
10511            decoder.debug_check_bounds::<Self>(offset);
10512            // Verify that padding bytes are zero.
10513            fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.sme_channel, decoder, offset + 0, _depth)?;
10514            Ok(())
10515        }
10516    }
10517}