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::NullableHandle {
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
2653    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2654        self.inner.shutdown_with_epitaph(status)
2655    }
2656
2657    fn is_closed(&self) -> bool {
2658        self.inner.channel().is_closed()
2659    }
2660    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2661        self.inner.channel().on_closed()
2662    }
2663
2664    #[cfg(target_os = "fuchsia")]
2665    fn signal_peer(
2666        &self,
2667        clear_mask: zx::Signals,
2668        set_mask: zx::Signals,
2669    ) -> Result<(), zx_status::Status> {
2670        use fidl::Peered;
2671        self.inner.channel().signal_peer(clear_mask, set_mask)
2672    }
2673}
2674
2675impl DeviceMonitorControlHandle {}
2676
2677#[must_use = "FIDL methods require a response to be sent"]
2678#[derive(Debug)]
2679pub struct DeviceMonitorListPhysResponder {
2680    control_handle: std::mem::ManuallyDrop<DeviceMonitorControlHandle>,
2681    tx_id: u32,
2682}
2683
2684/// Set the the channel to be shutdown (see [`DeviceMonitorControlHandle::shutdown`])
2685/// if the responder is dropped without sending a response, so that the client
2686/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2687impl std::ops::Drop for DeviceMonitorListPhysResponder {
2688    fn drop(&mut self) {
2689        self.control_handle.shutdown();
2690        // Safety: drops once, never accessed again
2691        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2692    }
2693}
2694
2695impl fidl::endpoints::Responder for DeviceMonitorListPhysResponder {
2696    type ControlHandle = DeviceMonitorControlHandle;
2697
2698    fn control_handle(&self) -> &DeviceMonitorControlHandle {
2699        &self.control_handle
2700    }
2701
2702    fn drop_without_shutdown(mut self) {
2703        // Safety: drops once, never accessed again due to mem::forget
2704        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2705        // Prevent Drop from running (which would shut down the channel)
2706        std::mem::forget(self);
2707    }
2708}
2709
2710impl DeviceMonitorListPhysResponder {
2711    /// Sends a response to the FIDL transaction.
2712    ///
2713    /// Sets the channel to shutdown if an error occurs.
2714    pub fn send(self, mut phy_list: &[u16]) -> Result<(), fidl::Error> {
2715        let _result = self.send_raw(phy_list);
2716        if _result.is_err() {
2717            self.control_handle.shutdown();
2718        }
2719        self.drop_without_shutdown();
2720        _result
2721    }
2722
2723    /// Similar to "send" but does not shutdown the channel if an error occurs.
2724    pub fn send_no_shutdown_on_err(self, mut phy_list: &[u16]) -> Result<(), fidl::Error> {
2725        let _result = self.send_raw(phy_list);
2726        self.drop_without_shutdown();
2727        _result
2728    }
2729
2730    fn send_raw(&self, mut phy_list: &[u16]) -> Result<(), fidl::Error> {
2731        self.control_handle.inner.send::<DeviceMonitorListPhysResponse>(
2732            (phy_list,),
2733            self.tx_id,
2734            0x3a08518874196aab,
2735            fidl::encoding::DynamicFlags::empty(),
2736        )
2737    }
2738}
2739
2740#[must_use = "FIDL methods require a response to be sent"]
2741#[derive(Debug)]
2742pub struct DeviceMonitorListIfacesResponder {
2743    control_handle: std::mem::ManuallyDrop<DeviceMonitorControlHandle>,
2744    tx_id: u32,
2745}
2746
2747/// Set the the channel to be shutdown (see [`DeviceMonitorControlHandle::shutdown`])
2748/// if the responder is dropped without sending a response, so that the client
2749/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2750impl std::ops::Drop for DeviceMonitorListIfacesResponder {
2751    fn drop(&mut self) {
2752        self.control_handle.shutdown();
2753        // Safety: drops once, never accessed again
2754        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2755    }
2756}
2757
2758impl fidl::endpoints::Responder for DeviceMonitorListIfacesResponder {
2759    type ControlHandle = DeviceMonitorControlHandle;
2760
2761    fn control_handle(&self) -> &DeviceMonitorControlHandle {
2762        &self.control_handle
2763    }
2764
2765    fn drop_without_shutdown(mut self) {
2766        // Safety: drops once, never accessed again due to mem::forget
2767        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2768        // Prevent Drop from running (which would shut down the channel)
2769        std::mem::forget(self);
2770    }
2771}
2772
2773impl DeviceMonitorListIfacesResponder {
2774    /// Sends a response to the FIDL transaction.
2775    ///
2776    /// Sets the channel to shutdown if an error occurs.
2777    pub fn send(self, mut iface_list: &[u16]) -> Result<(), fidl::Error> {
2778        let _result = self.send_raw(iface_list);
2779        if _result.is_err() {
2780            self.control_handle.shutdown();
2781        }
2782        self.drop_without_shutdown();
2783        _result
2784    }
2785
2786    /// Similar to "send" but does not shutdown the channel if an error occurs.
2787    pub fn send_no_shutdown_on_err(self, mut iface_list: &[u16]) -> Result<(), fidl::Error> {
2788        let _result = self.send_raw(iface_list);
2789        self.drop_without_shutdown();
2790        _result
2791    }
2792
2793    fn send_raw(&self, mut iface_list: &[u16]) -> Result<(), fidl::Error> {
2794        self.control_handle.inner.send::<DeviceMonitorListIfacesResponse>(
2795            (iface_list,),
2796            self.tx_id,
2797            0x129e758fb8e0b113,
2798            fidl::encoding::DynamicFlags::empty(),
2799        )
2800    }
2801}
2802
2803#[must_use = "FIDL methods require a response to be sent"]
2804#[derive(Debug)]
2805pub struct DeviceMonitorGetDevPathResponder {
2806    control_handle: std::mem::ManuallyDrop<DeviceMonitorControlHandle>,
2807    tx_id: u32,
2808}
2809
2810/// Set the the channel to be shutdown (see [`DeviceMonitorControlHandle::shutdown`])
2811/// if the responder is dropped without sending a response, so that the client
2812/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2813impl std::ops::Drop for DeviceMonitorGetDevPathResponder {
2814    fn drop(&mut self) {
2815        self.control_handle.shutdown();
2816        // Safety: drops once, never accessed again
2817        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2818    }
2819}
2820
2821impl fidl::endpoints::Responder for DeviceMonitorGetDevPathResponder {
2822    type ControlHandle = DeviceMonitorControlHandle;
2823
2824    fn control_handle(&self) -> &DeviceMonitorControlHandle {
2825        &self.control_handle
2826    }
2827
2828    fn drop_without_shutdown(mut self) {
2829        // Safety: drops once, never accessed again due to mem::forget
2830        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2831        // Prevent Drop from running (which would shut down the channel)
2832        std::mem::forget(self);
2833    }
2834}
2835
2836impl DeviceMonitorGetDevPathResponder {
2837    /// Sends a response to the FIDL transaction.
2838    ///
2839    /// Sets the channel to shutdown if an error occurs.
2840    pub fn send(self, mut dev_path: Option<&str>) -> Result<(), fidl::Error> {
2841        let _result = self.send_raw(dev_path);
2842        if _result.is_err() {
2843            self.control_handle.shutdown();
2844        }
2845        self.drop_without_shutdown();
2846        _result
2847    }
2848
2849    /// Similar to "send" but does not shutdown the channel if an error occurs.
2850    pub fn send_no_shutdown_on_err(self, mut dev_path: Option<&str>) -> Result<(), fidl::Error> {
2851        let _result = self.send_raw(dev_path);
2852        self.drop_without_shutdown();
2853        _result
2854    }
2855
2856    fn send_raw(&self, mut dev_path: Option<&str>) -> Result<(), fidl::Error> {
2857        self.control_handle.inner.send::<DeviceMonitorGetDevPathResponse>(
2858            (dev_path,),
2859            self.tx_id,
2860            0x4aa489b57113bccf,
2861            fidl::encoding::DynamicFlags::empty(),
2862        )
2863    }
2864}
2865
2866#[must_use = "FIDL methods require a response to be sent"]
2867#[derive(Debug)]
2868pub struct DeviceMonitorGetSupportedMacRolesResponder {
2869    control_handle: std::mem::ManuallyDrop<DeviceMonitorControlHandle>,
2870    tx_id: u32,
2871}
2872
2873/// Set the the channel to be shutdown (see [`DeviceMonitorControlHandle::shutdown`])
2874/// if the responder is dropped without sending a response, so that the client
2875/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2876impl std::ops::Drop for DeviceMonitorGetSupportedMacRolesResponder {
2877    fn drop(&mut self) {
2878        self.control_handle.shutdown();
2879        // Safety: drops once, never accessed again
2880        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2881    }
2882}
2883
2884impl fidl::endpoints::Responder for DeviceMonitorGetSupportedMacRolesResponder {
2885    type ControlHandle = DeviceMonitorControlHandle;
2886
2887    fn control_handle(&self) -> &DeviceMonitorControlHandle {
2888        &self.control_handle
2889    }
2890
2891    fn drop_without_shutdown(mut self) {
2892        // Safety: drops once, never accessed again due to mem::forget
2893        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2894        // Prevent Drop from running (which would shut down the channel)
2895        std::mem::forget(self);
2896    }
2897}
2898
2899impl DeviceMonitorGetSupportedMacRolesResponder {
2900    /// Sends a response to the FIDL transaction.
2901    ///
2902    /// Sets the channel to shutdown if an error occurs.
2903    pub fn send(
2904        self,
2905        mut result: Result<&[fidl_fuchsia_wlan_common::WlanMacRole], i32>,
2906    ) -> Result<(), fidl::Error> {
2907        let _result = self.send_raw(result);
2908        if _result.is_err() {
2909            self.control_handle.shutdown();
2910        }
2911        self.drop_without_shutdown();
2912        _result
2913    }
2914
2915    /// Similar to "send" but does not shutdown the channel if an error occurs.
2916    pub fn send_no_shutdown_on_err(
2917        self,
2918        mut result: Result<&[fidl_fuchsia_wlan_common::WlanMacRole], i32>,
2919    ) -> Result<(), fidl::Error> {
2920        let _result = self.send_raw(result);
2921        self.drop_without_shutdown();
2922        _result
2923    }
2924
2925    fn send_raw(
2926        &self,
2927        mut result: Result<&[fidl_fuchsia_wlan_common::WlanMacRole], i32>,
2928    ) -> Result<(), fidl::Error> {
2929        self.control_handle.inner.send::<fidl::encoding::ResultType<
2930            DeviceMonitorGetSupportedMacRolesResponse,
2931            i32,
2932        >>(
2933            result.map(|supported_mac_roles| (supported_mac_roles,)),
2934            self.tx_id,
2935            0x172b3d2eabd5a14e,
2936            fidl::encoding::DynamicFlags::empty(),
2937        )
2938    }
2939}
2940
2941#[must_use = "FIDL methods require a response to be sent"]
2942#[derive(Debug)]
2943pub struct DeviceMonitorGetCountryResponder {
2944    control_handle: std::mem::ManuallyDrop<DeviceMonitorControlHandle>,
2945    tx_id: u32,
2946}
2947
2948/// Set the the channel to be shutdown (see [`DeviceMonitorControlHandle::shutdown`])
2949/// if the responder is dropped without sending a response, so that the client
2950/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2951impl std::ops::Drop for DeviceMonitorGetCountryResponder {
2952    fn drop(&mut self) {
2953        self.control_handle.shutdown();
2954        // Safety: drops once, never accessed again
2955        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2956    }
2957}
2958
2959impl fidl::endpoints::Responder for DeviceMonitorGetCountryResponder {
2960    type ControlHandle = DeviceMonitorControlHandle;
2961
2962    fn control_handle(&self) -> &DeviceMonitorControlHandle {
2963        &self.control_handle
2964    }
2965
2966    fn drop_without_shutdown(mut self) {
2967        // Safety: drops once, never accessed again due to mem::forget
2968        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2969        // Prevent Drop from running (which would shut down the channel)
2970        std::mem::forget(self);
2971    }
2972}
2973
2974impl DeviceMonitorGetCountryResponder {
2975    /// Sends a response to the FIDL transaction.
2976    ///
2977    /// Sets the channel to shutdown if an error occurs.
2978    pub fn send(self, mut result: Result<&GetCountryResponse, i32>) -> Result<(), fidl::Error> {
2979        let _result = self.send_raw(result);
2980        if _result.is_err() {
2981            self.control_handle.shutdown();
2982        }
2983        self.drop_without_shutdown();
2984        _result
2985    }
2986
2987    /// Similar to "send" but does not shutdown the channel if an error occurs.
2988    pub fn send_no_shutdown_on_err(
2989        self,
2990        mut result: Result<&GetCountryResponse, i32>,
2991    ) -> Result<(), fidl::Error> {
2992        let _result = self.send_raw(result);
2993        self.drop_without_shutdown();
2994        _result
2995    }
2996
2997    fn send_raw(&self, mut result: Result<&GetCountryResponse, i32>) -> Result<(), fidl::Error> {
2998        self.control_handle
2999            .inner
3000            .send::<fidl::encoding::ResultType<DeviceMonitorGetCountryResponse, i32>>(
3001                result.map(|resp| (resp,)),
3002                self.tx_id,
3003                0x6f1040bd81bde90e,
3004                fidl::encoding::DynamicFlags::empty(),
3005            )
3006    }
3007}
3008
3009#[must_use = "FIDL methods require a response to be sent"]
3010#[derive(Debug)]
3011pub struct DeviceMonitorSetCountryResponder {
3012    control_handle: std::mem::ManuallyDrop<DeviceMonitorControlHandle>,
3013    tx_id: u32,
3014}
3015
3016/// Set the the channel to be shutdown (see [`DeviceMonitorControlHandle::shutdown`])
3017/// if the responder is dropped without sending a response, so that the client
3018/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3019impl std::ops::Drop for DeviceMonitorSetCountryResponder {
3020    fn drop(&mut self) {
3021        self.control_handle.shutdown();
3022        // Safety: drops once, never accessed again
3023        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3024    }
3025}
3026
3027impl fidl::endpoints::Responder for DeviceMonitorSetCountryResponder {
3028    type ControlHandle = DeviceMonitorControlHandle;
3029
3030    fn control_handle(&self) -> &DeviceMonitorControlHandle {
3031        &self.control_handle
3032    }
3033
3034    fn drop_without_shutdown(mut self) {
3035        // Safety: drops once, never accessed again due to mem::forget
3036        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3037        // Prevent Drop from running (which would shut down the channel)
3038        std::mem::forget(self);
3039    }
3040}
3041
3042impl DeviceMonitorSetCountryResponder {
3043    /// Sends a response to the FIDL transaction.
3044    ///
3045    /// Sets the channel to shutdown if an error occurs.
3046    pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
3047        let _result = self.send_raw(status);
3048        if _result.is_err() {
3049            self.control_handle.shutdown();
3050        }
3051        self.drop_without_shutdown();
3052        _result
3053    }
3054
3055    /// Similar to "send" but does not shutdown the channel if an error occurs.
3056    pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
3057        let _result = self.send_raw(status);
3058        self.drop_without_shutdown();
3059        _result
3060    }
3061
3062    fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
3063        self.control_handle.inner.send::<DeviceMonitorSetCountryResponse>(
3064            (status,),
3065            self.tx_id,
3066            0xdaa7b77a5a6e71b,
3067            fidl::encoding::DynamicFlags::empty(),
3068        )
3069    }
3070}
3071
3072#[must_use = "FIDL methods require a response to be sent"]
3073#[derive(Debug)]
3074pub struct DeviceMonitorClearCountryResponder {
3075    control_handle: std::mem::ManuallyDrop<DeviceMonitorControlHandle>,
3076    tx_id: u32,
3077}
3078
3079/// Set the the channel to be shutdown (see [`DeviceMonitorControlHandle::shutdown`])
3080/// if the responder is dropped without sending a response, so that the client
3081/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3082impl std::ops::Drop for DeviceMonitorClearCountryResponder {
3083    fn drop(&mut self) {
3084        self.control_handle.shutdown();
3085        // Safety: drops once, never accessed again
3086        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3087    }
3088}
3089
3090impl fidl::endpoints::Responder for DeviceMonitorClearCountryResponder {
3091    type ControlHandle = DeviceMonitorControlHandle;
3092
3093    fn control_handle(&self) -> &DeviceMonitorControlHandle {
3094        &self.control_handle
3095    }
3096
3097    fn drop_without_shutdown(mut self) {
3098        // Safety: drops once, never accessed again due to mem::forget
3099        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3100        // Prevent Drop from running (which would shut down the channel)
3101        std::mem::forget(self);
3102    }
3103}
3104
3105impl DeviceMonitorClearCountryResponder {
3106    /// Sends a response to the FIDL transaction.
3107    ///
3108    /// Sets the channel to shutdown if an error occurs.
3109    pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
3110        let _result = self.send_raw(status);
3111        if _result.is_err() {
3112            self.control_handle.shutdown();
3113        }
3114        self.drop_without_shutdown();
3115        _result
3116    }
3117
3118    /// Similar to "send" but does not shutdown the channel if an error occurs.
3119    pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
3120        let _result = self.send_raw(status);
3121        self.drop_without_shutdown();
3122        _result
3123    }
3124
3125    fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
3126        self.control_handle.inner.send::<DeviceMonitorClearCountryResponse>(
3127            (status,),
3128            self.tx_id,
3129            0x66714d61103120e9,
3130            fidl::encoding::DynamicFlags::empty(),
3131        )
3132    }
3133}
3134
3135#[must_use = "FIDL methods require a response to be sent"]
3136#[derive(Debug)]
3137pub struct DeviceMonitorSetPowerSaveModeResponder {
3138    control_handle: std::mem::ManuallyDrop<DeviceMonitorControlHandle>,
3139    tx_id: u32,
3140}
3141
3142/// Set the the channel to be shutdown (see [`DeviceMonitorControlHandle::shutdown`])
3143/// if the responder is dropped without sending a response, so that the client
3144/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3145impl std::ops::Drop for DeviceMonitorSetPowerSaveModeResponder {
3146    fn drop(&mut self) {
3147        self.control_handle.shutdown();
3148        // Safety: drops once, never accessed again
3149        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3150    }
3151}
3152
3153impl fidl::endpoints::Responder for DeviceMonitorSetPowerSaveModeResponder {
3154    type ControlHandle = DeviceMonitorControlHandle;
3155
3156    fn control_handle(&self) -> &DeviceMonitorControlHandle {
3157        &self.control_handle
3158    }
3159
3160    fn drop_without_shutdown(mut self) {
3161        // Safety: drops once, never accessed again due to mem::forget
3162        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3163        // Prevent Drop from running (which would shut down the channel)
3164        std::mem::forget(self);
3165    }
3166}
3167
3168impl DeviceMonitorSetPowerSaveModeResponder {
3169    /// Sends a response to the FIDL transaction.
3170    ///
3171    /// Sets the channel to shutdown if an error occurs.
3172    pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
3173        let _result = self.send_raw(status);
3174        if _result.is_err() {
3175            self.control_handle.shutdown();
3176        }
3177        self.drop_without_shutdown();
3178        _result
3179    }
3180
3181    /// Similar to "send" but does not shutdown the channel if an error occurs.
3182    pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
3183        let _result = self.send_raw(status);
3184        self.drop_without_shutdown();
3185        _result
3186    }
3187
3188    fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
3189        self.control_handle.inner.send::<DeviceMonitorSetPowerSaveModeResponse>(
3190            (status,),
3191            self.tx_id,
3192            0x62202b4d360533bc,
3193            fidl::encoding::DynamicFlags::empty(),
3194        )
3195    }
3196}
3197
3198#[must_use = "FIDL methods require a response to be sent"]
3199#[derive(Debug)]
3200pub struct DeviceMonitorGetPowerSaveModeResponder {
3201    control_handle: std::mem::ManuallyDrop<DeviceMonitorControlHandle>,
3202    tx_id: u32,
3203}
3204
3205/// Set the the channel to be shutdown (see [`DeviceMonitorControlHandle::shutdown`])
3206/// if the responder is dropped without sending a response, so that the client
3207/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3208impl std::ops::Drop for DeviceMonitorGetPowerSaveModeResponder {
3209    fn drop(&mut self) {
3210        self.control_handle.shutdown();
3211        // Safety: drops once, never accessed again
3212        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3213    }
3214}
3215
3216impl fidl::endpoints::Responder for DeviceMonitorGetPowerSaveModeResponder {
3217    type ControlHandle = DeviceMonitorControlHandle;
3218
3219    fn control_handle(&self) -> &DeviceMonitorControlHandle {
3220        &self.control_handle
3221    }
3222
3223    fn drop_without_shutdown(mut self) {
3224        // Safety: drops once, never accessed again due to mem::forget
3225        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3226        // Prevent Drop from running (which would shut down the channel)
3227        std::mem::forget(self);
3228    }
3229}
3230
3231impl DeviceMonitorGetPowerSaveModeResponder {
3232    /// Sends a response to the FIDL transaction.
3233    ///
3234    /// Sets the channel to shutdown if an error occurs.
3235    pub fn send(
3236        self,
3237        mut result: Result<&GetPowerSaveModeResponse, i32>,
3238    ) -> Result<(), fidl::Error> {
3239        let _result = self.send_raw(result);
3240        if _result.is_err() {
3241            self.control_handle.shutdown();
3242        }
3243        self.drop_without_shutdown();
3244        _result
3245    }
3246
3247    /// Similar to "send" but does not shutdown the channel if an error occurs.
3248    pub fn send_no_shutdown_on_err(
3249        self,
3250        mut result: Result<&GetPowerSaveModeResponse, i32>,
3251    ) -> Result<(), fidl::Error> {
3252        let _result = self.send_raw(result);
3253        self.drop_without_shutdown();
3254        _result
3255    }
3256
3257    fn send_raw(
3258        &self,
3259        mut result: Result<&GetPowerSaveModeResponse, i32>,
3260    ) -> Result<(), fidl::Error> {
3261        self.control_handle.inner.send::<fidl::encoding::ResultType<
3262            DeviceMonitorGetPowerSaveModeResponse,
3263            i32,
3264        >>(
3265            result.map(|resp| (resp,)),
3266            self.tx_id,
3267            0x14304d406ada8693,
3268            fidl::encoding::DynamicFlags::empty(),
3269        )
3270    }
3271}
3272
3273#[must_use = "FIDL methods require a response to be sent"]
3274#[derive(Debug)]
3275pub struct DeviceMonitorPowerDownResponder {
3276    control_handle: std::mem::ManuallyDrop<DeviceMonitorControlHandle>,
3277    tx_id: u32,
3278}
3279
3280/// Set the the channel to be shutdown (see [`DeviceMonitorControlHandle::shutdown`])
3281/// if the responder is dropped without sending a response, so that the client
3282/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3283impl std::ops::Drop for DeviceMonitorPowerDownResponder {
3284    fn drop(&mut self) {
3285        self.control_handle.shutdown();
3286        // Safety: drops once, never accessed again
3287        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3288    }
3289}
3290
3291impl fidl::endpoints::Responder for DeviceMonitorPowerDownResponder {
3292    type ControlHandle = DeviceMonitorControlHandle;
3293
3294    fn control_handle(&self) -> &DeviceMonitorControlHandle {
3295        &self.control_handle
3296    }
3297
3298    fn drop_without_shutdown(mut self) {
3299        // Safety: drops once, never accessed again due to mem::forget
3300        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3301        // Prevent Drop from running (which would shut down the channel)
3302        std::mem::forget(self);
3303    }
3304}
3305
3306impl DeviceMonitorPowerDownResponder {
3307    /// Sends a response to the FIDL transaction.
3308    ///
3309    /// Sets the channel to shutdown if an error occurs.
3310    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3311        let _result = self.send_raw(result);
3312        if _result.is_err() {
3313            self.control_handle.shutdown();
3314        }
3315        self.drop_without_shutdown();
3316        _result
3317    }
3318
3319    /// Similar to "send" but does not shutdown the channel if an error occurs.
3320    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3321        let _result = self.send_raw(result);
3322        self.drop_without_shutdown();
3323        _result
3324    }
3325
3326    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3327        self.control_handle
3328            .inner
3329            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3330                result,
3331                self.tx_id,
3332                0x374ad717fe8902e0,
3333                fidl::encoding::DynamicFlags::empty(),
3334            )
3335    }
3336}
3337
3338#[must_use = "FIDL methods require a response to be sent"]
3339#[derive(Debug)]
3340pub struct DeviceMonitorPowerUpResponder {
3341    control_handle: std::mem::ManuallyDrop<DeviceMonitorControlHandle>,
3342    tx_id: u32,
3343}
3344
3345/// Set the the channel to be shutdown (see [`DeviceMonitorControlHandle::shutdown`])
3346/// if the responder is dropped without sending a response, so that the client
3347/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3348impl std::ops::Drop for DeviceMonitorPowerUpResponder {
3349    fn drop(&mut self) {
3350        self.control_handle.shutdown();
3351        // Safety: drops once, never accessed again
3352        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3353    }
3354}
3355
3356impl fidl::endpoints::Responder for DeviceMonitorPowerUpResponder {
3357    type ControlHandle = DeviceMonitorControlHandle;
3358
3359    fn control_handle(&self) -> &DeviceMonitorControlHandle {
3360        &self.control_handle
3361    }
3362
3363    fn drop_without_shutdown(mut self) {
3364        // Safety: drops once, never accessed again due to mem::forget
3365        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3366        // Prevent Drop from running (which would shut down the channel)
3367        std::mem::forget(self);
3368    }
3369}
3370
3371impl DeviceMonitorPowerUpResponder {
3372    /// Sends a response to the FIDL transaction.
3373    ///
3374    /// Sets the channel to shutdown if an error occurs.
3375    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3376        let _result = self.send_raw(result);
3377        if _result.is_err() {
3378            self.control_handle.shutdown();
3379        }
3380        self.drop_without_shutdown();
3381        _result
3382    }
3383
3384    /// Similar to "send" but does not shutdown the channel if an error occurs.
3385    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3386        let _result = self.send_raw(result);
3387        self.drop_without_shutdown();
3388        _result
3389    }
3390
3391    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3392        self.control_handle
3393            .inner
3394            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3395                result,
3396                self.tx_id,
3397                0xa2379b639869c17,
3398                fidl::encoding::DynamicFlags::empty(),
3399            )
3400    }
3401}
3402
3403#[must_use = "FIDL methods require a response to be sent"]
3404#[derive(Debug)]
3405pub struct DeviceMonitorResetResponder {
3406    control_handle: std::mem::ManuallyDrop<DeviceMonitorControlHandle>,
3407    tx_id: u32,
3408}
3409
3410/// Set the the channel to be shutdown (see [`DeviceMonitorControlHandle::shutdown`])
3411/// if the responder is dropped without sending a response, so that the client
3412/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3413impl std::ops::Drop for DeviceMonitorResetResponder {
3414    fn drop(&mut self) {
3415        self.control_handle.shutdown();
3416        // Safety: drops once, never accessed again
3417        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3418    }
3419}
3420
3421impl fidl::endpoints::Responder for DeviceMonitorResetResponder {
3422    type ControlHandle = DeviceMonitorControlHandle;
3423
3424    fn control_handle(&self) -> &DeviceMonitorControlHandle {
3425        &self.control_handle
3426    }
3427
3428    fn drop_without_shutdown(mut self) {
3429        // Safety: drops once, never accessed again due to mem::forget
3430        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3431        // Prevent Drop from running (which would shut down the channel)
3432        std::mem::forget(self);
3433    }
3434}
3435
3436impl DeviceMonitorResetResponder {
3437    /// Sends a response to the FIDL transaction.
3438    ///
3439    /// Sets the channel to shutdown if an error occurs.
3440    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3441        let _result = self.send_raw(result);
3442        if _result.is_err() {
3443            self.control_handle.shutdown();
3444        }
3445        self.drop_without_shutdown();
3446        _result
3447    }
3448
3449    /// Similar to "send" but does not shutdown the channel if an error occurs.
3450    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3451        let _result = self.send_raw(result);
3452        self.drop_without_shutdown();
3453        _result
3454    }
3455
3456    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3457        self.control_handle
3458            .inner
3459            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3460                result,
3461                self.tx_id,
3462                0x6def240c9f8c6867,
3463                fidl::encoding::DynamicFlags::empty(),
3464            )
3465    }
3466}
3467
3468#[must_use = "FIDL methods require a response to be sent"]
3469#[derive(Debug)]
3470pub struct DeviceMonitorSetTxPowerScenarioResponder {
3471    control_handle: std::mem::ManuallyDrop<DeviceMonitorControlHandle>,
3472    tx_id: u32,
3473}
3474
3475/// Set the the channel to be shutdown (see [`DeviceMonitorControlHandle::shutdown`])
3476/// if the responder is dropped without sending a response, so that the client
3477/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3478impl std::ops::Drop for DeviceMonitorSetTxPowerScenarioResponder {
3479    fn drop(&mut self) {
3480        self.control_handle.shutdown();
3481        // Safety: drops once, never accessed again
3482        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3483    }
3484}
3485
3486impl fidl::endpoints::Responder for DeviceMonitorSetTxPowerScenarioResponder {
3487    type ControlHandle = DeviceMonitorControlHandle;
3488
3489    fn control_handle(&self) -> &DeviceMonitorControlHandle {
3490        &self.control_handle
3491    }
3492
3493    fn drop_without_shutdown(mut self) {
3494        // Safety: drops once, never accessed again due to mem::forget
3495        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3496        // Prevent Drop from running (which would shut down the channel)
3497        std::mem::forget(self);
3498    }
3499}
3500
3501impl DeviceMonitorSetTxPowerScenarioResponder {
3502    /// Sends a response to the FIDL transaction.
3503    ///
3504    /// Sets the channel to shutdown if an error occurs.
3505    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3506        let _result = self.send_raw(result);
3507        if _result.is_err() {
3508            self.control_handle.shutdown();
3509        }
3510        self.drop_without_shutdown();
3511        _result
3512    }
3513
3514    /// Similar to "send" but does not shutdown the channel if an error occurs.
3515    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3516        let _result = self.send_raw(result);
3517        self.drop_without_shutdown();
3518        _result
3519    }
3520
3521    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3522        self.control_handle
3523            .inner
3524            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3525                result,
3526                self.tx_id,
3527                0x7c51443a985934fd,
3528                fidl::encoding::DynamicFlags::empty(),
3529            )
3530    }
3531}
3532
3533#[must_use = "FIDL methods require a response to be sent"]
3534#[derive(Debug)]
3535pub struct DeviceMonitorResetTxPowerScenarioResponder {
3536    control_handle: std::mem::ManuallyDrop<DeviceMonitorControlHandle>,
3537    tx_id: u32,
3538}
3539
3540/// Set the the channel to be shutdown (see [`DeviceMonitorControlHandle::shutdown`])
3541/// if the responder is dropped without sending a response, so that the client
3542/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3543impl std::ops::Drop for DeviceMonitorResetTxPowerScenarioResponder {
3544    fn drop(&mut self) {
3545        self.control_handle.shutdown();
3546        // Safety: drops once, never accessed again
3547        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3548    }
3549}
3550
3551impl fidl::endpoints::Responder for DeviceMonitorResetTxPowerScenarioResponder {
3552    type ControlHandle = DeviceMonitorControlHandle;
3553
3554    fn control_handle(&self) -> &DeviceMonitorControlHandle {
3555        &self.control_handle
3556    }
3557
3558    fn drop_without_shutdown(mut self) {
3559        // Safety: drops once, never accessed again due to mem::forget
3560        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3561        // Prevent Drop from running (which would shut down the channel)
3562        std::mem::forget(self);
3563    }
3564}
3565
3566impl DeviceMonitorResetTxPowerScenarioResponder {
3567    /// Sends a response to the FIDL transaction.
3568    ///
3569    /// Sets the channel to shutdown if an error occurs.
3570    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3571        let _result = self.send_raw(result);
3572        if _result.is_err() {
3573            self.control_handle.shutdown();
3574        }
3575        self.drop_without_shutdown();
3576        _result
3577    }
3578
3579    /// Similar to "send" but does not shutdown the channel if an error occurs.
3580    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3581        let _result = self.send_raw(result);
3582        self.drop_without_shutdown();
3583        _result
3584    }
3585
3586    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3587        self.control_handle
3588            .inner
3589            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3590                result,
3591                self.tx_id,
3592                0x4790357c9cdddc4a,
3593                fidl::encoding::DynamicFlags::empty(),
3594            )
3595    }
3596}
3597
3598#[must_use = "FIDL methods require a response to be sent"]
3599#[derive(Debug)]
3600pub struct DeviceMonitorGetTxPowerScenarioResponder {
3601    control_handle: std::mem::ManuallyDrop<DeviceMonitorControlHandle>,
3602    tx_id: u32,
3603}
3604
3605/// Set the the channel to be shutdown (see [`DeviceMonitorControlHandle::shutdown`])
3606/// if the responder is dropped without sending a response, so that the client
3607/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3608impl std::ops::Drop for DeviceMonitorGetTxPowerScenarioResponder {
3609    fn drop(&mut self) {
3610        self.control_handle.shutdown();
3611        // Safety: drops once, never accessed again
3612        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3613    }
3614}
3615
3616impl fidl::endpoints::Responder for DeviceMonitorGetTxPowerScenarioResponder {
3617    type ControlHandle = DeviceMonitorControlHandle;
3618
3619    fn control_handle(&self) -> &DeviceMonitorControlHandle {
3620        &self.control_handle
3621    }
3622
3623    fn drop_without_shutdown(mut self) {
3624        // Safety: drops once, never accessed again due to mem::forget
3625        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3626        // Prevent Drop from running (which would shut down the channel)
3627        std::mem::forget(self);
3628    }
3629}
3630
3631impl DeviceMonitorGetTxPowerScenarioResponder {
3632    /// Sends a response to the FIDL transaction.
3633    ///
3634    /// Sets the channel to shutdown if an error occurs.
3635    pub fn send(
3636        self,
3637        mut result: Result<fidl_fuchsia_wlan_internal::TxPowerScenario, i32>,
3638    ) -> Result<(), fidl::Error> {
3639        let _result = self.send_raw(result);
3640        if _result.is_err() {
3641            self.control_handle.shutdown();
3642        }
3643        self.drop_without_shutdown();
3644        _result
3645    }
3646
3647    /// Similar to "send" but does not shutdown the channel if an error occurs.
3648    pub fn send_no_shutdown_on_err(
3649        self,
3650        mut result: Result<fidl_fuchsia_wlan_internal::TxPowerScenario, i32>,
3651    ) -> Result<(), fidl::Error> {
3652        let _result = self.send_raw(result);
3653        self.drop_without_shutdown();
3654        _result
3655    }
3656
3657    fn send_raw(
3658        &self,
3659        mut result: Result<fidl_fuchsia_wlan_internal::TxPowerScenario, i32>,
3660    ) -> Result<(), fidl::Error> {
3661        self.control_handle.inner.send::<fidl::encoding::ResultType<
3662            DeviceMonitorGetTxPowerScenarioResponse,
3663            i32,
3664        >>(
3665            result.map(|scenario| (scenario,)),
3666            self.tx_id,
3667            0x555fb197f90e9830,
3668            fidl::encoding::DynamicFlags::empty(),
3669        )
3670    }
3671}
3672
3673#[must_use = "FIDL methods require a response to be sent"]
3674#[derive(Debug)]
3675pub struct DeviceMonitorGetPowerStateResponder {
3676    control_handle: std::mem::ManuallyDrop<DeviceMonitorControlHandle>,
3677    tx_id: u32,
3678}
3679
3680/// Set the the channel to be shutdown (see [`DeviceMonitorControlHandle::shutdown`])
3681/// if the responder is dropped without sending a response, so that the client
3682/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3683impl std::ops::Drop for DeviceMonitorGetPowerStateResponder {
3684    fn drop(&mut self) {
3685        self.control_handle.shutdown();
3686        // Safety: drops once, never accessed again
3687        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3688    }
3689}
3690
3691impl fidl::endpoints::Responder for DeviceMonitorGetPowerStateResponder {
3692    type ControlHandle = DeviceMonitorControlHandle;
3693
3694    fn control_handle(&self) -> &DeviceMonitorControlHandle {
3695        &self.control_handle
3696    }
3697
3698    fn drop_without_shutdown(mut self) {
3699        // Safety: drops once, never accessed again due to mem::forget
3700        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3701        // Prevent Drop from running (which would shut down the channel)
3702        std::mem::forget(self);
3703    }
3704}
3705
3706impl DeviceMonitorGetPowerStateResponder {
3707    /// Sends a response to the FIDL transaction.
3708    ///
3709    /// Sets the channel to shutdown if an error occurs.
3710    pub fn send(self, mut result: Result<bool, i32>) -> Result<(), fidl::Error> {
3711        let _result = self.send_raw(result);
3712        if _result.is_err() {
3713            self.control_handle.shutdown();
3714        }
3715        self.drop_without_shutdown();
3716        _result
3717    }
3718
3719    /// Similar to "send" but does not shutdown the channel if an error occurs.
3720    pub fn send_no_shutdown_on_err(self, mut result: Result<bool, i32>) -> Result<(), fidl::Error> {
3721        let _result = self.send_raw(result);
3722        self.drop_without_shutdown();
3723        _result
3724    }
3725
3726    fn send_raw(&self, mut result: Result<bool, i32>) -> Result<(), fidl::Error> {
3727        self.control_handle
3728            .inner
3729            .send::<fidl::encoding::ResultType<DeviceMonitorGetPowerStateResponse, i32>>(
3730                result.map(|power_on| (power_on,)),
3731                self.tx_id,
3732                0x58cf95c5bbbe3f,
3733                fidl::encoding::DynamicFlags::empty(),
3734            )
3735    }
3736}
3737
3738#[must_use = "FIDL methods require a response to be sent"]
3739#[derive(Debug)]
3740pub struct DeviceMonitorSetBtCoexistenceModeResponder {
3741    control_handle: std::mem::ManuallyDrop<DeviceMonitorControlHandle>,
3742    tx_id: u32,
3743}
3744
3745/// Set the the channel to be shutdown (see [`DeviceMonitorControlHandle::shutdown`])
3746/// if the responder is dropped without sending a response, so that the client
3747/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3748impl std::ops::Drop for DeviceMonitorSetBtCoexistenceModeResponder {
3749    fn drop(&mut self) {
3750        self.control_handle.shutdown();
3751        // Safety: drops once, never accessed again
3752        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3753    }
3754}
3755
3756impl fidl::endpoints::Responder for DeviceMonitorSetBtCoexistenceModeResponder {
3757    type ControlHandle = DeviceMonitorControlHandle;
3758
3759    fn control_handle(&self) -> &DeviceMonitorControlHandle {
3760        &self.control_handle
3761    }
3762
3763    fn drop_without_shutdown(mut self) {
3764        // Safety: drops once, never accessed again due to mem::forget
3765        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3766        // Prevent Drop from running (which would shut down the channel)
3767        std::mem::forget(self);
3768    }
3769}
3770
3771impl DeviceMonitorSetBtCoexistenceModeResponder {
3772    /// Sends a response to the FIDL transaction.
3773    ///
3774    /// Sets the channel to shutdown if an error occurs.
3775    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3776        let _result = self.send_raw(result);
3777        if _result.is_err() {
3778            self.control_handle.shutdown();
3779        }
3780        self.drop_without_shutdown();
3781        _result
3782    }
3783
3784    /// Similar to "send" but does not shutdown the channel if an error occurs.
3785    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3786        let _result = self.send_raw(result);
3787        self.drop_without_shutdown();
3788        _result
3789    }
3790
3791    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3792        self.control_handle
3793            .inner
3794            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3795                result,
3796                self.tx_id,
3797                0x97539596c9a79c7,
3798                fidl::encoding::DynamicFlags::empty(),
3799            )
3800    }
3801}
3802
3803#[must_use = "FIDL methods require a response to be sent"]
3804#[derive(Debug)]
3805pub struct DeviceMonitorCreateIfaceResponder {
3806    control_handle: std::mem::ManuallyDrop<DeviceMonitorControlHandle>,
3807    tx_id: u32,
3808}
3809
3810/// Set the the channel to be shutdown (see [`DeviceMonitorControlHandle::shutdown`])
3811/// if the responder is dropped without sending a response, so that the client
3812/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3813impl std::ops::Drop for DeviceMonitorCreateIfaceResponder {
3814    fn drop(&mut self) {
3815        self.control_handle.shutdown();
3816        // Safety: drops once, never accessed again
3817        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3818    }
3819}
3820
3821impl fidl::endpoints::Responder for DeviceMonitorCreateIfaceResponder {
3822    type ControlHandle = DeviceMonitorControlHandle;
3823
3824    fn control_handle(&self) -> &DeviceMonitorControlHandle {
3825        &self.control_handle
3826    }
3827
3828    fn drop_without_shutdown(mut self) {
3829        // Safety: drops once, never accessed again due to mem::forget
3830        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3831        // Prevent Drop from running (which would shut down the channel)
3832        std::mem::forget(self);
3833    }
3834}
3835
3836impl DeviceMonitorCreateIfaceResponder {
3837    /// Sends a response to the FIDL transaction.
3838    ///
3839    /// Sets the channel to shutdown if an error occurs.
3840    pub fn send(
3841        self,
3842        mut result: Result<&DeviceMonitorCreateIfaceResponse, DeviceMonitorError>,
3843    ) -> Result<(), fidl::Error> {
3844        let _result = self.send_raw(result);
3845        if _result.is_err() {
3846            self.control_handle.shutdown();
3847        }
3848        self.drop_without_shutdown();
3849        _result
3850    }
3851
3852    /// Similar to "send" but does not shutdown the channel if an error occurs.
3853    pub fn send_no_shutdown_on_err(
3854        self,
3855        mut result: Result<&DeviceMonitorCreateIfaceResponse, DeviceMonitorError>,
3856    ) -> Result<(), fidl::Error> {
3857        let _result = self.send_raw(result);
3858        self.drop_without_shutdown();
3859        _result
3860    }
3861
3862    fn send_raw(
3863        &self,
3864        mut result: Result<&DeviceMonitorCreateIfaceResponse, DeviceMonitorError>,
3865    ) -> Result<(), fidl::Error> {
3866        self.control_handle.inner.send::<fidl::encoding::ResultType<
3867            DeviceMonitorCreateIfaceResponse,
3868            DeviceMonitorError,
3869        >>(
3870            result,
3871            self.tx_id,
3872            0x1e1d30c24c0ec144,
3873            fidl::encoding::DynamicFlags::empty(),
3874        )
3875    }
3876}
3877
3878#[must_use = "FIDL methods require a response to be sent"]
3879#[derive(Debug)]
3880pub struct DeviceMonitorQueryIfaceResponder {
3881    control_handle: std::mem::ManuallyDrop<DeviceMonitorControlHandle>,
3882    tx_id: u32,
3883}
3884
3885/// Set the the channel to be shutdown (see [`DeviceMonitorControlHandle::shutdown`])
3886/// if the responder is dropped without sending a response, so that the client
3887/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3888impl std::ops::Drop for DeviceMonitorQueryIfaceResponder {
3889    fn drop(&mut self) {
3890        self.control_handle.shutdown();
3891        // Safety: drops once, never accessed again
3892        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3893    }
3894}
3895
3896impl fidl::endpoints::Responder for DeviceMonitorQueryIfaceResponder {
3897    type ControlHandle = DeviceMonitorControlHandle;
3898
3899    fn control_handle(&self) -> &DeviceMonitorControlHandle {
3900        &self.control_handle
3901    }
3902
3903    fn drop_without_shutdown(mut self) {
3904        // Safety: drops once, never accessed again due to mem::forget
3905        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3906        // Prevent Drop from running (which would shut down the channel)
3907        std::mem::forget(self);
3908    }
3909}
3910
3911impl DeviceMonitorQueryIfaceResponder {
3912    /// Sends a response to the FIDL transaction.
3913    ///
3914    /// Sets the channel to shutdown if an error occurs.
3915    pub fn send(self, mut result: Result<&QueryIfaceResponse, i32>) -> Result<(), fidl::Error> {
3916        let _result = self.send_raw(result);
3917        if _result.is_err() {
3918            self.control_handle.shutdown();
3919        }
3920        self.drop_without_shutdown();
3921        _result
3922    }
3923
3924    /// Similar to "send" but does not shutdown the channel if an error occurs.
3925    pub fn send_no_shutdown_on_err(
3926        self,
3927        mut result: Result<&QueryIfaceResponse, i32>,
3928    ) -> Result<(), fidl::Error> {
3929        let _result = self.send_raw(result);
3930        self.drop_without_shutdown();
3931        _result
3932    }
3933
3934    fn send_raw(&self, mut result: Result<&QueryIfaceResponse, i32>) -> Result<(), fidl::Error> {
3935        self.control_handle
3936            .inner
3937            .send::<fidl::encoding::ResultType<DeviceMonitorQueryIfaceResponse, i32>>(
3938                result.map(|resp| (resp,)),
3939                self.tx_id,
3940                0x1a48c4a2b86259ef,
3941                fidl::encoding::DynamicFlags::empty(),
3942            )
3943    }
3944}
3945
3946#[must_use = "FIDL methods require a response to be sent"]
3947#[derive(Debug)]
3948pub struct DeviceMonitorDestroyIfaceResponder {
3949    control_handle: std::mem::ManuallyDrop<DeviceMonitorControlHandle>,
3950    tx_id: u32,
3951}
3952
3953/// Set the the channel to be shutdown (see [`DeviceMonitorControlHandle::shutdown`])
3954/// if the responder is dropped without sending a response, so that the client
3955/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3956impl std::ops::Drop for DeviceMonitorDestroyIfaceResponder {
3957    fn drop(&mut self) {
3958        self.control_handle.shutdown();
3959        // Safety: drops once, never accessed again
3960        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3961    }
3962}
3963
3964impl fidl::endpoints::Responder for DeviceMonitorDestroyIfaceResponder {
3965    type ControlHandle = DeviceMonitorControlHandle;
3966
3967    fn control_handle(&self) -> &DeviceMonitorControlHandle {
3968        &self.control_handle
3969    }
3970
3971    fn drop_without_shutdown(mut self) {
3972        // Safety: drops once, never accessed again due to mem::forget
3973        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3974        // Prevent Drop from running (which would shut down the channel)
3975        std::mem::forget(self);
3976    }
3977}
3978
3979impl DeviceMonitorDestroyIfaceResponder {
3980    /// Sends a response to the FIDL transaction.
3981    ///
3982    /// Sets the channel to shutdown if an error occurs.
3983    pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
3984        let _result = self.send_raw(status);
3985        if _result.is_err() {
3986            self.control_handle.shutdown();
3987        }
3988        self.drop_without_shutdown();
3989        _result
3990    }
3991
3992    /// Similar to "send" but does not shutdown the channel if an error occurs.
3993    pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
3994        let _result = self.send_raw(status);
3995        self.drop_without_shutdown();
3996        _result
3997    }
3998
3999    fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
4000        self.control_handle.inner.send::<DeviceMonitorDestroyIfaceResponse>(
4001            (status,),
4002            self.tx_id,
4003            0x4c77982c1616a3b0,
4004            fidl::encoding::DynamicFlags::empty(),
4005        )
4006    }
4007}
4008
4009#[must_use = "FIDL methods require a response to be sent"]
4010#[derive(Debug)]
4011pub struct DeviceMonitorGetClientSmeResponder {
4012    control_handle: std::mem::ManuallyDrop<DeviceMonitorControlHandle>,
4013    tx_id: u32,
4014}
4015
4016/// Set the the channel to be shutdown (see [`DeviceMonitorControlHandle::shutdown`])
4017/// if the responder is dropped without sending a response, so that the client
4018/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4019impl std::ops::Drop for DeviceMonitorGetClientSmeResponder {
4020    fn drop(&mut self) {
4021        self.control_handle.shutdown();
4022        // Safety: drops once, never accessed again
4023        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4024    }
4025}
4026
4027impl fidl::endpoints::Responder for DeviceMonitorGetClientSmeResponder {
4028    type ControlHandle = DeviceMonitorControlHandle;
4029
4030    fn control_handle(&self) -> &DeviceMonitorControlHandle {
4031        &self.control_handle
4032    }
4033
4034    fn drop_without_shutdown(mut self) {
4035        // Safety: drops once, never accessed again due to mem::forget
4036        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4037        // Prevent Drop from running (which would shut down the channel)
4038        std::mem::forget(self);
4039    }
4040}
4041
4042impl DeviceMonitorGetClientSmeResponder {
4043    /// Sends a response to the FIDL transaction.
4044    ///
4045    /// Sets the channel to shutdown if an error occurs.
4046    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4047        let _result = self.send_raw(result);
4048        if _result.is_err() {
4049            self.control_handle.shutdown();
4050        }
4051        self.drop_without_shutdown();
4052        _result
4053    }
4054
4055    /// Similar to "send" but does not shutdown the channel if an error occurs.
4056    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4057        let _result = self.send_raw(result);
4058        self.drop_without_shutdown();
4059        _result
4060    }
4061
4062    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4063        self.control_handle
4064            .inner
4065            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4066                result,
4067                self.tx_id,
4068                0x1b056c379ca98273,
4069                fidl::encoding::DynamicFlags::empty(),
4070            )
4071    }
4072}
4073
4074#[must_use = "FIDL methods require a response to be sent"]
4075#[derive(Debug)]
4076pub struct DeviceMonitorGetApSmeResponder {
4077    control_handle: std::mem::ManuallyDrop<DeviceMonitorControlHandle>,
4078    tx_id: u32,
4079}
4080
4081/// Set the the channel to be shutdown (see [`DeviceMonitorControlHandle::shutdown`])
4082/// if the responder is dropped without sending a response, so that the client
4083/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4084impl std::ops::Drop for DeviceMonitorGetApSmeResponder {
4085    fn drop(&mut self) {
4086        self.control_handle.shutdown();
4087        // Safety: drops once, never accessed again
4088        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4089    }
4090}
4091
4092impl fidl::endpoints::Responder for DeviceMonitorGetApSmeResponder {
4093    type ControlHandle = DeviceMonitorControlHandle;
4094
4095    fn control_handle(&self) -> &DeviceMonitorControlHandle {
4096        &self.control_handle
4097    }
4098
4099    fn drop_without_shutdown(mut self) {
4100        // Safety: drops once, never accessed again due to mem::forget
4101        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4102        // Prevent Drop from running (which would shut down the channel)
4103        std::mem::forget(self);
4104    }
4105}
4106
4107impl DeviceMonitorGetApSmeResponder {
4108    /// Sends a response to the FIDL transaction.
4109    ///
4110    /// Sets the channel to shutdown if an error occurs.
4111    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4112        let _result = self.send_raw(result);
4113        if _result.is_err() {
4114            self.control_handle.shutdown();
4115        }
4116        self.drop_without_shutdown();
4117        _result
4118    }
4119
4120    /// Similar to "send" but does not shutdown the channel if an error occurs.
4121    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4122        let _result = self.send_raw(result);
4123        self.drop_without_shutdown();
4124        _result
4125    }
4126
4127    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4128        self.control_handle
4129            .inner
4130            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4131                result,
4132                self.tx_id,
4133                0x754de680c4318c52,
4134                fidl::encoding::DynamicFlags::empty(),
4135            )
4136    }
4137}
4138
4139#[must_use = "FIDL methods require a response to be sent"]
4140#[derive(Debug)]
4141pub struct DeviceMonitorGetSmeTelemetryResponder {
4142    control_handle: std::mem::ManuallyDrop<DeviceMonitorControlHandle>,
4143    tx_id: u32,
4144}
4145
4146/// Set the the channel to be shutdown (see [`DeviceMonitorControlHandle::shutdown`])
4147/// if the responder is dropped without sending a response, so that the client
4148/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4149impl std::ops::Drop for DeviceMonitorGetSmeTelemetryResponder {
4150    fn drop(&mut self) {
4151        self.control_handle.shutdown();
4152        // Safety: drops once, never accessed again
4153        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4154    }
4155}
4156
4157impl fidl::endpoints::Responder for DeviceMonitorGetSmeTelemetryResponder {
4158    type ControlHandle = DeviceMonitorControlHandle;
4159
4160    fn control_handle(&self) -> &DeviceMonitorControlHandle {
4161        &self.control_handle
4162    }
4163
4164    fn drop_without_shutdown(mut self) {
4165        // Safety: drops once, never accessed again due to mem::forget
4166        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4167        // Prevent Drop from running (which would shut down the channel)
4168        std::mem::forget(self);
4169    }
4170}
4171
4172impl DeviceMonitorGetSmeTelemetryResponder {
4173    /// Sends a response to the FIDL transaction.
4174    ///
4175    /// Sets the channel to shutdown if an error occurs.
4176    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4177        let _result = self.send_raw(result);
4178        if _result.is_err() {
4179            self.control_handle.shutdown();
4180        }
4181        self.drop_without_shutdown();
4182        _result
4183    }
4184
4185    /// Similar to "send" but does not shutdown the channel if an error occurs.
4186    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4187        let _result = self.send_raw(result);
4188        self.drop_without_shutdown();
4189        _result
4190    }
4191
4192    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4193        self.control_handle
4194            .inner
4195            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4196                result,
4197                self.tx_id,
4198                0x1baf42b003f7452a,
4199                fidl::encoding::DynamicFlags::empty(),
4200            )
4201    }
4202}
4203
4204#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4205pub struct DeviceWatcherMarker;
4206
4207impl fidl::endpoints::ProtocolMarker for DeviceWatcherMarker {
4208    type Proxy = DeviceWatcherProxy;
4209    type RequestStream = DeviceWatcherRequestStream;
4210    #[cfg(target_os = "fuchsia")]
4211    type SynchronousProxy = DeviceWatcherSynchronousProxy;
4212
4213    const DEBUG_NAME: &'static str = "(anonymous) DeviceWatcher";
4214}
4215
4216pub trait DeviceWatcherProxyInterface: Send + Sync {}
4217#[derive(Debug)]
4218#[cfg(target_os = "fuchsia")]
4219pub struct DeviceWatcherSynchronousProxy {
4220    client: fidl::client::sync::Client,
4221}
4222
4223#[cfg(target_os = "fuchsia")]
4224impl fidl::endpoints::SynchronousProxy for DeviceWatcherSynchronousProxy {
4225    type Proxy = DeviceWatcherProxy;
4226    type Protocol = DeviceWatcherMarker;
4227
4228    fn from_channel(inner: fidl::Channel) -> Self {
4229        Self::new(inner)
4230    }
4231
4232    fn into_channel(self) -> fidl::Channel {
4233        self.client.into_channel()
4234    }
4235
4236    fn as_channel(&self) -> &fidl::Channel {
4237        self.client.as_channel()
4238    }
4239}
4240
4241#[cfg(target_os = "fuchsia")]
4242impl DeviceWatcherSynchronousProxy {
4243    pub fn new(channel: fidl::Channel) -> Self {
4244        let protocol_name = <DeviceWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4245        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
4246    }
4247
4248    pub fn into_channel(self) -> fidl::Channel {
4249        self.client.into_channel()
4250    }
4251
4252    /// Waits until an event arrives and returns it. It is safe for other
4253    /// threads to make concurrent requests while waiting for an event.
4254    pub fn wait_for_event(
4255        &self,
4256        deadline: zx::MonotonicInstant,
4257    ) -> Result<DeviceWatcherEvent, fidl::Error> {
4258        DeviceWatcherEvent::decode(self.client.wait_for_event(deadline)?)
4259    }
4260}
4261
4262#[cfg(target_os = "fuchsia")]
4263impl From<DeviceWatcherSynchronousProxy> for zx::NullableHandle {
4264    fn from(value: DeviceWatcherSynchronousProxy) -> Self {
4265        value.into_channel().into()
4266    }
4267}
4268
4269#[cfg(target_os = "fuchsia")]
4270impl From<fidl::Channel> for DeviceWatcherSynchronousProxy {
4271    fn from(value: fidl::Channel) -> Self {
4272        Self::new(value)
4273    }
4274}
4275
4276#[cfg(target_os = "fuchsia")]
4277impl fidl::endpoints::FromClient for DeviceWatcherSynchronousProxy {
4278    type Protocol = DeviceWatcherMarker;
4279
4280    fn from_client(value: fidl::endpoints::ClientEnd<DeviceWatcherMarker>) -> Self {
4281        Self::new(value.into_channel())
4282    }
4283}
4284
4285#[derive(Debug, Clone)]
4286pub struct DeviceWatcherProxy {
4287    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4288}
4289
4290impl fidl::endpoints::Proxy for DeviceWatcherProxy {
4291    type Protocol = DeviceWatcherMarker;
4292
4293    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4294        Self::new(inner)
4295    }
4296
4297    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4298        self.client.into_channel().map_err(|client| Self { client })
4299    }
4300
4301    fn as_channel(&self) -> &::fidl::AsyncChannel {
4302        self.client.as_channel()
4303    }
4304}
4305
4306impl DeviceWatcherProxy {
4307    /// Create a new Proxy for fuchsia.wlan.device.service/DeviceWatcher.
4308    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4309        let protocol_name = <DeviceWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4310        Self { client: fidl::client::Client::new(channel, protocol_name) }
4311    }
4312
4313    /// Get a Stream of events from the remote end of the protocol.
4314    ///
4315    /// # Panics
4316    ///
4317    /// Panics if the event stream was already taken.
4318    pub fn take_event_stream(&self) -> DeviceWatcherEventStream {
4319        DeviceWatcherEventStream { event_receiver: self.client.take_event_receiver() }
4320    }
4321}
4322
4323impl DeviceWatcherProxyInterface for DeviceWatcherProxy {}
4324
4325pub struct DeviceWatcherEventStream {
4326    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4327}
4328
4329impl std::marker::Unpin for DeviceWatcherEventStream {}
4330
4331impl futures::stream::FusedStream for DeviceWatcherEventStream {
4332    fn is_terminated(&self) -> bool {
4333        self.event_receiver.is_terminated()
4334    }
4335}
4336
4337impl futures::Stream for DeviceWatcherEventStream {
4338    type Item = Result<DeviceWatcherEvent, fidl::Error>;
4339
4340    fn poll_next(
4341        mut self: std::pin::Pin<&mut Self>,
4342        cx: &mut std::task::Context<'_>,
4343    ) -> std::task::Poll<Option<Self::Item>> {
4344        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4345            &mut self.event_receiver,
4346            cx
4347        )?) {
4348            Some(buf) => std::task::Poll::Ready(Some(DeviceWatcherEvent::decode(buf))),
4349            None => std::task::Poll::Ready(None),
4350        }
4351    }
4352}
4353
4354#[derive(Debug)]
4355pub enum DeviceWatcherEvent {
4356    OnPhyAdded { phy_id: u16 },
4357    OnPhyRemoved { phy_id: u16 },
4358    OnIfaceAdded { iface_id: u16 },
4359    OnIfaceRemoved { iface_id: u16 },
4360}
4361
4362impl DeviceWatcherEvent {
4363    #[allow(irrefutable_let_patterns)]
4364    pub fn into_on_phy_added(self) -> Option<u16> {
4365        if let DeviceWatcherEvent::OnPhyAdded { phy_id } = self { Some((phy_id)) } else { None }
4366    }
4367    #[allow(irrefutable_let_patterns)]
4368    pub fn into_on_phy_removed(self) -> Option<u16> {
4369        if let DeviceWatcherEvent::OnPhyRemoved { phy_id } = self { Some((phy_id)) } else { None }
4370    }
4371    #[allow(irrefutable_let_patterns)]
4372    pub fn into_on_iface_added(self) -> Option<u16> {
4373        if let DeviceWatcherEvent::OnIfaceAdded { iface_id } = self {
4374            Some((iface_id))
4375        } else {
4376            None
4377        }
4378    }
4379    #[allow(irrefutable_let_patterns)]
4380    pub fn into_on_iface_removed(self) -> Option<u16> {
4381        if let DeviceWatcherEvent::OnIfaceRemoved { iface_id } = self {
4382            Some((iface_id))
4383        } else {
4384            None
4385        }
4386    }
4387
4388    /// Decodes a message buffer as a [`DeviceWatcherEvent`].
4389    fn decode(
4390        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4391    ) -> Result<DeviceWatcherEvent, fidl::Error> {
4392        let (bytes, _handles) = buf.split_mut();
4393        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4394        debug_assert_eq!(tx_header.tx_id, 0);
4395        match tx_header.ordinal {
4396            0x771c58e0bd059f86 => {
4397                let mut out = fidl::new_empty!(
4398                    DeviceWatcherOnPhyAddedRequest,
4399                    fidl::encoding::DefaultFuchsiaResourceDialect
4400                );
4401                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DeviceWatcherOnPhyAddedRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
4402                Ok((DeviceWatcherEvent::OnPhyAdded { phy_id: out.phy_id }))
4403            }
4404            0x4ad72b96ccb7cff6 => {
4405                let mut out = fidl::new_empty!(
4406                    DeviceWatcherOnPhyRemovedRequest,
4407                    fidl::encoding::DefaultFuchsiaResourceDialect
4408                );
4409                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DeviceWatcherOnPhyRemovedRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
4410                Ok((DeviceWatcherEvent::OnPhyRemoved { phy_id: out.phy_id }))
4411            }
4412            0x6ee685e4aa1f31d8 => {
4413                let mut out = fidl::new_empty!(
4414                    DeviceWatcherOnIfaceAddedRequest,
4415                    fidl::encoding::DefaultFuchsiaResourceDialect
4416                );
4417                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DeviceWatcherOnIfaceAddedRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
4418                Ok((DeviceWatcherEvent::OnIfaceAdded { iface_id: out.iface_id }))
4419            }
4420            0x3b771b1fce38c291 => {
4421                let mut out = fidl::new_empty!(
4422                    DeviceWatcherOnIfaceRemovedRequest,
4423                    fidl::encoding::DefaultFuchsiaResourceDialect
4424                );
4425                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DeviceWatcherOnIfaceRemovedRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
4426                Ok((DeviceWatcherEvent::OnIfaceRemoved { iface_id: out.iface_id }))
4427            }
4428            _ => Err(fidl::Error::UnknownOrdinal {
4429                ordinal: tx_header.ordinal,
4430                protocol_name: <DeviceWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4431            }),
4432        }
4433    }
4434}
4435
4436/// A Stream of incoming requests for fuchsia.wlan.device.service/DeviceWatcher.
4437pub struct DeviceWatcherRequestStream {
4438    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4439    is_terminated: bool,
4440}
4441
4442impl std::marker::Unpin for DeviceWatcherRequestStream {}
4443
4444impl futures::stream::FusedStream for DeviceWatcherRequestStream {
4445    fn is_terminated(&self) -> bool {
4446        self.is_terminated
4447    }
4448}
4449
4450impl fidl::endpoints::RequestStream for DeviceWatcherRequestStream {
4451    type Protocol = DeviceWatcherMarker;
4452    type ControlHandle = DeviceWatcherControlHandle;
4453
4454    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4455        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4456    }
4457
4458    fn control_handle(&self) -> Self::ControlHandle {
4459        DeviceWatcherControlHandle { inner: self.inner.clone() }
4460    }
4461
4462    fn into_inner(
4463        self,
4464    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4465    {
4466        (self.inner, self.is_terminated)
4467    }
4468
4469    fn from_inner(
4470        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4471        is_terminated: bool,
4472    ) -> Self {
4473        Self { inner, is_terminated }
4474    }
4475}
4476
4477impl futures::Stream for DeviceWatcherRequestStream {
4478    type Item = Result<DeviceWatcherRequest, fidl::Error>;
4479
4480    fn poll_next(
4481        mut self: std::pin::Pin<&mut Self>,
4482        cx: &mut std::task::Context<'_>,
4483    ) -> std::task::Poll<Option<Self::Item>> {
4484        let this = &mut *self;
4485        if this.inner.check_shutdown(cx) {
4486            this.is_terminated = true;
4487            return std::task::Poll::Ready(None);
4488        }
4489        if this.is_terminated {
4490            panic!("polled DeviceWatcherRequestStream after completion");
4491        }
4492        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4493            |bytes, handles| {
4494                match this.inner.channel().read_etc(cx, bytes, handles) {
4495                    std::task::Poll::Ready(Ok(())) => {}
4496                    std::task::Poll::Pending => return std::task::Poll::Pending,
4497                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4498                        this.is_terminated = true;
4499                        return std::task::Poll::Ready(None);
4500                    }
4501                    std::task::Poll::Ready(Err(e)) => {
4502                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4503                            e.into(),
4504                        ))));
4505                    }
4506                }
4507
4508                // A message has been received from the channel
4509                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4510
4511                std::task::Poll::Ready(Some(match header.ordinal {
4512                    _ => Err(fidl::Error::UnknownOrdinal {
4513                        ordinal: header.ordinal,
4514                        protocol_name:
4515                            <DeviceWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4516                    }),
4517                }))
4518            },
4519        )
4520    }
4521}
4522
4523#[derive(Debug)]
4524pub enum DeviceWatcherRequest {}
4525
4526impl DeviceWatcherRequest {
4527    /// Name of the method defined in FIDL
4528    pub fn method_name(&self) -> &'static str {
4529        match *self {}
4530    }
4531}
4532
4533#[derive(Debug, Clone)]
4534pub struct DeviceWatcherControlHandle {
4535    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4536}
4537
4538impl fidl::endpoints::ControlHandle for DeviceWatcherControlHandle {
4539    fn shutdown(&self) {
4540        self.inner.shutdown()
4541    }
4542
4543    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4544        self.inner.shutdown_with_epitaph(status)
4545    }
4546
4547    fn is_closed(&self) -> bool {
4548        self.inner.channel().is_closed()
4549    }
4550    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4551        self.inner.channel().on_closed()
4552    }
4553
4554    #[cfg(target_os = "fuchsia")]
4555    fn signal_peer(
4556        &self,
4557        clear_mask: zx::Signals,
4558        set_mask: zx::Signals,
4559    ) -> Result<(), zx_status::Status> {
4560        use fidl::Peered;
4561        self.inner.channel().signal_peer(clear_mask, set_mask)
4562    }
4563}
4564
4565impl DeviceWatcherControlHandle {
4566    pub fn send_on_phy_added(&self, mut phy_id: u16) -> Result<(), fidl::Error> {
4567        self.inner.send::<DeviceWatcherOnPhyAddedRequest>(
4568            (phy_id,),
4569            0,
4570            0x771c58e0bd059f86,
4571            fidl::encoding::DynamicFlags::empty(),
4572        )
4573    }
4574
4575    pub fn send_on_phy_removed(&self, mut phy_id: u16) -> Result<(), fidl::Error> {
4576        self.inner.send::<DeviceWatcherOnPhyRemovedRequest>(
4577            (phy_id,),
4578            0,
4579            0x4ad72b96ccb7cff6,
4580            fidl::encoding::DynamicFlags::empty(),
4581        )
4582    }
4583
4584    pub fn send_on_iface_added(&self, mut iface_id: u16) -> Result<(), fidl::Error> {
4585        self.inner.send::<DeviceWatcherOnIfaceAddedRequest>(
4586            (iface_id,),
4587            0,
4588            0x6ee685e4aa1f31d8,
4589            fidl::encoding::DynamicFlags::empty(),
4590        )
4591    }
4592
4593    pub fn send_on_iface_removed(&self, mut iface_id: u16) -> Result<(), fidl::Error> {
4594        self.inner.send::<DeviceWatcherOnIfaceRemovedRequest>(
4595            (iface_id,),
4596            0,
4597            0x3b771b1fce38c291,
4598            fidl::encoding::DynamicFlags::empty(),
4599        )
4600    }
4601}
4602
4603#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4604pub struct PhyEventWatcherMarker;
4605
4606impl fidl::endpoints::ProtocolMarker for PhyEventWatcherMarker {
4607    type Proxy = PhyEventWatcherProxy;
4608    type RequestStream = PhyEventWatcherRequestStream;
4609    #[cfg(target_os = "fuchsia")]
4610    type SynchronousProxy = PhyEventWatcherSynchronousProxy;
4611
4612    const DEBUG_NAME: &'static str = "(anonymous) PhyEventWatcher";
4613}
4614
4615pub trait PhyEventWatcherProxyInterface: Send + Sync {}
4616#[derive(Debug)]
4617#[cfg(target_os = "fuchsia")]
4618pub struct PhyEventWatcherSynchronousProxy {
4619    client: fidl::client::sync::Client,
4620}
4621
4622#[cfg(target_os = "fuchsia")]
4623impl fidl::endpoints::SynchronousProxy for PhyEventWatcherSynchronousProxy {
4624    type Proxy = PhyEventWatcherProxy;
4625    type Protocol = PhyEventWatcherMarker;
4626
4627    fn from_channel(inner: fidl::Channel) -> Self {
4628        Self::new(inner)
4629    }
4630
4631    fn into_channel(self) -> fidl::Channel {
4632        self.client.into_channel()
4633    }
4634
4635    fn as_channel(&self) -> &fidl::Channel {
4636        self.client.as_channel()
4637    }
4638}
4639
4640#[cfg(target_os = "fuchsia")]
4641impl PhyEventWatcherSynchronousProxy {
4642    pub fn new(channel: fidl::Channel) -> Self {
4643        let protocol_name = <PhyEventWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4644        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
4645    }
4646
4647    pub fn into_channel(self) -> fidl::Channel {
4648        self.client.into_channel()
4649    }
4650
4651    /// Waits until an event arrives and returns it. It is safe for other
4652    /// threads to make concurrent requests while waiting for an event.
4653    pub fn wait_for_event(
4654        &self,
4655        deadline: zx::MonotonicInstant,
4656    ) -> Result<PhyEventWatcherEvent, fidl::Error> {
4657        PhyEventWatcherEvent::decode(self.client.wait_for_event(deadline)?)
4658    }
4659}
4660
4661#[cfg(target_os = "fuchsia")]
4662impl From<PhyEventWatcherSynchronousProxy> for zx::NullableHandle {
4663    fn from(value: PhyEventWatcherSynchronousProxy) -> Self {
4664        value.into_channel().into()
4665    }
4666}
4667
4668#[cfg(target_os = "fuchsia")]
4669impl From<fidl::Channel> for PhyEventWatcherSynchronousProxy {
4670    fn from(value: fidl::Channel) -> Self {
4671        Self::new(value)
4672    }
4673}
4674
4675#[cfg(target_os = "fuchsia")]
4676impl fidl::endpoints::FromClient for PhyEventWatcherSynchronousProxy {
4677    type Protocol = PhyEventWatcherMarker;
4678
4679    fn from_client(value: fidl::endpoints::ClientEnd<PhyEventWatcherMarker>) -> Self {
4680        Self::new(value.into_channel())
4681    }
4682}
4683
4684#[derive(Debug, Clone)]
4685pub struct PhyEventWatcherProxy {
4686    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4687}
4688
4689impl fidl::endpoints::Proxy for PhyEventWatcherProxy {
4690    type Protocol = PhyEventWatcherMarker;
4691
4692    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4693        Self::new(inner)
4694    }
4695
4696    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4697        self.client.into_channel().map_err(|client| Self { client })
4698    }
4699
4700    fn as_channel(&self) -> &::fidl::AsyncChannel {
4701        self.client.as_channel()
4702    }
4703}
4704
4705impl PhyEventWatcherProxy {
4706    /// Create a new Proxy for fuchsia.wlan.device.service/PhyEventWatcher.
4707    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4708        let protocol_name = <PhyEventWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4709        Self { client: fidl::client::Client::new(channel, protocol_name) }
4710    }
4711
4712    /// Get a Stream of events from the remote end of the protocol.
4713    ///
4714    /// # Panics
4715    ///
4716    /// Panics if the event stream was already taken.
4717    pub fn take_event_stream(&self) -> PhyEventWatcherEventStream {
4718        PhyEventWatcherEventStream { event_receiver: self.client.take_event_receiver() }
4719    }
4720}
4721
4722impl PhyEventWatcherProxyInterface for PhyEventWatcherProxy {}
4723
4724pub struct PhyEventWatcherEventStream {
4725    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4726}
4727
4728impl std::marker::Unpin for PhyEventWatcherEventStream {}
4729
4730impl futures::stream::FusedStream for PhyEventWatcherEventStream {
4731    fn is_terminated(&self) -> bool {
4732        self.event_receiver.is_terminated()
4733    }
4734}
4735
4736impl futures::Stream for PhyEventWatcherEventStream {
4737    type Item = Result<PhyEventWatcherEvent, fidl::Error>;
4738
4739    fn poll_next(
4740        mut self: std::pin::Pin<&mut Self>,
4741        cx: &mut std::task::Context<'_>,
4742    ) -> std::task::Poll<Option<Self::Item>> {
4743        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4744            &mut self.event_receiver,
4745            cx
4746        )?) {
4747            Some(buf) => std::task::Poll::Ready(Some(PhyEventWatcherEvent::decode(buf))),
4748            None => std::task::Poll::Ready(None),
4749        }
4750    }
4751}
4752
4753#[derive(Debug)]
4754pub enum PhyEventWatcherEvent {
4755    OnCriticalError {
4756        phy_id: u16,
4757        reason_code: CriticalErrorReason,
4758    },
4759    OnCountryCodeChange {
4760        phy_id: u16,
4761        alpha2: [u8; 2],
4762    },
4763    #[non_exhaustive]
4764    _UnknownEvent {
4765        /// Ordinal of the event that was sent.
4766        ordinal: u64,
4767    },
4768}
4769
4770impl PhyEventWatcherEvent {
4771    #[allow(irrefutable_let_patterns)]
4772    pub fn into_on_critical_error(self) -> Option<(u16, CriticalErrorReason)> {
4773        if let PhyEventWatcherEvent::OnCriticalError { phy_id, reason_code } = self {
4774            Some((phy_id, reason_code))
4775        } else {
4776            None
4777        }
4778    }
4779    #[allow(irrefutable_let_patterns)]
4780    pub fn into_on_country_code_change(self) -> Option<(u16, [u8; 2])> {
4781        if let PhyEventWatcherEvent::OnCountryCodeChange { phy_id, alpha2 } = self {
4782            Some((phy_id, alpha2))
4783        } else {
4784            None
4785        }
4786    }
4787
4788    /// Decodes a message buffer as a [`PhyEventWatcherEvent`].
4789    fn decode(
4790        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4791    ) -> Result<PhyEventWatcherEvent, fidl::Error> {
4792        let (bytes, _handles) = buf.split_mut();
4793        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4794        debug_assert_eq!(tx_header.tx_id, 0);
4795        match tx_header.ordinal {
4796            0x609a325d54f9e6ac => {
4797                let mut out = fidl::new_empty!(
4798                    PhyEventWatcherOnCriticalErrorRequest,
4799                    fidl::encoding::DefaultFuchsiaResourceDialect
4800                );
4801                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<PhyEventWatcherOnCriticalErrorRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
4802                Ok((PhyEventWatcherEvent::OnCriticalError {
4803                    phy_id: out.phy_id,
4804                    reason_code: out.reason_code,
4805                }))
4806            }
4807            0x781d791772be33ed => {
4808                let mut out = fidl::new_empty!(
4809                    PhyEventWatcherOnCountryCodeChangeRequest,
4810                    fidl::encoding::DefaultFuchsiaResourceDialect
4811                );
4812                fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<PhyEventWatcherOnCountryCodeChangeRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
4813                Ok((PhyEventWatcherEvent::OnCountryCodeChange {
4814                    phy_id: out.phy_id,
4815                    alpha2: out.alpha2,
4816                }))
4817            }
4818            _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
4819                Ok(PhyEventWatcherEvent::_UnknownEvent { ordinal: tx_header.ordinal })
4820            }
4821            _ => Err(fidl::Error::UnknownOrdinal {
4822                ordinal: tx_header.ordinal,
4823                protocol_name:
4824                    <PhyEventWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4825            }),
4826        }
4827    }
4828}
4829
4830/// A Stream of incoming requests for fuchsia.wlan.device.service/PhyEventWatcher.
4831pub struct PhyEventWatcherRequestStream {
4832    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4833    is_terminated: bool,
4834}
4835
4836impl std::marker::Unpin for PhyEventWatcherRequestStream {}
4837
4838impl futures::stream::FusedStream for PhyEventWatcherRequestStream {
4839    fn is_terminated(&self) -> bool {
4840        self.is_terminated
4841    }
4842}
4843
4844impl fidl::endpoints::RequestStream for PhyEventWatcherRequestStream {
4845    type Protocol = PhyEventWatcherMarker;
4846    type ControlHandle = PhyEventWatcherControlHandle;
4847
4848    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4849        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4850    }
4851
4852    fn control_handle(&self) -> Self::ControlHandle {
4853        PhyEventWatcherControlHandle { inner: self.inner.clone() }
4854    }
4855
4856    fn into_inner(
4857        self,
4858    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4859    {
4860        (self.inner, self.is_terminated)
4861    }
4862
4863    fn from_inner(
4864        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4865        is_terminated: bool,
4866    ) -> Self {
4867        Self { inner, is_terminated }
4868    }
4869}
4870
4871impl futures::Stream for PhyEventWatcherRequestStream {
4872    type Item = Result<PhyEventWatcherRequest, fidl::Error>;
4873
4874    fn poll_next(
4875        mut self: std::pin::Pin<&mut Self>,
4876        cx: &mut std::task::Context<'_>,
4877    ) -> std::task::Poll<Option<Self::Item>> {
4878        let this = &mut *self;
4879        if this.inner.check_shutdown(cx) {
4880            this.is_terminated = true;
4881            return std::task::Poll::Ready(None);
4882        }
4883        if this.is_terminated {
4884            panic!("polled PhyEventWatcherRequestStream after completion");
4885        }
4886        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4887            |bytes, handles| {
4888                match this.inner.channel().read_etc(cx, bytes, handles) {
4889                    std::task::Poll::Ready(Ok(())) => {}
4890                    std::task::Poll::Pending => return std::task::Poll::Pending,
4891                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4892                        this.is_terminated = true;
4893                        return std::task::Poll::Ready(None);
4894                    }
4895                    std::task::Poll::Ready(Err(e)) => {
4896                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4897                            e.into(),
4898                        ))));
4899                    }
4900                }
4901
4902                // A message has been received from the channel
4903                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4904
4905                std::task::Poll::Ready(Some(match header.ordinal {
4906                    _ if header.tx_id == 0
4907                        && header
4908                            .dynamic_flags()
4909                            .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
4910                    {
4911                        Ok(PhyEventWatcherRequest::_UnknownMethod {
4912                            ordinal: header.ordinal,
4913                            control_handle: PhyEventWatcherControlHandle {
4914                                inner: this.inner.clone(),
4915                            },
4916                            method_type: fidl::MethodType::OneWay,
4917                        })
4918                    }
4919                    _ if header
4920                        .dynamic_flags()
4921                        .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
4922                    {
4923                        this.inner.send_framework_err(
4924                            fidl::encoding::FrameworkErr::UnknownMethod,
4925                            header.tx_id,
4926                            header.ordinal,
4927                            header.dynamic_flags(),
4928                            (bytes, handles),
4929                        )?;
4930                        Ok(PhyEventWatcherRequest::_UnknownMethod {
4931                            ordinal: header.ordinal,
4932                            control_handle: PhyEventWatcherControlHandle {
4933                                inner: this.inner.clone(),
4934                            },
4935                            method_type: fidl::MethodType::TwoWay,
4936                        })
4937                    }
4938                    _ => Err(fidl::Error::UnknownOrdinal {
4939                        ordinal: header.ordinal,
4940                        protocol_name:
4941                            <PhyEventWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4942                    }),
4943                }))
4944            },
4945        )
4946    }
4947}
4948
4949#[derive(Debug)]
4950pub enum PhyEventWatcherRequest {
4951    /// An interaction was received which does not match any known method.
4952    #[non_exhaustive]
4953    _UnknownMethod {
4954        /// Ordinal of the method that was called.
4955        ordinal: u64,
4956        control_handle: PhyEventWatcherControlHandle,
4957        method_type: fidl::MethodType,
4958    },
4959}
4960
4961impl PhyEventWatcherRequest {
4962    /// Name of the method defined in FIDL
4963    pub fn method_name(&self) -> &'static str {
4964        match *self {
4965            PhyEventWatcherRequest::_UnknownMethod {
4966                method_type: fidl::MethodType::OneWay,
4967                ..
4968            } => "unknown one-way method",
4969            PhyEventWatcherRequest::_UnknownMethod {
4970                method_type: fidl::MethodType::TwoWay,
4971                ..
4972            } => "unknown two-way method",
4973        }
4974    }
4975}
4976
4977#[derive(Debug, Clone)]
4978pub struct PhyEventWatcherControlHandle {
4979    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4980}
4981
4982impl fidl::endpoints::ControlHandle for PhyEventWatcherControlHandle {
4983    fn shutdown(&self) {
4984        self.inner.shutdown()
4985    }
4986
4987    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4988        self.inner.shutdown_with_epitaph(status)
4989    }
4990
4991    fn is_closed(&self) -> bool {
4992        self.inner.channel().is_closed()
4993    }
4994    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4995        self.inner.channel().on_closed()
4996    }
4997
4998    #[cfg(target_os = "fuchsia")]
4999    fn signal_peer(
5000        &self,
5001        clear_mask: zx::Signals,
5002        set_mask: zx::Signals,
5003    ) -> Result<(), zx_status::Status> {
5004        use fidl::Peered;
5005        self.inner.channel().signal_peer(clear_mask, set_mask)
5006    }
5007}
5008
5009impl PhyEventWatcherControlHandle {
5010    pub fn send_on_critical_error(
5011        &self,
5012        mut phy_id: u16,
5013        mut reason_code: CriticalErrorReason,
5014    ) -> Result<(), fidl::Error> {
5015        self.inner.send::<PhyEventWatcherOnCriticalErrorRequest>(
5016            (phy_id, reason_code),
5017            0,
5018            0x609a325d54f9e6ac,
5019            fidl::encoding::DynamicFlags::empty(),
5020        )
5021    }
5022
5023    pub fn send_on_country_code_change(
5024        &self,
5025        mut phy_id: u16,
5026        mut alpha2: &[u8; 2],
5027    ) -> Result<(), fidl::Error> {
5028        self.inner.send::<PhyEventWatcherOnCountryCodeChangeRequest>(
5029            (phy_id, alpha2),
5030            0,
5031            0x781d791772be33ed,
5032            fidl::encoding::DynamicFlags::empty(),
5033        )
5034    }
5035}
5036
5037mod internal {
5038    use super::*;
5039
5040    impl fidl::encoding::ResourceTypeMarker for DeviceMonitorGetApSmeRequest {
5041        type Borrowed<'a> = &'a mut Self;
5042        fn take_or_borrow<'a>(
5043            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5044        ) -> Self::Borrowed<'a> {
5045            value
5046        }
5047    }
5048
5049    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorGetApSmeRequest {
5050        type Owned = Self;
5051
5052        #[inline(always)]
5053        fn inline_align(_context: fidl::encoding::Context) -> usize {
5054            4
5055        }
5056
5057        #[inline(always)]
5058        fn inline_size(_context: fidl::encoding::Context) -> usize {
5059            8
5060        }
5061    }
5062
5063    unsafe impl
5064        fidl::encoding::Encode<
5065            DeviceMonitorGetApSmeRequest,
5066            fidl::encoding::DefaultFuchsiaResourceDialect,
5067        > for &mut DeviceMonitorGetApSmeRequest
5068    {
5069        #[inline]
5070        unsafe fn encode(
5071            self,
5072            encoder: &mut fidl::encoding::Encoder<
5073                '_,
5074                fidl::encoding::DefaultFuchsiaResourceDialect,
5075            >,
5076            offset: usize,
5077            _depth: fidl::encoding::Depth,
5078        ) -> fidl::Result<()> {
5079            encoder.debug_check_bounds::<DeviceMonitorGetApSmeRequest>(offset);
5080            // Delegate to tuple encoding.
5081            fidl::encoding::Encode::<
5082                DeviceMonitorGetApSmeRequest,
5083                fidl::encoding::DefaultFuchsiaResourceDialect,
5084            >::encode(
5085                (
5086                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface_id),
5087                    <fidl::encoding::Endpoint<
5088                        fidl::endpoints::ServerEnd<fidl_fuchsia_wlan_sme::ApSmeMarker>,
5089                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5090                        &mut self.sme_server
5091                    ),
5092                ),
5093                encoder,
5094                offset,
5095                _depth,
5096            )
5097        }
5098    }
5099    unsafe impl<
5100        T0: fidl::encoding::Encode<u16, fidl::encoding::DefaultFuchsiaResourceDialect>,
5101        T1: fidl::encoding::Encode<
5102                fidl::encoding::Endpoint<
5103                    fidl::endpoints::ServerEnd<fidl_fuchsia_wlan_sme::ApSmeMarker>,
5104                >,
5105                fidl::encoding::DefaultFuchsiaResourceDialect,
5106            >,
5107    >
5108        fidl::encoding::Encode<
5109            DeviceMonitorGetApSmeRequest,
5110            fidl::encoding::DefaultFuchsiaResourceDialect,
5111        > for (T0, T1)
5112    {
5113        #[inline]
5114        unsafe fn encode(
5115            self,
5116            encoder: &mut fidl::encoding::Encoder<
5117                '_,
5118                fidl::encoding::DefaultFuchsiaResourceDialect,
5119            >,
5120            offset: usize,
5121            depth: fidl::encoding::Depth,
5122        ) -> fidl::Result<()> {
5123            encoder.debug_check_bounds::<DeviceMonitorGetApSmeRequest>(offset);
5124            // Zero out padding regions. There's no need to apply masks
5125            // because the unmasked parts will be overwritten by fields.
5126            unsafe {
5127                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
5128                (ptr as *mut u32).write_unaligned(0);
5129            }
5130            // Write the fields.
5131            self.0.encode(encoder, offset + 0, depth)?;
5132            self.1.encode(encoder, offset + 4, depth)?;
5133            Ok(())
5134        }
5135    }
5136
5137    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5138        for DeviceMonitorGetApSmeRequest
5139    {
5140        #[inline(always)]
5141        fn new_empty() -> Self {
5142            Self {
5143                iface_id: fidl::new_empty!(u16, fidl::encoding::DefaultFuchsiaResourceDialect),
5144                sme_server: fidl::new_empty!(
5145                    fidl::encoding::Endpoint<
5146                        fidl::endpoints::ServerEnd<fidl_fuchsia_wlan_sme::ApSmeMarker>,
5147                    >,
5148                    fidl::encoding::DefaultFuchsiaResourceDialect
5149                ),
5150            }
5151        }
5152
5153        #[inline]
5154        unsafe fn decode(
5155            &mut self,
5156            decoder: &mut fidl::encoding::Decoder<
5157                '_,
5158                fidl::encoding::DefaultFuchsiaResourceDialect,
5159            >,
5160            offset: usize,
5161            _depth: fidl::encoding::Depth,
5162        ) -> fidl::Result<()> {
5163            decoder.debug_check_bounds::<Self>(offset);
5164            // Verify that padding bytes are zero.
5165            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
5166            let padval = unsafe { (ptr as *const u32).read_unaligned() };
5167            let mask = 0xffff0000u32;
5168            let maskedval = padval & mask;
5169            if maskedval != 0 {
5170                return Err(fidl::Error::NonZeroPadding {
5171                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
5172                });
5173            }
5174            fidl::decode!(
5175                u16,
5176                fidl::encoding::DefaultFuchsiaResourceDialect,
5177                &mut self.iface_id,
5178                decoder,
5179                offset + 0,
5180                _depth
5181            )?;
5182            fidl::decode!(
5183                fidl::encoding::Endpoint<
5184                    fidl::endpoints::ServerEnd<fidl_fuchsia_wlan_sme::ApSmeMarker>,
5185                >,
5186                fidl::encoding::DefaultFuchsiaResourceDialect,
5187                &mut self.sme_server,
5188                decoder,
5189                offset + 4,
5190                _depth
5191            )?;
5192            Ok(())
5193        }
5194    }
5195
5196    impl fidl::encoding::ResourceTypeMarker for DeviceMonitorGetClientSmeRequest {
5197        type Borrowed<'a> = &'a mut Self;
5198        fn take_or_borrow<'a>(
5199            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5200        ) -> Self::Borrowed<'a> {
5201            value
5202        }
5203    }
5204
5205    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorGetClientSmeRequest {
5206        type Owned = Self;
5207
5208        #[inline(always)]
5209        fn inline_align(_context: fidl::encoding::Context) -> usize {
5210            4
5211        }
5212
5213        #[inline(always)]
5214        fn inline_size(_context: fidl::encoding::Context) -> usize {
5215            8
5216        }
5217    }
5218
5219    unsafe impl
5220        fidl::encoding::Encode<
5221            DeviceMonitorGetClientSmeRequest,
5222            fidl::encoding::DefaultFuchsiaResourceDialect,
5223        > for &mut DeviceMonitorGetClientSmeRequest
5224    {
5225        #[inline]
5226        unsafe fn encode(
5227            self,
5228            encoder: &mut fidl::encoding::Encoder<
5229                '_,
5230                fidl::encoding::DefaultFuchsiaResourceDialect,
5231            >,
5232            offset: usize,
5233            _depth: fidl::encoding::Depth,
5234        ) -> fidl::Result<()> {
5235            encoder.debug_check_bounds::<DeviceMonitorGetClientSmeRequest>(offset);
5236            // Delegate to tuple encoding.
5237            fidl::encoding::Encode::<
5238                DeviceMonitorGetClientSmeRequest,
5239                fidl::encoding::DefaultFuchsiaResourceDialect,
5240            >::encode(
5241                (
5242                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface_id),
5243                    <fidl::encoding::Endpoint<
5244                        fidl::endpoints::ServerEnd<fidl_fuchsia_wlan_sme::ClientSmeMarker>,
5245                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5246                        &mut self.sme_server
5247                    ),
5248                ),
5249                encoder,
5250                offset,
5251                _depth,
5252            )
5253        }
5254    }
5255    unsafe impl<
5256        T0: fidl::encoding::Encode<u16, fidl::encoding::DefaultFuchsiaResourceDialect>,
5257        T1: fidl::encoding::Encode<
5258                fidl::encoding::Endpoint<
5259                    fidl::endpoints::ServerEnd<fidl_fuchsia_wlan_sme::ClientSmeMarker>,
5260                >,
5261                fidl::encoding::DefaultFuchsiaResourceDialect,
5262            >,
5263    >
5264        fidl::encoding::Encode<
5265            DeviceMonitorGetClientSmeRequest,
5266            fidl::encoding::DefaultFuchsiaResourceDialect,
5267        > for (T0, T1)
5268    {
5269        #[inline]
5270        unsafe fn encode(
5271            self,
5272            encoder: &mut fidl::encoding::Encoder<
5273                '_,
5274                fidl::encoding::DefaultFuchsiaResourceDialect,
5275            >,
5276            offset: usize,
5277            depth: fidl::encoding::Depth,
5278        ) -> fidl::Result<()> {
5279            encoder.debug_check_bounds::<DeviceMonitorGetClientSmeRequest>(offset);
5280            // Zero out padding regions. There's no need to apply masks
5281            // because the unmasked parts will be overwritten by fields.
5282            unsafe {
5283                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
5284                (ptr as *mut u32).write_unaligned(0);
5285            }
5286            // Write the fields.
5287            self.0.encode(encoder, offset + 0, depth)?;
5288            self.1.encode(encoder, offset + 4, depth)?;
5289            Ok(())
5290        }
5291    }
5292
5293    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5294        for DeviceMonitorGetClientSmeRequest
5295    {
5296        #[inline(always)]
5297        fn new_empty() -> Self {
5298            Self {
5299                iface_id: fidl::new_empty!(u16, fidl::encoding::DefaultFuchsiaResourceDialect),
5300                sme_server: fidl::new_empty!(
5301                    fidl::encoding::Endpoint<
5302                        fidl::endpoints::ServerEnd<fidl_fuchsia_wlan_sme::ClientSmeMarker>,
5303                    >,
5304                    fidl::encoding::DefaultFuchsiaResourceDialect
5305                ),
5306            }
5307        }
5308
5309        #[inline]
5310        unsafe fn decode(
5311            &mut self,
5312            decoder: &mut fidl::encoding::Decoder<
5313                '_,
5314                fidl::encoding::DefaultFuchsiaResourceDialect,
5315            >,
5316            offset: usize,
5317            _depth: fidl::encoding::Depth,
5318        ) -> fidl::Result<()> {
5319            decoder.debug_check_bounds::<Self>(offset);
5320            // Verify that padding bytes are zero.
5321            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
5322            let padval = unsafe { (ptr as *const u32).read_unaligned() };
5323            let mask = 0xffff0000u32;
5324            let maskedval = padval & mask;
5325            if maskedval != 0 {
5326                return Err(fidl::Error::NonZeroPadding {
5327                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
5328                });
5329            }
5330            fidl::decode!(
5331                u16,
5332                fidl::encoding::DefaultFuchsiaResourceDialect,
5333                &mut self.iface_id,
5334                decoder,
5335                offset + 0,
5336                _depth
5337            )?;
5338            fidl::decode!(
5339                fidl::encoding::Endpoint<
5340                    fidl::endpoints::ServerEnd<fidl_fuchsia_wlan_sme::ClientSmeMarker>,
5341                >,
5342                fidl::encoding::DefaultFuchsiaResourceDialect,
5343                &mut self.sme_server,
5344                decoder,
5345                offset + 4,
5346                _depth
5347            )?;
5348            Ok(())
5349        }
5350    }
5351
5352    impl fidl::encoding::ResourceTypeMarker for DeviceMonitorGetSmeTelemetryRequest {
5353        type Borrowed<'a> = &'a mut Self;
5354        fn take_or_borrow<'a>(
5355            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5356        ) -> Self::Borrowed<'a> {
5357            value
5358        }
5359    }
5360
5361    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorGetSmeTelemetryRequest {
5362        type Owned = Self;
5363
5364        #[inline(always)]
5365        fn inline_align(_context: fidl::encoding::Context) -> usize {
5366            4
5367        }
5368
5369        #[inline(always)]
5370        fn inline_size(_context: fidl::encoding::Context) -> usize {
5371            8
5372        }
5373    }
5374
5375    unsafe impl
5376        fidl::encoding::Encode<
5377            DeviceMonitorGetSmeTelemetryRequest,
5378            fidl::encoding::DefaultFuchsiaResourceDialect,
5379        > for &mut DeviceMonitorGetSmeTelemetryRequest
5380    {
5381        #[inline]
5382        unsafe fn encode(
5383            self,
5384            encoder: &mut fidl::encoding::Encoder<
5385                '_,
5386                fidl::encoding::DefaultFuchsiaResourceDialect,
5387            >,
5388            offset: usize,
5389            _depth: fidl::encoding::Depth,
5390        ) -> fidl::Result<()> {
5391            encoder.debug_check_bounds::<DeviceMonitorGetSmeTelemetryRequest>(offset);
5392            // Delegate to tuple encoding.
5393            fidl::encoding::Encode::<
5394                DeviceMonitorGetSmeTelemetryRequest,
5395                fidl::encoding::DefaultFuchsiaResourceDialect,
5396            >::encode(
5397                (
5398                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.iface_id),
5399                    <fidl::encoding::Endpoint<
5400                        fidl::endpoints::ServerEnd<fidl_fuchsia_wlan_sme::TelemetryMarker>,
5401                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5402                        &mut self.telemetry_server,
5403                    ),
5404                ),
5405                encoder,
5406                offset,
5407                _depth,
5408            )
5409        }
5410    }
5411    unsafe impl<
5412        T0: fidl::encoding::Encode<u16, fidl::encoding::DefaultFuchsiaResourceDialect>,
5413        T1: fidl::encoding::Encode<
5414                fidl::encoding::Endpoint<
5415                    fidl::endpoints::ServerEnd<fidl_fuchsia_wlan_sme::TelemetryMarker>,
5416                >,
5417                fidl::encoding::DefaultFuchsiaResourceDialect,
5418            >,
5419    >
5420        fidl::encoding::Encode<
5421            DeviceMonitorGetSmeTelemetryRequest,
5422            fidl::encoding::DefaultFuchsiaResourceDialect,
5423        > for (T0, T1)
5424    {
5425        #[inline]
5426        unsafe fn encode(
5427            self,
5428            encoder: &mut fidl::encoding::Encoder<
5429                '_,
5430                fidl::encoding::DefaultFuchsiaResourceDialect,
5431            >,
5432            offset: usize,
5433            depth: fidl::encoding::Depth,
5434        ) -> fidl::Result<()> {
5435            encoder.debug_check_bounds::<DeviceMonitorGetSmeTelemetryRequest>(offset);
5436            // Zero out padding regions. There's no need to apply masks
5437            // because the unmasked parts will be overwritten by fields.
5438            unsafe {
5439                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
5440                (ptr as *mut u32).write_unaligned(0);
5441            }
5442            // Write the fields.
5443            self.0.encode(encoder, offset + 0, depth)?;
5444            self.1.encode(encoder, offset + 4, depth)?;
5445            Ok(())
5446        }
5447    }
5448
5449    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5450        for DeviceMonitorGetSmeTelemetryRequest
5451    {
5452        #[inline(always)]
5453        fn new_empty() -> Self {
5454            Self {
5455                iface_id: fidl::new_empty!(u16, fidl::encoding::DefaultFuchsiaResourceDialect),
5456                telemetry_server: fidl::new_empty!(
5457                    fidl::encoding::Endpoint<
5458                        fidl::endpoints::ServerEnd<fidl_fuchsia_wlan_sme::TelemetryMarker>,
5459                    >,
5460                    fidl::encoding::DefaultFuchsiaResourceDialect
5461                ),
5462            }
5463        }
5464
5465        #[inline]
5466        unsafe fn decode(
5467            &mut self,
5468            decoder: &mut fidl::encoding::Decoder<
5469                '_,
5470                fidl::encoding::DefaultFuchsiaResourceDialect,
5471            >,
5472            offset: usize,
5473            _depth: fidl::encoding::Depth,
5474        ) -> fidl::Result<()> {
5475            decoder.debug_check_bounds::<Self>(offset);
5476            // Verify that padding bytes are zero.
5477            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
5478            let padval = unsafe { (ptr as *const u32).read_unaligned() };
5479            let mask = 0xffff0000u32;
5480            let maskedval = padval & mask;
5481            if maskedval != 0 {
5482                return Err(fidl::Error::NonZeroPadding {
5483                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
5484                });
5485            }
5486            fidl::decode!(
5487                u16,
5488                fidl::encoding::DefaultFuchsiaResourceDialect,
5489                &mut self.iface_id,
5490                decoder,
5491                offset + 0,
5492                _depth
5493            )?;
5494            fidl::decode!(
5495                fidl::encoding::Endpoint<
5496                    fidl::endpoints::ServerEnd<fidl_fuchsia_wlan_sme::TelemetryMarker>,
5497                >,
5498                fidl::encoding::DefaultFuchsiaResourceDialect,
5499                &mut self.telemetry_server,
5500                decoder,
5501                offset + 4,
5502                _depth
5503            )?;
5504            Ok(())
5505        }
5506    }
5507
5508    impl fidl::encoding::ResourceTypeMarker for DeviceMonitorWatchDevicesRequest {
5509        type Borrowed<'a> = &'a mut Self;
5510        fn take_or_borrow<'a>(
5511            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5512        ) -> Self::Borrowed<'a> {
5513            value
5514        }
5515    }
5516
5517    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorWatchDevicesRequest {
5518        type Owned = Self;
5519
5520        #[inline(always)]
5521        fn inline_align(_context: fidl::encoding::Context) -> usize {
5522            4
5523        }
5524
5525        #[inline(always)]
5526        fn inline_size(_context: fidl::encoding::Context) -> usize {
5527            4
5528        }
5529    }
5530
5531    unsafe impl
5532        fidl::encoding::Encode<
5533            DeviceMonitorWatchDevicesRequest,
5534            fidl::encoding::DefaultFuchsiaResourceDialect,
5535        > for &mut DeviceMonitorWatchDevicesRequest
5536    {
5537        #[inline]
5538        unsafe fn encode(
5539            self,
5540            encoder: &mut fidl::encoding::Encoder<
5541                '_,
5542                fidl::encoding::DefaultFuchsiaResourceDialect,
5543            >,
5544            offset: usize,
5545            _depth: fidl::encoding::Depth,
5546        ) -> fidl::Result<()> {
5547            encoder.debug_check_bounds::<DeviceMonitorWatchDevicesRequest>(offset);
5548            // Delegate to tuple encoding.
5549            fidl::encoding::Encode::<DeviceMonitorWatchDevicesRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5550                (
5551                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DeviceWatcherMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.watcher),
5552                ),
5553                encoder, offset, _depth
5554            )
5555        }
5556    }
5557    unsafe impl<
5558        T0: fidl::encoding::Encode<
5559                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DeviceWatcherMarker>>,
5560                fidl::encoding::DefaultFuchsiaResourceDialect,
5561            >,
5562    >
5563        fidl::encoding::Encode<
5564            DeviceMonitorWatchDevicesRequest,
5565            fidl::encoding::DefaultFuchsiaResourceDialect,
5566        > for (T0,)
5567    {
5568        #[inline]
5569        unsafe fn encode(
5570            self,
5571            encoder: &mut fidl::encoding::Encoder<
5572                '_,
5573                fidl::encoding::DefaultFuchsiaResourceDialect,
5574            >,
5575            offset: usize,
5576            depth: fidl::encoding::Depth,
5577        ) -> fidl::Result<()> {
5578            encoder.debug_check_bounds::<DeviceMonitorWatchDevicesRequest>(offset);
5579            // Zero out padding regions. There's no need to apply masks
5580            // because the unmasked parts will be overwritten by fields.
5581            // Write the fields.
5582            self.0.encode(encoder, offset + 0, depth)?;
5583            Ok(())
5584        }
5585    }
5586
5587    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5588        for DeviceMonitorWatchDevicesRequest
5589    {
5590        #[inline(always)]
5591        fn new_empty() -> Self {
5592            Self {
5593                watcher: fidl::new_empty!(
5594                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DeviceWatcherMarker>>,
5595                    fidl::encoding::DefaultFuchsiaResourceDialect
5596                ),
5597            }
5598        }
5599
5600        #[inline]
5601        unsafe fn decode(
5602            &mut self,
5603            decoder: &mut fidl::encoding::Decoder<
5604                '_,
5605                fidl::encoding::DefaultFuchsiaResourceDialect,
5606            >,
5607            offset: usize,
5608            _depth: fidl::encoding::Depth,
5609        ) -> fidl::Result<()> {
5610            decoder.debug_check_bounds::<Self>(offset);
5611            // Verify that padding bytes are zero.
5612            fidl::decode!(
5613                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DeviceWatcherMarker>>,
5614                fidl::encoding::DefaultFuchsiaResourceDialect,
5615                &mut self.watcher,
5616                decoder,
5617                offset + 0,
5618                _depth
5619            )?;
5620            Ok(())
5621        }
5622    }
5623
5624    impl fidl::encoding::ResourceTypeMarker for DeviceMonitorWatchPhyEventsRequest {
5625        type Borrowed<'a> = &'a mut Self;
5626        fn take_or_borrow<'a>(
5627            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5628        ) -> Self::Borrowed<'a> {
5629            value
5630        }
5631    }
5632
5633    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorWatchPhyEventsRequest {
5634        type Owned = Self;
5635
5636        #[inline(always)]
5637        fn inline_align(_context: fidl::encoding::Context) -> usize {
5638            4
5639        }
5640
5641        #[inline(always)]
5642        fn inline_size(_context: fidl::encoding::Context) -> usize {
5643            4
5644        }
5645    }
5646
5647    unsafe impl
5648        fidl::encoding::Encode<
5649            DeviceMonitorWatchPhyEventsRequest,
5650            fidl::encoding::DefaultFuchsiaResourceDialect,
5651        > for &mut DeviceMonitorWatchPhyEventsRequest
5652    {
5653        #[inline]
5654        unsafe fn encode(
5655            self,
5656            encoder: &mut fidl::encoding::Encoder<
5657                '_,
5658                fidl::encoding::DefaultFuchsiaResourceDialect,
5659            >,
5660            offset: usize,
5661            _depth: fidl::encoding::Depth,
5662        ) -> fidl::Result<()> {
5663            encoder.debug_check_bounds::<DeviceMonitorWatchPhyEventsRequest>(offset);
5664            // Delegate to tuple encoding.
5665            fidl::encoding::Encode::<DeviceMonitorWatchPhyEventsRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5666                (
5667                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<PhyEventWatcherMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.watcher),
5668                ),
5669                encoder, offset, _depth
5670            )
5671        }
5672    }
5673    unsafe impl<
5674        T0: fidl::encoding::Encode<
5675                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<PhyEventWatcherMarker>>,
5676                fidl::encoding::DefaultFuchsiaResourceDialect,
5677            >,
5678    >
5679        fidl::encoding::Encode<
5680            DeviceMonitorWatchPhyEventsRequest,
5681            fidl::encoding::DefaultFuchsiaResourceDialect,
5682        > for (T0,)
5683    {
5684        #[inline]
5685        unsafe fn encode(
5686            self,
5687            encoder: &mut fidl::encoding::Encoder<
5688                '_,
5689                fidl::encoding::DefaultFuchsiaResourceDialect,
5690            >,
5691            offset: usize,
5692            depth: fidl::encoding::Depth,
5693        ) -> fidl::Result<()> {
5694            encoder.debug_check_bounds::<DeviceMonitorWatchPhyEventsRequest>(offset);
5695            // Zero out padding regions. There's no need to apply masks
5696            // because the unmasked parts will be overwritten by fields.
5697            // Write the fields.
5698            self.0.encode(encoder, offset + 0, depth)?;
5699            Ok(())
5700        }
5701    }
5702
5703    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5704        for DeviceMonitorWatchPhyEventsRequest
5705    {
5706        #[inline(always)]
5707        fn new_empty() -> Self {
5708            Self {
5709                watcher: fidl::new_empty!(
5710                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<PhyEventWatcherMarker>>,
5711                    fidl::encoding::DefaultFuchsiaResourceDialect
5712                ),
5713            }
5714        }
5715
5716        #[inline]
5717        unsafe fn decode(
5718            &mut self,
5719            decoder: &mut fidl::encoding::Decoder<
5720                '_,
5721                fidl::encoding::DefaultFuchsiaResourceDialect,
5722            >,
5723            offset: usize,
5724            _depth: fidl::encoding::Depth,
5725        ) -> fidl::Result<()> {
5726            decoder.debug_check_bounds::<Self>(offset);
5727            // Verify that padding bytes are zero.
5728            fidl::decode!(
5729                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<PhyEventWatcherMarker>>,
5730                fidl::encoding::DefaultFuchsiaResourceDialect,
5731                &mut self.watcher,
5732                decoder,
5733                offset + 0,
5734                _depth
5735            )?;
5736            Ok(())
5737        }
5738    }
5739}