fidl_fuchsia_wlan_sme/
fidl_fuchsia_wlan_sme.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_sme__common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, PartialEq)]
15pub struct ClientSmeConnectRequest {
16    pub req: ConnectRequest,
17    pub txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
18}
19
20impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ClientSmeConnectRequest {}
21
22#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
23pub struct ClientSmeScanForControllerRequest {
24    pub req: ScanRequest,
25}
26
27impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
28    for ClientSmeScanForControllerRequest
29{
30}
31
32#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
33pub struct ClientSmeScanRequest {
34    pub req: ScanRequest,
35}
36
37impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ClientSmeScanRequest {}
38
39#[derive(Debug, PartialEq)]
40pub struct ClientSmeScanForControllerResponse {
41    pub scan_results: Vec<ScanResult>,
42}
43
44impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
45    for ClientSmeScanForControllerResponse
46{
47}
48
49#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
50pub struct ClientSmeScanResponse {
51    pub scan_results: fidl::Vmo,
52}
53
54impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ClientSmeScanResponse {}
55
56#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
57pub struct GenericSmeGetApSmeRequest {
58    pub sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
59}
60
61impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for GenericSmeGetApSmeRequest {}
62
63#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
64pub struct GenericSmeGetClientSmeRequest {
65    pub sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
66}
67
68impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
69    for GenericSmeGetClientSmeRequest
70{
71}
72
73#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
74pub struct GenericSmeGetSmeTelemetryRequest {
75    pub telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
76}
77
78impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
79    for GenericSmeGetSmeTelemetryRequest
80{
81}
82
83#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
84pub struct GenericSmeQueryResponse {
85    pub resp: GenericSmeQuery,
86}
87
88impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for GenericSmeQueryResponse {}
89
90#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
91pub struct TelemetryCloneInspectVmoResponse {
92    pub inspect_vmo: fidl::Vmo,
93}
94
95impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
96    for TelemetryCloneInspectVmoResponse
97{
98}
99
100#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
101pub struct UsmeBootstrapStartRequest {
102    pub generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
103    pub legacy_privacy_support: LegacyPrivacySupport,
104}
105
106impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UsmeBootstrapStartRequest {}
107
108#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
109pub struct UsmeBootstrapStartResponse {
110    pub inspect_vmo: fidl::Vmo,
111}
112
113impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
114    for UsmeBootstrapStartResponse
115{
116}
117
118#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
119pub struct ApSmeMarker;
120
121impl fidl::endpoints::ProtocolMarker for ApSmeMarker {
122    type Proxy = ApSmeProxy;
123    type RequestStream = ApSmeRequestStream;
124    #[cfg(target_os = "fuchsia")]
125    type SynchronousProxy = ApSmeSynchronousProxy;
126
127    const DEBUG_NAME: &'static str = "(anonymous) ApSme";
128}
129
130pub trait ApSmeProxyInterface: Send + Sync {
131    type StartResponseFut: std::future::Future<Output = Result<StartApResultCode, fidl::Error>>
132        + Send;
133    fn r#start(&self, config: &ApConfig) -> Self::StartResponseFut;
134    type StopResponseFut: std::future::Future<Output = Result<StopApResultCode, fidl::Error>> + Send;
135    fn r#stop(&self) -> Self::StopResponseFut;
136    type StatusResponseFut: std::future::Future<Output = Result<ApStatusResponse, fidl::Error>>
137        + Send;
138    fn r#status(&self) -> Self::StatusResponseFut;
139}
140#[derive(Debug)]
141#[cfg(target_os = "fuchsia")]
142pub struct ApSmeSynchronousProxy {
143    client: fidl::client::sync::Client,
144}
145
146#[cfg(target_os = "fuchsia")]
147impl fidl::endpoints::SynchronousProxy for ApSmeSynchronousProxy {
148    type Proxy = ApSmeProxy;
149    type Protocol = ApSmeMarker;
150
151    fn from_channel(inner: fidl::Channel) -> Self {
152        Self::new(inner)
153    }
154
155    fn into_channel(self) -> fidl::Channel {
156        self.client.into_channel()
157    }
158
159    fn as_channel(&self) -> &fidl::Channel {
160        self.client.as_channel()
161    }
162}
163
164#[cfg(target_os = "fuchsia")]
165impl ApSmeSynchronousProxy {
166    pub fn new(channel: fidl::Channel) -> Self {
167        let protocol_name = <ApSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
168        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
169    }
170
171    pub fn into_channel(self) -> fidl::Channel {
172        self.client.into_channel()
173    }
174
175    /// Waits until an event arrives and returns it. It is safe for other
176    /// threads to make concurrent requests while waiting for an event.
177    pub fn wait_for_event(
178        &self,
179        deadline: zx::MonotonicInstant,
180    ) -> Result<ApSmeEvent, fidl::Error> {
181        ApSmeEvent::decode(self.client.wait_for_event(deadline)?)
182    }
183
184    pub fn r#start(
185        &self,
186        mut config: &ApConfig,
187        ___deadline: zx::MonotonicInstant,
188    ) -> Result<StartApResultCode, fidl::Error> {
189        let _response = self.client.send_query::<ApSmeStartRequest, ApSmeStartResponse>(
190            (config,),
191            0x33fa134ceda8624d,
192            fidl::encoding::DynamicFlags::empty(),
193            ___deadline,
194        )?;
195        Ok(_response.code)
196    }
197
198    pub fn r#stop(
199        &self,
200        ___deadline: zx::MonotonicInstant,
201    ) -> Result<StopApResultCode, fidl::Error> {
202        let _response = self.client.send_query::<fidl::encoding::EmptyPayload, ApSmeStopResponse>(
203            (),
204            0x56423f5b49a2e851,
205            fidl::encoding::DynamicFlags::empty(),
206            ___deadline,
207        )?;
208        Ok(_response.code)
209    }
210
211    pub fn r#status(
212        &self,
213        ___deadline: zx::MonotonicInstant,
214    ) -> Result<ApStatusResponse, fidl::Error> {
215        let _response =
216            self.client.send_query::<fidl::encoding::EmptyPayload, ApSmeStatusResponse>(
217                (),
218                0x51c688ac7a101606,
219                fidl::encoding::DynamicFlags::empty(),
220                ___deadline,
221            )?;
222        Ok(_response.resp)
223    }
224}
225
226#[cfg(target_os = "fuchsia")]
227impl From<ApSmeSynchronousProxy> for zx::NullableHandle {
228    fn from(value: ApSmeSynchronousProxy) -> Self {
229        value.into_channel().into()
230    }
231}
232
233#[cfg(target_os = "fuchsia")]
234impl From<fidl::Channel> for ApSmeSynchronousProxy {
235    fn from(value: fidl::Channel) -> Self {
236        Self::new(value)
237    }
238}
239
240#[cfg(target_os = "fuchsia")]
241impl fidl::endpoints::FromClient for ApSmeSynchronousProxy {
242    type Protocol = ApSmeMarker;
243
244    fn from_client(value: fidl::endpoints::ClientEnd<ApSmeMarker>) -> Self {
245        Self::new(value.into_channel())
246    }
247}
248
249#[derive(Debug, Clone)]
250pub struct ApSmeProxy {
251    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
252}
253
254impl fidl::endpoints::Proxy for ApSmeProxy {
255    type Protocol = ApSmeMarker;
256
257    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
258        Self::new(inner)
259    }
260
261    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
262        self.client.into_channel().map_err(|client| Self { client })
263    }
264
265    fn as_channel(&self) -> &::fidl::AsyncChannel {
266        self.client.as_channel()
267    }
268}
269
270impl ApSmeProxy {
271    /// Create a new Proxy for fuchsia.wlan.sme/ApSme.
272    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
273        let protocol_name = <ApSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
274        Self { client: fidl::client::Client::new(channel, protocol_name) }
275    }
276
277    /// Get a Stream of events from the remote end of the protocol.
278    ///
279    /// # Panics
280    ///
281    /// Panics if the event stream was already taken.
282    pub fn take_event_stream(&self) -> ApSmeEventStream {
283        ApSmeEventStream { event_receiver: self.client.take_event_receiver() }
284    }
285
286    pub fn r#start(
287        &self,
288        mut config: &ApConfig,
289    ) -> fidl::client::QueryResponseFut<
290        StartApResultCode,
291        fidl::encoding::DefaultFuchsiaResourceDialect,
292    > {
293        ApSmeProxyInterface::r#start(self, config)
294    }
295
296    pub fn r#stop(
297        &self,
298    ) -> fidl::client::QueryResponseFut<
299        StopApResultCode,
300        fidl::encoding::DefaultFuchsiaResourceDialect,
301    > {
302        ApSmeProxyInterface::r#stop(self)
303    }
304
305    pub fn r#status(
306        &self,
307    ) -> fidl::client::QueryResponseFut<
308        ApStatusResponse,
309        fidl::encoding::DefaultFuchsiaResourceDialect,
310    > {
311        ApSmeProxyInterface::r#status(self)
312    }
313}
314
315impl ApSmeProxyInterface for ApSmeProxy {
316    type StartResponseFut = fidl::client::QueryResponseFut<
317        StartApResultCode,
318        fidl::encoding::DefaultFuchsiaResourceDialect,
319    >;
320    fn r#start(&self, mut config: &ApConfig) -> Self::StartResponseFut {
321        fn _decode(
322            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
323        ) -> Result<StartApResultCode, fidl::Error> {
324            let _response = fidl::client::decode_transaction_body::<
325                ApSmeStartResponse,
326                fidl::encoding::DefaultFuchsiaResourceDialect,
327                0x33fa134ceda8624d,
328            >(_buf?)?;
329            Ok(_response.code)
330        }
331        self.client.send_query_and_decode::<ApSmeStartRequest, StartApResultCode>(
332            (config,),
333            0x33fa134ceda8624d,
334            fidl::encoding::DynamicFlags::empty(),
335            _decode,
336        )
337    }
338
339    type StopResponseFut = fidl::client::QueryResponseFut<
340        StopApResultCode,
341        fidl::encoding::DefaultFuchsiaResourceDialect,
342    >;
343    fn r#stop(&self) -> Self::StopResponseFut {
344        fn _decode(
345            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
346        ) -> Result<StopApResultCode, fidl::Error> {
347            let _response = fidl::client::decode_transaction_body::<
348                ApSmeStopResponse,
349                fidl::encoding::DefaultFuchsiaResourceDialect,
350                0x56423f5b49a2e851,
351            >(_buf?)?;
352            Ok(_response.code)
353        }
354        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, StopApResultCode>(
355            (),
356            0x56423f5b49a2e851,
357            fidl::encoding::DynamicFlags::empty(),
358            _decode,
359        )
360    }
361
362    type StatusResponseFut = fidl::client::QueryResponseFut<
363        ApStatusResponse,
364        fidl::encoding::DefaultFuchsiaResourceDialect,
365    >;
366    fn r#status(&self) -> Self::StatusResponseFut {
367        fn _decode(
368            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
369        ) -> Result<ApStatusResponse, fidl::Error> {
370            let _response = fidl::client::decode_transaction_body::<
371                ApSmeStatusResponse,
372                fidl::encoding::DefaultFuchsiaResourceDialect,
373                0x51c688ac7a101606,
374            >(_buf?)?;
375            Ok(_response.resp)
376        }
377        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ApStatusResponse>(
378            (),
379            0x51c688ac7a101606,
380            fidl::encoding::DynamicFlags::empty(),
381            _decode,
382        )
383    }
384}
385
386pub struct ApSmeEventStream {
387    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
388}
389
390impl std::marker::Unpin for ApSmeEventStream {}
391
392impl futures::stream::FusedStream for ApSmeEventStream {
393    fn is_terminated(&self) -> bool {
394        self.event_receiver.is_terminated()
395    }
396}
397
398impl futures::Stream for ApSmeEventStream {
399    type Item = Result<ApSmeEvent, fidl::Error>;
400
401    fn poll_next(
402        mut self: std::pin::Pin<&mut Self>,
403        cx: &mut std::task::Context<'_>,
404    ) -> std::task::Poll<Option<Self::Item>> {
405        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
406            &mut self.event_receiver,
407            cx
408        )?) {
409            Some(buf) => std::task::Poll::Ready(Some(ApSmeEvent::decode(buf))),
410            None => std::task::Poll::Ready(None),
411        }
412    }
413}
414
415#[derive(Debug)]
416pub enum ApSmeEvent {}
417
418impl ApSmeEvent {
419    /// Decodes a message buffer as a [`ApSmeEvent`].
420    fn decode(
421        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
422    ) -> Result<ApSmeEvent, fidl::Error> {
423        let (bytes, _handles) = buf.split_mut();
424        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
425        debug_assert_eq!(tx_header.tx_id, 0);
426        match tx_header.ordinal {
427            _ => Err(fidl::Error::UnknownOrdinal {
428                ordinal: tx_header.ordinal,
429                protocol_name: <ApSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
430            }),
431        }
432    }
433}
434
435/// A Stream of incoming requests for fuchsia.wlan.sme/ApSme.
436pub struct ApSmeRequestStream {
437    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
438    is_terminated: bool,
439}
440
441impl std::marker::Unpin for ApSmeRequestStream {}
442
443impl futures::stream::FusedStream for ApSmeRequestStream {
444    fn is_terminated(&self) -> bool {
445        self.is_terminated
446    }
447}
448
449impl fidl::endpoints::RequestStream for ApSmeRequestStream {
450    type Protocol = ApSmeMarker;
451    type ControlHandle = ApSmeControlHandle;
452
453    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
454        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
455    }
456
457    fn control_handle(&self) -> Self::ControlHandle {
458        ApSmeControlHandle { inner: self.inner.clone() }
459    }
460
461    fn into_inner(
462        self,
463    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
464    {
465        (self.inner, self.is_terminated)
466    }
467
468    fn from_inner(
469        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
470        is_terminated: bool,
471    ) -> Self {
472        Self { inner, is_terminated }
473    }
474}
475
476impl futures::Stream for ApSmeRequestStream {
477    type Item = Result<ApSmeRequest, fidl::Error>;
478
479    fn poll_next(
480        mut self: std::pin::Pin<&mut Self>,
481        cx: &mut std::task::Context<'_>,
482    ) -> std::task::Poll<Option<Self::Item>> {
483        let this = &mut *self;
484        if this.inner.check_shutdown(cx) {
485            this.is_terminated = true;
486            return std::task::Poll::Ready(None);
487        }
488        if this.is_terminated {
489            panic!("polled ApSmeRequestStream after completion");
490        }
491        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
492            |bytes, handles| {
493                match this.inner.channel().read_etc(cx, bytes, handles) {
494                    std::task::Poll::Ready(Ok(())) => {}
495                    std::task::Poll::Pending => return std::task::Poll::Pending,
496                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
497                        this.is_terminated = true;
498                        return std::task::Poll::Ready(None);
499                    }
500                    std::task::Poll::Ready(Err(e)) => {
501                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
502                            e.into(),
503                        ))));
504                    }
505                }
506
507                // A message has been received from the channel
508                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
509
510                std::task::Poll::Ready(Some(match header.ordinal {
511                    0x33fa134ceda8624d => {
512                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
513                        let mut req = fidl::new_empty!(
514                            ApSmeStartRequest,
515                            fidl::encoding::DefaultFuchsiaResourceDialect
516                        );
517                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ApSmeStartRequest>(&header, _body_bytes, handles, &mut req)?;
518                        let control_handle = ApSmeControlHandle { inner: this.inner.clone() };
519                        Ok(ApSmeRequest::Start {
520                            config: req.config,
521
522                            responder: ApSmeStartResponder {
523                                control_handle: std::mem::ManuallyDrop::new(control_handle),
524                                tx_id: header.tx_id,
525                            },
526                        })
527                    }
528                    0x56423f5b49a2e851 => {
529                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
530                        let mut req = fidl::new_empty!(
531                            fidl::encoding::EmptyPayload,
532                            fidl::encoding::DefaultFuchsiaResourceDialect
533                        );
534                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
535                        let control_handle = ApSmeControlHandle { inner: this.inner.clone() };
536                        Ok(ApSmeRequest::Stop {
537                            responder: ApSmeStopResponder {
538                                control_handle: std::mem::ManuallyDrop::new(control_handle),
539                                tx_id: header.tx_id,
540                            },
541                        })
542                    }
543                    0x51c688ac7a101606 => {
544                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
545                        let mut req = fidl::new_empty!(
546                            fidl::encoding::EmptyPayload,
547                            fidl::encoding::DefaultFuchsiaResourceDialect
548                        );
549                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
550                        let control_handle = ApSmeControlHandle { inner: this.inner.clone() };
551                        Ok(ApSmeRequest::Status {
552                            responder: ApSmeStatusResponder {
553                                control_handle: std::mem::ManuallyDrop::new(control_handle),
554                                tx_id: header.tx_id,
555                            },
556                        })
557                    }
558                    _ => Err(fidl::Error::UnknownOrdinal {
559                        ordinal: header.ordinal,
560                        protocol_name: <ApSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
561                    }),
562                }))
563            },
564        )
565    }
566}
567
568#[derive(Debug)]
569pub enum ApSmeRequest {
570    Start { config: ApConfig, responder: ApSmeStartResponder },
571    Stop { responder: ApSmeStopResponder },
572    Status { responder: ApSmeStatusResponder },
573}
574
575impl ApSmeRequest {
576    #[allow(irrefutable_let_patterns)]
577    pub fn into_start(self) -> Option<(ApConfig, ApSmeStartResponder)> {
578        if let ApSmeRequest::Start { config, responder } = self {
579            Some((config, responder))
580        } else {
581            None
582        }
583    }
584
585    #[allow(irrefutable_let_patterns)]
586    pub fn into_stop(self) -> Option<(ApSmeStopResponder)> {
587        if let ApSmeRequest::Stop { responder } = self { Some((responder)) } else { None }
588    }
589
590    #[allow(irrefutable_let_patterns)]
591    pub fn into_status(self) -> Option<(ApSmeStatusResponder)> {
592        if let ApSmeRequest::Status { responder } = self { Some((responder)) } else { None }
593    }
594
595    /// Name of the method defined in FIDL
596    pub fn method_name(&self) -> &'static str {
597        match *self {
598            ApSmeRequest::Start { .. } => "start",
599            ApSmeRequest::Stop { .. } => "stop",
600            ApSmeRequest::Status { .. } => "status",
601        }
602    }
603}
604
605#[derive(Debug, Clone)]
606pub struct ApSmeControlHandle {
607    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
608}
609
610impl fidl::endpoints::ControlHandle for ApSmeControlHandle {
611    fn shutdown(&self) {
612        self.inner.shutdown()
613    }
614    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
615        self.inner.shutdown_with_epitaph(status)
616    }
617
618    fn is_closed(&self) -> bool {
619        self.inner.channel().is_closed()
620    }
621    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
622        self.inner.channel().on_closed()
623    }
624
625    #[cfg(target_os = "fuchsia")]
626    fn signal_peer(
627        &self,
628        clear_mask: zx::Signals,
629        set_mask: zx::Signals,
630    ) -> Result<(), zx_status::Status> {
631        use fidl::Peered;
632        self.inner.channel().signal_peer(clear_mask, set_mask)
633    }
634}
635
636impl ApSmeControlHandle {}
637
638#[must_use = "FIDL methods require a response to be sent"]
639#[derive(Debug)]
640pub struct ApSmeStartResponder {
641    control_handle: std::mem::ManuallyDrop<ApSmeControlHandle>,
642    tx_id: u32,
643}
644
645/// Set the the channel to be shutdown (see [`ApSmeControlHandle::shutdown`])
646/// if the responder is dropped without sending a response, so that the client
647/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
648impl std::ops::Drop for ApSmeStartResponder {
649    fn drop(&mut self) {
650        self.control_handle.shutdown();
651        // Safety: drops once, never accessed again
652        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
653    }
654}
655
656impl fidl::endpoints::Responder for ApSmeStartResponder {
657    type ControlHandle = ApSmeControlHandle;
658
659    fn control_handle(&self) -> &ApSmeControlHandle {
660        &self.control_handle
661    }
662
663    fn drop_without_shutdown(mut self) {
664        // Safety: drops once, never accessed again due to mem::forget
665        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
666        // Prevent Drop from running (which would shut down the channel)
667        std::mem::forget(self);
668    }
669}
670
671impl ApSmeStartResponder {
672    /// Sends a response to the FIDL transaction.
673    ///
674    /// Sets the channel to shutdown if an error occurs.
675    pub fn send(self, mut code: StartApResultCode) -> Result<(), fidl::Error> {
676        let _result = self.send_raw(code);
677        if _result.is_err() {
678            self.control_handle.shutdown();
679        }
680        self.drop_without_shutdown();
681        _result
682    }
683
684    /// Similar to "send" but does not shutdown the channel if an error occurs.
685    pub fn send_no_shutdown_on_err(self, mut code: StartApResultCode) -> Result<(), fidl::Error> {
686        let _result = self.send_raw(code);
687        self.drop_without_shutdown();
688        _result
689    }
690
691    fn send_raw(&self, mut code: StartApResultCode) -> Result<(), fidl::Error> {
692        self.control_handle.inner.send::<ApSmeStartResponse>(
693            (code,),
694            self.tx_id,
695            0x33fa134ceda8624d,
696            fidl::encoding::DynamicFlags::empty(),
697        )
698    }
699}
700
701#[must_use = "FIDL methods require a response to be sent"]
702#[derive(Debug)]
703pub struct ApSmeStopResponder {
704    control_handle: std::mem::ManuallyDrop<ApSmeControlHandle>,
705    tx_id: u32,
706}
707
708/// Set the the channel to be shutdown (see [`ApSmeControlHandle::shutdown`])
709/// if the responder is dropped without sending a response, so that the client
710/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
711impl std::ops::Drop for ApSmeStopResponder {
712    fn drop(&mut self) {
713        self.control_handle.shutdown();
714        // Safety: drops once, never accessed again
715        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
716    }
717}
718
719impl fidl::endpoints::Responder for ApSmeStopResponder {
720    type ControlHandle = ApSmeControlHandle;
721
722    fn control_handle(&self) -> &ApSmeControlHandle {
723        &self.control_handle
724    }
725
726    fn drop_without_shutdown(mut self) {
727        // Safety: drops once, never accessed again due to mem::forget
728        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
729        // Prevent Drop from running (which would shut down the channel)
730        std::mem::forget(self);
731    }
732}
733
734impl ApSmeStopResponder {
735    /// Sends a response to the FIDL transaction.
736    ///
737    /// Sets the channel to shutdown if an error occurs.
738    pub fn send(self, mut code: StopApResultCode) -> Result<(), fidl::Error> {
739        let _result = self.send_raw(code);
740        if _result.is_err() {
741            self.control_handle.shutdown();
742        }
743        self.drop_without_shutdown();
744        _result
745    }
746
747    /// Similar to "send" but does not shutdown the channel if an error occurs.
748    pub fn send_no_shutdown_on_err(self, mut code: StopApResultCode) -> Result<(), fidl::Error> {
749        let _result = self.send_raw(code);
750        self.drop_without_shutdown();
751        _result
752    }
753
754    fn send_raw(&self, mut code: StopApResultCode) -> Result<(), fidl::Error> {
755        self.control_handle.inner.send::<ApSmeStopResponse>(
756            (code,),
757            self.tx_id,
758            0x56423f5b49a2e851,
759            fidl::encoding::DynamicFlags::empty(),
760        )
761    }
762}
763
764#[must_use = "FIDL methods require a response to be sent"]
765#[derive(Debug)]
766pub struct ApSmeStatusResponder {
767    control_handle: std::mem::ManuallyDrop<ApSmeControlHandle>,
768    tx_id: u32,
769}
770
771/// Set the the channel to be shutdown (see [`ApSmeControlHandle::shutdown`])
772/// if the responder is dropped without sending a response, so that the client
773/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
774impl std::ops::Drop for ApSmeStatusResponder {
775    fn drop(&mut self) {
776        self.control_handle.shutdown();
777        // Safety: drops once, never accessed again
778        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
779    }
780}
781
782impl fidl::endpoints::Responder for ApSmeStatusResponder {
783    type ControlHandle = ApSmeControlHandle;
784
785    fn control_handle(&self) -> &ApSmeControlHandle {
786        &self.control_handle
787    }
788
789    fn drop_without_shutdown(mut self) {
790        // Safety: drops once, never accessed again due to mem::forget
791        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
792        // Prevent Drop from running (which would shut down the channel)
793        std::mem::forget(self);
794    }
795}
796
797impl ApSmeStatusResponder {
798    /// Sends a response to the FIDL transaction.
799    ///
800    /// Sets the channel to shutdown if an error occurs.
801    pub fn send(self, mut resp: &ApStatusResponse) -> Result<(), fidl::Error> {
802        let _result = self.send_raw(resp);
803        if _result.is_err() {
804            self.control_handle.shutdown();
805        }
806        self.drop_without_shutdown();
807        _result
808    }
809
810    /// Similar to "send" but does not shutdown the channel if an error occurs.
811    pub fn send_no_shutdown_on_err(self, mut resp: &ApStatusResponse) -> Result<(), fidl::Error> {
812        let _result = self.send_raw(resp);
813        self.drop_without_shutdown();
814        _result
815    }
816
817    fn send_raw(&self, mut resp: &ApStatusResponse) -> Result<(), fidl::Error> {
818        self.control_handle.inner.send::<ApSmeStatusResponse>(
819            (resp,),
820            self.tx_id,
821            0x51c688ac7a101606,
822            fidl::encoding::DynamicFlags::empty(),
823        )
824    }
825}
826
827#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
828pub struct ClientSmeMarker;
829
830impl fidl::endpoints::ProtocolMarker for ClientSmeMarker {
831    type Proxy = ClientSmeProxy;
832    type RequestStream = ClientSmeRequestStream;
833    #[cfg(target_os = "fuchsia")]
834    type SynchronousProxy = ClientSmeSynchronousProxy;
835
836    const DEBUG_NAME: &'static str = "(anonymous) ClientSme";
837}
838pub type ClientSmeScanResult = Result<fidl::Vmo, ScanErrorCode>;
839pub type ClientSmeWmmStatusResult = Result<fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>;
840pub type ClientSmeScanForControllerResult = Result<Vec<ScanResult>, ScanErrorCode>;
841pub type ClientSmeSetMacAddressResult = Result<(), i32>;
842
843pub trait ClientSmeProxyInterface: Send + Sync {
844    type ScanResponseFut: std::future::Future<Output = Result<ClientSmeScanResult, fidl::Error>>
845        + Send;
846    fn r#scan(&self, req: &ScanRequest) -> Self::ScanResponseFut;
847    fn r#connect(
848        &self,
849        req: &ConnectRequest,
850        txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
851    ) -> Result<(), fidl::Error>;
852    fn r#roam(&self, req: &RoamRequest) -> Result<(), fidl::Error>;
853    type DisconnectResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
854    fn r#disconnect(&self, reason: UserDisconnectReason) -> Self::DisconnectResponseFut;
855    type StatusResponseFut: std::future::Future<Output = Result<ClientStatusResponse, fidl::Error>>
856        + Send;
857    fn r#status(&self) -> Self::StatusResponseFut;
858    type WmmStatusResponseFut: std::future::Future<Output = Result<ClientSmeWmmStatusResult, fidl::Error>>
859        + Send;
860    fn r#wmm_status(&self) -> Self::WmmStatusResponseFut;
861    type ScanForControllerResponseFut: std::future::Future<Output = Result<ClientSmeScanForControllerResult, fidl::Error>>
862        + Send;
863    fn r#scan_for_controller(&self, req: &ScanRequest) -> Self::ScanForControllerResponseFut;
864    type SetMacAddressResponseFut: std::future::Future<Output = Result<ClientSmeSetMacAddressResult, fidl::Error>>
865        + Send;
866    fn r#set_mac_address(&self, mac_addr: &[u8; 6]) -> Self::SetMacAddressResponseFut;
867}
868#[derive(Debug)]
869#[cfg(target_os = "fuchsia")]
870pub struct ClientSmeSynchronousProxy {
871    client: fidl::client::sync::Client,
872}
873
874#[cfg(target_os = "fuchsia")]
875impl fidl::endpoints::SynchronousProxy for ClientSmeSynchronousProxy {
876    type Proxy = ClientSmeProxy;
877    type Protocol = ClientSmeMarker;
878
879    fn from_channel(inner: fidl::Channel) -> Self {
880        Self::new(inner)
881    }
882
883    fn into_channel(self) -> fidl::Channel {
884        self.client.into_channel()
885    }
886
887    fn as_channel(&self) -> &fidl::Channel {
888        self.client.as_channel()
889    }
890}
891
892#[cfg(target_os = "fuchsia")]
893impl ClientSmeSynchronousProxy {
894    pub fn new(channel: fidl::Channel) -> Self {
895        let protocol_name = <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
896        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
897    }
898
899    pub fn into_channel(self) -> fidl::Channel {
900        self.client.into_channel()
901    }
902
903    /// Waits until an event arrives and returns it. It is safe for other
904    /// threads to make concurrent requests while waiting for an event.
905    pub fn wait_for_event(
906        &self,
907        deadline: zx::MonotonicInstant,
908    ) -> Result<ClientSmeEvent, fidl::Error> {
909        ClientSmeEvent::decode(self.client.wait_for_event(deadline)?)
910    }
911
912    pub fn r#scan(
913        &self,
914        mut req: &ScanRequest,
915        ___deadline: zx::MonotonicInstant,
916    ) -> Result<ClientSmeScanResult, fidl::Error> {
917        let _response = self.client.send_query::<ClientSmeScanRequest, fidl::encoding::ResultType<
918            ClientSmeScanResponse,
919            ScanErrorCode,
920        >>(
921            (req,),
922            0xded0ce3b1685822,
923            fidl::encoding::DynamicFlags::empty(),
924            ___deadline,
925        )?;
926        Ok(_response.map(|x| x.scan_results))
927    }
928
929    pub fn r#connect(
930        &self,
931        mut req: &ConnectRequest,
932        mut txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
933    ) -> Result<(), fidl::Error> {
934        self.client.send::<ClientSmeConnectRequest>(
935            (req, txn),
936            0x250a0f6fe9f85351,
937            fidl::encoding::DynamicFlags::empty(),
938        )
939    }
940
941    pub fn r#roam(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
942        self.client.send::<ClientSmeRoamRequest>(
943            (req,),
944            0x107ead7d84723921,
945            fidl::encoding::DynamicFlags::empty(),
946        )
947    }
948
949    pub fn r#disconnect(
950        &self,
951        mut reason: UserDisconnectReason,
952        ___deadline: zx::MonotonicInstant,
953    ) -> Result<(), fidl::Error> {
954        let _response =
955            self.client.send_query::<ClientSmeDisconnectRequest, fidl::encoding::EmptyPayload>(
956                (reason,),
957                0x39a578de9a107304,
958                fidl::encoding::DynamicFlags::empty(),
959                ___deadline,
960            )?;
961        Ok(_response)
962    }
963
964    pub fn r#status(
965        &self,
966        ___deadline: zx::MonotonicInstant,
967    ) -> Result<ClientStatusResponse, fidl::Error> {
968        let _response =
969            self.client.send_query::<fidl::encoding::EmptyPayload, ClientSmeStatusResponse>(
970                (),
971                0xda00b607470faf2,
972                fidl::encoding::DynamicFlags::empty(),
973                ___deadline,
974            )?;
975        Ok(_response.resp)
976    }
977
978    pub fn r#wmm_status(
979        &self,
980        ___deadline: zx::MonotonicInstant,
981    ) -> Result<ClientSmeWmmStatusResult, fidl::Error> {
982        let _response = self.client.send_query::<
983            fidl::encoding::EmptyPayload,
984            fidl::encoding::ResultType<ClientSmeWmmStatusResponse, i32>,
985        >(
986            (),
987            0x3d0ccc75f6baa9e3,
988            fidl::encoding::DynamicFlags::empty(),
989            ___deadline,
990        )?;
991        Ok(_response.map(|x| x.resp))
992    }
993
994    pub fn r#scan_for_controller(
995        &self,
996        mut req: &ScanRequest,
997        ___deadline: zx::MonotonicInstant,
998    ) -> Result<ClientSmeScanForControllerResult, fidl::Error> {
999        let _response = self.client.send_query::<
1000            ClientSmeScanForControllerRequest,
1001            fidl::encoding::ResultType<ClientSmeScanForControllerResponse, ScanErrorCode>,
1002        >(
1003            (req,),
1004            0x21f00ab22ff79a12,
1005            fidl::encoding::DynamicFlags::empty(),
1006            ___deadline,
1007        )?;
1008        Ok(_response.map(|x| x.scan_results))
1009    }
1010
1011    pub fn r#set_mac_address(
1012        &self,
1013        mut mac_addr: &[u8; 6],
1014        ___deadline: zx::MonotonicInstant,
1015    ) -> Result<ClientSmeSetMacAddressResult, fidl::Error> {
1016        let _response = self.client.send_query::<
1017            ClientSmeSetMacAddressRequest,
1018            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1019        >(
1020            (mac_addr,),
1021            0x13e0a0bee8962f58,
1022            fidl::encoding::DynamicFlags::empty(),
1023            ___deadline,
1024        )?;
1025        Ok(_response.map(|x| x))
1026    }
1027}
1028
1029#[cfg(target_os = "fuchsia")]
1030impl From<ClientSmeSynchronousProxy> for zx::NullableHandle {
1031    fn from(value: ClientSmeSynchronousProxy) -> Self {
1032        value.into_channel().into()
1033    }
1034}
1035
1036#[cfg(target_os = "fuchsia")]
1037impl From<fidl::Channel> for ClientSmeSynchronousProxy {
1038    fn from(value: fidl::Channel) -> Self {
1039        Self::new(value)
1040    }
1041}
1042
1043#[cfg(target_os = "fuchsia")]
1044impl fidl::endpoints::FromClient for ClientSmeSynchronousProxy {
1045    type Protocol = ClientSmeMarker;
1046
1047    fn from_client(value: fidl::endpoints::ClientEnd<ClientSmeMarker>) -> Self {
1048        Self::new(value.into_channel())
1049    }
1050}
1051
1052#[derive(Debug, Clone)]
1053pub struct ClientSmeProxy {
1054    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1055}
1056
1057impl fidl::endpoints::Proxy for ClientSmeProxy {
1058    type Protocol = ClientSmeMarker;
1059
1060    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1061        Self::new(inner)
1062    }
1063
1064    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1065        self.client.into_channel().map_err(|client| Self { client })
1066    }
1067
1068    fn as_channel(&self) -> &::fidl::AsyncChannel {
1069        self.client.as_channel()
1070    }
1071}
1072
1073impl ClientSmeProxy {
1074    /// Create a new Proxy for fuchsia.wlan.sme/ClientSme.
1075    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1076        let protocol_name = <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1077        Self { client: fidl::client::Client::new(channel, protocol_name) }
1078    }
1079
1080    /// Get a Stream of events from the remote end of the protocol.
1081    ///
1082    /// # Panics
1083    ///
1084    /// Panics if the event stream was already taken.
1085    pub fn take_event_stream(&self) -> ClientSmeEventStream {
1086        ClientSmeEventStream { event_receiver: self.client.take_event_receiver() }
1087    }
1088
1089    pub fn r#scan(
1090        &self,
1091        mut req: &ScanRequest,
1092    ) -> fidl::client::QueryResponseFut<
1093        ClientSmeScanResult,
1094        fidl::encoding::DefaultFuchsiaResourceDialect,
1095    > {
1096        ClientSmeProxyInterface::r#scan(self, req)
1097    }
1098
1099    pub fn r#connect(
1100        &self,
1101        mut req: &ConnectRequest,
1102        mut txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
1103    ) -> Result<(), fidl::Error> {
1104        ClientSmeProxyInterface::r#connect(self, req, txn)
1105    }
1106
1107    pub fn r#roam(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
1108        ClientSmeProxyInterface::r#roam(self, req)
1109    }
1110
1111    pub fn r#disconnect(
1112        &self,
1113        mut reason: UserDisconnectReason,
1114    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
1115        ClientSmeProxyInterface::r#disconnect(self, reason)
1116    }
1117
1118    pub fn r#status(
1119        &self,
1120    ) -> fidl::client::QueryResponseFut<
1121        ClientStatusResponse,
1122        fidl::encoding::DefaultFuchsiaResourceDialect,
1123    > {
1124        ClientSmeProxyInterface::r#status(self)
1125    }
1126
1127    pub fn r#wmm_status(
1128        &self,
1129    ) -> fidl::client::QueryResponseFut<
1130        ClientSmeWmmStatusResult,
1131        fidl::encoding::DefaultFuchsiaResourceDialect,
1132    > {
1133        ClientSmeProxyInterface::r#wmm_status(self)
1134    }
1135
1136    pub fn r#scan_for_controller(
1137        &self,
1138        mut req: &ScanRequest,
1139    ) -> fidl::client::QueryResponseFut<
1140        ClientSmeScanForControllerResult,
1141        fidl::encoding::DefaultFuchsiaResourceDialect,
1142    > {
1143        ClientSmeProxyInterface::r#scan_for_controller(self, req)
1144    }
1145
1146    pub fn r#set_mac_address(
1147        &self,
1148        mut mac_addr: &[u8; 6],
1149    ) -> fidl::client::QueryResponseFut<
1150        ClientSmeSetMacAddressResult,
1151        fidl::encoding::DefaultFuchsiaResourceDialect,
1152    > {
1153        ClientSmeProxyInterface::r#set_mac_address(self, mac_addr)
1154    }
1155}
1156
1157impl ClientSmeProxyInterface for ClientSmeProxy {
1158    type ScanResponseFut = fidl::client::QueryResponseFut<
1159        ClientSmeScanResult,
1160        fidl::encoding::DefaultFuchsiaResourceDialect,
1161    >;
1162    fn r#scan(&self, mut req: &ScanRequest) -> Self::ScanResponseFut {
1163        fn _decode(
1164            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1165        ) -> Result<ClientSmeScanResult, fidl::Error> {
1166            let _response = fidl::client::decode_transaction_body::<
1167                fidl::encoding::ResultType<ClientSmeScanResponse, ScanErrorCode>,
1168                fidl::encoding::DefaultFuchsiaResourceDialect,
1169                0xded0ce3b1685822,
1170            >(_buf?)?;
1171            Ok(_response.map(|x| x.scan_results))
1172        }
1173        self.client.send_query_and_decode::<ClientSmeScanRequest, ClientSmeScanResult>(
1174            (req,),
1175            0xded0ce3b1685822,
1176            fidl::encoding::DynamicFlags::empty(),
1177            _decode,
1178        )
1179    }
1180
1181    fn r#connect(
1182        &self,
1183        mut req: &ConnectRequest,
1184        mut txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
1185    ) -> Result<(), fidl::Error> {
1186        self.client.send::<ClientSmeConnectRequest>(
1187            (req, txn),
1188            0x250a0f6fe9f85351,
1189            fidl::encoding::DynamicFlags::empty(),
1190        )
1191    }
1192
1193    fn r#roam(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
1194        self.client.send::<ClientSmeRoamRequest>(
1195            (req,),
1196            0x107ead7d84723921,
1197            fidl::encoding::DynamicFlags::empty(),
1198        )
1199    }
1200
1201    type DisconnectResponseFut =
1202        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
1203    fn r#disconnect(&self, mut reason: UserDisconnectReason) -> Self::DisconnectResponseFut {
1204        fn _decode(
1205            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1206        ) -> Result<(), fidl::Error> {
1207            let _response = fidl::client::decode_transaction_body::<
1208                fidl::encoding::EmptyPayload,
1209                fidl::encoding::DefaultFuchsiaResourceDialect,
1210                0x39a578de9a107304,
1211            >(_buf?)?;
1212            Ok(_response)
1213        }
1214        self.client.send_query_and_decode::<ClientSmeDisconnectRequest, ()>(
1215            (reason,),
1216            0x39a578de9a107304,
1217            fidl::encoding::DynamicFlags::empty(),
1218            _decode,
1219        )
1220    }
1221
1222    type StatusResponseFut = fidl::client::QueryResponseFut<
1223        ClientStatusResponse,
1224        fidl::encoding::DefaultFuchsiaResourceDialect,
1225    >;
1226    fn r#status(&self) -> Self::StatusResponseFut {
1227        fn _decode(
1228            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1229        ) -> Result<ClientStatusResponse, fidl::Error> {
1230            let _response = fidl::client::decode_transaction_body::<
1231                ClientSmeStatusResponse,
1232                fidl::encoding::DefaultFuchsiaResourceDialect,
1233                0xda00b607470faf2,
1234            >(_buf?)?;
1235            Ok(_response.resp)
1236        }
1237        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ClientStatusResponse>(
1238            (),
1239            0xda00b607470faf2,
1240            fidl::encoding::DynamicFlags::empty(),
1241            _decode,
1242        )
1243    }
1244
1245    type WmmStatusResponseFut = fidl::client::QueryResponseFut<
1246        ClientSmeWmmStatusResult,
1247        fidl::encoding::DefaultFuchsiaResourceDialect,
1248    >;
1249    fn r#wmm_status(&self) -> Self::WmmStatusResponseFut {
1250        fn _decode(
1251            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1252        ) -> Result<ClientSmeWmmStatusResult, fidl::Error> {
1253            let _response = fidl::client::decode_transaction_body::<
1254                fidl::encoding::ResultType<ClientSmeWmmStatusResponse, i32>,
1255                fidl::encoding::DefaultFuchsiaResourceDialect,
1256                0x3d0ccc75f6baa9e3,
1257            >(_buf?)?;
1258            Ok(_response.map(|x| x.resp))
1259        }
1260        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ClientSmeWmmStatusResult>(
1261            (),
1262            0x3d0ccc75f6baa9e3,
1263            fidl::encoding::DynamicFlags::empty(),
1264            _decode,
1265        )
1266    }
1267
1268    type ScanForControllerResponseFut = fidl::client::QueryResponseFut<
1269        ClientSmeScanForControllerResult,
1270        fidl::encoding::DefaultFuchsiaResourceDialect,
1271    >;
1272    fn r#scan_for_controller(&self, mut req: &ScanRequest) -> Self::ScanForControllerResponseFut {
1273        fn _decode(
1274            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1275        ) -> Result<ClientSmeScanForControllerResult, fidl::Error> {
1276            let _response = fidl::client::decode_transaction_body::<
1277                fidl::encoding::ResultType<ClientSmeScanForControllerResponse, ScanErrorCode>,
1278                fidl::encoding::DefaultFuchsiaResourceDialect,
1279                0x21f00ab22ff79a12,
1280            >(_buf?)?;
1281            Ok(_response.map(|x| x.scan_results))
1282        }
1283        self.client.send_query_and_decode::<
1284            ClientSmeScanForControllerRequest,
1285            ClientSmeScanForControllerResult,
1286        >(
1287            (req,),
1288            0x21f00ab22ff79a12,
1289            fidl::encoding::DynamicFlags::empty(),
1290            _decode,
1291        )
1292    }
1293
1294    type SetMacAddressResponseFut = fidl::client::QueryResponseFut<
1295        ClientSmeSetMacAddressResult,
1296        fidl::encoding::DefaultFuchsiaResourceDialect,
1297    >;
1298    fn r#set_mac_address(&self, mut mac_addr: &[u8; 6]) -> Self::SetMacAddressResponseFut {
1299        fn _decode(
1300            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1301        ) -> Result<ClientSmeSetMacAddressResult, fidl::Error> {
1302            let _response = fidl::client::decode_transaction_body::<
1303                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1304                fidl::encoding::DefaultFuchsiaResourceDialect,
1305                0x13e0a0bee8962f58,
1306            >(_buf?)?;
1307            Ok(_response.map(|x| x))
1308        }
1309        self.client
1310            .send_query_and_decode::<ClientSmeSetMacAddressRequest, ClientSmeSetMacAddressResult>(
1311                (mac_addr,),
1312                0x13e0a0bee8962f58,
1313                fidl::encoding::DynamicFlags::empty(),
1314                _decode,
1315            )
1316    }
1317}
1318
1319pub struct ClientSmeEventStream {
1320    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1321}
1322
1323impl std::marker::Unpin for ClientSmeEventStream {}
1324
1325impl futures::stream::FusedStream for ClientSmeEventStream {
1326    fn is_terminated(&self) -> bool {
1327        self.event_receiver.is_terminated()
1328    }
1329}
1330
1331impl futures::Stream for ClientSmeEventStream {
1332    type Item = Result<ClientSmeEvent, fidl::Error>;
1333
1334    fn poll_next(
1335        mut self: std::pin::Pin<&mut Self>,
1336        cx: &mut std::task::Context<'_>,
1337    ) -> std::task::Poll<Option<Self::Item>> {
1338        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1339            &mut self.event_receiver,
1340            cx
1341        )?) {
1342            Some(buf) => std::task::Poll::Ready(Some(ClientSmeEvent::decode(buf))),
1343            None => std::task::Poll::Ready(None),
1344        }
1345    }
1346}
1347
1348#[derive(Debug)]
1349pub enum ClientSmeEvent {}
1350
1351impl ClientSmeEvent {
1352    /// Decodes a message buffer as a [`ClientSmeEvent`].
1353    fn decode(
1354        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1355    ) -> Result<ClientSmeEvent, fidl::Error> {
1356        let (bytes, _handles) = buf.split_mut();
1357        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1358        debug_assert_eq!(tx_header.tx_id, 0);
1359        match tx_header.ordinal {
1360            _ => Err(fidl::Error::UnknownOrdinal {
1361                ordinal: tx_header.ordinal,
1362                protocol_name: <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1363            }),
1364        }
1365    }
1366}
1367
1368/// A Stream of incoming requests for fuchsia.wlan.sme/ClientSme.
1369pub struct ClientSmeRequestStream {
1370    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1371    is_terminated: bool,
1372}
1373
1374impl std::marker::Unpin for ClientSmeRequestStream {}
1375
1376impl futures::stream::FusedStream for ClientSmeRequestStream {
1377    fn is_terminated(&self) -> bool {
1378        self.is_terminated
1379    }
1380}
1381
1382impl fidl::endpoints::RequestStream for ClientSmeRequestStream {
1383    type Protocol = ClientSmeMarker;
1384    type ControlHandle = ClientSmeControlHandle;
1385
1386    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1387        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1388    }
1389
1390    fn control_handle(&self) -> Self::ControlHandle {
1391        ClientSmeControlHandle { inner: self.inner.clone() }
1392    }
1393
1394    fn into_inner(
1395        self,
1396    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1397    {
1398        (self.inner, self.is_terminated)
1399    }
1400
1401    fn from_inner(
1402        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1403        is_terminated: bool,
1404    ) -> Self {
1405        Self { inner, is_terminated }
1406    }
1407}
1408
1409impl futures::Stream for ClientSmeRequestStream {
1410    type Item = Result<ClientSmeRequest, fidl::Error>;
1411
1412    fn poll_next(
1413        mut self: std::pin::Pin<&mut Self>,
1414        cx: &mut std::task::Context<'_>,
1415    ) -> std::task::Poll<Option<Self::Item>> {
1416        let this = &mut *self;
1417        if this.inner.check_shutdown(cx) {
1418            this.is_terminated = true;
1419            return std::task::Poll::Ready(None);
1420        }
1421        if this.is_terminated {
1422            panic!("polled ClientSmeRequestStream after completion");
1423        }
1424        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1425            |bytes, handles| {
1426                match this.inner.channel().read_etc(cx, bytes, handles) {
1427                    std::task::Poll::Ready(Ok(())) => {}
1428                    std::task::Poll::Pending => return std::task::Poll::Pending,
1429                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1430                        this.is_terminated = true;
1431                        return std::task::Poll::Ready(None);
1432                    }
1433                    std::task::Poll::Ready(Err(e)) => {
1434                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1435                            e.into(),
1436                        ))));
1437                    }
1438                }
1439
1440                // A message has been received from the channel
1441                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1442
1443                std::task::Poll::Ready(Some(match header.ordinal {
1444                    0xded0ce3b1685822 => {
1445                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1446                        let mut req = fidl::new_empty!(
1447                            ClientSmeScanRequest,
1448                            fidl::encoding::DefaultFuchsiaResourceDialect
1449                        );
1450                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeScanRequest>(&header, _body_bytes, handles, &mut req)?;
1451                        let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1452                        Ok(ClientSmeRequest::Scan {
1453                            req: req.req,
1454
1455                            responder: ClientSmeScanResponder {
1456                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1457                                tx_id: header.tx_id,
1458                            },
1459                        })
1460                    }
1461                    0x250a0f6fe9f85351 => {
1462                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1463                        let mut req = fidl::new_empty!(
1464                            ClientSmeConnectRequest,
1465                            fidl::encoding::DefaultFuchsiaResourceDialect
1466                        );
1467                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeConnectRequest>(&header, _body_bytes, handles, &mut req)?;
1468                        let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1469                        Ok(ClientSmeRequest::Connect { req: req.req, txn: req.txn, control_handle })
1470                    }
1471                    0x107ead7d84723921 => {
1472                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1473                        let mut req = fidl::new_empty!(
1474                            ClientSmeRoamRequest,
1475                            fidl::encoding::DefaultFuchsiaResourceDialect
1476                        );
1477                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeRoamRequest>(&header, _body_bytes, handles, &mut req)?;
1478                        let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1479                        Ok(ClientSmeRequest::Roam { req: req.req, control_handle })
1480                    }
1481                    0x39a578de9a107304 => {
1482                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1483                        let mut req = fidl::new_empty!(
1484                            ClientSmeDisconnectRequest,
1485                            fidl::encoding::DefaultFuchsiaResourceDialect
1486                        );
1487                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeDisconnectRequest>(&header, _body_bytes, handles, &mut req)?;
1488                        let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1489                        Ok(ClientSmeRequest::Disconnect {
1490                            reason: req.reason,
1491
1492                            responder: ClientSmeDisconnectResponder {
1493                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1494                                tx_id: header.tx_id,
1495                            },
1496                        })
1497                    }
1498                    0xda00b607470faf2 => {
1499                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1500                        let mut req = fidl::new_empty!(
1501                            fidl::encoding::EmptyPayload,
1502                            fidl::encoding::DefaultFuchsiaResourceDialect
1503                        );
1504                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1505                        let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1506                        Ok(ClientSmeRequest::Status {
1507                            responder: ClientSmeStatusResponder {
1508                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1509                                tx_id: header.tx_id,
1510                            },
1511                        })
1512                    }
1513                    0x3d0ccc75f6baa9e3 => {
1514                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1515                        let mut req = fidl::new_empty!(
1516                            fidl::encoding::EmptyPayload,
1517                            fidl::encoding::DefaultFuchsiaResourceDialect
1518                        );
1519                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1520                        let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1521                        Ok(ClientSmeRequest::WmmStatus {
1522                            responder: ClientSmeWmmStatusResponder {
1523                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1524                                tx_id: header.tx_id,
1525                            },
1526                        })
1527                    }
1528                    0x21f00ab22ff79a12 => {
1529                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1530                        let mut req = fidl::new_empty!(
1531                            ClientSmeScanForControllerRequest,
1532                            fidl::encoding::DefaultFuchsiaResourceDialect
1533                        );
1534                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeScanForControllerRequest>(&header, _body_bytes, handles, &mut req)?;
1535                        let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1536                        Ok(ClientSmeRequest::ScanForController {
1537                            req: req.req,
1538
1539                            responder: ClientSmeScanForControllerResponder {
1540                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1541                                tx_id: header.tx_id,
1542                            },
1543                        })
1544                    }
1545                    0x13e0a0bee8962f58 => {
1546                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1547                        let mut req = fidl::new_empty!(
1548                            ClientSmeSetMacAddressRequest,
1549                            fidl::encoding::DefaultFuchsiaResourceDialect
1550                        );
1551                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeSetMacAddressRequest>(&header, _body_bytes, handles, &mut req)?;
1552                        let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1553                        Ok(ClientSmeRequest::SetMacAddress {
1554                            mac_addr: req.mac_addr,
1555
1556                            responder: ClientSmeSetMacAddressResponder {
1557                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1558                                tx_id: header.tx_id,
1559                            },
1560                        })
1561                    }
1562                    _ => Err(fidl::Error::UnknownOrdinal {
1563                        ordinal: header.ordinal,
1564                        protocol_name:
1565                            <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1566                    }),
1567                }))
1568            },
1569        )
1570    }
1571}
1572
1573#[derive(Debug)]
1574pub enum ClientSmeRequest {
1575    Scan {
1576        req: ScanRequest,
1577        responder: ClientSmeScanResponder,
1578    },
1579    Connect {
1580        req: ConnectRequest,
1581        txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
1582        control_handle: ClientSmeControlHandle,
1583    },
1584    Roam {
1585        req: RoamRequest,
1586        control_handle: ClientSmeControlHandle,
1587    },
1588    Disconnect {
1589        reason: UserDisconnectReason,
1590        responder: ClientSmeDisconnectResponder,
1591    },
1592    Status {
1593        responder: ClientSmeStatusResponder,
1594    },
1595    WmmStatus {
1596        responder: ClientSmeWmmStatusResponder,
1597    },
1598    ScanForController {
1599        req: ScanRequest,
1600        responder: ClientSmeScanForControllerResponder,
1601    },
1602    SetMacAddress {
1603        mac_addr: [u8; 6],
1604        responder: ClientSmeSetMacAddressResponder,
1605    },
1606}
1607
1608impl ClientSmeRequest {
1609    #[allow(irrefutable_let_patterns)]
1610    pub fn into_scan(self) -> Option<(ScanRequest, ClientSmeScanResponder)> {
1611        if let ClientSmeRequest::Scan { req, responder } = self {
1612            Some((req, responder))
1613        } else {
1614            None
1615        }
1616    }
1617
1618    #[allow(irrefutable_let_patterns)]
1619    pub fn into_connect(
1620        self,
1621    ) -> Option<(
1622        ConnectRequest,
1623        Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
1624        ClientSmeControlHandle,
1625    )> {
1626        if let ClientSmeRequest::Connect { req, txn, control_handle } = self {
1627            Some((req, txn, control_handle))
1628        } else {
1629            None
1630        }
1631    }
1632
1633    #[allow(irrefutable_let_patterns)]
1634    pub fn into_roam(self) -> Option<(RoamRequest, ClientSmeControlHandle)> {
1635        if let ClientSmeRequest::Roam { req, control_handle } = self {
1636            Some((req, control_handle))
1637        } else {
1638            None
1639        }
1640    }
1641
1642    #[allow(irrefutable_let_patterns)]
1643    pub fn into_disconnect(self) -> Option<(UserDisconnectReason, ClientSmeDisconnectResponder)> {
1644        if let ClientSmeRequest::Disconnect { reason, responder } = self {
1645            Some((reason, responder))
1646        } else {
1647            None
1648        }
1649    }
1650
1651    #[allow(irrefutable_let_patterns)]
1652    pub fn into_status(self) -> Option<(ClientSmeStatusResponder)> {
1653        if let ClientSmeRequest::Status { responder } = self { Some((responder)) } else { None }
1654    }
1655
1656    #[allow(irrefutable_let_patterns)]
1657    pub fn into_wmm_status(self) -> Option<(ClientSmeWmmStatusResponder)> {
1658        if let ClientSmeRequest::WmmStatus { responder } = self { Some((responder)) } else { None }
1659    }
1660
1661    #[allow(irrefutable_let_patterns)]
1662    pub fn into_scan_for_controller(
1663        self,
1664    ) -> Option<(ScanRequest, ClientSmeScanForControllerResponder)> {
1665        if let ClientSmeRequest::ScanForController { req, responder } = self {
1666            Some((req, responder))
1667        } else {
1668            None
1669        }
1670    }
1671
1672    #[allow(irrefutable_let_patterns)]
1673    pub fn into_set_mac_address(self) -> Option<([u8; 6], ClientSmeSetMacAddressResponder)> {
1674        if let ClientSmeRequest::SetMacAddress { mac_addr, responder } = self {
1675            Some((mac_addr, responder))
1676        } else {
1677            None
1678        }
1679    }
1680
1681    /// Name of the method defined in FIDL
1682    pub fn method_name(&self) -> &'static str {
1683        match *self {
1684            ClientSmeRequest::Scan { .. } => "scan",
1685            ClientSmeRequest::Connect { .. } => "connect",
1686            ClientSmeRequest::Roam { .. } => "roam",
1687            ClientSmeRequest::Disconnect { .. } => "disconnect",
1688            ClientSmeRequest::Status { .. } => "status",
1689            ClientSmeRequest::WmmStatus { .. } => "wmm_status",
1690            ClientSmeRequest::ScanForController { .. } => "scan_for_controller",
1691            ClientSmeRequest::SetMacAddress { .. } => "set_mac_address",
1692        }
1693    }
1694}
1695
1696#[derive(Debug, Clone)]
1697pub struct ClientSmeControlHandle {
1698    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1699}
1700
1701impl fidl::endpoints::ControlHandle for ClientSmeControlHandle {
1702    fn shutdown(&self) {
1703        self.inner.shutdown()
1704    }
1705    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1706        self.inner.shutdown_with_epitaph(status)
1707    }
1708
1709    fn is_closed(&self) -> bool {
1710        self.inner.channel().is_closed()
1711    }
1712    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1713        self.inner.channel().on_closed()
1714    }
1715
1716    #[cfg(target_os = "fuchsia")]
1717    fn signal_peer(
1718        &self,
1719        clear_mask: zx::Signals,
1720        set_mask: zx::Signals,
1721    ) -> Result<(), zx_status::Status> {
1722        use fidl::Peered;
1723        self.inner.channel().signal_peer(clear_mask, set_mask)
1724    }
1725}
1726
1727impl ClientSmeControlHandle {}
1728
1729#[must_use = "FIDL methods require a response to be sent"]
1730#[derive(Debug)]
1731pub struct ClientSmeScanResponder {
1732    control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
1733    tx_id: u32,
1734}
1735
1736/// Set the the channel to be shutdown (see [`ClientSmeControlHandle::shutdown`])
1737/// if the responder is dropped without sending a response, so that the client
1738/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
1739impl std::ops::Drop for ClientSmeScanResponder {
1740    fn drop(&mut self) {
1741        self.control_handle.shutdown();
1742        // Safety: drops once, never accessed again
1743        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1744    }
1745}
1746
1747impl fidl::endpoints::Responder for ClientSmeScanResponder {
1748    type ControlHandle = ClientSmeControlHandle;
1749
1750    fn control_handle(&self) -> &ClientSmeControlHandle {
1751        &self.control_handle
1752    }
1753
1754    fn drop_without_shutdown(mut self) {
1755        // Safety: drops once, never accessed again due to mem::forget
1756        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1757        // Prevent Drop from running (which would shut down the channel)
1758        std::mem::forget(self);
1759    }
1760}
1761
1762impl ClientSmeScanResponder {
1763    /// Sends a response to the FIDL transaction.
1764    ///
1765    /// Sets the channel to shutdown if an error occurs.
1766    pub fn send(self, mut result: Result<fidl::Vmo, ScanErrorCode>) -> Result<(), fidl::Error> {
1767        let _result = self.send_raw(result);
1768        if _result.is_err() {
1769            self.control_handle.shutdown();
1770        }
1771        self.drop_without_shutdown();
1772        _result
1773    }
1774
1775    /// Similar to "send" but does not shutdown the channel if an error occurs.
1776    pub fn send_no_shutdown_on_err(
1777        self,
1778        mut result: Result<fidl::Vmo, ScanErrorCode>,
1779    ) -> Result<(), fidl::Error> {
1780        let _result = self.send_raw(result);
1781        self.drop_without_shutdown();
1782        _result
1783    }
1784
1785    fn send_raw(&self, mut result: Result<fidl::Vmo, ScanErrorCode>) -> Result<(), fidl::Error> {
1786        self.control_handle
1787            .inner
1788            .send::<fidl::encoding::ResultType<ClientSmeScanResponse, ScanErrorCode>>(
1789                result.map(|scan_results| (scan_results,)),
1790                self.tx_id,
1791                0xded0ce3b1685822,
1792                fidl::encoding::DynamicFlags::empty(),
1793            )
1794    }
1795}
1796
1797#[must_use = "FIDL methods require a response to be sent"]
1798#[derive(Debug)]
1799pub struct ClientSmeDisconnectResponder {
1800    control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
1801    tx_id: u32,
1802}
1803
1804/// Set the the channel to be shutdown (see [`ClientSmeControlHandle::shutdown`])
1805/// if the responder is dropped without sending a response, so that the client
1806/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
1807impl std::ops::Drop for ClientSmeDisconnectResponder {
1808    fn drop(&mut self) {
1809        self.control_handle.shutdown();
1810        // Safety: drops once, never accessed again
1811        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1812    }
1813}
1814
1815impl fidl::endpoints::Responder for ClientSmeDisconnectResponder {
1816    type ControlHandle = ClientSmeControlHandle;
1817
1818    fn control_handle(&self) -> &ClientSmeControlHandle {
1819        &self.control_handle
1820    }
1821
1822    fn drop_without_shutdown(mut self) {
1823        // Safety: drops once, never accessed again due to mem::forget
1824        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1825        // Prevent Drop from running (which would shut down the channel)
1826        std::mem::forget(self);
1827    }
1828}
1829
1830impl ClientSmeDisconnectResponder {
1831    /// Sends a response to the FIDL transaction.
1832    ///
1833    /// Sets the channel to shutdown if an error occurs.
1834    pub fn send(self) -> Result<(), fidl::Error> {
1835        let _result = self.send_raw();
1836        if _result.is_err() {
1837            self.control_handle.shutdown();
1838        }
1839        self.drop_without_shutdown();
1840        _result
1841    }
1842
1843    /// Similar to "send" but does not shutdown the channel if an error occurs.
1844    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
1845        let _result = self.send_raw();
1846        self.drop_without_shutdown();
1847        _result
1848    }
1849
1850    fn send_raw(&self) -> Result<(), fidl::Error> {
1851        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
1852            (),
1853            self.tx_id,
1854            0x39a578de9a107304,
1855            fidl::encoding::DynamicFlags::empty(),
1856        )
1857    }
1858}
1859
1860#[must_use = "FIDL methods require a response to be sent"]
1861#[derive(Debug)]
1862pub struct ClientSmeStatusResponder {
1863    control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
1864    tx_id: u32,
1865}
1866
1867/// Set the the channel to be shutdown (see [`ClientSmeControlHandle::shutdown`])
1868/// if the responder is dropped without sending a response, so that the client
1869/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
1870impl std::ops::Drop for ClientSmeStatusResponder {
1871    fn drop(&mut self) {
1872        self.control_handle.shutdown();
1873        // Safety: drops once, never accessed again
1874        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1875    }
1876}
1877
1878impl fidl::endpoints::Responder for ClientSmeStatusResponder {
1879    type ControlHandle = ClientSmeControlHandle;
1880
1881    fn control_handle(&self) -> &ClientSmeControlHandle {
1882        &self.control_handle
1883    }
1884
1885    fn drop_without_shutdown(mut self) {
1886        // Safety: drops once, never accessed again due to mem::forget
1887        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1888        // Prevent Drop from running (which would shut down the channel)
1889        std::mem::forget(self);
1890    }
1891}
1892
1893impl ClientSmeStatusResponder {
1894    /// Sends a response to the FIDL transaction.
1895    ///
1896    /// Sets the channel to shutdown if an error occurs.
1897    pub fn send(self, mut resp: &ClientStatusResponse) -> Result<(), fidl::Error> {
1898        let _result = self.send_raw(resp);
1899        if _result.is_err() {
1900            self.control_handle.shutdown();
1901        }
1902        self.drop_without_shutdown();
1903        _result
1904    }
1905
1906    /// Similar to "send" but does not shutdown the channel if an error occurs.
1907    pub fn send_no_shutdown_on_err(
1908        self,
1909        mut resp: &ClientStatusResponse,
1910    ) -> Result<(), fidl::Error> {
1911        let _result = self.send_raw(resp);
1912        self.drop_without_shutdown();
1913        _result
1914    }
1915
1916    fn send_raw(&self, mut resp: &ClientStatusResponse) -> Result<(), fidl::Error> {
1917        self.control_handle.inner.send::<ClientSmeStatusResponse>(
1918            (resp,),
1919            self.tx_id,
1920            0xda00b607470faf2,
1921            fidl::encoding::DynamicFlags::empty(),
1922        )
1923    }
1924}
1925
1926#[must_use = "FIDL methods require a response to be sent"]
1927#[derive(Debug)]
1928pub struct ClientSmeWmmStatusResponder {
1929    control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
1930    tx_id: u32,
1931}
1932
1933/// Set the the channel to be shutdown (see [`ClientSmeControlHandle::shutdown`])
1934/// if the responder is dropped without sending a response, so that the client
1935/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
1936impl std::ops::Drop for ClientSmeWmmStatusResponder {
1937    fn drop(&mut self) {
1938        self.control_handle.shutdown();
1939        // Safety: drops once, never accessed again
1940        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1941    }
1942}
1943
1944impl fidl::endpoints::Responder for ClientSmeWmmStatusResponder {
1945    type ControlHandle = ClientSmeControlHandle;
1946
1947    fn control_handle(&self) -> &ClientSmeControlHandle {
1948        &self.control_handle
1949    }
1950
1951    fn drop_without_shutdown(mut self) {
1952        // Safety: drops once, never accessed again due to mem::forget
1953        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1954        // Prevent Drop from running (which would shut down the channel)
1955        std::mem::forget(self);
1956    }
1957}
1958
1959impl ClientSmeWmmStatusResponder {
1960    /// Sends a response to the FIDL transaction.
1961    ///
1962    /// Sets the channel to shutdown if an error occurs.
1963    pub fn send(
1964        self,
1965        mut result: Result<&fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>,
1966    ) -> Result<(), fidl::Error> {
1967        let _result = self.send_raw(result);
1968        if _result.is_err() {
1969            self.control_handle.shutdown();
1970        }
1971        self.drop_without_shutdown();
1972        _result
1973    }
1974
1975    /// Similar to "send" but does not shutdown the channel if an error occurs.
1976    pub fn send_no_shutdown_on_err(
1977        self,
1978        mut result: Result<&fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>,
1979    ) -> Result<(), fidl::Error> {
1980        let _result = self.send_raw(result);
1981        self.drop_without_shutdown();
1982        _result
1983    }
1984
1985    fn send_raw(
1986        &self,
1987        mut result: Result<&fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>,
1988    ) -> Result<(), fidl::Error> {
1989        self.control_handle
1990            .inner
1991            .send::<fidl::encoding::ResultType<ClientSmeWmmStatusResponse, i32>>(
1992                result.map(|resp| (resp,)),
1993                self.tx_id,
1994                0x3d0ccc75f6baa9e3,
1995                fidl::encoding::DynamicFlags::empty(),
1996            )
1997    }
1998}
1999
2000#[must_use = "FIDL methods require a response to be sent"]
2001#[derive(Debug)]
2002pub struct ClientSmeScanForControllerResponder {
2003    control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2004    tx_id: u32,
2005}
2006
2007/// Set the the channel to be shutdown (see [`ClientSmeControlHandle::shutdown`])
2008/// if the responder is dropped without sending a response, so that the client
2009/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2010impl std::ops::Drop for ClientSmeScanForControllerResponder {
2011    fn drop(&mut self) {
2012        self.control_handle.shutdown();
2013        // Safety: drops once, never accessed again
2014        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2015    }
2016}
2017
2018impl fidl::endpoints::Responder for ClientSmeScanForControllerResponder {
2019    type ControlHandle = ClientSmeControlHandle;
2020
2021    fn control_handle(&self) -> &ClientSmeControlHandle {
2022        &self.control_handle
2023    }
2024
2025    fn drop_without_shutdown(mut self) {
2026        // Safety: drops once, never accessed again due to mem::forget
2027        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2028        // Prevent Drop from running (which would shut down the channel)
2029        std::mem::forget(self);
2030    }
2031}
2032
2033impl ClientSmeScanForControllerResponder {
2034    /// Sends a response to the FIDL transaction.
2035    ///
2036    /// Sets the channel to shutdown if an error occurs.
2037    pub fn send(self, mut result: Result<&[ScanResult], ScanErrorCode>) -> Result<(), fidl::Error> {
2038        let _result = self.send_raw(result);
2039        if _result.is_err() {
2040            self.control_handle.shutdown();
2041        }
2042        self.drop_without_shutdown();
2043        _result
2044    }
2045
2046    /// Similar to "send" but does not shutdown the channel if an error occurs.
2047    pub fn send_no_shutdown_on_err(
2048        self,
2049        mut result: Result<&[ScanResult], ScanErrorCode>,
2050    ) -> Result<(), fidl::Error> {
2051        let _result = self.send_raw(result);
2052        self.drop_without_shutdown();
2053        _result
2054    }
2055
2056    fn send_raw(
2057        &self,
2058        mut result: Result<&[ScanResult], ScanErrorCode>,
2059    ) -> Result<(), fidl::Error> {
2060        self.control_handle.inner.send::<fidl::encoding::ResultType<
2061            ClientSmeScanForControllerResponse,
2062            ScanErrorCode,
2063        >>(
2064            result.map(|scan_results| (scan_results,)),
2065            self.tx_id,
2066            0x21f00ab22ff79a12,
2067            fidl::encoding::DynamicFlags::empty(),
2068        )
2069    }
2070}
2071
2072#[must_use = "FIDL methods require a response to be sent"]
2073#[derive(Debug)]
2074pub struct ClientSmeSetMacAddressResponder {
2075    control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2076    tx_id: u32,
2077}
2078
2079/// Set the the channel to be shutdown (see [`ClientSmeControlHandle::shutdown`])
2080/// if the responder is dropped without sending a response, so that the client
2081/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2082impl std::ops::Drop for ClientSmeSetMacAddressResponder {
2083    fn drop(&mut self) {
2084        self.control_handle.shutdown();
2085        // Safety: drops once, never accessed again
2086        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2087    }
2088}
2089
2090impl fidl::endpoints::Responder for ClientSmeSetMacAddressResponder {
2091    type ControlHandle = ClientSmeControlHandle;
2092
2093    fn control_handle(&self) -> &ClientSmeControlHandle {
2094        &self.control_handle
2095    }
2096
2097    fn drop_without_shutdown(mut self) {
2098        // Safety: drops once, never accessed again due to mem::forget
2099        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2100        // Prevent Drop from running (which would shut down the channel)
2101        std::mem::forget(self);
2102    }
2103}
2104
2105impl ClientSmeSetMacAddressResponder {
2106    /// Sends a response to the FIDL transaction.
2107    ///
2108    /// Sets the channel to shutdown if an error occurs.
2109    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2110        let _result = self.send_raw(result);
2111        if _result.is_err() {
2112            self.control_handle.shutdown();
2113        }
2114        self.drop_without_shutdown();
2115        _result
2116    }
2117
2118    /// Similar to "send" but does not shutdown the channel if an error occurs.
2119    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2120        let _result = self.send_raw(result);
2121        self.drop_without_shutdown();
2122        _result
2123    }
2124
2125    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2126        self.control_handle
2127            .inner
2128            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2129                result,
2130                self.tx_id,
2131                0x13e0a0bee8962f58,
2132                fidl::encoding::DynamicFlags::empty(),
2133            )
2134    }
2135}
2136
2137#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2138pub struct ConnectTransactionMarker;
2139
2140impl fidl::endpoints::ProtocolMarker for ConnectTransactionMarker {
2141    type Proxy = ConnectTransactionProxy;
2142    type RequestStream = ConnectTransactionRequestStream;
2143    #[cfg(target_os = "fuchsia")]
2144    type SynchronousProxy = ConnectTransactionSynchronousProxy;
2145
2146    const DEBUG_NAME: &'static str = "(anonymous) ConnectTransaction";
2147}
2148
2149pub trait ConnectTransactionProxyInterface: Send + Sync {}
2150#[derive(Debug)]
2151#[cfg(target_os = "fuchsia")]
2152pub struct ConnectTransactionSynchronousProxy {
2153    client: fidl::client::sync::Client,
2154}
2155
2156#[cfg(target_os = "fuchsia")]
2157impl fidl::endpoints::SynchronousProxy for ConnectTransactionSynchronousProxy {
2158    type Proxy = ConnectTransactionProxy;
2159    type Protocol = ConnectTransactionMarker;
2160
2161    fn from_channel(inner: fidl::Channel) -> Self {
2162        Self::new(inner)
2163    }
2164
2165    fn into_channel(self) -> fidl::Channel {
2166        self.client.into_channel()
2167    }
2168
2169    fn as_channel(&self) -> &fidl::Channel {
2170        self.client.as_channel()
2171    }
2172}
2173
2174#[cfg(target_os = "fuchsia")]
2175impl ConnectTransactionSynchronousProxy {
2176    pub fn new(channel: fidl::Channel) -> Self {
2177        let protocol_name =
2178            <ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2179        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
2180    }
2181
2182    pub fn into_channel(self) -> fidl::Channel {
2183        self.client.into_channel()
2184    }
2185
2186    /// Waits until an event arrives and returns it. It is safe for other
2187    /// threads to make concurrent requests while waiting for an event.
2188    pub fn wait_for_event(
2189        &self,
2190        deadline: zx::MonotonicInstant,
2191    ) -> Result<ConnectTransactionEvent, fidl::Error> {
2192        ConnectTransactionEvent::decode(self.client.wait_for_event(deadline)?)
2193    }
2194}
2195
2196#[cfg(target_os = "fuchsia")]
2197impl From<ConnectTransactionSynchronousProxy> for zx::NullableHandle {
2198    fn from(value: ConnectTransactionSynchronousProxy) -> Self {
2199        value.into_channel().into()
2200    }
2201}
2202
2203#[cfg(target_os = "fuchsia")]
2204impl From<fidl::Channel> for ConnectTransactionSynchronousProxy {
2205    fn from(value: fidl::Channel) -> Self {
2206        Self::new(value)
2207    }
2208}
2209
2210#[cfg(target_os = "fuchsia")]
2211impl fidl::endpoints::FromClient for ConnectTransactionSynchronousProxy {
2212    type Protocol = ConnectTransactionMarker;
2213
2214    fn from_client(value: fidl::endpoints::ClientEnd<ConnectTransactionMarker>) -> Self {
2215        Self::new(value.into_channel())
2216    }
2217}
2218
2219#[derive(Debug, Clone)]
2220pub struct ConnectTransactionProxy {
2221    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2222}
2223
2224impl fidl::endpoints::Proxy for ConnectTransactionProxy {
2225    type Protocol = ConnectTransactionMarker;
2226
2227    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2228        Self::new(inner)
2229    }
2230
2231    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2232        self.client.into_channel().map_err(|client| Self { client })
2233    }
2234
2235    fn as_channel(&self) -> &::fidl::AsyncChannel {
2236        self.client.as_channel()
2237    }
2238}
2239
2240impl ConnectTransactionProxy {
2241    /// Create a new Proxy for fuchsia.wlan.sme/ConnectTransaction.
2242    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2243        let protocol_name =
2244            <ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2245        Self { client: fidl::client::Client::new(channel, protocol_name) }
2246    }
2247
2248    /// Get a Stream of events from the remote end of the protocol.
2249    ///
2250    /// # Panics
2251    ///
2252    /// Panics if the event stream was already taken.
2253    pub fn take_event_stream(&self) -> ConnectTransactionEventStream {
2254        ConnectTransactionEventStream { event_receiver: self.client.take_event_receiver() }
2255    }
2256}
2257
2258impl ConnectTransactionProxyInterface for ConnectTransactionProxy {}
2259
2260pub struct ConnectTransactionEventStream {
2261    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2262}
2263
2264impl std::marker::Unpin for ConnectTransactionEventStream {}
2265
2266impl futures::stream::FusedStream for ConnectTransactionEventStream {
2267    fn is_terminated(&self) -> bool {
2268        self.event_receiver.is_terminated()
2269    }
2270}
2271
2272impl futures::Stream for ConnectTransactionEventStream {
2273    type Item = Result<ConnectTransactionEvent, fidl::Error>;
2274
2275    fn poll_next(
2276        mut self: std::pin::Pin<&mut Self>,
2277        cx: &mut std::task::Context<'_>,
2278    ) -> std::task::Poll<Option<Self::Item>> {
2279        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2280            &mut self.event_receiver,
2281            cx
2282        )?) {
2283            Some(buf) => std::task::Poll::Ready(Some(ConnectTransactionEvent::decode(buf))),
2284            None => std::task::Poll::Ready(None),
2285        }
2286    }
2287}
2288
2289#[derive(Debug)]
2290pub enum ConnectTransactionEvent {
2291    OnConnectResult { result: ConnectResult },
2292    OnDisconnect { info: DisconnectInfo },
2293    OnRoamResult { result: RoamResult },
2294    OnSignalReport { ind: fidl_fuchsia_wlan_internal::SignalReportIndication },
2295    OnChannelSwitched { info: fidl_fuchsia_wlan_internal::ChannelSwitchInfo },
2296}
2297
2298impl ConnectTransactionEvent {
2299    #[allow(irrefutable_let_patterns)]
2300    pub fn into_on_connect_result(self) -> Option<ConnectResult> {
2301        if let ConnectTransactionEvent::OnConnectResult { result } = self {
2302            Some((result))
2303        } else {
2304            None
2305        }
2306    }
2307    #[allow(irrefutable_let_patterns)]
2308    pub fn into_on_disconnect(self) -> Option<DisconnectInfo> {
2309        if let ConnectTransactionEvent::OnDisconnect { info } = self { Some((info)) } else { None }
2310    }
2311    #[allow(irrefutable_let_patterns)]
2312    pub fn into_on_roam_result(self) -> Option<RoamResult> {
2313        if let ConnectTransactionEvent::OnRoamResult { result } = self {
2314            Some((result))
2315        } else {
2316            None
2317        }
2318    }
2319    #[allow(irrefutable_let_patterns)]
2320    pub fn into_on_signal_report(
2321        self,
2322    ) -> Option<fidl_fuchsia_wlan_internal::SignalReportIndication> {
2323        if let ConnectTransactionEvent::OnSignalReport { ind } = self { Some((ind)) } else { None }
2324    }
2325    #[allow(irrefutable_let_patterns)]
2326    pub fn into_on_channel_switched(self) -> Option<fidl_fuchsia_wlan_internal::ChannelSwitchInfo> {
2327        if let ConnectTransactionEvent::OnChannelSwitched { info } = self {
2328            Some((info))
2329        } else {
2330            None
2331        }
2332    }
2333
2334    /// Decodes a message buffer as a [`ConnectTransactionEvent`].
2335    fn decode(
2336        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2337    ) -> Result<ConnectTransactionEvent, fidl::Error> {
2338        let (bytes, _handles) = buf.split_mut();
2339        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2340        debug_assert_eq!(tx_header.tx_id, 0);
2341        match tx_header.ordinal {
2342            0x48d2cf407da489a7 => {
2343                let mut out = fidl::new_empty!(
2344                    ConnectTransactionOnConnectResultRequest,
2345                    fidl::encoding::DefaultFuchsiaResourceDialect
2346                );
2347                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnConnectResultRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2348                Ok((ConnectTransactionEvent::OnConnectResult { result: out.result }))
2349            }
2350            0x40dea7b1449cc733 => {
2351                let mut out = fidl::new_empty!(
2352                    ConnectTransactionOnDisconnectRequest,
2353                    fidl::encoding::DefaultFuchsiaResourceDialect
2354                );
2355                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnDisconnectRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2356                Ok((ConnectTransactionEvent::OnDisconnect { info: out.info }))
2357            }
2358            0x656267da4ccf2a41 => {
2359                let mut out = fidl::new_empty!(
2360                    ConnectTransactionOnRoamResultRequest,
2361                    fidl::encoding::DefaultFuchsiaResourceDialect
2362                );
2363                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnRoamResultRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2364                Ok((ConnectTransactionEvent::OnRoamResult { result: out.result }))
2365            }
2366            0x5e968bd5e267e262 => {
2367                let mut out = fidl::new_empty!(
2368                    ConnectTransactionOnSignalReportRequest,
2369                    fidl::encoding::DefaultFuchsiaResourceDialect
2370                );
2371                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnSignalReportRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2372                Ok((ConnectTransactionEvent::OnSignalReport { ind: out.ind }))
2373            }
2374            0x5f5153778cd70512 => {
2375                let mut out = fidl::new_empty!(
2376                    ConnectTransactionOnChannelSwitchedRequest,
2377                    fidl::encoding::DefaultFuchsiaResourceDialect
2378                );
2379                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnChannelSwitchedRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2380                Ok((ConnectTransactionEvent::OnChannelSwitched { info: out.info }))
2381            }
2382            _ => Err(fidl::Error::UnknownOrdinal {
2383                ordinal: tx_header.ordinal,
2384                protocol_name:
2385                    <ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2386            }),
2387        }
2388    }
2389}
2390
2391/// A Stream of incoming requests for fuchsia.wlan.sme/ConnectTransaction.
2392pub struct ConnectTransactionRequestStream {
2393    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2394    is_terminated: bool,
2395}
2396
2397impl std::marker::Unpin for ConnectTransactionRequestStream {}
2398
2399impl futures::stream::FusedStream for ConnectTransactionRequestStream {
2400    fn is_terminated(&self) -> bool {
2401        self.is_terminated
2402    }
2403}
2404
2405impl fidl::endpoints::RequestStream for ConnectTransactionRequestStream {
2406    type Protocol = ConnectTransactionMarker;
2407    type ControlHandle = ConnectTransactionControlHandle;
2408
2409    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2410        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2411    }
2412
2413    fn control_handle(&self) -> Self::ControlHandle {
2414        ConnectTransactionControlHandle { inner: self.inner.clone() }
2415    }
2416
2417    fn into_inner(
2418        self,
2419    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2420    {
2421        (self.inner, self.is_terminated)
2422    }
2423
2424    fn from_inner(
2425        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2426        is_terminated: bool,
2427    ) -> Self {
2428        Self { inner, is_terminated }
2429    }
2430}
2431
2432impl futures::Stream for ConnectTransactionRequestStream {
2433    type Item = Result<ConnectTransactionRequest, fidl::Error>;
2434
2435    fn poll_next(
2436        mut self: std::pin::Pin<&mut Self>,
2437        cx: &mut std::task::Context<'_>,
2438    ) -> std::task::Poll<Option<Self::Item>> {
2439        let this = &mut *self;
2440        if this.inner.check_shutdown(cx) {
2441            this.is_terminated = true;
2442            return std::task::Poll::Ready(None);
2443        }
2444        if this.is_terminated {
2445            panic!("polled ConnectTransactionRequestStream after completion");
2446        }
2447        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
2448            |bytes, handles| {
2449                match this.inner.channel().read_etc(cx, bytes, handles) {
2450                    std::task::Poll::Ready(Ok(())) => {}
2451                    std::task::Poll::Pending => return std::task::Poll::Pending,
2452                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
2453                        this.is_terminated = true;
2454                        return std::task::Poll::Ready(None);
2455                    }
2456                    std::task::Poll::Ready(Err(e)) => {
2457                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2458                            e.into(),
2459                        ))));
2460                    }
2461                }
2462
2463                // A message has been received from the channel
2464                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2465
2466                std::task::Poll::Ready(Some(match header.ordinal {
2467                _ => Err(fidl::Error::UnknownOrdinal {
2468                    ordinal: header.ordinal,
2469                    protocol_name: <ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2470                }),
2471            }))
2472            },
2473        )
2474    }
2475}
2476
2477#[derive(Debug)]
2478pub enum ConnectTransactionRequest {}
2479
2480impl ConnectTransactionRequest {
2481    /// Name of the method defined in FIDL
2482    pub fn method_name(&self) -> &'static str {
2483        match *self {}
2484    }
2485}
2486
2487#[derive(Debug, Clone)]
2488pub struct ConnectTransactionControlHandle {
2489    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2490}
2491
2492impl fidl::endpoints::ControlHandle for ConnectTransactionControlHandle {
2493    fn shutdown(&self) {
2494        self.inner.shutdown()
2495    }
2496    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2497        self.inner.shutdown_with_epitaph(status)
2498    }
2499
2500    fn is_closed(&self) -> bool {
2501        self.inner.channel().is_closed()
2502    }
2503    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2504        self.inner.channel().on_closed()
2505    }
2506
2507    #[cfg(target_os = "fuchsia")]
2508    fn signal_peer(
2509        &self,
2510        clear_mask: zx::Signals,
2511        set_mask: zx::Signals,
2512    ) -> Result<(), zx_status::Status> {
2513        use fidl::Peered;
2514        self.inner.channel().signal_peer(clear_mask, set_mask)
2515    }
2516}
2517
2518impl ConnectTransactionControlHandle {
2519    pub fn send_on_connect_result(&self, mut result: &ConnectResult) -> Result<(), fidl::Error> {
2520        self.inner.send::<ConnectTransactionOnConnectResultRequest>(
2521            (result,),
2522            0,
2523            0x48d2cf407da489a7,
2524            fidl::encoding::DynamicFlags::empty(),
2525        )
2526    }
2527
2528    pub fn send_on_disconnect(&self, mut info: &DisconnectInfo) -> Result<(), fidl::Error> {
2529        self.inner.send::<ConnectTransactionOnDisconnectRequest>(
2530            (info,),
2531            0,
2532            0x40dea7b1449cc733,
2533            fidl::encoding::DynamicFlags::empty(),
2534        )
2535    }
2536
2537    pub fn send_on_roam_result(&self, mut result: &RoamResult) -> Result<(), fidl::Error> {
2538        self.inner.send::<ConnectTransactionOnRoamResultRequest>(
2539            (result,),
2540            0,
2541            0x656267da4ccf2a41,
2542            fidl::encoding::DynamicFlags::empty(),
2543        )
2544    }
2545
2546    pub fn send_on_signal_report(
2547        &self,
2548        mut ind: &fidl_fuchsia_wlan_internal::SignalReportIndication,
2549    ) -> Result<(), fidl::Error> {
2550        self.inner.send::<ConnectTransactionOnSignalReportRequest>(
2551            (ind,),
2552            0,
2553            0x5e968bd5e267e262,
2554            fidl::encoding::DynamicFlags::empty(),
2555        )
2556    }
2557
2558    pub fn send_on_channel_switched(
2559        &self,
2560        mut info: &fidl_fuchsia_wlan_internal::ChannelSwitchInfo,
2561    ) -> Result<(), fidl::Error> {
2562        self.inner.send::<ConnectTransactionOnChannelSwitchedRequest>(
2563            (info,),
2564            0,
2565            0x5f5153778cd70512,
2566            fidl::encoding::DynamicFlags::empty(),
2567        )
2568    }
2569}
2570
2571#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2572pub struct GenericSmeMarker;
2573
2574impl fidl::endpoints::ProtocolMarker for GenericSmeMarker {
2575    type Proxy = GenericSmeProxy;
2576    type RequestStream = GenericSmeRequestStream;
2577    #[cfg(target_os = "fuchsia")]
2578    type SynchronousProxy = GenericSmeSynchronousProxy;
2579
2580    const DEBUG_NAME: &'static str = "(anonymous) GenericSme";
2581}
2582pub type GenericSmeGetClientSmeResult = Result<(), i32>;
2583pub type GenericSmeGetApSmeResult = Result<(), i32>;
2584pub type GenericSmeGetSmeTelemetryResult = Result<(), i32>;
2585
2586pub trait GenericSmeProxyInterface: Send + Sync {
2587    type QueryResponseFut: std::future::Future<Output = Result<GenericSmeQuery, fidl::Error>> + Send;
2588    fn r#query(&self) -> Self::QueryResponseFut;
2589    type GetClientSmeResponseFut: std::future::Future<Output = Result<GenericSmeGetClientSmeResult, fidl::Error>>
2590        + Send;
2591    fn r#get_client_sme(
2592        &self,
2593        sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
2594    ) -> Self::GetClientSmeResponseFut;
2595    type GetApSmeResponseFut: std::future::Future<Output = Result<GenericSmeGetApSmeResult, fidl::Error>>
2596        + Send;
2597    fn r#get_ap_sme(
2598        &self,
2599        sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
2600    ) -> Self::GetApSmeResponseFut;
2601    type GetSmeTelemetryResponseFut: std::future::Future<Output = Result<GenericSmeGetSmeTelemetryResult, fidl::Error>>
2602        + Send;
2603    fn r#get_sme_telemetry(
2604        &self,
2605        telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
2606    ) -> Self::GetSmeTelemetryResponseFut;
2607}
2608#[derive(Debug)]
2609#[cfg(target_os = "fuchsia")]
2610pub struct GenericSmeSynchronousProxy {
2611    client: fidl::client::sync::Client,
2612}
2613
2614#[cfg(target_os = "fuchsia")]
2615impl fidl::endpoints::SynchronousProxy for GenericSmeSynchronousProxy {
2616    type Proxy = GenericSmeProxy;
2617    type Protocol = GenericSmeMarker;
2618
2619    fn from_channel(inner: fidl::Channel) -> Self {
2620        Self::new(inner)
2621    }
2622
2623    fn into_channel(self) -> fidl::Channel {
2624        self.client.into_channel()
2625    }
2626
2627    fn as_channel(&self) -> &fidl::Channel {
2628        self.client.as_channel()
2629    }
2630}
2631
2632#[cfg(target_os = "fuchsia")]
2633impl GenericSmeSynchronousProxy {
2634    pub fn new(channel: fidl::Channel) -> Self {
2635        let protocol_name = <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2636        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
2637    }
2638
2639    pub fn into_channel(self) -> fidl::Channel {
2640        self.client.into_channel()
2641    }
2642
2643    /// Waits until an event arrives and returns it. It is safe for other
2644    /// threads to make concurrent requests while waiting for an event.
2645    pub fn wait_for_event(
2646        &self,
2647        deadline: zx::MonotonicInstant,
2648    ) -> Result<GenericSmeEvent, fidl::Error> {
2649        GenericSmeEvent::decode(self.client.wait_for_event(deadline)?)
2650    }
2651
2652    /// Query the underlying SME to determine basic properties. This should
2653    /// generally be called first to determine which SME protocol to request
2654    /// for the SME.
2655    pub fn r#query(
2656        &self,
2657        ___deadline: zx::MonotonicInstant,
2658    ) -> Result<GenericSmeQuery, fidl::Error> {
2659        let _response =
2660            self.client.send_query::<fidl::encoding::EmptyPayload, GenericSmeQueryResponse>(
2661                (),
2662                0x6ef4a820c153e249,
2663                fidl::encoding::DynamicFlags::empty(),
2664                ___deadline,
2665            )?;
2666        Ok(_response.resp)
2667    }
2668
2669    /// Attempt to establish a new connection to an underlying Client SME.
2670    /// Connections may be established for the whole lifetime of the SME,
2671    /// but concurrent connections might lead to unexpected behavior.
2672    /// Likely errors include:
2673    ///     * NOT_SUPPORTED: The underlying SME is not a Client SME.
2674    ///     * PEER_CLOSED: The underlying SME is shutting down.
2675    pub fn r#get_client_sme(
2676        &self,
2677        mut sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
2678        ___deadline: zx::MonotonicInstant,
2679    ) -> Result<GenericSmeGetClientSmeResult, fidl::Error> {
2680        let _response = self.client.send_query::<
2681            GenericSmeGetClientSmeRequest,
2682            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2683        >(
2684            (sme_server,),
2685            0x2439ad714c642f15,
2686            fidl::encoding::DynamicFlags::empty(),
2687            ___deadline,
2688        )?;
2689        Ok(_response.map(|x| x))
2690    }
2691
2692    /// Attempt to establish a new connection to an underlying AP SME.
2693    /// Connections may be established for the whole lifetime of the SME,
2694    /// but concurrent connections might lead to unexpected behavior.
2695    /// Likely errors include:
2696    ///     * NOT_SUPPORTED: The underlying SME is not an AP SME.
2697    ///     * PEER_CLOSED: The underlying SME is shutting down.
2698    pub fn r#get_ap_sme(
2699        &self,
2700        mut sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
2701        ___deadline: zx::MonotonicInstant,
2702    ) -> Result<GenericSmeGetApSmeResult, fidl::Error> {
2703        let _response = self.client.send_query::<
2704            GenericSmeGetApSmeRequest,
2705            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2706        >(
2707            (sme_server,),
2708            0x4d2a40be2b44ad6c,
2709            fidl::encoding::DynamicFlags::empty(),
2710            ___deadline,
2711        )?;
2712        Ok(_response.map(|x| x))
2713    }
2714
2715    /// Attempt to establish a new connection to telemetry information for the
2716    /// underlying SME.
2717    /// Connections may be established for the whole lifetime of the SME, and
2718    /// concurrent connections are safe since this is a read-only API.
2719    /// Likely errors include:
2720    ///     * NOT_SUPPORTED: The underlying SME does not support telemetry.
2721    ///     * PEER_CLOSED: The underlying SME is shutting down.
2722    pub fn r#get_sme_telemetry(
2723        &self,
2724        mut telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
2725        ___deadline: zx::MonotonicInstant,
2726    ) -> Result<GenericSmeGetSmeTelemetryResult, fidl::Error> {
2727        let _response = self.client.send_query::<
2728            GenericSmeGetSmeTelemetryRequest,
2729            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2730        >(
2731            (telemetry_server,),
2732            0x7ea015b3060fa,
2733            fidl::encoding::DynamicFlags::empty(),
2734            ___deadline,
2735        )?;
2736        Ok(_response.map(|x| x))
2737    }
2738}
2739
2740#[cfg(target_os = "fuchsia")]
2741impl From<GenericSmeSynchronousProxy> for zx::NullableHandle {
2742    fn from(value: GenericSmeSynchronousProxy) -> Self {
2743        value.into_channel().into()
2744    }
2745}
2746
2747#[cfg(target_os = "fuchsia")]
2748impl From<fidl::Channel> for GenericSmeSynchronousProxy {
2749    fn from(value: fidl::Channel) -> Self {
2750        Self::new(value)
2751    }
2752}
2753
2754#[cfg(target_os = "fuchsia")]
2755impl fidl::endpoints::FromClient for GenericSmeSynchronousProxy {
2756    type Protocol = GenericSmeMarker;
2757
2758    fn from_client(value: fidl::endpoints::ClientEnd<GenericSmeMarker>) -> Self {
2759        Self::new(value.into_channel())
2760    }
2761}
2762
2763#[derive(Debug, Clone)]
2764pub struct GenericSmeProxy {
2765    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2766}
2767
2768impl fidl::endpoints::Proxy for GenericSmeProxy {
2769    type Protocol = GenericSmeMarker;
2770
2771    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2772        Self::new(inner)
2773    }
2774
2775    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2776        self.client.into_channel().map_err(|client| Self { client })
2777    }
2778
2779    fn as_channel(&self) -> &::fidl::AsyncChannel {
2780        self.client.as_channel()
2781    }
2782}
2783
2784impl GenericSmeProxy {
2785    /// Create a new Proxy for fuchsia.wlan.sme/GenericSme.
2786    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2787        let protocol_name = <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2788        Self { client: fidl::client::Client::new(channel, protocol_name) }
2789    }
2790
2791    /// Get a Stream of events from the remote end of the protocol.
2792    ///
2793    /// # Panics
2794    ///
2795    /// Panics if the event stream was already taken.
2796    pub fn take_event_stream(&self) -> GenericSmeEventStream {
2797        GenericSmeEventStream { event_receiver: self.client.take_event_receiver() }
2798    }
2799
2800    /// Query the underlying SME to determine basic properties. This should
2801    /// generally be called first to determine which SME protocol to request
2802    /// for the SME.
2803    pub fn r#query(
2804        &self,
2805    ) -> fidl::client::QueryResponseFut<
2806        GenericSmeQuery,
2807        fidl::encoding::DefaultFuchsiaResourceDialect,
2808    > {
2809        GenericSmeProxyInterface::r#query(self)
2810    }
2811
2812    /// Attempt to establish a new connection to an underlying Client SME.
2813    /// Connections may be established for the whole lifetime of the SME,
2814    /// but concurrent connections might lead to unexpected behavior.
2815    /// Likely errors include:
2816    ///     * NOT_SUPPORTED: The underlying SME is not a Client SME.
2817    ///     * PEER_CLOSED: The underlying SME is shutting down.
2818    pub fn r#get_client_sme(
2819        &self,
2820        mut sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
2821    ) -> fidl::client::QueryResponseFut<
2822        GenericSmeGetClientSmeResult,
2823        fidl::encoding::DefaultFuchsiaResourceDialect,
2824    > {
2825        GenericSmeProxyInterface::r#get_client_sme(self, sme_server)
2826    }
2827
2828    /// Attempt to establish a new connection to an underlying AP SME.
2829    /// Connections may be established for the whole lifetime of the SME,
2830    /// but concurrent connections might lead to unexpected behavior.
2831    /// Likely errors include:
2832    ///     * NOT_SUPPORTED: The underlying SME is not an AP SME.
2833    ///     * PEER_CLOSED: The underlying SME is shutting down.
2834    pub fn r#get_ap_sme(
2835        &self,
2836        mut sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
2837    ) -> fidl::client::QueryResponseFut<
2838        GenericSmeGetApSmeResult,
2839        fidl::encoding::DefaultFuchsiaResourceDialect,
2840    > {
2841        GenericSmeProxyInterface::r#get_ap_sme(self, sme_server)
2842    }
2843
2844    /// Attempt to establish a new connection to telemetry information for the
2845    /// underlying SME.
2846    /// Connections may be established for the whole lifetime of the SME, and
2847    /// concurrent connections are safe since this is a read-only API.
2848    /// Likely errors include:
2849    ///     * NOT_SUPPORTED: The underlying SME does not support telemetry.
2850    ///     * PEER_CLOSED: The underlying SME is shutting down.
2851    pub fn r#get_sme_telemetry(
2852        &self,
2853        mut telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
2854    ) -> fidl::client::QueryResponseFut<
2855        GenericSmeGetSmeTelemetryResult,
2856        fidl::encoding::DefaultFuchsiaResourceDialect,
2857    > {
2858        GenericSmeProxyInterface::r#get_sme_telemetry(self, telemetry_server)
2859    }
2860}
2861
2862impl GenericSmeProxyInterface for GenericSmeProxy {
2863    type QueryResponseFut = fidl::client::QueryResponseFut<
2864        GenericSmeQuery,
2865        fidl::encoding::DefaultFuchsiaResourceDialect,
2866    >;
2867    fn r#query(&self) -> Self::QueryResponseFut {
2868        fn _decode(
2869            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2870        ) -> Result<GenericSmeQuery, fidl::Error> {
2871            let _response = fidl::client::decode_transaction_body::<
2872                GenericSmeQueryResponse,
2873                fidl::encoding::DefaultFuchsiaResourceDialect,
2874                0x6ef4a820c153e249,
2875            >(_buf?)?;
2876            Ok(_response.resp)
2877        }
2878        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, GenericSmeQuery>(
2879            (),
2880            0x6ef4a820c153e249,
2881            fidl::encoding::DynamicFlags::empty(),
2882            _decode,
2883        )
2884    }
2885
2886    type GetClientSmeResponseFut = fidl::client::QueryResponseFut<
2887        GenericSmeGetClientSmeResult,
2888        fidl::encoding::DefaultFuchsiaResourceDialect,
2889    >;
2890    fn r#get_client_sme(
2891        &self,
2892        mut sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
2893    ) -> Self::GetClientSmeResponseFut {
2894        fn _decode(
2895            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2896        ) -> Result<GenericSmeGetClientSmeResult, fidl::Error> {
2897            let _response = fidl::client::decode_transaction_body::<
2898                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2899                fidl::encoding::DefaultFuchsiaResourceDialect,
2900                0x2439ad714c642f15,
2901            >(_buf?)?;
2902            Ok(_response.map(|x| x))
2903        }
2904        self.client
2905            .send_query_and_decode::<GenericSmeGetClientSmeRequest, GenericSmeGetClientSmeResult>(
2906                (sme_server,),
2907                0x2439ad714c642f15,
2908                fidl::encoding::DynamicFlags::empty(),
2909                _decode,
2910            )
2911    }
2912
2913    type GetApSmeResponseFut = fidl::client::QueryResponseFut<
2914        GenericSmeGetApSmeResult,
2915        fidl::encoding::DefaultFuchsiaResourceDialect,
2916    >;
2917    fn r#get_ap_sme(
2918        &self,
2919        mut sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
2920    ) -> Self::GetApSmeResponseFut {
2921        fn _decode(
2922            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2923        ) -> Result<GenericSmeGetApSmeResult, fidl::Error> {
2924            let _response = fidl::client::decode_transaction_body::<
2925                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2926                fidl::encoding::DefaultFuchsiaResourceDialect,
2927                0x4d2a40be2b44ad6c,
2928            >(_buf?)?;
2929            Ok(_response.map(|x| x))
2930        }
2931        self.client.send_query_and_decode::<GenericSmeGetApSmeRequest, GenericSmeGetApSmeResult>(
2932            (sme_server,),
2933            0x4d2a40be2b44ad6c,
2934            fidl::encoding::DynamicFlags::empty(),
2935            _decode,
2936        )
2937    }
2938
2939    type GetSmeTelemetryResponseFut = fidl::client::QueryResponseFut<
2940        GenericSmeGetSmeTelemetryResult,
2941        fidl::encoding::DefaultFuchsiaResourceDialect,
2942    >;
2943    fn r#get_sme_telemetry(
2944        &self,
2945        mut telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
2946    ) -> Self::GetSmeTelemetryResponseFut {
2947        fn _decode(
2948            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2949        ) -> Result<GenericSmeGetSmeTelemetryResult, fidl::Error> {
2950            let _response = fidl::client::decode_transaction_body::<
2951                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2952                fidl::encoding::DefaultFuchsiaResourceDialect,
2953                0x7ea015b3060fa,
2954            >(_buf?)?;
2955            Ok(_response.map(|x| x))
2956        }
2957        self.client.send_query_and_decode::<
2958            GenericSmeGetSmeTelemetryRequest,
2959            GenericSmeGetSmeTelemetryResult,
2960        >(
2961            (telemetry_server,),
2962            0x7ea015b3060fa,
2963            fidl::encoding::DynamicFlags::empty(),
2964            _decode,
2965        )
2966    }
2967}
2968
2969pub struct GenericSmeEventStream {
2970    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2971}
2972
2973impl std::marker::Unpin for GenericSmeEventStream {}
2974
2975impl futures::stream::FusedStream for GenericSmeEventStream {
2976    fn is_terminated(&self) -> bool {
2977        self.event_receiver.is_terminated()
2978    }
2979}
2980
2981impl futures::Stream for GenericSmeEventStream {
2982    type Item = Result<GenericSmeEvent, fidl::Error>;
2983
2984    fn poll_next(
2985        mut self: std::pin::Pin<&mut Self>,
2986        cx: &mut std::task::Context<'_>,
2987    ) -> std::task::Poll<Option<Self::Item>> {
2988        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2989            &mut self.event_receiver,
2990            cx
2991        )?) {
2992            Some(buf) => std::task::Poll::Ready(Some(GenericSmeEvent::decode(buf))),
2993            None => std::task::Poll::Ready(None),
2994        }
2995    }
2996}
2997
2998#[derive(Debug)]
2999pub enum GenericSmeEvent {}
3000
3001impl GenericSmeEvent {
3002    /// Decodes a message buffer as a [`GenericSmeEvent`].
3003    fn decode(
3004        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3005    ) -> Result<GenericSmeEvent, fidl::Error> {
3006        let (bytes, _handles) = buf.split_mut();
3007        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3008        debug_assert_eq!(tx_header.tx_id, 0);
3009        match tx_header.ordinal {
3010            _ => Err(fidl::Error::UnknownOrdinal {
3011                ordinal: tx_header.ordinal,
3012                protocol_name: <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3013            }),
3014        }
3015    }
3016}
3017
3018/// A Stream of incoming requests for fuchsia.wlan.sme/GenericSme.
3019pub struct GenericSmeRequestStream {
3020    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3021    is_terminated: bool,
3022}
3023
3024impl std::marker::Unpin for GenericSmeRequestStream {}
3025
3026impl futures::stream::FusedStream for GenericSmeRequestStream {
3027    fn is_terminated(&self) -> bool {
3028        self.is_terminated
3029    }
3030}
3031
3032impl fidl::endpoints::RequestStream for GenericSmeRequestStream {
3033    type Protocol = GenericSmeMarker;
3034    type ControlHandle = GenericSmeControlHandle;
3035
3036    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3037        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3038    }
3039
3040    fn control_handle(&self) -> Self::ControlHandle {
3041        GenericSmeControlHandle { inner: self.inner.clone() }
3042    }
3043
3044    fn into_inner(
3045        self,
3046    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3047    {
3048        (self.inner, self.is_terminated)
3049    }
3050
3051    fn from_inner(
3052        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3053        is_terminated: bool,
3054    ) -> Self {
3055        Self { inner, is_terminated }
3056    }
3057}
3058
3059impl futures::Stream for GenericSmeRequestStream {
3060    type Item = Result<GenericSmeRequest, fidl::Error>;
3061
3062    fn poll_next(
3063        mut self: std::pin::Pin<&mut Self>,
3064        cx: &mut std::task::Context<'_>,
3065    ) -> std::task::Poll<Option<Self::Item>> {
3066        let this = &mut *self;
3067        if this.inner.check_shutdown(cx) {
3068            this.is_terminated = true;
3069            return std::task::Poll::Ready(None);
3070        }
3071        if this.is_terminated {
3072            panic!("polled GenericSmeRequestStream after completion");
3073        }
3074        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3075            |bytes, handles| {
3076                match this.inner.channel().read_etc(cx, bytes, handles) {
3077                    std::task::Poll::Ready(Ok(())) => {}
3078                    std::task::Poll::Pending => return std::task::Poll::Pending,
3079                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3080                        this.is_terminated = true;
3081                        return std::task::Poll::Ready(None);
3082                    }
3083                    std::task::Poll::Ready(Err(e)) => {
3084                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3085                            e.into(),
3086                        ))));
3087                    }
3088                }
3089
3090                // A message has been received from the channel
3091                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3092
3093                std::task::Poll::Ready(Some(match header.ordinal {
3094                    0x6ef4a820c153e249 => {
3095                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3096                        let mut req = fidl::new_empty!(
3097                            fidl::encoding::EmptyPayload,
3098                            fidl::encoding::DefaultFuchsiaResourceDialect
3099                        );
3100                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3101                        let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
3102                        Ok(GenericSmeRequest::Query {
3103                            responder: GenericSmeQueryResponder {
3104                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3105                                tx_id: header.tx_id,
3106                            },
3107                        })
3108                    }
3109                    0x2439ad714c642f15 => {
3110                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3111                        let mut req = fidl::new_empty!(
3112                            GenericSmeGetClientSmeRequest,
3113                            fidl::encoding::DefaultFuchsiaResourceDialect
3114                        );
3115                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<GenericSmeGetClientSmeRequest>(&header, _body_bytes, handles, &mut req)?;
3116                        let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
3117                        Ok(GenericSmeRequest::GetClientSme {
3118                            sme_server: req.sme_server,
3119
3120                            responder: GenericSmeGetClientSmeResponder {
3121                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3122                                tx_id: header.tx_id,
3123                            },
3124                        })
3125                    }
3126                    0x4d2a40be2b44ad6c => {
3127                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3128                        let mut req = fidl::new_empty!(
3129                            GenericSmeGetApSmeRequest,
3130                            fidl::encoding::DefaultFuchsiaResourceDialect
3131                        );
3132                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<GenericSmeGetApSmeRequest>(&header, _body_bytes, handles, &mut req)?;
3133                        let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
3134                        Ok(GenericSmeRequest::GetApSme {
3135                            sme_server: req.sme_server,
3136
3137                            responder: GenericSmeGetApSmeResponder {
3138                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3139                                tx_id: header.tx_id,
3140                            },
3141                        })
3142                    }
3143                    0x7ea015b3060fa => {
3144                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3145                        let mut req = fidl::new_empty!(
3146                            GenericSmeGetSmeTelemetryRequest,
3147                            fidl::encoding::DefaultFuchsiaResourceDialect
3148                        );
3149                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<GenericSmeGetSmeTelemetryRequest>(&header, _body_bytes, handles, &mut req)?;
3150                        let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
3151                        Ok(GenericSmeRequest::GetSmeTelemetry {
3152                            telemetry_server: req.telemetry_server,
3153
3154                            responder: GenericSmeGetSmeTelemetryResponder {
3155                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3156                                tx_id: header.tx_id,
3157                            },
3158                        })
3159                    }
3160                    _ => Err(fidl::Error::UnknownOrdinal {
3161                        ordinal: header.ordinal,
3162                        protocol_name:
3163                            <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3164                    }),
3165                }))
3166            },
3167        )
3168    }
3169}
3170
3171#[derive(Debug)]
3172pub enum GenericSmeRequest {
3173    /// Query the underlying SME to determine basic properties. This should
3174    /// generally be called first to determine which SME protocol to request
3175    /// for the SME.
3176    Query { responder: GenericSmeQueryResponder },
3177    /// Attempt to establish a new connection to an underlying Client SME.
3178    /// Connections may be established for the whole lifetime of the SME,
3179    /// but concurrent connections might lead to unexpected behavior.
3180    /// Likely errors include:
3181    ///     * NOT_SUPPORTED: The underlying SME is not a Client SME.
3182    ///     * PEER_CLOSED: The underlying SME is shutting down.
3183    GetClientSme {
3184        sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
3185        responder: GenericSmeGetClientSmeResponder,
3186    },
3187    /// Attempt to establish a new connection to an underlying AP SME.
3188    /// Connections may be established for the whole lifetime of the SME,
3189    /// but concurrent connections might lead to unexpected behavior.
3190    /// Likely errors include:
3191    ///     * NOT_SUPPORTED: The underlying SME is not an AP SME.
3192    ///     * PEER_CLOSED: The underlying SME is shutting down.
3193    GetApSme {
3194        sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
3195        responder: GenericSmeGetApSmeResponder,
3196    },
3197    /// Attempt to establish a new connection to telemetry information for the
3198    /// underlying SME.
3199    /// Connections may be established for the whole lifetime of the SME, and
3200    /// concurrent connections are safe since this is a read-only API.
3201    /// Likely errors include:
3202    ///     * NOT_SUPPORTED: The underlying SME does not support telemetry.
3203    ///     * PEER_CLOSED: The underlying SME is shutting down.
3204    GetSmeTelemetry {
3205        telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
3206        responder: GenericSmeGetSmeTelemetryResponder,
3207    },
3208}
3209
3210impl GenericSmeRequest {
3211    #[allow(irrefutable_let_patterns)]
3212    pub fn into_query(self) -> Option<(GenericSmeQueryResponder)> {
3213        if let GenericSmeRequest::Query { responder } = self { Some((responder)) } else { None }
3214    }
3215
3216    #[allow(irrefutable_let_patterns)]
3217    pub fn into_get_client_sme(
3218        self,
3219    ) -> Option<(fidl::endpoints::ServerEnd<ClientSmeMarker>, GenericSmeGetClientSmeResponder)>
3220    {
3221        if let GenericSmeRequest::GetClientSme { sme_server, responder } = self {
3222            Some((sme_server, responder))
3223        } else {
3224            None
3225        }
3226    }
3227
3228    #[allow(irrefutable_let_patterns)]
3229    pub fn into_get_ap_sme(
3230        self,
3231    ) -> Option<(fidl::endpoints::ServerEnd<ApSmeMarker>, GenericSmeGetApSmeResponder)> {
3232        if let GenericSmeRequest::GetApSme { sme_server, responder } = self {
3233            Some((sme_server, responder))
3234        } else {
3235            None
3236        }
3237    }
3238
3239    #[allow(irrefutable_let_patterns)]
3240    pub fn into_get_sme_telemetry(
3241        self,
3242    ) -> Option<(fidl::endpoints::ServerEnd<TelemetryMarker>, GenericSmeGetSmeTelemetryResponder)>
3243    {
3244        if let GenericSmeRequest::GetSmeTelemetry { telemetry_server, responder } = self {
3245            Some((telemetry_server, responder))
3246        } else {
3247            None
3248        }
3249    }
3250
3251    /// Name of the method defined in FIDL
3252    pub fn method_name(&self) -> &'static str {
3253        match *self {
3254            GenericSmeRequest::Query { .. } => "query",
3255            GenericSmeRequest::GetClientSme { .. } => "get_client_sme",
3256            GenericSmeRequest::GetApSme { .. } => "get_ap_sme",
3257            GenericSmeRequest::GetSmeTelemetry { .. } => "get_sme_telemetry",
3258        }
3259    }
3260}
3261
3262#[derive(Debug, Clone)]
3263pub struct GenericSmeControlHandle {
3264    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3265}
3266
3267impl fidl::endpoints::ControlHandle for GenericSmeControlHandle {
3268    fn shutdown(&self) {
3269        self.inner.shutdown()
3270    }
3271    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3272        self.inner.shutdown_with_epitaph(status)
3273    }
3274
3275    fn is_closed(&self) -> bool {
3276        self.inner.channel().is_closed()
3277    }
3278    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3279        self.inner.channel().on_closed()
3280    }
3281
3282    #[cfg(target_os = "fuchsia")]
3283    fn signal_peer(
3284        &self,
3285        clear_mask: zx::Signals,
3286        set_mask: zx::Signals,
3287    ) -> Result<(), zx_status::Status> {
3288        use fidl::Peered;
3289        self.inner.channel().signal_peer(clear_mask, set_mask)
3290    }
3291}
3292
3293impl GenericSmeControlHandle {}
3294
3295#[must_use = "FIDL methods require a response to be sent"]
3296#[derive(Debug)]
3297pub struct GenericSmeQueryResponder {
3298    control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
3299    tx_id: u32,
3300}
3301
3302/// Set the the channel to be shutdown (see [`GenericSmeControlHandle::shutdown`])
3303/// if the responder is dropped without sending a response, so that the client
3304/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3305impl std::ops::Drop for GenericSmeQueryResponder {
3306    fn drop(&mut self) {
3307        self.control_handle.shutdown();
3308        // Safety: drops once, never accessed again
3309        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3310    }
3311}
3312
3313impl fidl::endpoints::Responder for GenericSmeQueryResponder {
3314    type ControlHandle = GenericSmeControlHandle;
3315
3316    fn control_handle(&self) -> &GenericSmeControlHandle {
3317        &self.control_handle
3318    }
3319
3320    fn drop_without_shutdown(mut self) {
3321        // Safety: drops once, never accessed again due to mem::forget
3322        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3323        // Prevent Drop from running (which would shut down the channel)
3324        std::mem::forget(self);
3325    }
3326}
3327
3328impl GenericSmeQueryResponder {
3329    /// Sends a response to the FIDL transaction.
3330    ///
3331    /// Sets the channel to shutdown if an error occurs.
3332    pub fn send(self, mut resp: &GenericSmeQuery) -> Result<(), fidl::Error> {
3333        let _result = self.send_raw(resp);
3334        if _result.is_err() {
3335            self.control_handle.shutdown();
3336        }
3337        self.drop_without_shutdown();
3338        _result
3339    }
3340
3341    /// Similar to "send" but does not shutdown the channel if an error occurs.
3342    pub fn send_no_shutdown_on_err(self, mut resp: &GenericSmeQuery) -> Result<(), fidl::Error> {
3343        let _result = self.send_raw(resp);
3344        self.drop_without_shutdown();
3345        _result
3346    }
3347
3348    fn send_raw(&self, mut resp: &GenericSmeQuery) -> Result<(), fidl::Error> {
3349        self.control_handle.inner.send::<GenericSmeQueryResponse>(
3350            (resp,),
3351            self.tx_id,
3352            0x6ef4a820c153e249,
3353            fidl::encoding::DynamicFlags::empty(),
3354        )
3355    }
3356}
3357
3358#[must_use = "FIDL methods require a response to be sent"]
3359#[derive(Debug)]
3360pub struct GenericSmeGetClientSmeResponder {
3361    control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
3362    tx_id: u32,
3363}
3364
3365/// Set the the channel to be shutdown (see [`GenericSmeControlHandle::shutdown`])
3366/// if the responder is dropped without sending a response, so that the client
3367/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3368impl std::ops::Drop for GenericSmeGetClientSmeResponder {
3369    fn drop(&mut self) {
3370        self.control_handle.shutdown();
3371        // Safety: drops once, never accessed again
3372        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3373    }
3374}
3375
3376impl fidl::endpoints::Responder for GenericSmeGetClientSmeResponder {
3377    type ControlHandle = GenericSmeControlHandle;
3378
3379    fn control_handle(&self) -> &GenericSmeControlHandle {
3380        &self.control_handle
3381    }
3382
3383    fn drop_without_shutdown(mut self) {
3384        // Safety: drops once, never accessed again due to mem::forget
3385        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3386        // Prevent Drop from running (which would shut down the channel)
3387        std::mem::forget(self);
3388    }
3389}
3390
3391impl GenericSmeGetClientSmeResponder {
3392    /// Sends a response to the FIDL transaction.
3393    ///
3394    /// Sets the channel to shutdown if an error occurs.
3395    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3396        let _result = self.send_raw(result);
3397        if _result.is_err() {
3398            self.control_handle.shutdown();
3399        }
3400        self.drop_without_shutdown();
3401        _result
3402    }
3403
3404    /// Similar to "send" but does not shutdown the channel if an error occurs.
3405    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3406        let _result = self.send_raw(result);
3407        self.drop_without_shutdown();
3408        _result
3409    }
3410
3411    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3412        self.control_handle
3413            .inner
3414            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3415                result,
3416                self.tx_id,
3417                0x2439ad714c642f15,
3418                fidl::encoding::DynamicFlags::empty(),
3419            )
3420    }
3421}
3422
3423#[must_use = "FIDL methods require a response to be sent"]
3424#[derive(Debug)]
3425pub struct GenericSmeGetApSmeResponder {
3426    control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
3427    tx_id: u32,
3428}
3429
3430/// Set the the channel to be shutdown (see [`GenericSmeControlHandle::shutdown`])
3431/// if the responder is dropped without sending a response, so that the client
3432/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3433impl std::ops::Drop for GenericSmeGetApSmeResponder {
3434    fn drop(&mut self) {
3435        self.control_handle.shutdown();
3436        // Safety: drops once, never accessed again
3437        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3438    }
3439}
3440
3441impl fidl::endpoints::Responder for GenericSmeGetApSmeResponder {
3442    type ControlHandle = GenericSmeControlHandle;
3443
3444    fn control_handle(&self) -> &GenericSmeControlHandle {
3445        &self.control_handle
3446    }
3447
3448    fn drop_without_shutdown(mut self) {
3449        // Safety: drops once, never accessed again due to mem::forget
3450        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3451        // Prevent Drop from running (which would shut down the channel)
3452        std::mem::forget(self);
3453    }
3454}
3455
3456impl GenericSmeGetApSmeResponder {
3457    /// Sends a response to the FIDL transaction.
3458    ///
3459    /// Sets the channel to shutdown if an error occurs.
3460    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3461        let _result = self.send_raw(result);
3462        if _result.is_err() {
3463            self.control_handle.shutdown();
3464        }
3465        self.drop_without_shutdown();
3466        _result
3467    }
3468
3469    /// Similar to "send" but does not shutdown the channel if an error occurs.
3470    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3471        let _result = self.send_raw(result);
3472        self.drop_without_shutdown();
3473        _result
3474    }
3475
3476    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3477        self.control_handle
3478            .inner
3479            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3480                result,
3481                self.tx_id,
3482                0x4d2a40be2b44ad6c,
3483                fidl::encoding::DynamicFlags::empty(),
3484            )
3485    }
3486}
3487
3488#[must_use = "FIDL methods require a response to be sent"]
3489#[derive(Debug)]
3490pub struct GenericSmeGetSmeTelemetryResponder {
3491    control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
3492    tx_id: u32,
3493}
3494
3495/// Set the the channel to be shutdown (see [`GenericSmeControlHandle::shutdown`])
3496/// if the responder is dropped without sending a response, so that the client
3497/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3498impl std::ops::Drop for GenericSmeGetSmeTelemetryResponder {
3499    fn drop(&mut self) {
3500        self.control_handle.shutdown();
3501        // Safety: drops once, never accessed again
3502        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3503    }
3504}
3505
3506impl fidl::endpoints::Responder for GenericSmeGetSmeTelemetryResponder {
3507    type ControlHandle = GenericSmeControlHandle;
3508
3509    fn control_handle(&self) -> &GenericSmeControlHandle {
3510        &self.control_handle
3511    }
3512
3513    fn drop_without_shutdown(mut self) {
3514        // Safety: drops once, never accessed again due to mem::forget
3515        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3516        // Prevent Drop from running (which would shut down the channel)
3517        std::mem::forget(self);
3518    }
3519}
3520
3521impl GenericSmeGetSmeTelemetryResponder {
3522    /// Sends a response to the FIDL transaction.
3523    ///
3524    /// Sets the channel to shutdown if an error occurs.
3525    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3526        let _result = self.send_raw(result);
3527        if _result.is_err() {
3528            self.control_handle.shutdown();
3529        }
3530        self.drop_without_shutdown();
3531        _result
3532    }
3533
3534    /// Similar to "send" but does not shutdown the channel if an error occurs.
3535    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3536        let _result = self.send_raw(result);
3537        self.drop_without_shutdown();
3538        _result
3539    }
3540
3541    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3542        self.control_handle
3543            .inner
3544            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3545                result,
3546                self.tx_id,
3547                0x7ea015b3060fa,
3548                fidl::encoding::DynamicFlags::empty(),
3549            )
3550    }
3551}
3552
3553#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3554pub struct TelemetryMarker;
3555
3556impl fidl::endpoints::ProtocolMarker for TelemetryMarker {
3557    type Proxy = TelemetryProxy;
3558    type RequestStream = TelemetryRequestStream;
3559    #[cfg(target_os = "fuchsia")]
3560    type SynchronousProxy = TelemetrySynchronousProxy;
3561
3562    const DEBUG_NAME: &'static str = "(anonymous) Telemetry";
3563}
3564pub type TelemetryQueryTelemetrySupportResult =
3565    Result<fidl_fuchsia_wlan_stats::TelemetrySupport, i32>;
3566pub type TelemetryGetIfaceStatsResult = Result<fidl_fuchsia_wlan_stats::IfaceStats, i32>;
3567pub type TelemetryGetHistogramStatsResult =
3568    Result<fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>;
3569pub type TelemetryGetSignalReportResult = Result<fidl_fuchsia_wlan_stats::SignalReport, i32>;
3570pub type TelemetryCloneInspectVmoResult = Result<fidl::Vmo, i32>;
3571
3572pub trait TelemetryProxyInterface: Send + Sync {
3573    type QueryTelemetrySupportResponseFut: std::future::Future<Output = Result<TelemetryQueryTelemetrySupportResult, fidl::Error>>
3574        + Send;
3575    fn r#query_telemetry_support(&self) -> Self::QueryTelemetrySupportResponseFut;
3576    type GetIfaceStatsResponseFut: std::future::Future<Output = Result<TelemetryGetIfaceStatsResult, fidl::Error>>
3577        + Send;
3578    fn r#get_iface_stats(&self) -> Self::GetIfaceStatsResponseFut;
3579    type GetHistogramStatsResponseFut: std::future::Future<Output = Result<TelemetryGetHistogramStatsResult, fidl::Error>>
3580        + Send;
3581    fn r#get_histogram_stats(&self) -> Self::GetHistogramStatsResponseFut;
3582    type GetSignalReportResponseFut: std::future::Future<Output = Result<TelemetryGetSignalReportResult, fidl::Error>>
3583        + Send;
3584    fn r#get_signal_report(&self) -> Self::GetSignalReportResponseFut;
3585    type CloneInspectVmoResponseFut: std::future::Future<Output = Result<TelemetryCloneInspectVmoResult, fidl::Error>>
3586        + Send;
3587    fn r#clone_inspect_vmo(&self) -> Self::CloneInspectVmoResponseFut;
3588}
3589#[derive(Debug)]
3590#[cfg(target_os = "fuchsia")]
3591pub struct TelemetrySynchronousProxy {
3592    client: fidl::client::sync::Client,
3593}
3594
3595#[cfg(target_os = "fuchsia")]
3596impl fidl::endpoints::SynchronousProxy for TelemetrySynchronousProxy {
3597    type Proxy = TelemetryProxy;
3598    type Protocol = TelemetryMarker;
3599
3600    fn from_channel(inner: fidl::Channel) -> Self {
3601        Self::new(inner)
3602    }
3603
3604    fn into_channel(self) -> fidl::Channel {
3605        self.client.into_channel()
3606    }
3607
3608    fn as_channel(&self) -> &fidl::Channel {
3609        self.client.as_channel()
3610    }
3611}
3612
3613#[cfg(target_os = "fuchsia")]
3614impl TelemetrySynchronousProxy {
3615    pub fn new(channel: fidl::Channel) -> Self {
3616        let protocol_name = <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3617        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
3618    }
3619
3620    pub fn into_channel(self) -> fidl::Channel {
3621        self.client.into_channel()
3622    }
3623
3624    /// Waits until an event arrives and returns it. It is safe for other
3625    /// threads to make concurrent requests while waiting for an event.
3626    pub fn wait_for_event(
3627        &self,
3628        deadline: zx::MonotonicInstant,
3629    ) -> Result<TelemetryEvent, fidl::Error> {
3630        TelemetryEvent::decode(self.client.wait_for_event(deadline)?)
3631    }
3632
3633    pub fn r#query_telemetry_support(
3634        &self,
3635        ___deadline: zx::MonotonicInstant,
3636    ) -> Result<TelemetryQueryTelemetrySupportResult, fidl::Error> {
3637        let _response = self.client.send_query::<
3638            fidl::encoding::EmptyPayload,
3639            fidl::encoding::ResultType<TelemetryQueryTelemetrySupportResponse, i32>,
3640        >(
3641            (),
3642            0x69443ad35b204686,
3643            fidl::encoding::DynamicFlags::empty(),
3644            ___deadline,
3645        )?;
3646        Ok(_response.map(|x| x.resp))
3647    }
3648
3649    pub fn r#get_iface_stats(
3650        &self,
3651        ___deadline: zx::MonotonicInstant,
3652    ) -> Result<TelemetryGetIfaceStatsResult, fidl::Error> {
3653        let _response = self.client.send_query::<
3654            fidl::encoding::EmptyPayload,
3655            fidl::encoding::ResultType<TelemetryGetIfaceStatsResponse, i32>,
3656        >(
3657            (),
3658            0x6af057f3a017f572,
3659            fidl::encoding::DynamicFlags::empty(),
3660            ___deadline,
3661        )?;
3662        Ok(_response.map(|x| x.stats))
3663    }
3664
3665    pub fn r#get_histogram_stats(
3666        &self,
3667        ___deadline: zx::MonotonicInstant,
3668    ) -> Result<TelemetryGetHistogramStatsResult, fidl::Error> {
3669        let _response = self.client.send_query::<
3670            fidl::encoding::EmptyPayload,
3671            fidl::encoding::ResultType<TelemetryGetHistogramStatsResponse, i32>,
3672        >(
3673            (),
3674            0x46d2b6a23f764564,
3675            fidl::encoding::DynamicFlags::empty(),
3676            ___deadline,
3677        )?;
3678        Ok(_response.map(|x| x.stats))
3679    }
3680
3681    pub fn r#get_signal_report(
3682        &self,
3683        ___deadline: zx::MonotonicInstant,
3684    ) -> Result<TelemetryGetSignalReportResult, fidl::Error> {
3685        let _response = self.client.send_query::<
3686            fidl::encoding::EmptyPayload,
3687            fidl::encoding::ResultType<TelemetryGetSignalReportResponse, i32>,
3688        >(
3689            (),
3690            0x24133aeac3225e28,
3691            fidl::encoding::DynamicFlags::empty(),
3692            ___deadline,
3693        )?;
3694        Ok(_response.map(|x| x.stats))
3695    }
3696
3697    pub fn r#clone_inspect_vmo(
3698        &self,
3699        ___deadline: zx::MonotonicInstant,
3700    ) -> Result<TelemetryCloneInspectVmoResult, fidl::Error> {
3701        let _response = self.client.send_query::<
3702            fidl::encoding::EmptyPayload,
3703            fidl::encoding::ResultType<TelemetryCloneInspectVmoResponse, i32>,
3704        >(
3705            (),
3706            0x47153917e84c5a21,
3707            fidl::encoding::DynamicFlags::empty(),
3708            ___deadline,
3709        )?;
3710        Ok(_response.map(|x| x.inspect_vmo))
3711    }
3712}
3713
3714#[cfg(target_os = "fuchsia")]
3715impl From<TelemetrySynchronousProxy> for zx::NullableHandle {
3716    fn from(value: TelemetrySynchronousProxy) -> Self {
3717        value.into_channel().into()
3718    }
3719}
3720
3721#[cfg(target_os = "fuchsia")]
3722impl From<fidl::Channel> for TelemetrySynchronousProxy {
3723    fn from(value: fidl::Channel) -> Self {
3724        Self::new(value)
3725    }
3726}
3727
3728#[cfg(target_os = "fuchsia")]
3729impl fidl::endpoints::FromClient for TelemetrySynchronousProxy {
3730    type Protocol = TelemetryMarker;
3731
3732    fn from_client(value: fidl::endpoints::ClientEnd<TelemetryMarker>) -> Self {
3733        Self::new(value.into_channel())
3734    }
3735}
3736
3737#[derive(Debug, Clone)]
3738pub struct TelemetryProxy {
3739    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
3740}
3741
3742impl fidl::endpoints::Proxy for TelemetryProxy {
3743    type Protocol = TelemetryMarker;
3744
3745    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
3746        Self::new(inner)
3747    }
3748
3749    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
3750        self.client.into_channel().map_err(|client| Self { client })
3751    }
3752
3753    fn as_channel(&self) -> &::fidl::AsyncChannel {
3754        self.client.as_channel()
3755    }
3756}
3757
3758impl TelemetryProxy {
3759    /// Create a new Proxy for fuchsia.wlan.sme/Telemetry.
3760    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
3761        let protocol_name = <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3762        Self { client: fidl::client::Client::new(channel, protocol_name) }
3763    }
3764
3765    /// Get a Stream of events from the remote end of the protocol.
3766    ///
3767    /// # Panics
3768    ///
3769    /// Panics if the event stream was already taken.
3770    pub fn take_event_stream(&self) -> TelemetryEventStream {
3771        TelemetryEventStream { event_receiver: self.client.take_event_receiver() }
3772    }
3773
3774    pub fn r#query_telemetry_support(
3775        &self,
3776    ) -> fidl::client::QueryResponseFut<
3777        TelemetryQueryTelemetrySupportResult,
3778        fidl::encoding::DefaultFuchsiaResourceDialect,
3779    > {
3780        TelemetryProxyInterface::r#query_telemetry_support(self)
3781    }
3782
3783    pub fn r#get_iface_stats(
3784        &self,
3785    ) -> fidl::client::QueryResponseFut<
3786        TelemetryGetIfaceStatsResult,
3787        fidl::encoding::DefaultFuchsiaResourceDialect,
3788    > {
3789        TelemetryProxyInterface::r#get_iface_stats(self)
3790    }
3791
3792    pub fn r#get_histogram_stats(
3793        &self,
3794    ) -> fidl::client::QueryResponseFut<
3795        TelemetryGetHistogramStatsResult,
3796        fidl::encoding::DefaultFuchsiaResourceDialect,
3797    > {
3798        TelemetryProxyInterface::r#get_histogram_stats(self)
3799    }
3800
3801    pub fn r#get_signal_report(
3802        &self,
3803    ) -> fidl::client::QueryResponseFut<
3804        TelemetryGetSignalReportResult,
3805        fidl::encoding::DefaultFuchsiaResourceDialect,
3806    > {
3807        TelemetryProxyInterface::r#get_signal_report(self)
3808    }
3809
3810    pub fn r#clone_inspect_vmo(
3811        &self,
3812    ) -> fidl::client::QueryResponseFut<
3813        TelemetryCloneInspectVmoResult,
3814        fidl::encoding::DefaultFuchsiaResourceDialect,
3815    > {
3816        TelemetryProxyInterface::r#clone_inspect_vmo(self)
3817    }
3818}
3819
3820impl TelemetryProxyInterface for TelemetryProxy {
3821    type QueryTelemetrySupportResponseFut = fidl::client::QueryResponseFut<
3822        TelemetryQueryTelemetrySupportResult,
3823        fidl::encoding::DefaultFuchsiaResourceDialect,
3824    >;
3825    fn r#query_telemetry_support(&self) -> Self::QueryTelemetrySupportResponseFut {
3826        fn _decode(
3827            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3828        ) -> Result<TelemetryQueryTelemetrySupportResult, fidl::Error> {
3829            let _response = fidl::client::decode_transaction_body::<
3830                fidl::encoding::ResultType<TelemetryQueryTelemetrySupportResponse, i32>,
3831                fidl::encoding::DefaultFuchsiaResourceDialect,
3832                0x69443ad35b204686,
3833            >(_buf?)?;
3834            Ok(_response.map(|x| x.resp))
3835        }
3836        self.client.send_query_and_decode::<
3837            fidl::encoding::EmptyPayload,
3838            TelemetryQueryTelemetrySupportResult,
3839        >(
3840            (),
3841            0x69443ad35b204686,
3842            fidl::encoding::DynamicFlags::empty(),
3843            _decode,
3844        )
3845    }
3846
3847    type GetIfaceStatsResponseFut = fidl::client::QueryResponseFut<
3848        TelemetryGetIfaceStatsResult,
3849        fidl::encoding::DefaultFuchsiaResourceDialect,
3850    >;
3851    fn r#get_iface_stats(&self) -> Self::GetIfaceStatsResponseFut {
3852        fn _decode(
3853            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3854        ) -> Result<TelemetryGetIfaceStatsResult, fidl::Error> {
3855            let _response = fidl::client::decode_transaction_body::<
3856                fidl::encoding::ResultType<TelemetryGetIfaceStatsResponse, i32>,
3857                fidl::encoding::DefaultFuchsiaResourceDialect,
3858                0x6af057f3a017f572,
3859            >(_buf?)?;
3860            Ok(_response.map(|x| x.stats))
3861        }
3862        self.client
3863            .send_query_and_decode::<fidl::encoding::EmptyPayload, TelemetryGetIfaceStatsResult>(
3864                (),
3865                0x6af057f3a017f572,
3866                fidl::encoding::DynamicFlags::empty(),
3867                _decode,
3868            )
3869    }
3870
3871    type GetHistogramStatsResponseFut = fidl::client::QueryResponseFut<
3872        TelemetryGetHistogramStatsResult,
3873        fidl::encoding::DefaultFuchsiaResourceDialect,
3874    >;
3875    fn r#get_histogram_stats(&self) -> Self::GetHistogramStatsResponseFut {
3876        fn _decode(
3877            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3878        ) -> Result<TelemetryGetHistogramStatsResult, fidl::Error> {
3879            let _response = fidl::client::decode_transaction_body::<
3880                fidl::encoding::ResultType<TelemetryGetHistogramStatsResponse, i32>,
3881                fidl::encoding::DefaultFuchsiaResourceDialect,
3882                0x46d2b6a23f764564,
3883            >(_buf?)?;
3884            Ok(_response.map(|x| x.stats))
3885        }
3886        self.client.send_query_and_decode::<
3887            fidl::encoding::EmptyPayload,
3888            TelemetryGetHistogramStatsResult,
3889        >(
3890            (),
3891            0x46d2b6a23f764564,
3892            fidl::encoding::DynamicFlags::empty(),
3893            _decode,
3894        )
3895    }
3896
3897    type GetSignalReportResponseFut = fidl::client::QueryResponseFut<
3898        TelemetryGetSignalReportResult,
3899        fidl::encoding::DefaultFuchsiaResourceDialect,
3900    >;
3901    fn r#get_signal_report(&self) -> Self::GetSignalReportResponseFut {
3902        fn _decode(
3903            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3904        ) -> Result<TelemetryGetSignalReportResult, fidl::Error> {
3905            let _response = fidl::client::decode_transaction_body::<
3906                fidl::encoding::ResultType<TelemetryGetSignalReportResponse, i32>,
3907                fidl::encoding::DefaultFuchsiaResourceDialect,
3908                0x24133aeac3225e28,
3909            >(_buf?)?;
3910            Ok(_response.map(|x| x.stats))
3911        }
3912        self.client
3913            .send_query_and_decode::<fidl::encoding::EmptyPayload, TelemetryGetSignalReportResult>(
3914                (),
3915                0x24133aeac3225e28,
3916                fidl::encoding::DynamicFlags::empty(),
3917                _decode,
3918            )
3919    }
3920
3921    type CloneInspectVmoResponseFut = fidl::client::QueryResponseFut<
3922        TelemetryCloneInspectVmoResult,
3923        fidl::encoding::DefaultFuchsiaResourceDialect,
3924    >;
3925    fn r#clone_inspect_vmo(&self) -> Self::CloneInspectVmoResponseFut {
3926        fn _decode(
3927            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3928        ) -> Result<TelemetryCloneInspectVmoResult, fidl::Error> {
3929            let _response = fidl::client::decode_transaction_body::<
3930                fidl::encoding::ResultType<TelemetryCloneInspectVmoResponse, i32>,
3931                fidl::encoding::DefaultFuchsiaResourceDialect,
3932                0x47153917e84c5a21,
3933            >(_buf?)?;
3934            Ok(_response.map(|x| x.inspect_vmo))
3935        }
3936        self.client
3937            .send_query_and_decode::<fidl::encoding::EmptyPayload, TelemetryCloneInspectVmoResult>(
3938                (),
3939                0x47153917e84c5a21,
3940                fidl::encoding::DynamicFlags::empty(),
3941                _decode,
3942            )
3943    }
3944}
3945
3946pub struct TelemetryEventStream {
3947    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3948}
3949
3950impl std::marker::Unpin for TelemetryEventStream {}
3951
3952impl futures::stream::FusedStream for TelemetryEventStream {
3953    fn is_terminated(&self) -> bool {
3954        self.event_receiver.is_terminated()
3955    }
3956}
3957
3958impl futures::Stream for TelemetryEventStream {
3959    type Item = Result<TelemetryEvent, fidl::Error>;
3960
3961    fn poll_next(
3962        mut self: std::pin::Pin<&mut Self>,
3963        cx: &mut std::task::Context<'_>,
3964    ) -> std::task::Poll<Option<Self::Item>> {
3965        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3966            &mut self.event_receiver,
3967            cx
3968        )?) {
3969            Some(buf) => std::task::Poll::Ready(Some(TelemetryEvent::decode(buf))),
3970            None => std::task::Poll::Ready(None),
3971        }
3972    }
3973}
3974
3975#[derive(Debug)]
3976pub enum TelemetryEvent {}
3977
3978impl TelemetryEvent {
3979    /// Decodes a message buffer as a [`TelemetryEvent`].
3980    fn decode(
3981        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3982    ) -> Result<TelemetryEvent, fidl::Error> {
3983        let (bytes, _handles) = buf.split_mut();
3984        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3985        debug_assert_eq!(tx_header.tx_id, 0);
3986        match tx_header.ordinal {
3987            _ => Err(fidl::Error::UnknownOrdinal {
3988                ordinal: tx_header.ordinal,
3989                protocol_name: <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3990            }),
3991        }
3992    }
3993}
3994
3995/// A Stream of incoming requests for fuchsia.wlan.sme/Telemetry.
3996pub struct TelemetryRequestStream {
3997    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3998    is_terminated: bool,
3999}
4000
4001impl std::marker::Unpin for TelemetryRequestStream {}
4002
4003impl futures::stream::FusedStream for TelemetryRequestStream {
4004    fn is_terminated(&self) -> bool {
4005        self.is_terminated
4006    }
4007}
4008
4009impl fidl::endpoints::RequestStream for TelemetryRequestStream {
4010    type Protocol = TelemetryMarker;
4011    type ControlHandle = TelemetryControlHandle;
4012
4013    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4014        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4015    }
4016
4017    fn control_handle(&self) -> Self::ControlHandle {
4018        TelemetryControlHandle { inner: self.inner.clone() }
4019    }
4020
4021    fn into_inner(
4022        self,
4023    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4024    {
4025        (self.inner, self.is_terminated)
4026    }
4027
4028    fn from_inner(
4029        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4030        is_terminated: bool,
4031    ) -> Self {
4032        Self { inner, is_terminated }
4033    }
4034}
4035
4036impl futures::Stream for TelemetryRequestStream {
4037    type Item = Result<TelemetryRequest, fidl::Error>;
4038
4039    fn poll_next(
4040        mut self: std::pin::Pin<&mut Self>,
4041        cx: &mut std::task::Context<'_>,
4042    ) -> std::task::Poll<Option<Self::Item>> {
4043        let this = &mut *self;
4044        if this.inner.check_shutdown(cx) {
4045            this.is_terminated = true;
4046            return std::task::Poll::Ready(None);
4047        }
4048        if this.is_terminated {
4049            panic!("polled TelemetryRequestStream after completion");
4050        }
4051        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4052            |bytes, handles| {
4053                match this.inner.channel().read_etc(cx, bytes, handles) {
4054                    std::task::Poll::Ready(Ok(())) => {}
4055                    std::task::Poll::Pending => return std::task::Poll::Pending,
4056                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4057                        this.is_terminated = true;
4058                        return std::task::Poll::Ready(None);
4059                    }
4060                    std::task::Poll::Ready(Err(e)) => {
4061                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4062                            e.into(),
4063                        ))));
4064                    }
4065                }
4066
4067                // A message has been received from the channel
4068                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4069
4070                std::task::Poll::Ready(Some(match header.ordinal {
4071                    0x69443ad35b204686 => {
4072                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4073                        let mut req = fidl::new_empty!(
4074                            fidl::encoding::EmptyPayload,
4075                            fidl::encoding::DefaultFuchsiaResourceDialect
4076                        );
4077                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4078                        let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
4079                        Ok(TelemetryRequest::QueryTelemetrySupport {
4080                            responder: TelemetryQueryTelemetrySupportResponder {
4081                                control_handle: std::mem::ManuallyDrop::new(control_handle),
4082                                tx_id: header.tx_id,
4083                            },
4084                        })
4085                    }
4086                    0x6af057f3a017f572 => {
4087                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4088                        let mut req = fidl::new_empty!(
4089                            fidl::encoding::EmptyPayload,
4090                            fidl::encoding::DefaultFuchsiaResourceDialect
4091                        );
4092                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4093                        let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
4094                        Ok(TelemetryRequest::GetIfaceStats {
4095                            responder: TelemetryGetIfaceStatsResponder {
4096                                control_handle: std::mem::ManuallyDrop::new(control_handle),
4097                                tx_id: header.tx_id,
4098                            },
4099                        })
4100                    }
4101                    0x46d2b6a23f764564 => {
4102                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4103                        let mut req = fidl::new_empty!(
4104                            fidl::encoding::EmptyPayload,
4105                            fidl::encoding::DefaultFuchsiaResourceDialect
4106                        );
4107                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4108                        let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
4109                        Ok(TelemetryRequest::GetHistogramStats {
4110                            responder: TelemetryGetHistogramStatsResponder {
4111                                control_handle: std::mem::ManuallyDrop::new(control_handle),
4112                                tx_id: header.tx_id,
4113                            },
4114                        })
4115                    }
4116                    0x24133aeac3225e28 => {
4117                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4118                        let mut req = fidl::new_empty!(
4119                            fidl::encoding::EmptyPayload,
4120                            fidl::encoding::DefaultFuchsiaResourceDialect
4121                        );
4122                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4123                        let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
4124                        Ok(TelemetryRequest::GetSignalReport {
4125                            responder: TelemetryGetSignalReportResponder {
4126                                control_handle: std::mem::ManuallyDrop::new(control_handle),
4127                                tx_id: header.tx_id,
4128                            },
4129                        })
4130                    }
4131                    0x47153917e84c5a21 => {
4132                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4133                        let mut req = fidl::new_empty!(
4134                            fidl::encoding::EmptyPayload,
4135                            fidl::encoding::DefaultFuchsiaResourceDialect
4136                        );
4137                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4138                        let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
4139                        Ok(TelemetryRequest::CloneInspectVmo {
4140                            responder: TelemetryCloneInspectVmoResponder {
4141                                control_handle: std::mem::ManuallyDrop::new(control_handle),
4142                                tx_id: header.tx_id,
4143                            },
4144                        })
4145                    }
4146                    _ => Err(fidl::Error::UnknownOrdinal {
4147                        ordinal: header.ordinal,
4148                        protocol_name:
4149                            <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4150                    }),
4151                }))
4152            },
4153        )
4154    }
4155}
4156
4157#[derive(Debug)]
4158pub enum TelemetryRequest {
4159    QueryTelemetrySupport { responder: TelemetryQueryTelemetrySupportResponder },
4160    GetIfaceStats { responder: TelemetryGetIfaceStatsResponder },
4161    GetHistogramStats { responder: TelemetryGetHistogramStatsResponder },
4162    GetSignalReport { responder: TelemetryGetSignalReportResponder },
4163    CloneInspectVmo { responder: TelemetryCloneInspectVmoResponder },
4164}
4165
4166impl TelemetryRequest {
4167    #[allow(irrefutable_let_patterns)]
4168    pub fn into_query_telemetry_support(self) -> Option<(TelemetryQueryTelemetrySupportResponder)> {
4169        if let TelemetryRequest::QueryTelemetrySupport { responder } = self {
4170            Some((responder))
4171        } else {
4172            None
4173        }
4174    }
4175
4176    #[allow(irrefutable_let_patterns)]
4177    pub fn into_get_iface_stats(self) -> Option<(TelemetryGetIfaceStatsResponder)> {
4178        if let TelemetryRequest::GetIfaceStats { responder } = self {
4179            Some((responder))
4180        } else {
4181            None
4182        }
4183    }
4184
4185    #[allow(irrefutable_let_patterns)]
4186    pub fn into_get_histogram_stats(self) -> Option<(TelemetryGetHistogramStatsResponder)> {
4187        if let TelemetryRequest::GetHistogramStats { responder } = self {
4188            Some((responder))
4189        } else {
4190            None
4191        }
4192    }
4193
4194    #[allow(irrefutable_let_patterns)]
4195    pub fn into_get_signal_report(self) -> Option<(TelemetryGetSignalReportResponder)> {
4196        if let TelemetryRequest::GetSignalReport { responder } = self {
4197            Some((responder))
4198        } else {
4199            None
4200        }
4201    }
4202
4203    #[allow(irrefutable_let_patterns)]
4204    pub fn into_clone_inspect_vmo(self) -> Option<(TelemetryCloneInspectVmoResponder)> {
4205        if let TelemetryRequest::CloneInspectVmo { responder } = self {
4206            Some((responder))
4207        } else {
4208            None
4209        }
4210    }
4211
4212    /// Name of the method defined in FIDL
4213    pub fn method_name(&self) -> &'static str {
4214        match *self {
4215            TelemetryRequest::QueryTelemetrySupport { .. } => "query_telemetry_support",
4216            TelemetryRequest::GetIfaceStats { .. } => "get_iface_stats",
4217            TelemetryRequest::GetHistogramStats { .. } => "get_histogram_stats",
4218            TelemetryRequest::GetSignalReport { .. } => "get_signal_report",
4219            TelemetryRequest::CloneInspectVmo { .. } => "clone_inspect_vmo",
4220        }
4221    }
4222}
4223
4224#[derive(Debug, Clone)]
4225pub struct TelemetryControlHandle {
4226    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4227}
4228
4229impl fidl::endpoints::ControlHandle for TelemetryControlHandle {
4230    fn shutdown(&self) {
4231        self.inner.shutdown()
4232    }
4233    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4234        self.inner.shutdown_with_epitaph(status)
4235    }
4236
4237    fn is_closed(&self) -> bool {
4238        self.inner.channel().is_closed()
4239    }
4240    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4241        self.inner.channel().on_closed()
4242    }
4243
4244    #[cfg(target_os = "fuchsia")]
4245    fn signal_peer(
4246        &self,
4247        clear_mask: zx::Signals,
4248        set_mask: zx::Signals,
4249    ) -> Result<(), zx_status::Status> {
4250        use fidl::Peered;
4251        self.inner.channel().signal_peer(clear_mask, set_mask)
4252    }
4253}
4254
4255impl TelemetryControlHandle {}
4256
4257#[must_use = "FIDL methods require a response to be sent"]
4258#[derive(Debug)]
4259pub struct TelemetryQueryTelemetrySupportResponder {
4260    control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
4261    tx_id: u32,
4262}
4263
4264/// Set the the channel to be shutdown (see [`TelemetryControlHandle::shutdown`])
4265/// if the responder is dropped without sending a response, so that the client
4266/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4267impl std::ops::Drop for TelemetryQueryTelemetrySupportResponder {
4268    fn drop(&mut self) {
4269        self.control_handle.shutdown();
4270        // Safety: drops once, never accessed again
4271        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4272    }
4273}
4274
4275impl fidl::endpoints::Responder for TelemetryQueryTelemetrySupportResponder {
4276    type ControlHandle = TelemetryControlHandle;
4277
4278    fn control_handle(&self) -> &TelemetryControlHandle {
4279        &self.control_handle
4280    }
4281
4282    fn drop_without_shutdown(mut self) {
4283        // Safety: drops once, never accessed again due to mem::forget
4284        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4285        // Prevent Drop from running (which would shut down the channel)
4286        std::mem::forget(self);
4287    }
4288}
4289
4290impl TelemetryQueryTelemetrySupportResponder {
4291    /// Sends a response to the FIDL transaction.
4292    ///
4293    /// Sets the channel to shutdown if an error occurs.
4294    pub fn send(
4295        self,
4296        mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
4297    ) -> Result<(), fidl::Error> {
4298        let _result = self.send_raw(result);
4299        if _result.is_err() {
4300            self.control_handle.shutdown();
4301        }
4302        self.drop_without_shutdown();
4303        _result
4304    }
4305
4306    /// Similar to "send" but does not shutdown the channel if an error occurs.
4307    pub fn send_no_shutdown_on_err(
4308        self,
4309        mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
4310    ) -> Result<(), fidl::Error> {
4311        let _result = self.send_raw(result);
4312        self.drop_without_shutdown();
4313        _result
4314    }
4315
4316    fn send_raw(
4317        &self,
4318        mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
4319    ) -> Result<(), fidl::Error> {
4320        self.control_handle.inner.send::<fidl::encoding::ResultType<
4321            TelemetryQueryTelemetrySupportResponse,
4322            i32,
4323        >>(
4324            result.map(|resp| (resp,)),
4325            self.tx_id,
4326            0x69443ad35b204686,
4327            fidl::encoding::DynamicFlags::empty(),
4328        )
4329    }
4330}
4331
4332#[must_use = "FIDL methods require a response to be sent"]
4333#[derive(Debug)]
4334pub struct TelemetryGetIfaceStatsResponder {
4335    control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
4336    tx_id: u32,
4337}
4338
4339/// Set the the channel to be shutdown (see [`TelemetryControlHandle::shutdown`])
4340/// if the responder is dropped without sending a response, so that the client
4341/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4342impl std::ops::Drop for TelemetryGetIfaceStatsResponder {
4343    fn drop(&mut self) {
4344        self.control_handle.shutdown();
4345        // Safety: drops once, never accessed again
4346        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4347    }
4348}
4349
4350impl fidl::endpoints::Responder for TelemetryGetIfaceStatsResponder {
4351    type ControlHandle = TelemetryControlHandle;
4352
4353    fn control_handle(&self) -> &TelemetryControlHandle {
4354        &self.control_handle
4355    }
4356
4357    fn drop_without_shutdown(mut self) {
4358        // Safety: drops once, never accessed again due to mem::forget
4359        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4360        // Prevent Drop from running (which would shut down the channel)
4361        std::mem::forget(self);
4362    }
4363}
4364
4365impl TelemetryGetIfaceStatsResponder {
4366    /// Sends a response to the FIDL transaction.
4367    ///
4368    /// Sets the channel to shutdown if an error occurs.
4369    pub fn send(
4370        self,
4371        mut result: Result<&fidl_fuchsia_wlan_stats::IfaceStats, i32>,
4372    ) -> Result<(), fidl::Error> {
4373        let _result = self.send_raw(result);
4374        if _result.is_err() {
4375            self.control_handle.shutdown();
4376        }
4377        self.drop_without_shutdown();
4378        _result
4379    }
4380
4381    /// Similar to "send" but does not shutdown the channel if an error occurs.
4382    pub fn send_no_shutdown_on_err(
4383        self,
4384        mut result: Result<&fidl_fuchsia_wlan_stats::IfaceStats, i32>,
4385    ) -> Result<(), fidl::Error> {
4386        let _result = self.send_raw(result);
4387        self.drop_without_shutdown();
4388        _result
4389    }
4390
4391    fn send_raw(
4392        &self,
4393        mut result: Result<&fidl_fuchsia_wlan_stats::IfaceStats, i32>,
4394    ) -> Result<(), fidl::Error> {
4395        self.control_handle
4396            .inner
4397            .send::<fidl::encoding::ResultType<TelemetryGetIfaceStatsResponse, i32>>(
4398                result.map(|stats| (stats,)),
4399                self.tx_id,
4400                0x6af057f3a017f572,
4401                fidl::encoding::DynamicFlags::empty(),
4402            )
4403    }
4404}
4405
4406#[must_use = "FIDL methods require a response to be sent"]
4407#[derive(Debug)]
4408pub struct TelemetryGetHistogramStatsResponder {
4409    control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
4410    tx_id: u32,
4411}
4412
4413/// Set the the channel to be shutdown (see [`TelemetryControlHandle::shutdown`])
4414/// if the responder is dropped without sending a response, so that the client
4415/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4416impl std::ops::Drop for TelemetryGetHistogramStatsResponder {
4417    fn drop(&mut self) {
4418        self.control_handle.shutdown();
4419        // Safety: drops once, never accessed again
4420        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4421    }
4422}
4423
4424impl fidl::endpoints::Responder for TelemetryGetHistogramStatsResponder {
4425    type ControlHandle = TelemetryControlHandle;
4426
4427    fn control_handle(&self) -> &TelemetryControlHandle {
4428        &self.control_handle
4429    }
4430
4431    fn drop_without_shutdown(mut self) {
4432        // Safety: drops once, never accessed again due to mem::forget
4433        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4434        // Prevent Drop from running (which would shut down the channel)
4435        std::mem::forget(self);
4436    }
4437}
4438
4439impl TelemetryGetHistogramStatsResponder {
4440    /// Sends a response to the FIDL transaction.
4441    ///
4442    /// Sets the channel to shutdown if an error occurs.
4443    pub fn send(
4444        self,
4445        mut result: Result<&fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>,
4446    ) -> Result<(), fidl::Error> {
4447        let _result = self.send_raw(result);
4448        if _result.is_err() {
4449            self.control_handle.shutdown();
4450        }
4451        self.drop_without_shutdown();
4452        _result
4453    }
4454
4455    /// Similar to "send" but does not shutdown the channel if an error occurs.
4456    pub fn send_no_shutdown_on_err(
4457        self,
4458        mut result: Result<&fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>,
4459    ) -> Result<(), fidl::Error> {
4460        let _result = self.send_raw(result);
4461        self.drop_without_shutdown();
4462        _result
4463    }
4464
4465    fn send_raw(
4466        &self,
4467        mut result: Result<&fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>,
4468    ) -> Result<(), fidl::Error> {
4469        self.control_handle
4470            .inner
4471            .send::<fidl::encoding::ResultType<TelemetryGetHistogramStatsResponse, i32>>(
4472                result.map(|stats| (stats,)),
4473                self.tx_id,
4474                0x46d2b6a23f764564,
4475                fidl::encoding::DynamicFlags::empty(),
4476            )
4477    }
4478}
4479
4480#[must_use = "FIDL methods require a response to be sent"]
4481#[derive(Debug)]
4482pub struct TelemetryGetSignalReportResponder {
4483    control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
4484    tx_id: u32,
4485}
4486
4487/// Set the the channel to be shutdown (see [`TelemetryControlHandle::shutdown`])
4488/// if the responder is dropped without sending a response, so that the client
4489/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4490impl std::ops::Drop for TelemetryGetSignalReportResponder {
4491    fn drop(&mut self) {
4492        self.control_handle.shutdown();
4493        // Safety: drops once, never accessed again
4494        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4495    }
4496}
4497
4498impl fidl::endpoints::Responder for TelemetryGetSignalReportResponder {
4499    type ControlHandle = TelemetryControlHandle;
4500
4501    fn control_handle(&self) -> &TelemetryControlHandle {
4502        &self.control_handle
4503    }
4504
4505    fn drop_without_shutdown(mut self) {
4506        // Safety: drops once, never accessed again due to mem::forget
4507        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4508        // Prevent Drop from running (which would shut down the channel)
4509        std::mem::forget(self);
4510    }
4511}
4512
4513impl TelemetryGetSignalReportResponder {
4514    /// Sends a response to the FIDL transaction.
4515    ///
4516    /// Sets the channel to shutdown if an error occurs.
4517    pub fn send(
4518        self,
4519        mut result: Result<&fidl_fuchsia_wlan_stats::SignalReport, i32>,
4520    ) -> Result<(), fidl::Error> {
4521        let _result = self.send_raw(result);
4522        if _result.is_err() {
4523            self.control_handle.shutdown();
4524        }
4525        self.drop_without_shutdown();
4526        _result
4527    }
4528
4529    /// Similar to "send" but does not shutdown the channel if an error occurs.
4530    pub fn send_no_shutdown_on_err(
4531        self,
4532        mut result: Result<&fidl_fuchsia_wlan_stats::SignalReport, i32>,
4533    ) -> Result<(), fidl::Error> {
4534        let _result = self.send_raw(result);
4535        self.drop_without_shutdown();
4536        _result
4537    }
4538
4539    fn send_raw(
4540        &self,
4541        mut result: Result<&fidl_fuchsia_wlan_stats::SignalReport, i32>,
4542    ) -> Result<(), fidl::Error> {
4543        self.control_handle
4544            .inner
4545            .send::<fidl::encoding::ResultType<TelemetryGetSignalReportResponse, i32>>(
4546                result.map(|stats| (stats,)),
4547                self.tx_id,
4548                0x24133aeac3225e28,
4549                fidl::encoding::DynamicFlags::empty(),
4550            )
4551    }
4552}
4553
4554#[must_use = "FIDL methods require a response to be sent"]
4555#[derive(Debug)]
4556pub struct TelemetryCloneInspectVmoResponder {
4557    control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
4558    tx_id: u32,
4559}
4560
4561/// Set the the channel to be shutdown (see [`TelemetryControlHandle::shutdown`])
4562/// if the responder is dropped without sending a response, so that the client
4563/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4564impl std::ops::Drop for TelemetryCloneInspectVmoResponder {
4565    fn drop(&mut self) {
4566        self.control_handle.shutdown();
4567        // Safety: drops once, never accessed again
4568        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4569    }
4570}
4571
4572impl fidl::endpoints::Responder for TelemetryCloneInspectVmoResponder {
4573    type ControlHandle = TelemetryControlHandle;
4574
4575    fn control_handle(&self) -> &TelemetryControlHandle {
4576        &self.control_handle
4577    }
4578
4579    fn drop_without_shutdown(mut self) {
4580        // Safety: drops once, never accessed again due to mem::forget
4581        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4582        // Prevent Drop from running (which would shut down the channel)
4583        std::mem::forget(self);
4584    }
4585}
4586
4587impl TelemetryCloneInspectVmoResponder {
4588    /// Sends a response to the FIDL transaction.
4589    ///
4590    /// Sets the channel to shutdown if an error occurs.
4591    pub fn send(self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
4592        let _result = self.send_raw(result);
4593        if _result.is_err() {
4594            self.control_handle.shutdown();
4595        }
4596        self.drop_without_shutdown();
4597        _result
4598    }
4599
4600    /// Similar to "send" but does not shutdown the channel if an error occurs.
4601    pub fn send_no_shutdown_on_err(
4602        self,
4603        mut result: Result<fidl::Vmo, i32>,
4604    ) -> Result<(), fidl::Error> {
4605        let _result = self.send_raw(result);
4606        self.drop_without_shutdown();
4607        _result
4608    }
4609
4610    fn send_raw(&self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
4611        self.control_handle
4612            .inner
4613            .send::<fidl::encoding::ResultType<TelemetryCloneInspectVmoResponse, i32>>(
4614                result.map(|inspect_vmo| (inspect_vmo,)),
4615                self.tx_id,
4616                0x47153917e84c5a21,
4617                fidl::encoding::DynamicFlags::empty(),
4618            )
4619    }
4620}
4621
4622#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4623pub struct UsmeBootstrapMarker;
4624
4625impl fidl::endpoints::ProtocolMarker for UsmeBootstrapMarker {
4626    type Proxy = UsmeBootstrapProxy;
4627    type RequestStream = UsmeBootstrapRequestStream;
4628    #[cfg(target_os = "fuchsia")]
4629    type SynchronousProxy = UsmeBootstrapSynchronousProxy;
4630
4631    const DEBUG_NAME: &'static str = "(anonymous) UsmeBootstrap";
4632}
4633
4634pub trait UsmeBootstrapProxyInterface: Send + Sync {
4635    type StartResponseFut: std::future::Future<Output = Result<fidl::Vmo, fidl::Error>> + Send;
4636    fn r#start(
4637        &self,
4638        generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
4639        legacy_privacy_support: &LegacyPrivacySupport,
4640    ) -> Self::StartResponseFut;
4641}
4642#[derive(Debug)]
4643#[cfg(target_os = "fuchsia")]
4644pub struct UsmeBootstrapSynchronousProxy {
4645    client: fidl::client::sync::Client,
4646}
4647
4648#[cfg(target_os = "fuchsia")]
4649impl fidl::endpoints::SynchronousProxy for UsmeBootstrapSynchronousProxy {
4650    type Proxy = UsmeBootstrapProxy;
4651    type Protocol = UsmeBootstrapMarker;
4652
4653    fn from_channel(inner: fidl::Channel) -> Self {
4654        Self::new(inner)
4655    }
4656
4657    fn into_channel(self) -> fidl::Channel {
4658        self.client.into_channel()
4659    }
4660
4661    fn as_channel(&self) -> &fidl::Channel {
4662        self.client.as_channel()
4663    }
4664}
4665
4666#[cfg(target_os = "fuchsia")]
4667impl UsmeBootstrapSynchronousProxy {
4668    pub fn new(channel: fidl::Channel) -> Self {
4669        let protocol_name = <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4670        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
4671    }
4672
4673    pub fn into_channel(self) -> fidl::Channel {
4674        self.client.into_channel()
4675    }
4676
4677    /// Waits until an event arrives and returns it. It is safe for other
4678    /// threads to make concurrent requests while waiting for an event.
4679    pub fn wait_for_event(
4680        &self,
4681        deadline: zx::MonotonicInstant,
4682    ) -> Result<UsmeBootstrapEvent, fidl::Error> {
4683        UsmeBootstrapEvent::decode(self.client.wait_for_event(deadline)?)
4684    }
4685
4686    pub fn r#start(
4687        &self,
4688        mut generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
4689        mut legacy_privacy_support: &LegacyPrivacySupport,
4690        ___deadline: zx::MonotonicInstant,
4691    ) -> Result<fidl::Vmo, fidl::Error> {
4692        let _response =
4693            self.client.send_query::<UsmeBootstrapStartRequest, UsmeBootstrapStartResponse>(
4694                (generic_sme_server, legacy_privacy_support),
4695                0x58850dfb76c29a0e,
4696                fidl::encoding::DynamicFlags::empty(),
4697                ___deadline,
4698            )?;
4699        Ok(_response.inspect_vmo)
4700    }
4701}
4702
4703#[cfg(target_os = "fuchsia")]
4704impl From<UsmeBootstrapSynchronousProxy> for zx::NullableHandle {
4705    fn from(value: UsmeBootstrapSynchronousProxy) -> Self {
4706        value.into_channel().into()
4707    }
4708}
4709
4710#[cfg(target_os = "fuchsia")]
4711impl From<fidl::Channel> for UsmeBootstrapSynchronousProxy {
4712    fn from(value: fidl::Channel) -> Self {
4713        Self::new(value)
4714    }
4715}
4716
4717#[cfg(target_os = "fuchsia")]
4718impl fidl::endpoints::FromClient for UsmeBootstrapSynchronousProxy {
4719    type Protocol = UsmeBootstrapMarker;
4720
4721    fn from_client(value: fidl::endpoints::ClientEnd<UsmeBootstrapMarker>) -> Self {
4722        Self::new(value.into_channel())
4723    }
4724}
4725
4726#[derive(Debug, Clone)]
4727pub struct UsmeBootstrapProxy {
4728    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4729}
4730
4731impl fidl::endpoints::Proxy for UsmeBootstrapProxy {
4732    type Protocol = UsmeBootstrapMarker;
4733
4734    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4735        Self::new(inner)
4736    }
4737
4738    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4739        self.client.into_channel().map_err(|client| Self { client })
4740    }
4741
4742    fn as_channel(&self) -> &::fidl::AsyncChannel {
4743        self.client.as_channel()
4744    }
4745}
4746
4747impl UsmeBootstrapProxy {
4748    /// Create a new Proxy for fuchsia.wlan.sme/UsmeBootstrap.
4749    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4750        let protocol_name = <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4751        Self { client: fidl::client::Client::new(channel, protocol_name) }
4752    }
4753
4754    /// Get a Stream of events from the remote end of the protocol.
4755    ///
4756    /// # Panics
4757    ///
4758    /// Panics if the event stream was already taken.
4759    pub fn take_event_stream(&self) -> UsmeBootstrapEventStream {
4760        UsmeBootstrapEventStream { event_receiver: self.client.take_event_receiver() }
4761    }
4762
4763    pub fn r#start(
4764        &self,
4765        mut generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
4766        mut legacy_privacy_support: &LegacyPrivacySupport,
4767    ) -> fidl::client::QueryResponseFut<fidl::Vmo, fidl::encoding::DefaultFuchsiaResourceDialect>
4768    {
4769        UsmeBootstrapProxyInterface::r#start(self, generic_sme_server, legacy_privacy_support)
4770    }
4771}
4772
4773impl UsmeBootstrapProxyInterface for UsmeBootstrapProxy {
4774    type StartResponseFut =
4775        fidl::client::QueryResponseFut<fidl::Vmo, fidl::encoding::DefaultFuchsiaResourceDialect>;
4776    fn r#start(
4777        &self,
4778        mut generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
4779        mut legacy_privacy_support: &LegacyPrivacySupport,
4780    ) -> Self::StartResponseFut {
4781        fn _decode(
4782            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4783        ) -> Result<fidl::Vmo, fidl::Error> {
4784            let _response = fidl::client::decode_transaction_body::<
4785                UsmeBootstrapStartResponse,
4786                fidl::encoding::DefaultFuchsiaResourceDialect,
4787                0x58850dfb76c29a0e,
4788            >(_buf?)?;
4789            Ok(_response.inspect_vmo)
4790        }
4791        self.client.send_query_and_decode::<UsmeBootstrapStartRequest, fidl::Vmo>(
4792            (generic_sme_server, legacy_privacy_support),
4793            0x58850dfb76c29a0e,
4794            fidl::encoding::DynamicFlags::empty(),
4795            _decode,
4796        )
4797    }
4798}
4799
4800pub struct UsmeBootstrapEventStream {
4801    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4802}
4803
4804impl std::marker::Unpin for UsmeBootstrapEventStream {}
4805
4806impl futures::stream::FusedStream for UsmeBootstrapEventStream {
4807    fn is_terminated(&self) -> bool {
4808        self.event_receiver.is_terminated()
4809    }
4810}
4811
4812impl futures::Stream for UsmeBootstrapEventStream {
4813    type Item = Result<UsmeBootstrapEvent, fidl::Error>;
4814
4815    fn poll_next(
4816        mut self: std::pin::Pin<&mut Self>,
4817        cx: &mut std::task::Context<'_>,
4818    ) -> std::task::Poll<Option<Self::Item>> {
4819        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4820            &mut self.event_receiver,
4821            cx
4822        )?) {
4823            Some(buf) => std::task::Poll::Ready(Some(UsmeBootstrapEvent::decode(buf))),
4824            None => std::task::Poll::Ready(None),
4825        }
4826    }
4827}
4828
4829#[derive(Debug)]
4830pub enum UsmeBootstrapEvent {}
4831
4832impl UsmeBootstrapEvent {
4833    /// Decodes a message buffer as a [`UsmeBootstrapEvent`].
4834    fn decode(
4835        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4836    ) -> Result<UsmeBootstrapEvent, fidl::Error> {
4837        let (bytes, _handles) = buf.split_mut();
4838        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4839        debug_assert_eq!(tx_header.tx_id, 0);
4840        match tx_header.ordinal {
4841            _ => Err(fidl::Error::UnknownOrdinal {
4842                ordinal: tx_header.ordinal,
4843                protocol_name: <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4844            }),
4845        }
4846    }
4847}
4848
4849/// A Stream of incoming requests for fuchsia.wlan.sme/UsmeBootstrap.
4850pub struct UsmeBootstrapRequestStream {
4851    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4852    is_terminated: bool,
4853}
4854
4855impl std::marker::Unpin for UsmeBootstrapRequestStream {}
4856
4857impl futures::stream::FusedStream for UsmeBootstrapRequestStream {
4858    fn is_terminated(&self) -> bool {
4859        self.is_terminated
4860    }
4861}
4862
4863impl fidl::endpoints::RequestStream for UsmeBootstrapRequestStream {
4864    type Protocol = UsmeBootstrapMarker;
4865    type ControlHandle = UsmeBootstrapControlHandle;
4866
4867    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4868        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4869    }
4870
4871    fn control_handle(&self) -> Self::ControlHandle {
4872        UsmeBootstrapControlHandle { inner: self.inner.clone() }
4873    }
4874
4875    fn into_inner(
4876        self,
4877    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4878    {
4879        (self.inner, self.is_terminated)
4880    }
4881
4882    fn from_inner(
4883        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4884        is_terminated: bool,
4885    ) -> Self {
4886        Self { inner, is_terminated }
4887    }
4888}
4889
4890impl futures::Stream for UsmeBootstrapRequestStream {
4891    type Item = Result<UsmeBootstrapRequest, fidl::Error>;
4892
4893    fn poll_next(
4894        mut self: std::pin::Pin<&mut Self>,
4895        cx: &mut std::task::Context<'_>,
4896    ) -> std::task::Poll<Option<Self::Item>> {
4897        let this = &mut *self;
4898        if this.inner.check_shutdown(cx) {
4899            this.is_terminated = true;
4900            return std::task::Poll::Ready(None);
4901        }
4902        if this.is_terminated {
4903            panic!("polled UsmeBootstrapRequestStream after completion");
4904        }
4905        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4906            |bytes, handles| {
4907                match this.inner.channel().read_etc(cx, bytes, handles) {
4908                    std::task::Poll::Ready(Ok(())) => {}
4909                    std::task::Poll::Pending => return std::task::Poll::Pending,
4910                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4911                        this.is_terminated = true;
4912                        return std::task::Poll::Ready(None);
4913                    }
4914                    std::task::Poll::Ready(Err(e)) => {
4915                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4916                            e.into(),
4917                        ))));
4918                    }
4919                }
4920
4921                // A message has been received from the channel
4922                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4923
4924                std::task::Poll::Ready(Some(match header.ordinal {
4925                    0x58850dfb76c29a0e => {
4926                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4927                        let mut req = fidl::new_empty!(
4928                            UsmeBootstrapStartRequest,
4929                            fidl::encoding::DefaultFuchsiaResourceDialect
4930                        );
4931                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<UsmeBootstrapStartRequest>(&header, _body_bytes, handles, &mut req)?;
4932                        let control_handle =
4933                            UsmeBootstrapControlHandle { inner: this.inner.clone() };
4934                        Ok(UsmeBootstrapRequest::Start {
4935                            generic_sme_server: req.generic_sme_server,
4936                            legacy_privacy_support: req.legacy_privacy_support,
4937
4938                            responder: UsmeBootstrapStartResponder {
4939                                control_handle: std::mem::ManuallyDrop::new(control_handle),
4940                                tx_id: header.tx_id,
4941                            },
4942                        })
4943                    }
4944                    _ => Err(fidl::Error::UnknownOrdinal {
4945                        ordinal: header.ordinal,
4946                        protocol_name:
4947                            <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4948                    }),
4949                }))
4950            },
4951        )
4952    }
4953}
4954
4955#[derive(Debug)]
4956pub enum UsmeBootstrapRequest {
4957    Start {
4958        generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
4959        legacy_privacy_support: LegacyPrivacySupport,
4960        responder: UsmeBootstrapStartResponder,
4961    },
4962}
4963
4964impl UsmeBootstrapRequest {
4965    #[allow(irrefutable_let_patterns)]
4966    pub fn into_start(
4967        self,
4968    ) -> Option<(
4969        fidl::endpoints::ServerEnd<GenericSmeMarker>,
4970        LegacyPrivacySupport,
4971        UsmeBootstrapStartResponder,
4972    )> {
4973        if let UsmeBootstrapRequest::Start {
4974            generic_sme_server,
4975            legacy_privacy_support,
4976            responder,
4977        } = self
4978        {
4979            Some((generic_sme_server, legacy_privacy_support, responder))
4980        } else {
4981            None
4982        }
4983    }
4984
4985    /// Name of the method defined in FIDL
4986    pub fn method_name(&self) -> &'static str {
4987        match *self {
4988            UsmeBootstrapRequest::Start { .. } => "start",
4989        }
4990    }
4991}
4992
4993#[derive(Debug, Clone)]
4994pub struct UsmeBootstrapControlHandle {
4995    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4996}
4997
4998impl fidl::endpoints::ControlHandle for UsmeBootstrapControlHandle {
4999    fn shutdown(&self) {
5000        self.inner.shutdown()
5001    }
5002    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5003        self.inner.shutdown_with_epitaph(status)
5004    }
5005
5006    fn is_closed(&self) -> bool {
5007        self.inner.channel().is_closed()
5008    }
5009    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5010        self.inner.channel().on_closed()
5011    }
5012
5013    #[cfg(target_os = "fuchsia")]
5014    fn signal_peer(
5015        &self,
5016        clear_mask: zx::Signals,
5017        set_mask: zx::Signals,
5018    ) -> Result<(), zx_status::Status> {
5019        use fidl::Peered;
5020        self.inner.channel().signal_peer(clear_mask, set_mask)
5021    }
5022}
5023
5024impl UsmeBootstrapControlHandle {}
5025
5026#[must_use = "FIDL methods require a response to be sent"]
5027#[derive(Debug)]
5028pub struct UsmeBootstrapStartResponder {
5029    control_handle: std::mem::ManuallyDrop<UsmeBootstrapControlHandle>,
5030    tx_id: u32,
5031}
5032
5033/// Set the the channel to be shutdown (see [`UsmeBootstrapControlHandle::shutdown`])
5034/// if the responder is dropped without sending a response, so that the client
5035/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5036impl std::ops::Drop for UsmeBootstrapStartResponder {
5037    fn drop(&mut self) {
5038        self.control_handle.shutdown();
5039        // Safety: drops once, never accessed again
5040        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5041    }
5042}
5043
5044impl fidl::endpoints::Responder for UsmeBootstrapStartResponder {
5045    type ControlHandle = UsmeBootstrapControlHandle;
5046
5047    fn control_handle(&self) -> &UsmeBootstrapControlHandle {
5048        &self.control_handle
5049    }
5050
5051    fn drop_without_shutdown(mut self) {
5052        // Safety: drops once, never accessed again due to mem::forget
5053        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5054        // Prevent Drop from running (which would shut down the channel)
5055        std::mem::forget(self);
5056    }
5057}
5058
5059impl UsmeBootstrapStartResponder {
5060    /// Sends a response to the FIDL transaction.
5061    ///
5062    /// Sets the channel to shutdown if an error occurs.
5063    pub fn send(self, mut inspect_vmo: fidl::Vmo) -> Result<(), fidl::Error> {
5064        let _result = self.send_raw(inspect_vmo);
5065        if _result.is_err() {
5066            self.control_handle.shutdown();
5067        }
5068        self.drop_without_shutdown();
5069        _result
5070    }
5071
5072    /// Similar to "send" but does not shutdown the channel if an error occurs.
5073    pub fn send_no_shutdown_on_err(self, mut inspect_vmo: fidl::Vmo) -> Result<(), fidl::Error> {
5074        let _result = self.send_raw(inspect_vmo);
5075        self.drop_without_shutdown();
5076        _result
5077    }
5078
5079    fn send_raw(&self, mut inspect_vmo: fidl::Vmo) -> Result<(), fidl::Error> {
5080        self.control_handle.inner.send::<UsmeBootstrapStartResponse>(
5081            (inspect_vmo,),
5082            self.tx_id,
5083            0x58850dfb76c29a0e,
5084            fidl::encoding::DynamicFlags::empty(),
5085        )
5086    }
5087}
5088
5089mod internal {
5090    use super::*;
5091
5092    impl fidl::encoding::ResourceTypeMarker for ClientSmeConnectRequest {
5093        type Borrowed<'a> = &'a mut Self;
5094        fn take_or_borrow<'a>(
5095            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5096        ) -> Self::Borrowed<'a> {
5097            value
5098        }
5099    }
5100
5101    unsafe impl fidl::encoding::TypeMarker for ClientSmeConnectRequest {
5102        type Owned = Self;
5103
5104        #[inline(always)]
5105        fn inline_align(_context: fidl::encoding::Context) -> usize {
5106            8
5107        }
5108
5109        #[inline(always)]
5110        fn inline_size(_context: fidl::encoding::Context) -> usize {
5111            112
5112        }
5113    }
5114
5115    unsafe impl
5116        fidl::encoding::Encode<
5117            ClientSmeConnectRequest,
5118            fidl::encoding::DefaultFuchsiaResourceDialect,
5119        > for &mut ClientSmeConnectRequest
5120    {
5121        #[inline]
5122        unsafe fn encode(
5123            self,
5124            encoder: &mut fidl::encoding::Encoder<
5125                '_,
5126                fidl::encoding::DefaultFuchsiaResourceDialect,
5127            >,
5128            offset: usize,
5129            _depth: fidl::encoding::Depth,
5130        ) -> fidl::Result<()> {
5131            encoder.debug_check_bounds::<ClientSmeConnectRequest>(offset);
5132            // Delegate to tuple encoding.
5133            fidl::encoding::Encode::<
5134                ClientSmeConnectRequest,
5135                fidl::encoding::DefaultFuchsiaResourceDialect,
5136            >::encode(
5137                (
5138                    <ConnectRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),
5139                    <fidl::encoding::Optional<
5140                        fidl::encoding::Endpoint<
5141                            fidl::endpoints::ServerEnd<ConnectTransactionMarker>,
5142                        >,
5143                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5144                        &mut self.txn
5145                    ),
5146                ),
5147                encoder,
5148                offset,
5149                _depth,
5150            )
5151        }
5152    }
5153    unsafe impl<
5154        T0: fidl::encoding::Encode<ConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>,
5155        T1: fidl::encoding::Encode<
5156                fidl::encoding::Optional<
5157                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
5158                >,
5159                fidl::encoding::DefaultFuchsiaResourceDialect,
5160            >,
5161    >
5162        fidl::encoding::Encode<
5163            ClientSmeConnectRequest,
5164            fidl::encoding::DefaultFuchsiaResourceDialect,
5165        > for (T0, T1)
5166    {
5167        #[inline]
5168        unsafe fn encode(
5169            self,
5170            encoder: &mut fidl::encoding::Encoder<
5171                '_,
5172                fidl::encoding::DefaultFuchsiaResourceDialect,
5173            >,
5174            offset: usize,
5175            depth: fidl::encoding::Depth,
5176        ) -> fidl::Result<()> {
5177            encoder.debug_check_bounds::<ClientSmeConnectRequest>(offset);
5178            // Zero out padding regions. There's no need to apply masks
5179            // because the unmasked parts will be overwritten by fields.
5180            unsafe {
5181                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(104);
5182                (ptr as *mut u64).write_unaligned(0);
5183            }
5184            // Write the fields.
5185            self.0.encode(encoder, offset + 0, depth)?;
5186            self.1.encode(encoder, offset + 104, depth)?;
5187            Ok(())
5188        }
5189    }
5190
5191    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5192        for ClientSmeConnectRequest
5193    {
5194        #[inline(always)]
5195        fn new_empty() -> Self {
5196            Self {
5197                req: fidl::new_empty!(
5198                    ConnectRequest,
5199                    fidl::encoding::DefaultFuchsiaResourceDialect
5200                ),
5201                txn: fidl::new_empty!(
5202                    fidl::encoding::Optional<
5203                        fidl::encoding::Endpoint<
5204                            fidl::endpoints::ServerEnd<ConnectTransactionMarker>,
5205                        >,
5206                    >,
5207                    fidl::encoding::DefaultFuchsiaResourceDialect
5208                ),
5209            }
5210        }
5211
5212        #[inline]
5213        unsafe fn decode(
5214            &mut self,
5215            decoder: &mut fidl::encoding::Decoder<
5216                '_,
5217                fidl::encoding::DefaultFuchsiaResourceDialect,
5218            >,
5219            offset: usize,
5220            _depth: fidl::encoding::Depth,
5221        ) -> fidl::Result<()> {
5222            decoder.debug_check_bounds::<Self>(offset);
5223            // Verify that padding bytes are zero.
5224            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(104) };
5225            let padval = unsafe { (ptr as *const u64).read_unaligned() };
5226            let mask = 0xffffffff00000000u64;
5227            let maskedval = padval & mask;
5228            if maskedval != 0 {
5229                return Err(fidl::Error::NonZeroPadding {
5230                    padding_start: offset + 104 + ((mask as u64).trailing_zeros() / 8) as usize,
5231                });
5232            }
5233            fidl::decode!(
5234                ConnectRequest,
5235                fidl::encoding::DefaultFuchsiaResourceDialect,
5236                &mut self.req,
5237                decoder,
5238                offset + 0,
5239                _depth
5240            )?;
5241            fidl::decode!(
5242                fidl::encoding::Optional<
5243                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
5244                >,
5245                fidl::encoding::DefaultFuchsiaResourceDialect,
5246                &mut self.txn,
5247                decoder,
5248                offset + 104,
5249                _depth
5250            )?;
5251            Ok(())
5252        }
5253    }
5254
5255    impl fidl::encoding::ResourceTypeMarker for ClientSmeScanForControllerRequest {
5256        type Borrowed<'a> = &'a mut Self;
5257        fn take_or_borrow<'a>(
5258            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5259        ) -> Self::Borrowed<'a> {
5260            value
5261        }
5262    }
5263
5264    unsafe impl fidl::encoding::TypeMarker for ClientSmeScanForControllerRequest {
5265        type Owned = Self;
5266
5267        #[inline(always)]
5268        fn inline_align(_context: fidl::encoding::Context) -> usize {
5269            8
5270        }
5271
5272        #[inline(always)]
5273        fn inline_size(_context: fidl::encoding::Context) -> usize {
5274            16
5275        }
5276    }
5277
5278    unsafe impl
5279        fidl::encoding::Encode<
5280            ClientSmeScanForControllerRequest,
5281            fidl::encoding::DefaultFuchsiaResourceDialect,
5282        > for &mut ClientSmeScanForControllerRequest
5283    {
5284        #[inline]
5285        unsafe fn encode(
5286            self,
5287            encoder: &mut fidl::encoding::Encoder<
5288                '_,
5289                fidl::encoding::DefaultFuchsiaResourceDialect,
5290            >,
5291            offset: usize,
5292            _depth: fidl::encoding::Depth,
5293        ) -> fidl::Result<()> {
5294            encoder.debug_check_bounds::<ClientSmeScanForControllerRequest>(offset);
5295            // Delegate to tuple encoding.
5296            fidl::encoding::Encode::<
5297                ClientSmeScanForControllerRequest,
5298                fidl::encoding::DefaultFuchsiaResourceDialect,
5299            >::encode(
5300                (<ScanRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
5301                encoder,
5302                offset,
5303                _depth,
5304            )
5305        }
5306    }
5307    unsafe impl<
5308        T0: fidl::encoding::Encode<ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>,
5309    >
5310        fidl::encoding::Encode<
5311            ClientSmeScanForControllerRequest,
5312            fidl::encoding::DefaultFuchsiaResourceDialect,
5313        > for (T0,)
5314    {
5315        #[inline]
5316        unsafe fn encode(
5317            self,
5318            encoder: &mut fidl::encoding::Encoder<
5319                '_,
5320                fidl::encoding::DefaultFuchsiaResourceDialect,
5321            >,
5322            offset: usize,
5323            depth: fidl::encoding::Depth,
5324        ) -> fidl::Result<()> {
5325            encoder.debug_check_bounds::<ClientSmeScanForControllerRequest>(offset);
5326            // Zero out padding regions. There's no need to apply masks
5327            // because the unmasked parts will be overwritten by fields.
5328            // Write the fields.
5329            self.0.encode(encoder, offset + 0, depth)?;
5330            Ok(())
5331        }
5332    }
5333
5334    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5335        for ClientSmeScanForControllerRequest
5336    {
5337        #[inline(always)]
5338        fn new_empty() -> Self {
5339            Self {
5340                req: fidl::new_empty!(ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect),
5341            }
5342        }
5343
5344        #[inline]
5345        unsafe fn decode(
5346            &mut self,
5347            decoder: &mut fidl::encoding::Decoder<
5348                '_,
5349                fidl::encoding::DefaultFuchsiaResourceDialect,
5350            >,
5351            offset: usize,
5352            _depth: fidl::encoding::Depth,
5353        ) -> fidl::Result<()> {
5354            decoder.debug_check_bounds::<Self>(offset);
5355            // Verify that padding bytes are zero.
5356            fidl::decode!(
5357                ScanRequest,
5358                fidl::encoding::DefaultFuchsiaResourceDialect,
5359                &mut self.req,
5360                decoder,
5361                offset + 0,
5362                _depth
5363            )?;
5364            Ok(())
5365        }
5366    }
5367
5368    impl fidl::encoding::ResourceTypeMarker for ClientSmeScanRequest {
5369        type Borrowed<'a> = &'a mut Self;
5370        fn take_or_borrow<'a>(
5371            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5372        ) -> Self::Borrowed<'a> {
5373            value
5374        }
5375    }
5376
5377    unsafe impl fidl::encoding::TypeMarker for ClientSmeScanRequest {
5378        type Owned = Self;
5379
5380        #[inline(always)]
5381        fn inline_align(_context: fidl::encoding::Context) -> usize {
5382            8
5383        }
5384
5385        #[inline(always)]
5386        fn inline_size(_context: fidl::encoding::Context) -> usize {
5387            16
5388        }
5389    }
5390
5391    unsafe impl
5392        fidl::encoding::Encode<ClientSmeScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
5393        for &mut ClientSmeScanRequest
5394    {
5395        #[inline]
5396        unsafe fn encode(
5397            self,
5398            encoder: &mut fidl::encoding::Encoder<
5399                '_,
5400                fidl::encoding::DefaultFuchsiaResourceDialect,
5401            >,
5402            offset: usize,
5403            _depth: fidl::encoding::Depth,
5404        ) -> fidl::Result<()> {
5405            encoder.debug_check_bounds::<ClientSmeScanRequest>(offset);
5406            // Delegate to tuple encoding.
5407            fidl::encoding::Encode::<
5408                ClientSmeScanRequest,
5409                fidl::encoding::DefaultFuchsiaResourceDialect,
5410            >::encode(
5411                (<ScanRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
5412                encoder,
5413                offset,
5414                _depth,
5415            )
5416        }
5417    }
5418    unsafe impl<
5419        T0: fidl::encoding::Encode<ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>,
5420    >
5421        fidl::encoding::Encode<ClientSmeScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
5422        for (T0,)
5423    {
5424        #[inline]
5425        unsafe fn encode(
5426            self,
5427            encoder: &mut fidl::encoding::Encoder<
5428                '_,
5429                fidl::encoding::DefaultFuchsiaResourceDialect,
5430            >,
5431            offset: usize,
5432            depth: fidl::encoding::Depth,
5433        ) -> fidl::Result<()> {
5434            encoder.debug_check_bounds::<ClientSmeScanRequest>(offset);
5435            // Zero out padding regions. There's no need to apply masks
5436            // because the unmasked parts will be overwritten by fields.
5437            // Write the fields.
5438            self.0.encode(encoder, offset + 0, depth)?;
5439            Ok(())
5440        }
5441    }
5442
5443    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5444        for ClientSmeScanRequest
5445    {
5446        #[inline(always)]
5447        fn new_empty() -> Self {
5448            Self {
5449                req: fidl::new_empty!(ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect),
5450            }
5451        }
5452
5453        #[inline]
5454        unsafe fn decode(
5455            &mut self,
5456            decoder: &mut fidl::encoding::Decoder<
5457                '_,
5458                fidl::encoding::DefaultFuchsiaResourceDialect,
5459            >,
5460            offset: usize,
5461            _depth: fidl::encoding::Depth,
5462        ) -> fidl::Result<()> {
5463            decoder.debug_check_bounds::<Self>(offset);
5464            // Verify that padding bytes are zero.
5465            fidl::decode!(
5466                ScanRequest,
5467                fidl::encoding::DefaultFuchsiaResourceDialect,
5468                &mut self.req,
5469                decoder,
5470                offset + 0,
5471                _depth
5472            )?;
5473            Ok(())
5474        }
5475    }
5476
5477    impl fidl::encoding::ResourceTypeMarker for ClientSmeScanForControllerResponse {
5478        type Borrowed<'a> = &'a mut Self;
5479        fn take_or_borrow<'a>(
5480            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5481        ) -> Self::Borrowed<'a> {
5482            value
5483        }
5484    }
5485
5486    unsafe impl fidl::encoding::TypeMarker for ClientSmeScanForControllerResponse {
5487        type Owned = Self;
5488
5489        #[inline(always)]
5490        fn inline_align(_context: fidl::encoding::Context) -> usize {
5491            8
5492        }
5493
5494        #[inline(always)]
5495        fn inline_size(_context: fidl::encoding::Context) -> usize {
5496            16
5497        }
5498    }
5499
5500    unsafe impl
5501        fidl::encoding::Encode<
5502            ClientSmeScanForControllerResponse,
5503            fidl::encoding::DefaultFuchsiaResourceDialect,
5504        > for &mut ClientSmeScanForControllerResponse
5505    {
5506        #[inline]
5507        unsafe fn encode(
5508            self,
5509            encoder: &mut fidl::encoding::Encoder<
5510                '_,
5511                fidl::encoding::DefaultFuchsiaResourceDialect,
5512            >,
5513            offset: usize,
5514            _depth: fidl::encoding::Depth,
5515        ) -> fidl::Result<()> {
5516            encoder.debug_check_bounds::<ClientSmeScanForControllerResponse>(offset);
5517            // Delegate to tuple encoding.
5518            fidl::encoding::Encode::<ClientSmeScanForControllerResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5519                (
5520                    <fidl::encoding::UnboundedVector<ScanResult> as fidl::encoding::ValueTypeMarker>::borrow(&self.scan_results),
5521                ),
5522                encoder, offset, _depth
5523            )
5524        }
5525    }
5526    unsafe impl<
5527        T0: fidl::encoding::Encode<
5528                fidl::encoding::UnboundedVector<ScanResult>,
5529                fidl::encoding::DefaultFuchsiaResourceDialect,
5530            >,
5531    >
5532        fidl::encoding::Encode<
5533            ClientSmeScanForControllerResponse,
5534            fidl::encoding::DefaultFuchsiaResourceDialect,
5535        > for (T0,)
5536    {
5537        #[inline]
5538        unsafe fn encode(
5539            self,
5540            encoder: &mut fidl::encoding::Encoder<
5541                '_,
5542                fidl::encoding::DefaultFuchsiaResourceDialect,
5543            >,
5544            offset: usize,
5545            depth: fidl::encoding::Depth,
5546        ) -> fidl::Result<()> {
5547            encoder.debug_check_bounds::<ClientSmeScanForControllerResponse>(offset);
5548            // Zero out padding regions. There's no need to apply masks
5549            // because the unmasked parts will be overwritten by fields.
5550            // Write the fields.
5551            self.0.encode(encoder, offset + 0, depth)?;
5552            Ok(())
5553        }
5554    }
5555
5556    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5557        for ClientSmeScanForControllerResponse
5558    {
5559        #[inline(always)]
5560        fn new_empty() -> Self {
5561            Self {
5562                scan_results: fidl::new_empty!(
5563                    fidl::encoding::UnboundedVector<ScanResult>,
5564                    fidl::encoding::DefaultFuchsiaResourceDialect
5565                ),
5566            }
5567        }
5568
5569        #[inline]
5570        unsafe fn decode(
5571            &mut self,
5572            decoder: &mut fidl::encoding::Decoder<
5573                '_,
5574                fidl::encoding::DefaultFuchsiaResourceDialect,
5575            >,
5576            offset: usize,
5577            _depth: fidl::encoding::Depth,
5578        ) -> fidl::Result<()> {
5579            decoder.debug_check_bounds::<Self>(offset);
5580            // Verify that padding bytes are zero.
5581            fidl::decode!(
5582                fidl::encoding::UnboundedVector<ScanResult>,
5583                fidl::encoding::DefaultFuchsiaResourceDialect,
5584                &mut self.scan_results,
5585                decoder,
5586                offset + 0,
5587                _depth
5588            )?;
5589            Ok(())
5590        }
5591    }
5592
5593    impl fidl::encoding::ResourceTypeMarker for ClientSmeScanResponse {
5594        type Borrowed<'a> = &'a mut Self;
5595        fn take_or_borrow<'a>(
5596            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5597        ) -> Self::Borrowed<'a> {
5598            value
5599        }
5600    }
5601
5602    unsafe impl fidl::encoding::TypeMarker for ClientSmeScanResponse {
5603        type Owned = Self;
5604
5605        #[inline(always)]
5606        fn inline_align(_context: fidl::encoding::Context) -> usize {
5607            4
5608        }
5609
5610        #[inline(always)]
5611        fn inline_size(_context: fidl::encoding::Context) -> usize {
5612            4
5613        }
5614    }
5615
5616    unsafe impl
5617        fidl::encoding::Encode<ClientSmeScanResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
5618        for &mut ClientSmeScanResponse
5619    {
5620        #[inline]
5621        unsafe fn encode(
5622            self,
5623            encoder: &mut fidl::encoding::Encoder<
5624                '_,
5625                fidl::encoding::DefaultFuchsiaResourceDialect,
5626            >,
5627            offset: usize,
5628            _depth: fidl::encoding::Depth,
5629        ) -> fidl::Result<()> {
5630            encoder.debug_check_bounds::<ClientSmeScanResponse>(offset);
5631            // Delegate to tuple encoding.
5632            fidl::encoding::Encode::<
5633                ClientSmeScanResponse,
5634                fidl::encoding::DefaultFuchsiaResourceDialect,
5635            >::encode(
5636                (<fidl::encoding::HandleType<
5637                    fidl::Vmo,
5638                    { fidl::ObjectType::VMO.into_raw() },
5639                    2147483648,
5640                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5641                    &mut self.scan_results
5642                ),),
5643                encoder,
5644                offset,
5645                _depth,
5646            )
5647        }
5648    }
5649    unsafe impl<
5650        T0: fidl::encoding::Encode<
5651                fidl::encoding::HandleType<
5652                    fidl::Vmo,
5653                    { fidl::ObjectType::VMO.into_raw() },
5654                    2147483648,
5655                >,
5656                fidl::encoding::DefaultFuchsiaResourceDialect,
5657            >,
5658    >
5659        fidl::encoding::Encode<ClientSmeScanResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
5660        for (T0,)
5661    {
5662        #[inline]
5663        unsafe fn encode(
5664            self,
5665            encoder: &mut fidl::encoding::Encoder<
5666                '_,
5667                fidl::encoding::DefaultFuchsiaResourceDialect,
5668            >,
5669            offset: usize,
5670            depth: fidl::encoding::Depth,
5671        ) -> fidl::Result<()> {
5672            encoder.debug_check_bounds::<ClientSmeScanResponse>(offset);
5673            // Zero out padding regions. There's no need to apply masks
5674            // because the unmasked parts will be overwritten by fields.
5675            // Write the fields.
5676            self.0.encode(encoder, offset + 0, depth)?;
5677            Ok(())
5678        }
5679    }
5680
5681    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5682        for ClientSmeScanResponse
5683    {
5684        #[inline(always)]
5685        fn new_empty() -> Self {
5686            Self {
5687                scan_results: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
5688            }
5689        }
5690
5691        #[inline]
5692        unsafe fn decode(
5693            &mut self,
5694            decoder: &mut fidl::encoding::Decoder<
5695                '_,
5696                fidl::encoding::DefaultFuchsiaResourceDialect,
5697            >,
5698            offset: usize,
5699            _depth: fidl::encoding::Depth,
5700        ) -> fidl::Result<()> {
5701            decoder.debug_check_bounds::<Self>(offset);
5702            // Verify that padding bytes are zero.
5703            fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.scan_results, decoder, offset + 0, _depth)?;
5704            Ok(())
5705        }
5706    }
5707
5708    impl fidl::encoding::ResourceTypeMarker for GenericSmeGetApSmeRequest {
5709        type Borrowed<'a> = &'a mut Self;
5710        fn take_or_borrow<'a>(
5711            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5712        ) -> Self::Borrowed<'a> {
5713            value
5714        }
5715    }
5716
5717    unsafe impl fidl::encoding::TypeMarker for GenericSmeGetApSmeRequest {
5718        type Owned = Self;
5719
5720        #[inline(always)]
5721        fn inline_align(_context: fidl::encoding::Context) -> usize {
5722            4
5723        }
5724
5725        #[inline(always)]
5726        fn inline_size(_context: fidl::encoding::Context) -> usize {
5727            4
5728        }
5729    }
5730
5731    unsafe impl
5732        fidl::encoding::Encode<
5733            GenericSmeGetApSmeRequest,
5734            fidl::encoding::DefaultFuchsiaResourceDialect,
5735        > for &mut GenericSmeGetApSmeRequest
5736    {
5737        #[inline]
5738        unsafe fn encode(
5739            self,
5740            encoder: &mut fidl::encoding::Encoder<
5741                '_,
5742                fidl::encoding::DefaultFuchsiaResourceDialect,
5743            >,
5744            offset: usize,
5745            _depth: fidl::encoding::Depth,
5746        ) -> fidl::Result<()> {
5747            encoder.debug_check_bounds::<GenericSmeGetApSmeRequest>(offset);
5748            // Delegate to tuple encoding.
5749            fidl::encoding::Encode::<GenericSmeGetApSmeRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5750                (
5751                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.sme_server),
5752                ),
5753                encoder, offset, _depth
5754            )
5755        }
5756    }
5757    unsafe impl<
5758        T0: fidl::encoding::Encode<
5759                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>>,
5760                fidl::encoding::DefaultFuchsiaResourceDialect,
5761            >,
5762    >
5763        fidl::encoding::Encode<
5764            GenericSmeGetApSmeRequest,
5765            fidl::encoding::DefaultFuchsiaResourceDialect,
5766        > for (T0,)
5767    {
5768        #[inline]
5769        unsafe fn encode(
5770            self,
5771            encoder: &mut fidl::encoding::Encoder<
5772                '_,
5773                fidl::encoding::DefaultFuchsiaResourceDialect,
5774            >,
5775            offset: usize,
5776            depth: fidl::encoding::Depth,
5777        ) -> fidl::Result<()> {
5778            encoder.debug_check_bounds::<GenericSmeGetApSmeRequest>(offset);
5779            // Zero out padding regions. There's no need to apply masks
5780            // because the unmasked parts will be overwritten by fields.
5781            // Write the fields.
5782            self.0.encode(encoder, offset + 0, depth)?;
5783            Ok(())
5784        }
5785    }
5786
5787    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5788        for GenericSmeGetApSmeRequest
5789    {
5790        #[inline(always)]
5791        fn new_empty() -> Self {
5792            Self {
5793                sme_server: fidl::new_empty!(
5794                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>>,
5795                    fidl::encoding::DefaultFuchsiaResourceDialect
5796                ),
5797            }
5798        }
5799
5800        #[inline]
5801        unsafe fn decode(
5802            &mut self,
5803            decoder: &mut fidl::encoding::Decoder<
5804                '_,
5805                fidl::encoding::DefaultFuchsiaResourceDialect,
5806            >,
5807            offset: usize,
5808            _depth: fidl::encoding::Depth,
5809        ) -> fidl::Result<()> {
5810            decoder.debug_check_bounds::<Self>(offset);
5811            // Verify that padding bytes are zero.
5812            fidl::decode!(
5813                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>>,
5814                fidl::encoding::DefaultFuchsiaResourceDialect,
5815                &mut self.sme_server,
5816                decoder,
5817                offset + 0,
5818                _depth
5819            )?;
5820            Ok(())
5821        }
5822    }
5823
5824    impl fidl::encoding::ResourceTypeMarker for GenericSmeGetClientSmeRequest {
5825        type Borrowed<'a> = &'a mut Self;
5826        fn take_or_borrow<'a>(
5827            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5828        ) -> Self::Borrowed<'a> {
5829            value
5830        }
5831    }
5832
5833    unsafe impl fidl::encoding::TypeMarker for GenericSmeGetClientSmeRequest {
5834        type Owned = Self;
5835
5836        #[inline(always)]
5837        fn inline_align(_context: fidl::encoding::Context) -> usize {
5838            4
5839        }
5840
5841        #[inline(always)]
5842        fn inline_size(_context: fidl::encoding::Context) -> usize {
5843            4
5844        }
5845    }
5846
5847    unsafe impl
5848        fidl::encoding::Encode<
5849            GenericSmeGetClientSmeRequest,
5850            fidl::encoding::DefaultFuchsiaResourceDialect,
5851        > for &mut GenericSmeGetClientSmeRequest
5852    {
5853        #[inline]
5854        unsafe fn encode(
5855            self,
5856            encoder: &mut fidl::encoding::Encoder<
5857                '_,
5858                fidl::encoding::DefaultFuchsiaResourceDialect,
5859            >,
5860            offset: usize,
5861            _depth: fidl::encoding::Depth,
5862        ) -> fidl::Result<()> {
5863            encoder.debug_check_bounds::<GenericSmeGetClientSmeRequest>(offset);
5864            // Delegate to tuple encoding.
5865            fidl::encoding::Encode::<GenericSmeGetClientSmeRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5866                (
5867                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.sme_server),
5868                ),
5869                encoder, offset, _depth
5870            )
5871        }
5872    }
5873    unsafe impl<
5874        T0: fidl::encoding::Encode<
5875                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>>,
5876                fidl::encoding::DefaultFuchsiaResourceDialect,
5877            >,
5878    >
5879        fidl::encoding::Encode<
5880            GenericSmeGetClientSmeRequest,
5881            fidl::encoding::DefaultFuchsiaResourceDialect,
5882        > for (T0,)
5883    {
5884        #[inline]
5885        unsafe fn encode(
5886            self,
5887            encoder: &mut fidl::encoding::Encoder<
5888                '_,
5889                fidl::encoding::DefaultFuchsiaResourceDialect,
5890            >,
5891            offset: usize,
5892            depth: fidl::encoding::Depth,
5893        ) -> fidl::Result<()> {
5894            encoder.debug_check_bounds::<GenericSmeGetClientSmeRequest>(offset);
5895            // Zero out padding regions. There's no need to apply masks
5896            // because the unmasked parts will be overwritten by fields.
5897            // Write the fields.
5898            self.0.encode(encoder, offset + 0, depth)?;
5899            Ok(())
5900        }
5901    }
5902
5903    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5904        for GenericSmeGetClientSmeRequest
5905    {
5906        #[inline(always)]
5907        fn new_empty() -> Self {
5908            Self {
5909                sme_server: fidl::new_empty!(
5910                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>>,
5911                    fidl::encoding::DefaultFuchsiaResourceDialect
5912                ),
5913            }
5914        }
5915
5916        #[inline]
5917        unsafe fn decode(
5918            &mut self,
5919            decoder: &mut fidl::encoding::Decoder<
5920                '_,
5921                fidl::encoding::DefaultFuchsiaResourceDialect,
5922            >,
5923            offset: usize,
5924            _depth: fidl::encoding::Depth,
5925        ) -> fidl::Result<()> {
5926            decoder.debug_check_bounds::<Self>(offset);
5927            // Verify that padding bytes are zero.
5928            fidl::decode!(
5929                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>>,
5930                fidl::encoding::DefaultFuchsiaResourceDialect,
5931                &mut self.sme_server,
5932                decoder,
5933                offset + 0,
5934                _depth
5935            )?;
5936            Ok(())
5937        }
5938    }
5939
5940    impl fidl::encoding::ResourceTypeMarker for GenericSmeGetSmeTelemetryRequest {
5941        type Borrowed<'a> = &'a mut Self;
5942        fn take_or_borrow<'a>(
5943            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5944        ) -> Self::Borrowed<'a> {
5945            value
5946        }
5947    }
5948
5949    unsafe impl fidl::encoding::TypeMarker for GenericSmeGetSmeTelemetryRequest {
5950        type Owned = Self;
5951
5952        #[inline(always)]
5953        fn inline_align(_context: fidl::encoding::Context) -> usize {
5954            4
5955        }
5956
5957        #[inline(always)]
5958        fn inline_size(_context: fidl::encoding::Context) -> usize {
5959            4
5960        }
5961    }
5962
5963    unsafe impl
5964        fidl::encoding::Encode<
5965            GenericSmeGetSmeTelemetryRequest,
5966            fidl::encoding::DefaultFuchsiaResourceDialect,
5967        > for &mut GenericSmeGetSmeTelemetryRequest
5968    {
5969        #[inline]
5970        unsafe fn encode(
5971            self,
5972            encoder: &mut fidl::encoding::Encoder<
5973                '_,
5974                fidl::encoding::DefaultFuchsiaResourceDialect,
5975            >,
5976            offset: usize,
5977            _depth: fidl::encoding::Depth,
5978        ) -> fidl::Result<()> {
5979            encoder.debug_check_bounds::<GenericSmeGetSmeTelemetryRequest>(offset);
5980            // Delegate to tuple encoding.
5981            fidl::encoding::Encode::<GenericSmeGetSmeTelemetryRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5982                (
5983                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.telemetry_server),
5984                ),
5985                encoder, offset, _depth
5986            )
5987        }
5988    }
5989    unsafe impl<
5990        T0: fidl::encoding::Encode<
5991                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>>,
5992                fidl::encoding::DefaultFuchsiaResourceDialect,
5993            >,
5994    >
5995        fidl::encoding::Encode<
5996            GenericSmeGetSmeTelemetryRequest,
5997            fidl::encoding::DefaultFuchsiaResourceDialect,
5998        > for (T0,)
5999    {
6000        #[inline]
6001        unsafe fn encode(
6002            self,
6003            encoder: &mut fidl::encoding::Encoder<
6004                '_,
6005                fidl::encoding::DefaultFuchsiaResourceDialect,
6006            >,
6007            offset: usize,
6008            depth: fidl::encoding::Depth,
6009        ) -> fidl::Result<()> {
6010            encoder.debug_check_bounds::<GenericSmeGetSmeTelemetryRequest>(offset);
6011            // Zero out padding regions. There's no need to apply masks
6012            // because the unmasked parts will be overwritten by fields.
6013            // Write the fields.
6014            self.0.encode(encoder, offset + 0, depth)?;
6015            Ok(())
6016        }
6017    }
6018
6019    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6020        for GenericSmeGetSmeTelemetryRequest
6021    {
6022        #[inline(always)]
6023        fn new_empty() -> Self {
6024            Self {
6025                telemetry_server: fidl::new_empty!(
6026                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>>,
6027                    fidl::encoding::DefaultFuchsiaResourceDialect
6028                ),
6029            }
6030        }
6031
6032        #[inline]
6033        unsafe fn decode(
6034            &mut self,
6035            decoder: &mut fidl::encoding::Decoder<
6036                '_,
6037                fidl::encoding::DefaultFuchsiaResourceDialect,
6038            >,
6039            offset: usize,
6040            _depth: fidl::encoding::Depth,
6041        ) -> fidl::Result<()> {
6042            decoder.debug_check_bounds::<Self>(offset);
6043            // Verify that padding bytes are zero.
6044            fidl::decode!(
6045                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>>,
6046                fidl::encoding::DefaultFuchsiaResourceDialect,
6047                &mut self.telemetry_server,
6048                decoder,
6049                offset + 0,
6050                _depth
6051            )?;
6052            Ok(())
6053        }
6054    }
6055
6056    impl fidl::encoding::ResourceTypeMarker for GenericSmeQueryResponse {
6057        type Borrowed<'a> = &'a mut Self;
6058        fn take_or_borrow<'a>(
6059            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6060        ) -> Self::Borrowed<'a> {
6061            value
6062        }
6063    }
6064
6065    unsafe impl fidl::encoding::TypeMarker for GenericSmeQueryResponse {
6066        type Owned = Self;
6067
6068        #[inline(always)]
6069        fn inline_align(_context: fidl::encoding::Context) -> usize {
6070            4
6071        }
6072
6073        #[inline(always)]
6074        fn inline_size(_context: fidl::encoding::Context) -> usize {
6075            12
6076        }
6077    }
6078
6079    unsafe impl
6080        fidl::encoding::Encode<
6081            GenericSmeQueryResponse,
6082            fidl::encoding::DefaultFuchsiaResourceDialect,
6083        > for &mut GenericSmeQueryResponse
6084    {
6085        #[inline]
6086        unsafe fn encode(
6087            self,
6088            encoder: &mut fidl::encoding::Encoder<
6089                '_,
6090                fidl::encoding::DefaultFuchsiaResourceDialect,
6091            >,
6092            offset: usize,
6093            _depth: fidl::encoding::Depth,
6094        ) -> fidl::Result<()> {
6095            encoder.debug_check_bounds::<GenericSmeQueryResponse>(offset);
6096            // Delegate to tuple encoding.
6097            fidl::encoding::Encode::<
6098                GenericSmeQueryResponse,
6099                fidl::encoding::DefaultFuchsiaResourceDialect,
6100            >::encode(
6101                (<GenericSmeQuery as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
6102                encoder,
6103                offset,
6104                _depth,
6105            )
6106        }
6107    }
6108    unsafe impl<
6109        T0: fidl::encoding::Encode<GenericSmeQuery, fidl::encoding::DefaultFuchsiaResourceDialect>,
6110    >
6111        fidl::encoding::Encode<
6112            GenericSmeQueryResponse,
6113            fidl::encoding::DefaultFuchsiaResourceDialect,
6114        > for (T0,)
6115    {
6116        #[inline]
6117        unsafe fn encode(
6118            self,
6119            encoder: &mut fidl::encoding::Encoder<
6120                '_,
6121                fidl::encoding::DefaultFuchsiaResourceDialect,
6122            >,
6123            offset: usize,
6124            depth: fidl::encoding::Depth,
6125        ) -> fidl::Result<()> {
6126            encoder.debug_check_bounds::<GenericSmeQueryResponse>(offset);
6127            // Zero out padding regions. There's no need to apply masks
6128            // because the unmasked parts will be overwritten by fields.
6129            // Write the fields.
6130            self.0.encode(encoder, offset + 0, depth)?;
6131            Ok(())
6132        }
6133    }
6134
6135    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6136        for GenericSmeQueryResponse
6137    {
6138        #[inline(always)]
6139        fn new_empty() -> Self {
6140            Self {
6141                resp: fidl::new_empty!(
6142                    GenericSmeQuery,
6143                    fidl::encoding::DefaultFuchsiaResourceDialect
6144                ),
6145            }
6146        }
6147
6148        #[inline]
6149        unsafe fn decode(
6150            &mut self,
6151            decoder: &mut fidl::encoding::Decoder<
6152                '_,
6153                fidl::encoding::DefaultFuchsiaResourceDialect,
6154            >,
6155            offset: usize,
6156            _depth: fidl::encoding::Depth,
6157        ) -> fidl::Result<()> {
6158            decoder.debug_check_bounds::<Self>(offset);
6159            // Verify that padding bytes are zero.
6160            fidl::decode!(
6161                GenericSmeQuery,
6162                fidl::encoding::DefaultFuchsiaResourceDialect,
6163                &mut self.resp,
6164                decoder,
6165                offset + 0,
6166                _depth
6167            )?;
6168            Ok(())
6169        }
6170    }
6171
6172    impl fidl::encoding::ResourceTypeMarker for TelemetryCloneInspectVmoResponse {
6173        type Borrowed<'a> = &'a mut Self;
6174        fn take_or_borrow<'a>(
6175            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6176        ) -> Self::Borrowed<'a> {
6177            value
6178        }
6179    }
6180
6181    unsafe impl fidl::encoding::TypeMarker for TelemetryCloneInspectVmoResponse {
6182        type Owned = Self;
6183
6184        #[inline(always)]
6185        fn inline_align(_context: fidl::encoding::Context) -> usize {
6186            4
6187        }
6188
6189        #[inline(always)]
6190        fn inline_size(_context: fidl::encoding::Context) -> usize {
6191            4
6192        }
6193    }
6194
6195    unsafe impl
6196        fidl::encoding::Encode<
6197            TelemetryCloneInspectVmoResponse,
6198            fidl::encoding::DefaultFuchsiaResourceDialect,
6199        > for &mut TelemetryCloneInspectVmoResponse
6200    {
6201        #[inline]
6202        unsafe fn encode(
6203            self,
6204            encoder: &mut fidl::encoding::Encoder<
6205                '_,
6206                fidl::encoding::DefaultFuchsiaResourceDialect,
6207            >,
6208            offset: usize,
6209            _depth: fidl::encoding::Depth,
6210        ) -> fidl::Result<()> {
6211            encoder.debug_check_bounds::<TelemetryCloneInspectVmoResponse>(offset);
6212            // Delegate to tuple encoding.
6213            fidl::encoding::Encode::<
6214                TelemetryCloneInspectVmoResponse,
6215                fidl::encoding::DefaultFuchsiaResourceDialect,
6216            >::encode(
6217                (<fidl::encoding::HandleType<
6218                    fidl::Vmo,
6219                    { fidl::ObjectType::VMO.into_raw() },
6220                    2147483648,
6221                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6222                    &mut self.inspect_vmo
6223                ),),
6224                encoder,
6225                offset,
6226                _depth,
6227            )
6228        }
6229    }
6230    unsafe impl<
6231        T0: fidl::encoding::Encode<
6232                fidl::encoding::HandleType<
6233                    fidl::Vmo,
6234                    { fidl::ObjectType::VMO.into_raw() },
6235                    2147483648,
6236                >,
6237                fidl::encoding::DefaultFuchsiaResourceDialect,
6238            >,
6239    >
6240        fidl::encoding::Encode<
6241            TelemetryCloneInspectVmoResponse,
6242            fidl::encoding::DefaultFuchsiaResourceDialect,
6243        > for (T0,)
6244    {
6245        #[inline]
6246        unsafe fn encode(
6247            self,
6248            encoder: &mut fidl::encoding::Encoder<
6249                '_,
6250                fidl::encoding::DefaultFuchsiaResourceDialect,
6251            >,
6252            offset: usize,
6253            depth: fidl::encoding::Depth,
6254        ) -> fidl::Result<()> {
6255            encoder.debug_check_bounds::<TelemetryCloneInspectVmoResponse>(offset);
6256            // Zero out padding regions. There's no need to apply masks
6257            // because the unmasked parts will be overwritten by fields.
6258            // Write the fields.
6259            self.0.encode(encoder, offset + 0, depth)?;
6260            Ok(())
6261        }
6262    }
6263
6264    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6265        for TelemetryCloneInspectVmoResponse
6266    {
6267        #[inline(always)]
6268        fn new_empty() -> Self {
6269            Self {
6270                inspect_vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6271            }
6272        }
6273
6274        #[inline]
6275        unsafe fn decode(
6276            &mut self,
6277            decoder: &mut fidl::encoding::Decoder<
6278                '_,
6279                fidl::encoding::DefaultFuchsiaResourceDialect,
6280            >,
6281            offset: usize,
6282            _depth: fidl::encoding::Depth,
6283        ) -> fidl::Result<()> {
6284            decoder.debug_check_bounds::<Self>(offset);
6285            // Verify that padding bytes are zero.
6286            fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.inspect_vmo, decoder, offset + 0, _depth)?;
6287            Ok(())
6288        }
6289    }
6290
6291    impl fidl::encoding::ResourceTypeMarker for UsmeBootstrapStartRequest {
6292        type Borrowed<'a> = &'a mut Self;
6293        fn take_or_borrow<'a>(
6294            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6295        ) -> Self::Borrowed<'a> {
6296            value
6297        }
6298    }
6299
6300    unsafe impl fidl::encoding::TypeMarker for UsmeBootstrapStartRequest {
6301        type Owned = Self;
6302
6303        #[inline(always)]
6304        fn inline_align(_context: fidl::encoding::Context) -> usize {
6305            4
6306        }
6307
6308        #[inline(always)]
6309        fn inline_size(_context: fidl::encoding::Context) -> usize {
6310            8
6311        }
6312    }
6313
6314    unsafe impl
6315        fidl::encoding::Encode<
6316            UsmeBootstrapStartRequest,
6317            fidl::encoding::DefaultFuchsiaResourceDialect,
6318        > for &mut UsmeBootstrapStartRequest
6319    {
6320        #[inline]
6321        unsafe fn encode(
6322            self,
6323            encoder: &mut fidl::encoding::Encoder<
6324                '_,
6325                fidl::encoding::DefaultFuchsiaResourceDialect,
6326            >,
6327            offset: usize,
6328            _depth: fidl::encoding::Depth,
6329        ) -> fidl::Result<()> {
6330            encoder.debug_check_bounds::<UsmeBootstrapStartRequest>(offset);
6331            // Delegate to tuple encoding.
6332            fidl::encoding::Encode::<UsmeBootstrapStartRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6333                (
6334                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.generic_sme_server),
6335                    <LegacyPrivacySupport as fidl::encoding::ValueTypeMarker>::borrow(&self.legacy_privacy_support),
6336                ),
6337                encoder, offset, _depth
6338            )
6339        }
6340    }
6341    unsafe impl<
6342        T0: fidl::encoding::Encode<
6343                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>>,
6344                fidl::encoding::DefaultFuchsiaResourceDialect,
6345            >,
6346        T1: fidl::encoding::Encode<LegacyPrivacySupport, fidl::encoding::DefaultFuchsiaResourceDialect>,
6347    >
6348        fidl::encoding::Encode<
6349            UsmeBootstrapStartRequest,
6350            fidl::encoding::DefaultFuchsiaResourceDialect,
6351        > for (T0, T1)
6352    {
6353        #[inline]
6354        unsafe fn encode(
6355            self,
6356            encoder: &mut fidl::encoding::Encoder<
6357                '_,
6358                fidl::encoding::DefaultFuchsiaResourceDialect,
6359            >,
6360            offset: usize,
6361            depth: fidl::encoding::Depth,
6362        ) -> fidl::Result<()> {
6363            encoder.debug_check_bounds::<UsmeBootstrapStartRequest>(offset);
6364            // Zero out padding regions. There's no need to apply masks
6365            // because the unmasked parts will be overwritten by fields.
6366            unsafe {
6367                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
6368                (ptr as *mut u32).write_unaligned(0);
6369            }
6370            // Write the fields.
6371            self.0.encode(encoder, offset + 0, depth)?;
6372            self.1.encode(encoder, offset + 4, depth)?;
6373            Ok(())
6374        }
6375    }
6376
6377    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6378        for UsmeBootstrapStartRequest
6379    {
6380        #[inline(always)]
6381        fn new_empty() -> Self {
6382            Self {
6383                generic_sme_server: fidl::new_empty!(
6384                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>>,
6385                    fidl::encoding::DefaultFuchsiaResourceDialect
6386                ),
6387                legacy_privacy_support: fidl::new_empty!(
6388                    LegacyPrivacySupport,
6389                    fidl::encoding::DefaultFuchsiaResourceDialect
6390                ),
6391            }
6392        }
6393
6394        #[inline]
6395        unsafe fn decode(
6396            &mut self,
6397            decoder: &mut fidl::encoding::Decoder<
6398                '_,
6399                fidl::encoding::DefaultFuchsiaResourceDialect,
6400            >,
6401            offset: usize,
6402            _depth: fidl::encoding::Depth,
6403        ) -> fidl::Result<()> {
6404            decoder.debug_check_bounds::<Self>(offset);
6405            // Verify that padding bytes are zero.
6406            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
6407            let padval = unsafe { (ptr as *const u32).read_unaligned() };
6408            let mask = 0xffff0000u32;
6409            let maskedval = padval & mask;
6410            if maskedval != 0 {
6411                return Err(fidl::Error::NonZeroPadding {
6412                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
6413                });
6414            }
6415            fidl::decode!(
6416                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>>,
6417                fidl::encoding::DefaultFuchsiaResourceDialect,
6418                &mut self.generic_sme_server,
6419                decoder,
6420                offset + 0,
6421                _depth
6422            )?;
6423            fidl::decode!(
6424                LegacyPrivacySupport,
6425                fidl::encoding::DefaultFuchsiaResourceDialect,
6426                &mut self.legacy_privacy_support,
6427                decoder,
6428                offset + 4,
6429                _depth
6430            )?;
6431            Ok(())
6432        }
6433    }
6434
6435    impl fidl::encoding::ResourceTypeMarker for UsmeBootstrapStartResponse {
6436        type Borrowed<'a> = &'a mut Self;
6437        fn take_or_borrow<'a>(
6438            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6439        ) -> Self::Borrowed<'a> {
6440            value
6441        }
6442    }
6443
6444    unsafe impl fidl::encoding::TypeMarker for UsmeBootstrapStartResponse {
6445        type Owned = Self;
6446
6447        #[inline(always)]
6448        fn inline_align(_context: fidl::encoding::Context) -> usize {
6449            4
6450        }
6451
6452        #[inline(always)]
6453        fn inline_size(_context: fidl::encoding::Context) -> usize {
6454            4
6455        }
6456    }
6457
6458    unsafe impl
6459        fidl::encoding::Encode<
6460            UsmeBootstrapStartResponse,
6461            fidl::encoding::DefaultFuchsiaResourceDialect,
6462        > for &mut UsmeBootstrapStartResponse
6463    {
6464        #[inline]
6465        unsafe fn encode(
6466            self,
6467            encoder: &mut fidl::encoding::Encoder<
6468                '_,
6469                fidl::encoding::DefaultFuchsiaResourceDialect,
6470            >,
6471            offset: usize,
6472            _depth: fidl::encoding::Depth,
6473        ) -> fidl::Result<()> {
6474            encoder.debug_check_bounds::<UsmeBootstrapStartResponse>(offset);
6475            // Delegate to tuple encoding.
6476            fidl::encoding::Encode::<
6477                UsmeBootstrapStartResponse,
6478                fidl::encoding::DefaultFuchsiaResourceDialect,
6479            >::encode(
6480                (<fidl::encoding::HandleType<
6481                    fidl::Vmo,
6482                    { fidl::ObjectType::VMO.into_raw() },
6483                    2147483648,
6484                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6485                    &mut self.inspect_vmo
6486                ),),
6487                encoder,
6488                offset,
6489                _depth,
6490            )
6491        }
6492    }
6493    unsafe impl<
6494        T0: fidl::encoding::Encode<
6495                fidl::encoding::HandleType<
6496                    fidl::Vmo,
6497                    { fidl::ObjectType::VMO.into_raw() },
6498                    2147483648,
6499                >,
6500                fidl::encoding::DefaultFuchsiaResourceDialect,
6501            >,
6502    >
6503        fidl::encoding::Encode<
6504            UsmeBootstrapStartResponse,
6505            fidl::encoding::DefaultFuchsiaResourceDialect,
6506        > for (T0,)
6507    {
6508        #[inline]
6509        unsafe fn encode(
6510            self,
6511            encoder: &mut fidl::encoding::Encoder<
6512                '_,
6513                fidl::encoding::DefaultFuchsiaResourceDialect,
6514            >,
6515            offset: usize,
6516            depth: fidl::encoding::Depth,
6517        ) -> fidl::Result<()> {
6518            encoder.debug_check_bounds::<UsmeBootstrapStartResponse>(offset);
6519            // Zero out padding regions. There's no need to apply masks
6520            // because the unmasked parts will be overwritten by fields.
6521            // Write the fields.
6522            self.0.encode(encoder, offset + 0, depth)?;
6523            Ok(())
6524        }
6525    }
6526
6527    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6528        for UsmeBootstrapStartResponse
6529    {
6530        #[inline(always)]
6531        fn new_empty() -> Self {
6532            Self {
6533                inspect_vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6534            }
6535        }
6536
6537        #[inline]
6538        unsafe fn decode(
6539            &mut self,
6540            decoder: &mut fidl::encoding::Decoder<
6541                '_,
6542                fidl::encoding::DefaultFuchsiaResourceDialect,
6543            >,
6544            offset: usize,
6545            _depth: fidl::encoding::Depth,
6546        ) -> fidl::Result<()> {
6547            decoder.debug_check_bounds::<Self>(offset);
6548            // Verify that padding bytes are zero.
6549            fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.inspect_vmo, decoder, offset + 0, _depth)?;
6550            Ok(())
6551        }
6552    }
6553}