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