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