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