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