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