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