Skip to main content

fidl_fuchsia_wlan_device_service/
fidl_fuchsia_wlan_device_service.rs

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