Skip to main content

fidl_fuchsia_wlan_device_service/
fidl_fuchsia_wlan_device_service.rs

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