1#![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_phy_common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Default, PartialEq)]
15pub struct WlanPhyCreateIfaceRequest {
16 pub role: Option<fidl_fuchsia_wlan_common::WlanMacRole>,
19 pub mlme_channel: Option<fidl::Channel>,
23 pub init_sta_addr: Option<[u8; 6]>,
29 #[doc(hidden)]
30 pub __source_breaking: fidl::marker::SourceBreaking,
31}
32
33impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for WlanPhyCreateIfaceRequest {}
34
35#[derive(Debug, Default, PartialEq)]
36pub struct WlanPhyInitRequest {
37 pub notify_client: Option<fidl::endpoints::ClientEnd<WlanPhyNotifyMarker>>,
42 #[doc(hidden)]
43 pub __source_breaking: fidl::marker::SourceBreaking,
44}
45
46impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for WlanPhyInitRequest {}
47
48#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
49pub struct WlanPhyMarker;
50
51impl fidl::endpoints::ProtocolMarker for WlanPhyMarker {
52 type Proxy = WlanPhyProxy;
53 type RequestStream = WlanPhyRequestStream;
54 #[cfg(target_os = "fuchsia")]
55 type SynchronousProxy = WlanPhySynchronousProxy;
56
57 const DEBUG_NAME: &'static str = "fuchsia.wlan.phy.WlanPhy";
58}
59impl fidl::endpoints::DiscoverableProtocolMarker for WlanPhyMarker {}
60pub type WlanPhyInitResult = Result<(), i32>;
61pub type WlanPhyGetSupportedMacRolesResult = Result<WlanPhyGetSupportedMacRolesResponse, i32>;
62pub type WlanPhyCreateIfaceResult = Result<WlanPhyCreateIfaceResponse, i32>;
63pub type WlanPhyDestroyIfaceResult = Result<(), i32>;
64pub type WlanPhySetCountryResult = Result<(), i32>;
65pub type WlanPhyClearCountryResult = Result<(), i32>;
66pub type WlanPhyGetCountryResult = Result<[u8; 2], i32>;
67pub type WlanPhySetPowerSaveModeResult = Result<(), i32>;
68pub type WlanPhyGetPowerSaveModeResult = Result<WlanPhyGetPowerSaveModeResponse, i32>;
69pub type WlanPhyPowerDownResult = Result<(), i32>;
70pub type WlanPhyPowerUpResult = Result<(), i32>;
71pub type WlanPhyResetResult = Result<(), i32>;
72pub type WlanPhyGetPowerStateResult = Result<WlanPhyGetPowerStateResponse, i32>;
73pub type WlanPhySetBtCoexistenceModeResult = Result<(), i32>;
74pub type WlanPhySetTxPowerScenarioResult = Result<(), i32>;
75pub type WlanPhyResetTxPowerScenarioResult = Result<(), i32>;
76pub type WlanPhyGetTxPowerScenarioResult = Result<fidl_fuchsia_wlan_internal::TxPowerScenario, i32>;
77
78pub trait WlanPhyProxyInterface: Send + Sync {
79 type InitResponseFut: std::future::Future<Output = Result<WlanPhyInitResult, fidl::Error>>
80 + Send;
81 fn r#init(&self, payload: WlanPhyInitRequest) -> Self::InitResponseFut;
82 type GetSupportedMacRolesResponseFut: std::future::Future<Output = Result<WlanPhyGetSupportedMacRolesResult, fidl::Error>>
83 + Send;
84 fn r#get_supported_mac_roles(&self) -> Self::GetSupportedMacRolesResponseFut;
85 type CreateIfaceResponseFut: std::future::Future<Output = Result<WlanPhyCreateIfaceResult, fidl::Error>>
86 + Send;
87 fn r#create_iface(&self, payload: WlanPhyCreateIfaceRequest) -> Self::CreateIfaceResponseFut;
88 type DestroyIfaceResponseFut: std::future::Future<Output = Result<WlanPhyDestroyIfaceResult, fidl::Error>>
89 + Send;
90 fn r#destroy_iface(
91 &self,
92 payload: &WlanPhyDestroyIfaceRequest,
93 ) -> Self::DestroyIfaceResponseFut;
94 type SetCountryResponseFut: std::future::Future<Output = Result<WlanPhySetCountryResult, fidl::Error>>
95 + Send;
96 fn r#set_country(&self, country: &[u8; 2]) -> Self::SetCountryResponseFut;
97 type ClearCountryResponseFut: std::future::Future<Output = Result<WlanPhyClearCountryResult, fidl::Error>>
98 + Send;
99 fn r#clear_country(&self) -> Self::ClearCountryResponseFut;
100 type GetCountryResponseFut: std::future::Future<Output = Result<WlanPhyGetCountryResult, fidl::Error>>
101 + Send;
102 fn r#get_country(&self) -> Self::GetCountryResponseFut;
103 type SetPowerSaveModeResponseFut: std::future::Future<Output = Result<WlanPhySetPowerSaveModeResult, fidl::Error>>
104 + Send;
105 fn r#set_power_save_mode(
106 &self,
107 payload: &WlanPhySetPowerSaveModeRequest,
108 ) -> Self::SetPowerSaveModeResponseFut;
109 type GetPowerSaveModeResponseFut: std::future::Future<Output = Result<WlanPhyGetPowerSaveModeResult, fidl::Error>>
110 + Send;
111 fn r#get_power_save_mode(&self) -> Self::GetPowerSaveModeResponseFut;
112 type PowerDownResponseFut: std::future::Future<Output = Result<WlanPhyPowerDownResult, fidl::Error>>
113 + Send;
114 fn r#power_down(&self) -> Self::PowerDownResponseFut;
115 type PowerUpResponseFut: std::future::Future<Output = Result<WlanPhyPowerUpResult, fidl::Error>>
116 + Send;
117 fn r#power_up(&self) -> Self::PowerUpResponseFut;
118 type ResetResponseFut: std::future::Future<Output = Result<WlanPhyResetResult, fidl::Error>>
119 + Send;
120 fn r#reset(&self) -> Self::ResetResponseFut;
121 type GetPowerStateResponseFut: std::future::Future<Output = Result<WlanPhyGetPowerStateResult, fidl::Error>>
122 + Send;
123 fn r#get_power_state(&self) -> Self::GetPowerStateResponseFut;
124 type SetBtCoexistenceModeResponseFut: std::future::Future<Output = Result<WlanPhySetBtCoexistenceModeResult, fidl::Error>>
125 + Send;
126 fn r#set_bt_coexistence_mode(
127 &self,
128 payload: &WlanPhySetBtCoexistenceModeRequest,
129 ) -> Self::SetBtCoexistenceModeResponseFut;
130 type SetTxPowerScenarioResponseFut: std::future::Future<Output = Result<WlanPhySetTxPowerScenarioResult, fidl::Error>>
131 + Send;
132 fn r#set_tx_power_scenario(
133 &self,
134 payload: &WlanPhySetTxPowerScenarioRequest,
135 ) -> Self::SetTxPowerScenarioResponseFut;
136 type ResetTxPowerScenarioResponseFut: std::future::Future<Output = Result<WlanPhyResetTxPowerScenarioResult, fidl::Error>>
137 + Send;
138 fn r#reset_tx_power_scenario(&self) -> Self::ResetTxPowerScenarioResponseFut;
139 type GetTxPowerScenarioResponseFut: std::future::Future<Output = Result<WlanPhyGetTxPowerScenarioResult, fidl::Error>>
140 + Send;
141 fn r#get_tx_power_scenario(&self) -> Self::GetTxPowerScenarioResponseFut;
142}
143#[derive(Debug)]
144#[cfg(target_os = "fuchsia")]
145pub struct WlanPhySynchronousProxy {
146 client: fidl::client::sync::Client,
147}
148
149#[cfg(target_os = "fuchsia")]
150impl fidl::endpoints::SynchronousProxy for WlanPhySynchronousProxy {
151 type Proxy = WlanPhyProxy;
152 type Protocol = WlanPhyMarker;
153
154 fn from_channel(inner: fidl::Channel) -> Self {
155 Self::new(inner)
156 }
157
158 fn into_channel(self) -> fidl::Channel {
159 self.client.into_channel()
160 }
161
162 fn as_channel(&self) -> &fidl::Channel {
163 self.client.as_channel()
164 }
165}
166
167#[cfg(target_os = "fuchsia")]
168impl WlanPhySynchronousProxy {
169 pub fn new(channel: fidl::Channel) -> Self {
170 Self { client: fidl::client::sync::Client::new(channel) }
171 }
172
173 pub fn into_channel(self) -> fidl::Channel {
174 self.client.into_channel()
175 }
176
177 pub fn wait_for_event(
180 &self,
181 deadline: zx::MonotonicInstant,
182 ) -> Result<WlanPhyEvent, fidl::Error> {
183 WlanPhyEvent::decode(self.client.wait_for_event::<WlanPhyMarker>(deadline)?)
184 }
185
186 pub fn r#init(
192 &self,
193 mut payload: WlanPhyInitRequest,
194 ___deadline: zx::MonotonicInstant,
195 ) -> Result<WlanPhyInitResult, fidl::Error> {
196 let _response = self.client.send_query::<
197 WlanPhyInitRequest,
198 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
199 WlanPhyMarker,
200 >(
201 &mut payload,
202 0x399fe5e97bb0eff3,
203 fidl::encoding::DynamicFlags::FLEXIBLE,
204 ___deadline,
205 )?
206 .into_result::<WlanPhyMarker>("init")?;
207 Ok(_response.map(|x| x))
208 }
209
210 pub fn r#get_supported_mac_roles(
212 &self,
213 ___deadline: zx::MonotonicInstant,
214 ) -> Result<WlanPhyGetSupportedMacRolesResult, fidl::Error> {
215 let _response = self.client.send_query::<
216 fidl::encoding::EmptyPayload,
217 fidl::encoding::FlexibleResultType<WlanPhyGetSupportedMacRolesResponse, i32>,
218 WlanPhyMarker,
219 >(
220 (),
221 0x36891bcf679ad34a,
222 fidl::encoding::DynamicFlags::FLEXIBLE,
223 ___deadline,
224 )?
225 .into_result::<WlanPhyMarker>("get_supported_mac_roles")?;
226 Ok(_response.map(|x| x))
227 }
228
229 pub fn r#create_iface(
234 &self,
235 mut payload: WlanPhyCreateIfaceRequest,
236 ___deadline: zx::MonotonicInstant,
237 ) -> Result<WlanPhyCreateIfaceResult, fidl::Error> {
238 let _response = self.client.send_query::<
239 WlanPhyCreateIfaceRequest,
240 fidl::encoding::FlexibleResultType<WlanPhyCreateIfaceResponse, i32>,
241 WlanPhyMarker,
242 >(
243 &mut payload,
244 0x4cc00e15727fbb8e,
245 fidl::encoding::DynamicFlags::FLEXIBLE,
246 ___deadline,
247 )?
248 .into_result::<WlanPhyMarker>("create_iface")?;
249 Ok(_response.map(|x| x))
250 }
251
252 pub fn r#destroy_iface(
257 &self,
258 mut payload: &WlanPhyDestroyIfaceRequest,
259 ___deadline: zx::MonotonicInstant,
260 ) -> Result<WlanPhyDestroyIfaceResult, fidl::Error> {
261 let _response = self.client.send_query::<
262 WlanPhyDestroyIfaceRequest,
263 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
264 WlanPhyMarker,
265 >(
266 payload,
267 0xfa408ede62bf8bc,
268 fidl::encoding::DynamicFlags::FLEXIBLE,
269 ___deadline,
270 )?
271 .into_result::<WlanPhyMarker>("destroy_iface")?;
272 Ok(_response.map(|x| x))
273 }
274
275 pub fn r#set_country(
279 &self,
280 mut country: &[u8; 2],
281 ___deadline: zx::MonotonicInstant,
282 ) -> Result<WlanPhySetCountryResult, fidl::Error> {
283 let _response = self.client.send_query::<
284 WlanPhySetCountryRequest,
285 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
286 WlanPhyMarker,
287 >(
288 (country,),
289 0x6d1258ed25af4a0f,
290 fidl::encoding::DynamicFlags::FLEXIBLE,
291 ___deadline,
292 )?
293 .into_result::<WlanPhyMarker>("set_country")?;
294 Ok(_response.map(|x| x))
295 }
296
297 pub fn r#clear_country(
301 &self,
302 ___deadline: zx::MonotonicInstant,
303 ) -> Result<WlanPhyClearCountryResult, fidl::Error> {
304 let _response = self.client.send_query::<
305 fidl::encoding::EmptyPayload,
306 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
307 WlanPhyMarker,
308 >(
309 (),
310 0x73f333d223cec34f,
311 fidl::encoding::DynamicFlags::FLEXIBLE,
312 ___deadline,
313 )?
314 .into_result::<WlanPhyMarker>("clear_country")?;
315 Ok(_response.map(|x| x))
316 }
317
318 pub fn r#get_country(
322 &self,
323 ___deadline: zx::MonotonicInstant,
324 ) -> Result<WlanPhyGetCountryResult, fidl::Error> {
325 let _response = self.client.send_query::<
326 fidl::encoding::EmptyPayload,
327 fidl::encoding::FlexibleResultType<WlanPhyGetCountryResponse, i32>,
328 WlanPhyMarker,
329 >(
330 (),
331 0x13ee2c5158d8507a,
332 fidl::encoding::DynamicFlags::FLEXIBLE,
333 ___deadline,
334 )?
335 .into_result::<WlanPhyMarker>("get_country")?;
336 Ok(_response.map(|x| x.country))
337 }
338
339 pub fn r#set_power_save_mode(
344 &self,
345 mut payload: &WlanPhySetPowerSaveModeRequest,
346 ___deadline: zx::MonotonicInstant,
347 ) -> Result<WlanPhySetPowerSaveModeResult, fidl::Error> {
348 let _response = self.client.send_query::<
349 WlanPhySetPowerSaveModeRequest,
350 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
351 WlanPhyMarker,
352 >(
353 payload,
354 0x4e164c65070f890d,
355 fidl::encoding::DynamicFlags::FLEXIBLE,
356 ___deadline,
357 )?
358 .into_result::<WlanPhyMarker>("set_power_save_mode")?;
359 Ok(_response.map(|x| x))
360 }
361
362 pub fn r#get_power_save_mode(
365 &self,
366 ___deadline: zx::MonotonicInstant,
367 ) -> Result<WlanPhyGetPowerSaveModeResult, fidl::Error> {
368 let _response = self.client.send_query::<
369 fidl::encoding::EmptyPayload,
370 fidl::encoding::FlexibleResultType<WlanPhyGetPowerSaveModeResponse, i32>,
371 WlanPhyMarker,
372 >(
373 (),
374 0x1cbd3390a4230826,
375 fidl::encoding::DynamicFlags::FLEXIBLE,
376 ___deadline,
377 )?
378 .into_result::<WlanPhyMarker>("get_power_save_mode")?;
379 Ok(_response.map(|x| x))
380 }
381
382 pub fn r#power_down(
390 &self,
391 ___deadline: zx::MonotonicInstant,
392 ) -> Result<WlanPhyPowerDownResult, fidl::Error> {
393 let _response = self.client.send_query::<
394 fidl::encoding::EmptyPayload,
395 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
396 WlanPhyMarker,
397 >(
398 (),
399 0x79fb1043c6355d0a,
400 fidl::encoding::DynamicFlags::FLEXIBLE,
401 ___deadline,
402 )?
403 .into_result::<WlanPhyMarker>("power_down")?;
404 Ok(_response.map(|x| x))
405 }
406
407 pub fn r#power_up(
412 &self,
413 ___deadline: zx::MonotonicInstant,
414 ) -> Result<WlanPhyPowerUpResult, fidl::Error> {
415 let _response = self.client.send_query::<
416 fidl::encoding::EmptyPayload,
417 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
418 WlanPhyMarker,
419 >(
420 (),
421 0x6dcde9a4259494f2,
422 fidl::encoding::DynamicFlags::FLEXIBLE,
423 ___deadline,
424 )?
425 .into_result::<WlanPhyMarker>("power_up")?;
426 Ok(_response.map(|x| x))
427 }
428
429 pub fn r#reset(
437 &self,
438 ___deadline: zx::MonotonicInstant,
439 ) -> Result<WlanPhyResetResult, fidl::Error> {
440 let _response = self.client.send_query::<
441 fidl::encoding::EmptyPayload,
442 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
443 WlanPhyMarker,
444 >(
445 (),
446 0x2f0f1d8f2f22988f,
447 fidl::encoding::DynamicFlags::FLEXIBLE,
448 ___deadline,
449 )?
450 .into_result::<WlanPhyMarker>("reset")?;
451 Ok(_response.map(|x| x))
452 }
453
454 pub fn r#get_power_state(
459 &self,
460 ___deadline: zx::MonotonicInstant,
461 ) -> Result<WlanPhyGetPowerStateResult, fidl::Error> {
462 let _response = self.client.send_query::<
463 fidl::encoding::EmptyPayload,
464 fidl::encoding::FlexibleResultType<WlanPhyGetPowerStateResponse, i32>,
465 WlanPhyMarker,
466 >(
467 (),
468 0x4639d1e5e93102c1,
469 fidl::encoding::DynamicFlags::FLEXIBLE,
470 ___deadline,
471 )?
472 .into_result::<WlanPhyMarker>("get_power_state")?;
473 Ok(_response.map(|x| x))
474 }
475
476 pub fn r#set_bt_coexistence_mode(
480 &self,
481 mut payload: &WlanPhySetBtCoexistenceModeRequest,
482 ___deadline: zx::MonotonicInstant,
483 ) -> Result<WlanPhySetBtCoexistenceModeResult, fidl::Error> {
484 let _response = self.client.send_query::<
485 WlanPhySetBtCoexistenceModeRequest,
486 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
487 WlanPhyMarker,
488 >(
489 payload,
490 0x5ac69f24a87cac05,
491 fidl::encoding::DynamicFlags::FLEXIBLE,
492 ___deadline,
493 )?
494 .into_result::<WlanPhyMarker>("set_bt_coexistence_mode")?;
495 Ok(_response.map(|x| x))
496 }
497
498 pub fn r#set_tx_power_scenario(
499 &self,
500 mut payload: &WlanPhySetTxPowerScenarioRequest,
501 ___deadline: zx::MonotonicInstant,
502 ) -> Result<WlanPhySetTxPowerScenarioResult, fidl::Error> {
503 let _response = self.client.send_query::<
504 WlanPhySetTxPowerScenarioRequest,
505 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
506 WlanPhyMarker,
507 >(
508 payload,
509 0x72e4d055cd3a18dc,
510 fidl::encoding::DynamicFlags::FLEXIBLE,
511 ___deadline,
512 )?
513 .into_result::<WlanPhyMarker>("set_tx_power_scenario")?;
514 Ok(_response.map(|x| x))
515 }
516
517 pub fn r#reset_tx_power_scenario(
518 &self,
519 ___deadline: zx::MonotonicInstant,
520 ) -> Result<WlanPhyResetTxPowerScenarioResult, fidl::Error> {
521 let _response = self.client.send_query::<
522 fidl::encoding::EmptyPayload,
523 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
524 WlanPhyMarker,
525 >(
526 (),
527 0x78c3bd271b3bb712,
528 fidl::encoding::DynamicFlags::FLEXIBLE,
529 ___deadline,
530 )?
531 .into_result::<WlanPhyMarker>("reset_tx_power_scenario")?;
532 Ok(_response.map(|x| x))
533 }
534
535 pub fn r#get_tx_power_scenario(
536 &self,
537 ___deadline: zx::MonotonicInstant,
538 ) -> Result<WlanPhyGetTxPowerScenarioResult, fidl::Error> {
539 let _response = self.client.send_query::<
540 fidl::encoding::EmptyPayload,
541 fidl::encoding::FlexibleResultType<WlanPhyGetTxPowerScenarioResponse, i32>,
542 WlanPhyMarker,
543 >(
544 (),
545 0x62f9717d964b3c8e,
546 fidl::encoding::DynamicFlags::FLEXIBLE,
547 ___deadline,
548 )?
549 .into_result::<WlanPhyMarker>("get_tx_power_scenario")?;
550 Ok(_response.map(|x| x.scenario))
551 }
552}
553
554#[cfg(target_os = "fuchsia")]
555impl From<WlanPhySynchronousProxy> for zx::NullableHandle {
556 fn from(value: WlanPhySynchronousProxy) -> Self {
557 value.into_channel().into()
558 }
559}
560
561#[cfg(target_os = "fuchsia")]
562impl From<fidl::Channel> for WlanPhySynchronousProxy {
563 fn from(value: fidl::Channel) -> Self {
564 Self::new(value)
565 }
566}
567
568#[cfg(target_os = "fuchsia")]
569impl fidl::endpoints::FromClient for WlanPhySynchronousProxy {
570 type Protocol = WlanPhyMarker;
571
572 fn from_client(value: fidl::endpoints::ClientEnd<WlanPhyMarker>) -> Self {
573 Self::new(value.into_channel())
574 }
575}
576
577#[derive(Debug, Clone)]
578pub struct WlanPhyProxy {
579 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
580}
581
582impl fidl::endpoints::Proxy for WlanPhyProxy {
583 type Protocol = WlanPhyMarker;
584
585 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
586 Self::new(inner)
587 }
588
589 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
590 self.client.into_channel().map_err(|client| Self { client })
591 }
592
593 fn as_channel(&self) -> &::fidl::AsyncChannel {
594 self.client.as_channel()
595 }
596}
597
598impl WlanPhyProxy {
599 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
601 let protocol_name = <WlanPhyMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
602 Self { client: fidl::client::Client::new(channel, protocol_name) }
603 }
604
605 pub fn take_event_stream(&self) -> WlanPhyEventStream {
611 WlanPhyEventStream { event_receiver: self.client.take_event_receiver() }
612 }
613
614 pub fn r#init(
620 &self,
621 mut payload: WlanPhyInitRequest,
622 ) -> fidl::client::QueryResponseFut<
623 WlanPhyInitResult,
624 fidl::encoding::DefaultFuchsiaResourceDialect,
625 > {
626 WlanPhyProxyInterface::r#init(self, payload)
627 }
628
629 pub fn r#get_supported_mac_roles(
631 &self,
632 ) -> fidl::client::QueryResponseFut<
633 WlanPhyGetSupportedMacRolesResult,
634 fidl::encoding::DefaultFuchsiaResourceDialect,
635 > {
636 WlanPhyProxyInterface::r#get_supported_mac_roles(self)
637 }
638
639 pub fn r#create_iface(
644 &self,
645 mut payload: WlanPhyCreateIfaceRequest,
646 ) -> fidl::client::QueryResponseFut<
647 WlanPhyCreateIfaceResult,
648 fidl::encoding::DefaultFuchsiaResourceDialect,
649 > {
650 WlanPhyProxyInterface::r#create_iface(self, payload)
651 }
652
653 pub fn r#destroy_iface(
658 &self,
659 mut payload: &WlanPhyDestroyIfaceRequest,
660 ) -> fidl::client::QueryResponseFut<
661 WlanPhyDestroyIfaceResult,
662 fidl::encoding::DefaultFuchsiaResourceDialect,
663 > {
664 WlanPhyProxyInterface::r#destroy_iface(self, payload)
665 }
666
667 pub fn r#set_country(
671 &self,
672 mut country: &[u8; 2],
673 ) -> fidl::client::QueryResponseFut<
674 WlanPhySetCountryResult,
675 fidl::encoding::DefaultFuchsiaResourceDialect,
676 > {
677 WlanPhyProxyInterface::r#set_country(self, country)
678 }
679
680 pub fn r#clear_country(
684 &self,
685 ) -> fidl::client::QueryResponseFut<
686 WlanPhyClearCountryResult,
687 fidl::encoding::DefaultFuchsiaResourceDialect,
688 > {
689 WlanPhyProxyInterface::r#clear_country(self)
690 }
691
692 pub fn r#get_country(
696 &self,
697 ) -> fidl::client::QueryResponseFut<
698 WlanPhyGetCountryResult,
699 fidl::encoding::DefaultFuchsiaResourceDialect,
700 > {
701 WlanPhyProxyInterface::r#get_country(self)
702 }
703
704 pub fn r#set_power_save_mode(
709 &self,
710 mut payload: &WlanPhySetPowerSaveModeRequest,
711 ) -> fidl::client::QueryResponseFut<
712 WlanPhySetPowerSaveModeResult,
713 fidl::encoding::DefaultFuchsiaResourceDialect,
714 > {
715 WlanPhyProxyInterface::r#set_power_save_mode(self, payload)
716 }
717
718 pub fn r#get_power_save_mode(
721 &self,
722 ) -> fidl::client::QueryResponseFut<
723 WlanPhyGetPowerSaveModeResult,
724 fidl::encoding::DefaultFuchsiaResourceDialect,
725 > {
726 WlanPhyProxyInterface::r#get_power_save_mode(self)
727 }
728
729 pub fn r#power_down(
737 &self,
738 ) -> fidl::client::QueryResponseFut<
739 WlanPhyPowerDownResult,
740 fidl::encoding::DefaultFuchsiaResourceDialect,
741 > {
742 WlanPhyProxyInterface::r#power_down(self)
743 }
744
745 pub fn r#power_up(
750 &self,
751 ) -> fidl::client::QueryResponseFut<
752 WlanPhyPowerUpResult,
753 fidl::encoding::DefaultFuchsiaResourceDialect,
754 > {
755 WlanPhyProxyInterface::r#power_up(self)
756 }
757
758 pub fn r#reset(
766 &self,
767 ) -> fidl::client::QueryResponseFut<
768 WlanPhyResetResult,
769 fidl::encoding::DefaultFuchsiaResourceDialect,
770 > {
771 WlanPhyProxyInterface::r#reset(self)
772 }
773
774 pub fn r#get_power_state(
779 &self,
780 ) -> fidl::client::QueryResponseFut<
781 WlanPhyGetPowerStateResult,
782 fidl::encoding::DefaultFuchsiaResourceDialect,
783 > {
784 WlanPhyProxyInterface::r#get_power_state(self)
785 }
786
787 pub fn r#set_bt_coexistence_mode(
791 &self,
792 mut payload: &WlanPhySetBtCoexistenceModeRequest,
793 ) -> fidl::client::QueryResponseFut<
794 WlanPhySetBtCoexistenceModeResult,
795 fidl::encoding::DefaultFuchsiaResourceDialect,
796 > {
797 WlanPhyProxyInterface::r#set_bt_coexistence_mode(self, payload)
798 }
799
800 pub fn r#set_tx_power_scenario(
801 &self,
802 mut payload: &WlanPhySetTxPowerScenarioRequest,
803 ) -> fidl::client::QueryResponseFut<
804 WlanPhySetTxPowerScenarioResult,
805 fidl::encoding::DefaultFuchsiaResourceDialect,
806 > {
807 WlanPhyProxyInterface::r#set_tx_power_scenario(self, payload)
808 }
809
810 pub fn r#reset_tx_power_scenario(
811 &self,
812 ) -> fidl::client::QueryResponseFut<
813 WlanPhyResetTxPowerScenarioResult,
814 fidl::encoding::DefaultFuchsiaResourceDialect,
815 > {
816 WlanPhyProxyInterface::r#reset_tx_power_scenario(self)
817 }
818
819 pub fn r#get_tx_power_scenario(
820 &self,
821 ) -> fidl::client::QueryResponseFut<
822 WlanPhyGetTxPowerScenarioResult,
823 fidl::encoding::DefaultFuchsiaResourceDialect,
824 > {
825 WlanPhyProxyInterface::r#get_tx_power_scenario(self)
826 }
827}
828
829impl WlanPhyProxyInterface for WlanPhyProxy {
830 type InitResponseFut = fidl::client::QueryResponseFut<
831 WlanPhyInitResult,
832 fidl::encoding::DefaultFuchsiaResourceDialect,
833 >;
834 fn r#init(&self, mut payload: WlanPhyInitRequest) -> Self::InitResponseFut {
835 fn _decode(
836 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
837 ) -> Result<WlanPhyInitResult, fidl::Error> {
838 let _response = fidl::client::decode_transaction_body::<
839 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
840 fidl::encoding::DefaultFuchsiaResourceDialect,
841 0x399fe5e97bb0eff3,
842 >(_buf?)?
843 .into_result::<WlanPhyMarker>("init")?;
844 Ok(_response.map(|x| x))
845 }
846 self.client.send_query_and_decode::<WlanPhyInitRequest, WlanPhyInitResult>(
847 &mut payload,
848 0x399fe5e97bb0eff3,
849 fidl::encoding::DynamicFlags::FLEXIBLE,
850 _decode,
851 )
852 }
853
854 type GetSupportedMacRolesResponseFut = fidl::client::QueryResponseFut<
855 WlanPhyGetSupportedMacRolesResult,
856 fidl::encoding::DefaultFuchsiaResourceDialect,
857 >;
858 fn r#get_supported_mac_roles(&self) -> Self::GetSupportedMacRolesResponseFut {
859 fn _decode(
860 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
861 ) -> Result<WlanPhyGetSupportedMacRolesResult, fidl::Error> {
862 let _response = fidl::client::decode_transaction_body::<
863 fidl::encoding::FlexibleResultType<WlanPhyGetSupportedMacRolesResponse, i32>,
864 fidl::encoding::DefaultFuchsiaResourceDialect,
865 0x36891bcf679ad34a,
866 >(_buf?)?
867 .into_result::<WlanPhyMarker>("get_supported_mac_roles")?;
868 Ok(_response.map(|x| x))
869 }
870 self.client.send_query_and_decode::<
871 fidl::encoding::EmptyPayload,
872 WlanPhyGetSupportedMacRolesResult,
873 >(
874 (),
875 0x36891bcf679ad34a,
876 fidl::encoding::DynamicFlags::FLEXIBLE,
877 _decode,
878 )
879 }
880
881 type CreateIfaceResponseFut = fidl::client::QueryResponseFut<
882 WlanPhyCreateIfaceResult,
883 fidl::encoding::DefaultFuchsiaResourceDialect,
884 >;
885 fn r#create_iface(
886 &self,
887 mut payload: WlanPhyCreateIfaceRequest,
888 ) -> Self::CreateIfaceResponseFut {
889 fn _decode(
890 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
891 ) -> Result<WlanPhyCreateIfaceResult, fidl::Error> {
892 let _response = fidl::client::decode_transaction_body::<
893 fidl::encoding::FlexibleResultType<WlanPhyCreateIfaceResponse, i32>,
894 fidl::encoding::DefaultFuchsiaResourceDialect,
895 0x4cc00e15727fbb8e,
896 >(_buf?)?
897 .into_result::<WlanPhyMarker>("create_iface")?;
898 Ok(_response.map(|x| x))
899 }
900 self.client.send_query_and_decode::<WlanPhyCreateIfaceRequest, WlanPhyCreateIfaceResult>(
901 &mut payload,
902 0x4cc00e15727fbb8e,
903 fidl::encoding::DynamicFlags::FLEXIBLE,
904 _decode,
905 )
906 }
907
908 type DestroyIfaceResponseFut = fidl::client::QueryResponseFut<
909 WlanPhyDestroyIfaceResult,
910 fidl::encoding::DefaultFuchsiaResourceDialect,
911 >;
912 fn r#destroy_iface(
913 &self,
914 mut payload: &WlanPhyDestroyIfaceRequest,
915 ) -> Self::DestroyIfaceResponseFut {
916 fn _decode(
917 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
918 ) -> Result<WlanPhyDestroyIfaceResult, fidl::Error> {
919 let _response = fidl::client::decode_transaction_body::<
920 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
921 fidl::encoding::DefaultFuchsiaResourceDialect,
922 0xfa408ede62bf8bc,
923 >(_buf?)?
924 .into_result::<WlanPhyMarker>("destroy_iface")?;
925 Ok(_response.map(|x| x))
926 }
927 self.client.send_query_and_decode::<WlanPhyDestroyIfaceRequest, WlanPhyDestroyIfaceResult>(
928 payload,
929 0xfa408ede62bf8bc,
930 fidl::encoding::DynamicFlags::FLEXIBLE,
931 _decode,
932 )
933 }
934
935 type SetCountryResponseFut = fidl::client::QueryResponseFut<
936 WlanPhySetCountryResult,
937 fidl::encoding::DefaultFuchsiaResourceDialect,
938 >;
939 fn r#set_country(&self, mut country: &[u8; 2]) -> Self::SetCountryResponseFut {
940 fn _decode(
941 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
942 ) -> Result<WlanPhySetCountryResult, fidl::Error> {
943 let _response = fidl::client::decode_transaction_body::<
944 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
945 fidl::encoding::DefaultFuchsiaResourceDialect,
946 0x6d1258ed25af4a0f,
947 >(_buf?)?
948 .into_result::<WlanPhyMarker>("set_country")?;
949 Ok(_response.map(|x| x))
950 }
951 self.client.send_query_and_decode::<WlanPhySetCountryRequest, WlanPhySetCountryResult>(
952 (country,),
953 0x6d1258ed25af4a0f,
954 fidl::encoding::DynamicFlags::FLEXIBLE,
955 _decode,
956 )
957 }
958
959 type ClearCountryResponseFut = fidl::client::QueryResponseFut<
960 WlanPhyClearCountryResult,
961 fidl::encoding::DefaultFuchsiaResourceDialect,
962 >;
963 fn r#clear_country(&self) -> Self::ClearCountryResponseFut {
964 fn _decode(
965 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
966 ) -> Result<WlanPhyClearCountryResult, fidl::Error> {
967 let _response = fidl::client::decode_transaction_body::<
968 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
969 fidl::encoding::DefaultFuchsiaResourceDialect,
970 0x73f333d223cec34f,
971 >(_buf?)?
972 .into_result::<WlanPhyMarker>("clear_country")?;
973 Ok(_response.map(|x| x))
974 }
975 self.client
976 .send_query_and_decode::<fidl::encoding::EmptyPayload, WlanPhyClearCountryResult>(
977 (),
978 0x73f333d223cec34f,
979 fidl::encoding::DynamicFlags::FLEXIBLE,
980 _decode,
981 )
982 }
983
984 type GetCountryResponseFut = fidl::client::QueryResponseFut<
985 WlanPhyGetCountryResult,
986 fidl::encoding::DefaultFuchsiaResourceDialect,
987 >;
988 fn r#get_country(&self) -> Self::GetCountryResponseFut {
989 fn _decode(
990 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
991 ) -> Result<WlanPhyGetCountryResult, fidl::Error> {
992 let _response = fidl::client::decode_transaction_body::<
993 fidl::encoding::FlexibleResultType<WlanPhyGetCountryResponse, i32>,
994 fidl::encoding::DefaultFuchsiaResourceDialect,
995 0x13ee2c5158d8507a,
996 >(_buf?)?
997 .into_result::<WlanPhyMarker>("get_country")?;
998 Ok(_response.map(|x| x.country))
999 }
1000 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, WlanPhyGetCountryResult>(
1001 (),
1002 0x13ee2c5158d8507a,
1003 fidl::encoding::DynamicFlags::FLEXIBLE,
1004 _decode,
1005 )
1006 }
1007
1008 type SetPowerSaveModeResponseFut = fidl::client::QueryResponseFut<
1009 WlanPhySetPowerSaveModeResult,
1010 fidl::encoding::DefaultFuchsiaResourceDialect,
1011 >;
1012 fn r#set_power_save_mode(
1013 &self,
1014 mut payload: &WlanPhySetPowerSaveModeRequest,
1015 ) -> Self::SetPowerSaveModeResponseFut {
1016 fn _decode(
1017 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1018 ) -> Result<WlanPhySetPowerSaveModeResult, fidl::Error> {
1019 let _response = fidl::client::decode_transaction_body::<
1020 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
1021 fidl::encoding::DefaultFuchsiaResourceDialect,
1022 0x4e164c65070f890d,
1023 >(_buf?)?
1024 .into_result::<WlanPhyMarker>("set_power_save_mode")?;
1025 Ok(_response.map(|x| x))
1026 }
1027 self.client
1028 .send_query_and_decode::<WlanPhySetPowerSaveModeRequest, WlanPhySetPowerSaveModeResult>(
1029 payload,
1030 0x4e164c65070f890d,
1031 fidl::encoding::DynamicFlags::FLEXIBLE,
1032 _decode,
1033 )
1034 }
1035
1036 type GetPowerSaveModeResponseFut = fidl::client::QueryResponseFut<
1037 WlanPhyGetPowerSaveModeResult,
1038 fidl::encoding::DefaultFuchsiaResourceDialect,
1039 >;
1040 fn r#get_power_save_mode(&self) -> Self::GetPowerSaveModeResponseFut {
1041 fn _decode(
1042 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1043 ) -> Result<WlanPhyGetPowerSaveModeResult, fidl::Error> {
1044 let _response = fidl::client::decode_transaction_body::<
1045 fidl::encoding::FlexibleResultType<WlanPhyGetPowerSaveModeResponse, i32>,
1046 fidl::encoding::DefaultFuchsiaResourceDialect,
1047 0x1cbd3390a4230826,
1048 >(_buf?)?
1049 .into_result::<WlanPhyMarker>("get_power_save_mode")?;
1050 Ok(_response.map(|x| x))
1051 }
1052 self.client
1053 .send_query_and_decode::<fidl::encoding::EmptyPayload, WlanPhyGetPowerSaveModeResult>(
1054 (),
1055 0x1cbd3390a4230826,
1056 fidl::encoding::DynamicFlags::FLEXIBLE,
1057 _decode,
1058 )
1059 }
1060
1061 type PowerDownResponseFut = fidl::client::QueryResponseFut<
1062 WlanPhyPowerDownResult,
1063 fidl::encoding::DefaultFuchsiaResourceDialect,
1064 >;
1065 fn r#power_down(&self) -> Self::PowerDownResponseFut {
1066 fn _decode(
1067 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1068 ) -> Result<WlanPhyPowerDownResult, fidl::Error> {
1069 let _response = fidl::client::decode_transaction_body::<
1070 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
1071 fidl::encoding::DefaultFuchsiaResourceDialect,
1072 0x79fb1043c6355d0a,
1073 >(_buf?)?
1074 .into_result::<WlanPhyMarker>("power_down")?;
1075 Ok(_response.map(|x| x))
1076 }
1077 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, WlanPhyPowerDownResult>(
1078 (),
1079 0x79fb1043c6355d0a,
1080 fidl::encoding::DynamicFlags::FLEXIBLE,
1081 _decode,
1082 )
1083 }
1084
1085 type PowerUpResponseFut = fidl::client::QueryResponseFut<
1086 WlanPhyPowerUpResult,
1087 fidl::encoding::DefaultFuchsiaResourceDialect,
1088 >;
1089 fn r#power_up(&self) -> Self::PowerUpResponseFut {
1090 fn _decode(
1091 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1092 ) -> Result<WlanPhyPowerUpResult, fidl::Error> {
1093 let _response = fidl::client::decode_transaction_body::<
1094 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
1095 fidl::encoding::DefaultFuchsiaResourceDialect,
1096 0x6dcde9a4259494f2,
1097 >(_buf?)?
1098 .into_result::<WlanPhyMarker>("power_up")?;
1099 Ok(_response.map(|x| x))
1100 }
1101 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, WlanPhyPowerUpResult>(
1102 (),
1103 0x6dcde9a4259494f2,
1104 fidl::encoding::DynamicFlags::FLEXIBLE,
1105 _decode,
1106 )
1107 }
1108
1109 type ResetResponseFut = fidl::client::QueryResponseFut<
1110 WlanPhyResetResult,
1111 fidl::encoding::DefaultFuchsiaResourceDialect,
1112 >;
1113 fn r#reset(&self) -> Self::ResetResponseFut {
1114 fn _decode(
1115 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1116 ) -> Result<WlanPhyResetResult, fidl::Error> {
1117 let _response = fidl::client::decode_transaction_body::<
1118 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
1119 fidl::encoding::DefaultFuchsiaResourceDialect,
1120 0x2f0f1d8f2f22988f,
1121 >(_buf?)?
1122 .into_result::<WlanPhyMarker>("reset")?;
1123 Ok(_response.map(|x| x))
1124 }
1125 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, WlanPhyResetResult>(
1126 (),
1127 0x2f0f1d8f2f22988f,
1128 fidl::encoding::DynamicFlags::FLEXIBLE,
1129 _decode,
1130 )
1131 }
1132
1133 type GetPowerStateResponseFut = fidl::client::QueryResponseFut<
1134 WlanPhyGetPowerStateResult,
1135 fidl::encoding::DefaultFuchsiaResourceDialect,
1136 >;
1137 fn r#get_power_state(&self) -> Self::GetPowerStateResponseFut {
1138 fn _decode(
1139 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1140 ) -> Result<WlanPhyGetPowerStateResult, fidl::Error> {
1141 let _response = fidl::client::decode_transaction_body::<
1142 fidl::encoding::FlexibleResultType<WlanPhyGetPowerStateResponse, i32>,
1143 fidl::encoding::DefaultFuchsiaResourceDialect,
1144 0x4639d1e5e93102c1,
1145 >(_buf?)?
1146 .into_result::<WlanPhyMarker>("get_power_state")?;
1147 Ok(_response.map(|x| x))
1148 }
1149 self.client
1150 .send_query_and_decode::<fidl::encoding::EmptyPayload, WlanPhyGetPowerStateResult>(
1151 (),
1152 0x4639d1e5e93102c1,
1153 fidl::encoding::DynamicFlags::FLEXIBLE,
1154 _decode,
1155 )
1156 }
1157
1158 type SetBtCoexistenceModeResponseFut = fidl::client::QueryResponseFut<
1159 WlanPhySetBtCoexistenceModeResult,
1160 fidl::encoding::DefaultFuchsiaResourceDialect,
1161 >;
1162 fn r#set_bt_coexistence_mode(
1163 &self,
1164 mut payload: &WlanPhySetBtCoexistenceModeRequest,
1165 ) -> Self::SetBtCoexistenceModeResponseFut {
1166 fn _decode(
1167 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1168 ) -> Result<WlanPhySetBtCoexistenceModeResult, fidl::Error> {
1169 let _response = fidl::client::decode_transaction_body::<
1170 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
1171 fidl::encoding::DefaultFuchsiaResourceDialect,
1172 0x5ac69f24a87cac05,
1173 >(_buf?)?
1174 .into_result::<WlanPhyMarker>("set_bt_coexistence_mode")?;
1175 Ok(_response.map(|x| x))
1176 }
1177 self.client.send_query_and_decode::<
1178 WlanPhySetBtCoexistenceModeRequest,
1179 WlanPhySetBtCoexistenceModeResult,
1180 >(
1181 payload,
1182 0x5ac69f24a87cac05,
1183 fidl::encoding::DynamicFlags::FLEXIBLE,
1184 _decode,
1185 )
1186 }
1187
1188 type SetTxPowerScenarioResponseFut = fidl::client::QueryResponseFut<
1189 WlanPhySetTxPowerScenarioResult,
1190 fidl::encoding::DefaultFuchsiaResourceDialect,
1191 >;
1192 fn r#set_tx_power_scenario(
1193 &self,
1194 mut payload: &WlanPhySetTxPowerScenarioRequest,
1195 ) -> Self::SetTxPowerScenarioResponseFut {
1196 fn _decode(
1197 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1198 ) -> Result<WlanPhySetTxPowerScenarioResult, fidl::Error> {
1199 let _response = fidl::client::decode_transaction_body::<
1200 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
1201 fidl::encoding::DefaultFuchsiaResourceDialect,
1202 0x72e4d055cd3a18dc,
1203 >(_buf?)?
1204 .into_result::<WlanPhyMarker>("set_tx_power_scenario")?;
1205 Ok(_response.map(|x| x))
1206 }
1207 self.client.send_query_and_decode::<
1208 WlanPhySetTxPowerScenarioRequest,
1209 WlanPhySetTxPowerScenarioResult,
1210 >(
1211 payload,
1212 0x72e4d055cd3a18dc,
1213 fidl::encoding::DynamicFlags::FLEXIBLE,
1214 _decode,
1215 )
1216 }
1217
1218 type ResetTxPowerScenarioResponseFut = fidl::client::QueryResponseFut<
1219 WlanPhyResetTxPowerScenarioResult,
1220 fidl::encoding::DefaultFuchsiaResourceDialect,
1221 >;
1222 fn r#reset_tx_power_scenario(&self) -> Self::ResetTxPowerScenarioResponseFut {
1223 fn _decode(
1224 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1225 ) -> Result<WlanPhyResetTxPowerScenarioResult, fidl::Error> {
1226 let _response = fidl::client::decode_transaction_body::<
1227 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
1228 fidl::encoding::DefaultFuchsiaResourceDialect,
1229 0x78c3bd271b3bb712,
1230 >(_buf?)?
1231 .into_result::<WlanPhyMarker>("reset_tx_power_scenario")?;
1232 Ok(_response.map(|x| x))
1233 }
1234 self.client.send_query_and_decode::<
1235 fidl::encoding::EmptyPayload,
1236 WlanPhyResetTxPowerScenarioResult,
1237 >(
1238 (),
1239 0x78c3bd271b3bb712,
1240 fidl::encoding::DynamicFlags::FLEXIBLE,
1241 _decode,
1242 )
1243 }
1244
1245 type GetTxPowerScenarioResponseFut = fidl::client::QueryResponseFut<
1246 WlanPhyGetTxPowerScenarioResult,
1247 fidl::encoding::DefaultFuchsiaResourceDialect,
1248 >;
1249 fn r#get_tx_power_scenario(&self) -> Self::GetTxPowerScenarioResponseFut {
1250 fn _decode(
1251 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1252 ) -> Result<WlanPhyGetTxPowerScenarioResult, fidl::Error> {
1253 let _response = fidl::client::decode_transaction_body::<
1254 fidl::encoding::FlexibleResultType<WlanPhyGetTxPowerScenarioResponse, i32>,
1255 fidl::encoding::DefaultFuchsiaResourceDialect,
1256 0x62f9717d964b3c8e,
1257 >(_buf?)?
1258 .into_result::<WlanPhyMarker>("get_tx_power_scenario")?;
1259 Ok(_response.map(|x| x.scenario))
1260 }
1261 self.client
1262 .send_query_and_decode::<fidl::encoding::EmptyPayload, WlanPhyGetTxPowerScenarioResult>(
1263 (),
1264 0x62f9717d964b3c8e,
1265 fidl::encoding::DynamicFlags::FLEXIBLE,
1266 _decode,
1267 )
1268 }
1269}
1270
1271pub struct WlanPhyEventStream {
1272 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1273}
1274
1275impl std::marker::Unpin for WlanPhyEventStream {}
1276
1277impl futures::stream::FusedStream for WlanPhyEventStream {
1278 fn is_terminated(&self) -> bool {
1279 self.event_receiver.is_terminated()
1280 }
1281}
1282
1283impl futures::Stream for WlanPhyEventStream {
1284 type Item = Result<WlanPhyEvent, fidl::Error>;
1285
1286 fn poll_next(
1287 mut self: std::pin::Pin<&mut Self>,
1288 cx: &mut std::task::Context<'_>,
1289 ) -> std::task::Poll<Option<Self::Item>> {
1290 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1291 &mut self.event_receiver,
1292 cx
1293 )?) {
1294 Some(buf) => std::task::Poll::Ready(Some(WlanPhyEvent::decode(buf))),
1295 None => std::task::Poll::Ready(None),
1296 }
1297 }
1298}
1299
1300#[derive(Debug)]
1301pub enum WlanPhyEvent {
1302 #[non_exhaustive]
1303 _UnknownEvent {
1304 ordinal: u64,
1306 },
1307}
1308
1309impl WlanPhyEvent {
1310 fn decode(
1312 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1313 ) -> Result<WlanPhyEvent, fidl::Error> {
1314 let (bytes, _handles) = buf.split_mut();
1315 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1316 debug_assert_eq!(tx_header.tx_id, 0);
1317 match tx_header.ordinal {
1318 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
1319 Ok(WlanPhyEvent::_UnknownEvent { ordinal: tx_header.ordinal })
1320 }
1321 _ => Err(fidl::Error::UnknownOrdinal {
1322 ordinal: tx_header.ordinal,
1323 protocol_name: <WlanPhyMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1324 }),
1325 }
1326 }
1327}
1328
1329pub struct WlanPhyRequestStream {
1331 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1332 is_terminated: bool,
1333}
1334
1335impl std::marker::Unpin for WlanPhyRequestStream {}
1336
1337impl futures::stream::FusedStream for WlanPhyRequestStream {
1338 fn is_terminated(&self) -> bool {
1339 self.is_terminated
1340 }
1341}
1342
1343impl fidl::endpoints::RequestStream for WlanPhyRequestStream {
1344 type Protocol = WlanPhyMarker;
1345 type ControlHandle = WlanPhyControlHandle;
1346
1347 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1348 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1349 }
1350
1351 fn control_handle(&self) -> Self::ControlHandle {
1352 WlanPhyControlHandle { inner: self.inner.clone() }
1353 }
1354
1355 fn into_inner(
1356 self,
1357 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1358 {
1359 (self.inner, self.is_terminated)
1360 }
1361
1362 fn from_inner(
1363 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1364 is_terminated: bool,
1365 ) -> Self {
1366 Self { inner, is_terminated }
1367 }
1368}
1369
1370impl futures::Stream for WlanPhyRequestStream {
1371 type Item = Result<WlanPhyRequest, fidl::Error>;
1372
1373 fn poll_next(
1374 mut self: std::pin::Pin<&mut Self>,
1375 cx: &mut std::task::Context<'_>,
1376 ) -> std::task::Poll<Option<Self::Item>> {
1377 let this = &mut *self;
1378 if this.inner.check_shutdown(cx) {
1379 this.is_terminated = true;
1380 return std::task::Poll::Ready(None);
1381 }
1382 if this.is_terminated {
1383 panic!("polled WlanPhyRequestStream after completion");
1384 }
1385 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1386 |bytes, handles| {
1387 match this.inner.channel().read_etc(cx, bytes, handles) {
1388 std::task::Poll::Ready(Ok(())) => {}
1389 std::task::Poll::Pending => return std::task::Poll::Pending,
1390 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1391 this.is_terminated = true;
1392 return std::task::Poll::Ready(None);
1393 }
1394 std::task::Poll::Ready(Err(e)) => {
1395 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1396 e.into(),
1397 ))));
1398 }
1399 }
1400
1401 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1403
1404 std::task::Poll::Ready(Some(match header.ordinal {
1405 0x399fe5e97bb0eff3 => {
1406 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1407 let mut req = fidl::new_empty!(
1408 WlanPhyInitRequest,
1409 fidl::encoding::DefaultFuchsiaResourceDialect
1410 );
1411 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanPhyInitRequest>(&header, _body_bytes, handles, &mut req)?;
1412 let control_handle = WlanPhyControlHandle { inner: this.inner.clone() };
1413 Ok(WlanPhyRequest::Init {
1414 payload: req,
1415 responder: WlanPhyInitResponder {
1416 control_handle: std::mem::ManuallyDrop::new(control_handle),
1417 tx_id: header.tx_id,
1418 },
1419 })
1420 }
1421 0x36891bcf679ad34a => {
1422 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1423 let mut req = fidl::new_empty!(
1424 fidl::encoding::EmptyPayload,
1425 fidl::encoding::DefaultFuchsiaResourceDialect
1426 );
1427 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1428 let control_handle = WlanPhyControlHandle { inner: this.inner.clone() };
1429 Ok(WlanPhyRequest::GetSupportedMacRoles {
1430 responder: WlanPhyGetSupportedMacRolesResponder {
1431 control_handle: std::mem::ManuallyDrop::new(control_handle),
1432 tx_id: header.tx_id,
1433 },
1434 })
1435 }
1436 0x4cc00e15727fbb8e => {
1437 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1438 let mut req = fidl::new_empty!(
1439 WlanPhyCreateIfaceRequest,
1440 fidl::encoding::DefaultFuchsiaResourceDialect
1441 );
1442 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanPhyCreateIfaceRequest>(&header, _body_bytes, handles, &mut req)?;
1443 let control_handle = WlanPhyControlHandle { inner: this.inner.clone() };
1444 Ok(WlanPhyRequest::CreateIface {
1445 payload: req,
1446 responder: WlanPhyCreateIfaceResponder {
1447 control_handle: std::mem::ManuallyDrop::new(control_handle),
1448 tx_id: header.tx_id,
1449 },
1450 })
1451 }
1452 0xfa408ede62bf8bc => {
1453 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1454 let mut req = fidl::new_empty!(
1455 WlanPhyDestroyIfaceRequest,
1456 fidl::encoding::DefaultFuchsiaResourceDialect
1457 );
1458 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanPhyDestroyIfaceRequest>(&header, _body_bytes, handles, &mut req)?;
1459 let control_handle = WlanPhyControlHandle { inner: this.inner.clone() };
1460 Ok(WlanPhyRequest::DestroyIface {
1461 payload: req,
1462 responder: WlanPhyDestroyIfaceResponder {
1463 control_handle: std::mem::ManuallyDrop::new(control_handle),
1464 tx_id: header.tx_id,
1465 },
1466 })
1467 }
1468 0x6d1258ed25af4a0f => {
1469 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1470 let mut req = fidl::new_empty!(
1471 WlanPhySetCountryRequest,
1472 fidl::encoding::DefaultFuchsiaResourceDialect
1473 );
1474 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanPhySetCountryRequest>(&header, _body_bytes, handles, &mut req)?;
1475 let control_handle = WlanPhyControlHandle { inner: this.inner.clone() };
1476 Ok(WlanPhyRequest::SetCountry {
1477 country: req.country,
1478
1479 responder: WlanPhySetCountryResponder {
1480 control_handle: std::mem::ManuallyDrop::new(control_handle),
1481 tx_id: header.tx_id,
1482 },
1483 })
1484 }
1485 0x73f333d223cec34f => {
1486 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1487 let mut req = fidl::new_empty!(
1488 fidl::encoding::EmptyPayload,
1489 fidl::encoding::DefaultFuchsiaResourceDialect
1490 );
1491 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1492 let control_handle = WlanPhyControlHandle { inner: this.inner.clone() };
1493 Ok(WlanPhyRequest::ClearCountry {
1494 responder: WlanPhyClearCountryResponder {
1495 control_handle: std::mem::ManuallyDrop::new(control_handle),
1496 tx_id: header.tx_id,
1497 },
1498 })
1499 }
1500 0x13ee2c5158d8507a => {
1501 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1502 let mut req = fidl::new_empty!(
1503 fidl::encoding::EmptyPayload,
1504 fidl::encoding::DefaultFuchsiaResourceDialect
1505 );
1506 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1507 let control_handle = WlanPhyControlHandle { inner: this.inner.clone() };
1508 Ok(WlanPhyRequest::GetCountry {
1509 responder: WlanPhyGetCountryResponder {
1510 control_handle: std::mem::ManuallyDrop::new(control_handle),
1511 tx_id: header.tx_id,
1512 },
1513 })
1514 }
1515 0x4e164c65070f890d => {
1516 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1517 let mut req = fidl::new_empty!(
1518 WlanPhySetPowerSaveModeRequest,
1519 fidl::encoding::DefaultFuchsiaResourceDialect
1520 );
1521 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanPhySetPowerSaveModeRequest>(&header, _body_bytes, handles, &mut req)?;
1522 let control_handle = WlanPhyControlHandle { inner: this.inner.clone() };
1523 Ok(WlanPhyRequest::SetPowerSaveMode {
1524 payload: req,
1525 responder: WlanPhySetPowerSaveModeResponder {
1526 control_handle: std::mem::ManuallyDrop::new(control_handle),
1527 tx_id: header.tx_id,
1528 },
1529 })
1530 }
1531 0x1cbd3390a4230826 => {
1532 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1533 let mut req = fidl::new_empty!(
1534 fidl::encoding::EmptyPayload,
1535 fidl::encoding::DefaultFuchsiaResourceDialect
1536 );
1537 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1538 let control_handle = WlanPhyControlHandle { inner: this.inner.clone() };
1539 Ok(WlanPhyRequest::GetPowerSaveMode {
1540 responder: WlanPhyGetPowerSaveModeResponder {
1541 control_handle: std::mem::ManuallyDrop::new(control_handle),
1542 tx_id: header.tx_id,
1543 },
1544 })
1545 }
1546 0x79fb1043c6355d0a => {
1547 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1548 let mut req = fidl::new_empty!(
1549 fidl::encoding::EmptyPayload,
1550 fidl::encoding::DefaultFuchsiaResourceDialect
1551 );
1552 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1553 let control_handle = WlanPhyControlHandle { inner: this.inner.clone() };
1554 Ok(WlanPhyRequest::PowerDown {
1555 responder: WlanPhyPowerDownResponder {
1556 control_handle: std::mem::ManuallyDrop::new(control_handle),
1557 tx_id: header.tx_id,
1558 },
1559 })
1560 }
1561 0x6dcde9a4259494f2 => {
1562 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1563 let mut req = fidl::new_empty!(
1564 fidl::encoding::EmptyPayload,
1565 fidl::encoding::DefaultFuchsiaResourceDialect
1566 );
1567 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1568 let control_handle = WlanPhyControlHandle { inner: this.inner.clone() };
1569 Ok(WlanPhyRequest::PowerUp {
1570 responder: WlanPhyPowerUpResponder {
1571 control_handle: std::mem::ManuallyDrop::new(control_handle),
1572 tx_id: header.tx_id,
1573 },
1574 })
1575 }
1576 0x2f0f1d8f2f22988f => {
1577 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1578 let mut req = fidl::new_empty!(
1579 fidl::encoding::EmptyPayload,
1580 fidl::encoding::DefaultFuchsiaResourceDialect
1581 );
1582 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1583 let control_handle = WlanPhyControlHandle { inner: this.inner.clone() };
1584 Ok(WlanPhyRequest::Reset {
1585 responder: WlanPhyResetResponder {
1586 control_handle: std::mem::ManuallyDrop::new(control_handle),
1587 tx_id: header.tx_id,
1588 },
1589 })
1590 }
1591 0x4639d1e5e93102c1 => {
1592 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1593 let mut req = fidl::new_empty!(
1594 fidl::encoding::EmptyPayload,
1595 fidl::encoding::DefaultFuchsiaResourceDialect
1596 );
1597 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1598 let control_handle = WlanPhyControlHandle { inner: this.inner.clone() };
1599 Ok(WlanPhyRequest::GetPowerState {
1600 responder: WlanPhyGetPowerStateResponder {
1601 control_handle: std::mem::ManuallyDrop::new(control_handle),
1602 tx_id: header.tx_id,
1603 },
1604 })
1605 }
1606 0x5ac69f24a87cac05 => {
1607 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1608 let mut req = fidl::new_empty!(
1609 WlanPhySetBtCoexistenceModeRequest,
1610 fidl::encoding::DefaultFuchsiaResourceDialect
1611 );
1612 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanPhySetBtCoexistenceModeRequest>(&header, _body_bytes, handles, &mut req)?;
1613 let control_handle = WlanPhyControlHandle { inner: this.inner.clone() };
1614 Ok(WlanPhyRequest::SetBtCoexistenceMode {
1615 payload: req,
1616 responder: WlanPhySetBtCoexistenceModeResponder {
1617 control_handle: std::mem::ManuallyDrop::new(control_handle),
1618 tx_id: header.tx_id,
1619 },
1620 })
1621 }
1622 0x72e4d055cd3a18dc => {
1623 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1624 let mut req = fidl::new_empty!(
1625 WlanPhySetTxPowerScenarioRequest,
1626 fidl::encoding::DefaultFuchsiaResourceDialect
1627 );
1628 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanPhySetTxPowerScenarioRequest>(&header, _body_bytes, handles, &mut req)?;
1629 let control_handle = WlanPhyControlHandle { inner: this.inner.clone() };
1630 Ok(WlanPhyRequest::SetTxPowerScenario {
1631 payload: req,
1632 responder: WlanPhySetTxPowerScenarioResponder {
1633 control_handle: std::mem::ManuallyDrop::new(control_handle),
1634 tx_id: header.tx_id,
1635 },
1636 })
1637 }
1638 0x78c3bd271b3bb712 => {
1639 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1640 let mut req = fidl::new_empty!(
1641 fidl::encoding::EmptyPayload,
1642 fidl::encoding::DefaultFuchsiaResourceDialect
1643 );
1644 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1645 let control_handle = WlanPhyControlHandle { inner: this.inner.clone() };
1646 Ok(WlanPhyRequest::ResetTxPowerScenario {
1647 responder: WlanPhyResetTxPowerScenarioResponder {
1648 control_handle: std::mem::ManuallyDrop::new(control_handle),
1649 tx_id: header.tx_id,
1650 },
1651 })
1652 }
1653 0x62f9717d964b3c8e => {
1654 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1655 let mut req = fidl::new_empty!(
1656 fidl::encoding::EmptyPayload,
1657 fidl::encoding::DefaultFuchsiaResourceDialect
1658 );
1659 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1660 let control_handle = WlanPhyControlHandle { inner: this.inner.clone() };
1661 Ok(WlanPhyRequest::GetTxPowerScenario {
1662 responder: WlanPhyGetTxPowerScenarioResponder {
1663 control_handle: std::mem::ManuallyDrop::new(control_handle),
1664 tx_id: header.tx_id,
1665 },
1666 })
1667 }
1668 _ if header.tx_id == 0
1669 && header
1670 .dynamic_flags()
1671 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
1672 {
1673 Ok(WlanPhyRequest::_UnknownMethod {
1674 ordinal: header.ordinal,
1675 control_handle: WlanPhyControlHandle { inner: this.inner.clone() },
1676 method_type: fidl::MethodType::OneWay,
1677 })
1678 }
1679 _ if header
1680 .dynamic_flags()
1681 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
1682 {
1683 this.inner.send_framework_err(
1684 fidl::encoding::FrameworkErr::UnknownMethod,
1685 header.tx_id,
1686 header.ordinal,
1687 header.dynamic_flags(),
1688 (bytes, handles),
1689 )?;
1690 Ok(WlanPhyRequest::_UnknownMethod {
1691 ordinal: header.ordinal,
1692 control_handle: WlanPhyControlHandle { inner: this.inner.clone() },
1693 method_type: fidl::MethodType::TwoWay,
1694 })
1695 }
1696 _ => Err(fidl::Error::UnknownOrdinal {
1697 ordinal: header.ordinal,
1698 protocol_name:
1699 <WlanPhyMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1700 }),
1701 }))
1702 },
1703 )
1704 }
1705}
1706
1707#[derive(Debug)]
1708pub enum WlanPhyRequest {
1709 Init {
1715 payload: WlanPhyInitRequest,
1716 responder: WlanPhyInitResponder,
1717 },
1718 GetSupportedMacRoles {
1720 responder: WlanPhyGetSupportedMacRolesResponder,
1721 },
1722 CreateIface {
1727 payload: WlanPhyCreateIfaceRequest,
1728 responder: WlanPhyCreateIfaceResponder,
1729 },
1730 DestroyIface {
1735 payload: WlanPhyDestroyIfaceRequest,
1736 responder: WlanPhyDestroyIfaceResponder,
1737 },
1738 SetCountry {
1742 country: [u8; 2],
1743 responder: WlanPhySetCountryResponder,
1744 },
1745 ClearCountry {
1749 responder: WlanPhyClearCountryResponder,
1750 },
1751 GetCountry {
1755 responder: WlanPhyGetCountryResponder,
1756 },
1757 SetPowerSaveMode {
1762 payload: WlanPhySetPowerSaveModeRequest,
1763 responder: WlanPhySetPowerSaveModeResponder,
1764 },
1765 GetPowerSaveMode {
1768 responder: WlanPhyGetPowerSaveModeResponder,
1769 },
1770 PowerDown {
1778 responder: WlanPhyPowerDownResponder,
1779 },
1780 PowerUp {
1785 responder: WlanPhyPowerUpResponder,
1786 },
1787 Reset {
1795 responder: WlanPhyResetResponder,
1796 },
1797 GetPowerState {
1802 responder: WlanPhyGetPowerStateResponder,
1803 },
1804 SetBtCoexistenceMode {
1808 payload: WlanPhySetBtCoexistenceModeRequest,
1809 responder: WlanPhySetBtCoexistenceModeResponder,
1810 },
1811 SetTxPowerScenario {
1812 payload: WlanPhySetTxPowerScenarioRequest,
1813 responder: WlanPhySetTxPowerScenarioResponder,
1814 },
1815 ResetTxPowerScenario {
1816 responder: WlanPhyResetTxPowerScenarioResponder,
1817 },
1818 GetTxPowerScenario {
1819 responder: WlanPhyGetTxPowerScenarioResponder,
1820 },
1821 #[non_exhaustive]
1823 _UnknownMethod {
1824 ordinal: u64,
1826 control_handle: WlanPhyControlHandle,
1827 method_type: fidl::MethodType,
1828 },
1829}
1830
1831impl WlanPhyRequest {
1832 #[allow(irrefutable_let_patterns)]
1833 pub fn into_init(self) -> Option<(WlanPhyInitRequest, WlanPhyInitResponder)> {
1834 if let WlanPhyRequest::Init { payload, responder } = self {
1835 Some((payload, responder))
1836 } else {
1837 None
1838 }
1839 }
1840
1841 #[allow(irrefutable_let_patterns)]
1842 pub fn into_get_supported_mac_roles(self) -> Option<(WlanPhyGetSupportedMacRolesResponder)> {
1843 if let WlanPhyRequest::GetSupportedMacRoles { responder } = self {
1844 Some((responder))
1845 } else {
1846 None
1847 }
1848 }
1849
1850 #[allow(irrefutable_let_patterns)]
1851 pub fn into_create_iface(
1852 self,
1853 ) -> Option<(WlanPhyCreateIfaceRequest, WlanPhyCreateIfaceResponder)> {
1854 if let WlanPhyRequest::CreateIface { payload, responder } = self {
1855 Some((payload, responder))
1856 } else {
1857 None
1858 }
1859 }
1860
1861 #[allow(irrefutable_let_patterns)]
1862 pub fn into_destroy_iface(
1863 self,
1864 ) -> Option<(WlanPhyDestroyIfaceRequest, WlanPhyDestroyIfaceResponder)> {
1865 if let WlanPhyRequest::DestroyIface { payload, responder } = self {
1866 Some((payload, responder))
1867 } else {
1868 None
1869 }
1870 }
1871
1872 #[allow(irrefutable_let_patterns)]
1873 pub fn into_set_country(self) -> Option<([u8; 2], WlanPhySetCountryResponder)> {
1874 if let WlanPhyRequest::SetCountry { country, responder } = self {
1875 Some((country, responder))
1876 } else {
1877 None
1878 }
1879 }
1880
1881 #[allow(irrefutable_let_patterns)]
1882 pub fn into_clear_country(self) -> Option<(WlanPhyClearCountryResponder)> {
1883 if let WlanPhyRequest::ClearCountry { responder } = self { Some((responder)) } else { None }
1884 }
1885
1886 #[allow(irrefutable_let_patterns)]
1887 pub fn into_get_country(self) -> Option<(WlanPhyGetCountryResponder)> {
1888 if let WlanPhyRequest::GetCountry { responder } = self { Some((responder)) } else { None }
1889 }
1890
1891 #[allow(irrefutable_let_patterns)]
1892 pub fn into_set_power_save_mode(
1893 self,
1894 ) -> Option<(WlanPhySetPowerSaveModeRequest, WlanPhySetPowerSaveModeResponder)> {
1895 if let WlanPhyRequest::SetPowerSaveMode { payload, responder } = self {
1896 Some((payload, responder))
1897 } else {
1898 None
1899 }
1900 }
1901
1902 #[allow(irrefutable_let_patterns)]
1903 pub fn into_get_power_save_mode(self) -> Option<(WlanPhyGetPowerSaveModeResponder)> {
1904 if let WlanPhyRequest::GetPowerSaveMode { responder } = self {
1905 Some((responder))
1906 } else {
1907 None
1908 }
1909 }
1910
1911 #[allow(irrefutable_let_patterns)]
1912 pub fn into_power_down(self) -> Option<(WlanPhyPowerDownResponder)> {
1913 if let WlanPhyRequest::PowerDown { responder } = self { Some((responder)) } else { None }
1914 }
1915
1916 #[allow(irrefutable_let_patterns)]
1917 pub fn into_power_up(self) -> Option<(WlanPhyPowerUpResponder)> {
1918 if let WlanPhyRequest::PowerUp { responder } = self { Some((responder)) } else { None }
1919 }
1920
1921 #[allow(irrefutable_let_patterns)]
1922 pub fn into_reset(self) -> Option<(WlanPhyResetResponder)> {
1923 if let WlanPhyRequest::Reset { responder } = self { Some((responder)) } else { None }
1924 }
1925
1926 #[allow(irrefutable_let_patterns)]
1927 pub fn into_get_power_state(self) -> Option<(WlanPhyGetPowerStateResponder)> {
1928 if let WlanPhyRequest::GetPowerState { responder } = self {
1929 Some((responder))
1930 } else {
1931 None
1932 }
1933 }
1934
1935 #[allow(irrefutable_let_patterns)]
1936 pub fn into_set_bt_coexistence_mode(
1937 self,
1938 ) -> Option<(WlanPhySetBtCoexistenceModeRequest, WlanPhySetBtCoexistenceModeResponder)> {
1939 if let WlanPhyRequest::SetBtCoexistenceMode { payload, responder } = self {
1940 Some((payload, responder))
1941 } else {
1942 None
1943 }
1944 }
1945
1946 #[allow(irrefutable_let_patterns)]
1947 pub fn into_set_tx_power_scenario(
1948 self,
1949 ) -> Option<(WlanPhySetTxPowerScenarioRequest, WlanPhySetTxPowerScenarioResponder)> {
1950 if let WlanPhyRequest::SetTxPowerScenario { payload, responder } = self {
1951 Some((payload, responder))
1952 } else {
1953 None
1954 }
1955 }
1956
1957 #[allow(irrefutable_let_patterns)]
1958 pub fn into_reset_tx_power_scenario(self) -> Option<(WlanPhyResetTxPowerScenarioResponder)> {
1959 if let WlanPhyRequest::ResetTxPowerScenario { responder } = self {
1960 Some((responder))
1961 } else {
1962 None
1963 }
1964 }
1965
1966 #[allow(irrefutable_let_patterns)]
1967 pub fn into_get_tx_power_scenario(self) -> Option<(WlanPhyGetTxPowerScenarioResponder)> {
1968 if let WlanPhyRequest::GetTxPowerScenario { responder } = self {
1969 Some((responder))
1970 } else {
1971 None
1972 }
1973 }
1974
1975 pub fn method_name(&self) -> &'static str {
1977 match *self {
1978 WlanPhyRequest::Init { .. } => "init",
1979 WlanPhyRequest::GetSupportedMacRoles { .. } => "get_supported_mac_roles",
1980 WlanPhyRequest::CreateIface { .. } => "create_iface",
1981 WlanPhyRequest::DestroyIface { .. } => "destroy_iface",
1982 WlanPhyRequest::SetCountry { .. } => "set_country",
1983 WlanPhyRequest::ClearCountry { .. } => "clear_country",
1984 WlanPhyRequest::GetCountry { .. } => "get_country",
1985 WlanPhyRequest::SetPowerSaveMode { .. } => "set_power_save_mode",
1986 WlanPhyRequest::GetPowerSaveMode { .. } => "get_power_save_mode",
1987 WlanPhyRequest::PowerDown { .. } => "power_down",
1988 WlanPhyRequest::PowerUp { .. } => "power_up",
1989 WlanPhyRequest::Reset { .. } => "reset",
1990 WlanPhyRequest::GetPowerState { .. } => "get_power_state",
1991 WlanPhyRequest::SetBtCoexistenceMode { .. } => "set_bt_coexistence_mode",
1992 WlanPhyRequest::SetTxPowerScenario { .. } => "set_tx_power_scenario",
1993 WlanPhyRequest::ResetTxPowerScenario { .. } => "reset_tx_power_scenario",
1994 WlanPhyRequest::GetTxPowerScenario { .. } => "get_tx_power_scenario",
1995 WlanPhyRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
1996 "unknown one-way method"
1997 }
1998 WlanPhyRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
1999 "unknown two-way method"
2000 }
2001 }
2002 }
2003}
2004
2005#[derive(Debug, Clone)]
2006pub struct WlanPhyControlHandle {
2007 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2008}
2009
2010impl WlanPhyControlHandle {
2011 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
2012 self.inner.shutdown_with_epitaph(status.into())
2013 }
2014}
2015
2016impl fidl::endpoints::ControlHandle for WlanPhyControlHandle {
2017 fn shutdown(&self) {
2018 self.inner.shutdown()
2019 }
2020
2021 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
2022 self.inner.shutdown_with_epitaph(status)
2023 }
2024
2025 fn is_closed(&self) -> bool {
2026 self.inner.channel().is_closed()
2027 }
2028 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2029 self.inner.channel().on_closed()
2030 }
2031
2032 #[cfg(target_os = "fuchsia")]
2033 fn signal_peer(
2034 &self,
2035 clear_mask: zx::Signals,
2036 set_mask: zx::Signals,
2037 ) -> Result<(), zx_status::Status> {
2038 use fidl::Peered;
2039 self.inner.channel().signal_peer(clear_mask, set_mask)
2040 }
2041}
2042
2043impl WlanPhyControlHandle {}
2044
2045#[must_use = "FIDL methods require a response to be sent"]
2046#[derive(Debug)]
2047pub struct WlanPhyInitResponder {
2048 control_handle: std::mem::ManuallyDrop<WlanPhyControlHandle>,
2049 tx_id: u32,
2050}
2051
2052impl std::ops::Drop for WlanPhyInitResponder {
2056 fn drop(&mut self) {
2057 self.control_handle.shutdown();
2058 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2060 }
2061}
2062
2063impl fidl::endpoints::Responder for WlanPhyInitResponder {
2064 type ControlHandle = WlanPhyControlHandle;
2065
2066 fn control_handle(&self) -> &WlanPhyControlHandle {
2067 &self.control_handle
2068 }
2069
2070 fn drop_without_shutdown(mut self) {
2071 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2073 std::mem::forget(self);
2075 }
2076}
2077
2078impl WlanPhyInitResponder {
2079 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2083 let _result = self.send_raw(result);
2084 if _result.is_err() {
2085 self.control_handle.shutdown();
2086 }
2087 self.drop_without_shutdown();
2088 _result
2089 }
2090
2091 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2093 let _result = self.send_raw(result);
2094 self.drop_without_shutdown();
2095 _result
2096 }
2097
2098 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2099 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2100 fidl::encoding::EmptyStruct,
2101 i32,
2102 >>(
2103 fidl::encoding::FlexibleResult::new(result),
2104 self.tx_id,
2105 0x399fe5e97bb0eff3,
2106 fidl::encoding::DynamicFlags::FLEXIBLE,
2107 )
2108 }
2109}
2110
2111#[must_use = "FIDL methods require a response to be sent"]
2112#[derive(Debug)]
2113pub struct WlanPhyGetSupportedMacRolesResponder {
2114 control_handle: std::mem::ManuallyDrop<WlanPhyControlHandle>,
2115 tx_id: u32,
2116}
2117
2118impl std::ops::Drop for WlanPhyGetSupportedMacRolesResponder {
2122 fn drop(&mut self) {
2123 self.control_handle.shutdown();
2124 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2126 }
2127}
2128
2129impl fidl::endpoints::Responder for WlanPhyGetSupportedMacRolesResponder {
2130 type ControlHandle = WlanPhyControlHandle;
2131
2132 fn control_handle(&self) -> &WlanPhyControlHandle {
2133 &self.control_handle
2134 }
2135
2136 fn drop_without_shutdown(mut self) {
2137 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2139 std::mem::forget(self);
2141 }
2142}
2143
2144impl WlanPhyGetSupportedMacRolesResponder {
2145 pub fn send(
2149 self,
2150 mut result: Result<&WlanPhyGetSupportedMacRolesResponse, i32>,
2151 ) -> Result<(), fidl::Error> {
2152 let _result = self.send_raw(result);
2153 if _result.is_err() {
2154 self.control_handle.shutdown();
2155 }
2156 self.drop_without_shutdown();
2157 _result
2158 }
2159
2160 pub fn send_no_shutdown_on_err(
2162 self,
2163 mut result: Result<&WlanPhyGetSupportedMacRolesResponse, i32>,
2164 ) -> Result<(), fidl::Error> {
2165 let _result = self.send_raw(result);
2166 self.drop_without_shutdown();
2167 _result
2168 }
2169
2170 fn send_raw(
2171 &self,
2172 mut result: Result<&WlanPhyGetSupportedMacRolesResponse, i32>,
2173 ) -> Result<(), fidl::Error> {
2174 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2175 WlanPhyGetSupportedMacRolesResponse,
2176 i32,
2177 >>(
2178 fidl::encoding::FlexibleResult::new(result),
2179 self.tx_id,
2180 0x36891bcf679ad34a,
2181 fidl::encoding::DynamicFlags::FLEXIBLE,
2182 )
2183 }
2184}
2185
2186#[must_use = "FIDL methods require a response to be sent"]
2187#[derive(Debug)]
2188pub struct WlanPhyCreateIfaceResponder {
2189 control_handle: std::mem::ManuallyDrop<WlanPhyControlHandle>,
2190 tx_id: u32,
2191}
2192
2193impl std::ops::Drop for WlanPhyCreateIfaceResponder {
2197 fn drop(&mut self) {
2198 self.control_handle.shutdown();
2199 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2201 }
2202}
2203
2204impl fidl::endpoints::Responder for WlanPhyCreateIfaceResponder {
2205 type ControlHandle = WlanPhyControlHandle;
2206
2207 fn control_handle(&self) -> &WlanPhyControlHandle {
2208 &self.control_handle
2209 }
2210
2211 fn drop_without_shutdown(mut self) {
2212 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2214 std::mem::forget(self);
2216 }
2217}
2218
2219impl WlanPhyCreateIfaceResponder {
2220 pub fn send(
2224 self,
2225 mut result: Result<&WlanPhyCreateIfaceResponse, i32>,
2226 ) -> Result<(), fidl::Error> {
2227 let _result = self.send_raw(result);
2228 if _result.is_err() {
2229 self.control_handle.shutdown();
2230 }
2231 self.drop_without_shutdown();
2232 _result
2233 }
2234
2235 pub fn send_no_shutdown_on_err(
2237 self,
2238 mut result: Result<&WlanPhyCreateIfaceResponse, i32>,
2239 ) -> Result<(), fidl::Error> {
2240 let _result = self.send_raw(result);
2241 self.drop_without_shutdown();
2242 _result
2243 }
2244
2245 fn send_raw(
2246 &self,
2247 mut result: Result<&WlanPhyCreateIfaceResponse, i32>,
2248 ) -> Result<(), fidl::Error> {
2249 self.control_handle
2250 .inner
2251 .send::<fidl::encoding::FlexibleResultType<WlanPhyCreateIfaceResponse, i32>>(
2252 fidl::encoding::FlexibleResult::new(result),
2253 self.tx_id,
2254 0x4cc00e15727fbb8e,
2255 fidl::encoding::DynamicFlags::FLEXIBLE,
2256 )
2257 }
2258}
2259
2260#[must_use = "FIDL methods require a response to be sent"]
2261#[derive(Debug)]
2262pub struct WlanPhyDestroyIfaceResponder {
2263 control_handle: std::mem::ManuallyDrop<WlanPhyControlHandle>,
2264 tx_id: u32,
2265}
2266
2267impl std::ops::Drop for WlanPhyDestroyIfaceResponder {
2271 fn drop(&mut self) {
2272 self.control_handle.shutdown();
2273 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2275 }
2276}
2277
2278impl fidl::endpoints::Responder for WlanPhyDestroyIfaceResponder {
2279 type ControlHandle = WlanPhyControlHandle;
2280
2281 fn control_handle(&self) -> &WlanPhyControlHandle {
2282 &self.control_handle
2283 }
2284
2285 fn drop_without_shutdown(mut self) {
2286 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2288 std::mem::forget(self);
2290 }
2291}
2292
2293impl WlanPhyDestroyIfaceResponder {
2294 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2298 let _result = self.send_raw(result);
2299 if _result.is_err() {
2300 self.control_handle.shutdown();
2301 }
2302 self.drop_without_shutdown();
2303 _result
2304 }
2305
2306 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2308 let _result = self.send_raw(result);
2309 self.drop_without_shutdown();
2310 _result
2311 }
2312
2313 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2314 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2315 fidl::encoding::EmptyStruct,
2316 i32,
2317 >>(
2318 fidl::encoding::FlexibleResult::new(result),
2319 self.tx_id,
2320 0xfa408ede62bf8bc,
2321 fidl::encoding::DynamicFlags::FLEXIBLE,
2322 )
2323 }
2324}
2325
2326#[must_use = "FIDL methods require a response to be sent"]
2327#[derive(Debug)]
2328pub struct WlanPhySetCountryResponder {
2329 control_handle: std::mem::ManuallyDrop<WlanPhyControlHandle>,
2330 tx_id: u32,
2331}
2332
2333impl std::ops::Drop for WlanPhySetCountryResponder {
2337 fn drop(&mut self) {
2338 self.control_handle.shutdown();
2339 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2341 }
2342}
2343
2344impl fidl::endpoints::Responder for WlanPhySetCountryResponder {
2345 type ControlHandle = WlanPhyControlHandle;
2346
2347 fn control_handle(&self) -> &WlanPhyControlHandle {
2348 &self.control_handle
2349 }
2350
2351 fn drop_without_shutdown(mut self) {
2352 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2354 std::mem::forget(self);
2356 }
2357}
2358
2359impl WlanPhySetCountryResponder {
2360 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2364 let _result = self.send_raw(result);
2365 if _result.is_err() {
2366 self.control_handle.shutdown();
2367 }
2368 self.drop_without_shutdown();
2369 _result
2370 }
2371
2372 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2374 let _result = self.send_raw(result);
2375 self.drop_without_shutdown();
2376 _result
2377 }
2378
2379 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2380 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2381 fidl::encoding::EmptyStruct,
2382 i32,
2383 >>(
2384 fidl::encoding::FlexibleResult::new(result),
2385 self.tx_id,
2386 0x6d1258ed25af4a0f,
2387 fidl::encoding::DynamicFlags::FLEXIBLE,
2388 )
2389 }
2390}
2391
2392#[must_use = "FIDL methods require a response to be sent"]
2393#[derive(Debug)]
2394pub struct WlanPhyClearCountryResponder {
2395 control_handle: std::mem::ManuallyDrop<WlanPhyControlHandle>,
2396 tx_id: u32,
2397}
2398
2399impl std::ops::Drop for WlanPhyClearCountryResponder {
2403 fn drop(&mut self) {
2404 self.control_handle.shutdown();
2405 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2407 }
2408}
2409
2410impl fidl::endpoints::Responder for WlanPhyClearCountryResponder {
2411 type ControlHandle = WlanPhyControlHandle;
2412
2413 fn control_handle(&self) -> &WlanPhyControlHandle {
2414 &self.control_handle
2415 }
2416
2417 fn drop_without_shutdown(mut self) {
2418 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2420 std::mem::forget(self);
2422 }
2423}
2424
2425impl WlanPhyClearCountryResponder {
2426 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2430 let _result = self.send_raw(result);
2431 if _result.is_err() {
2432 self.control_handle.shutdown();
2433 }
2434 self.drop_without_shutdown();
2435 _result
2436 }
2437
2438 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2440 let _result = self.send_raw(result);
2441 self.drop_without_shutdown();
2442 _result
2443 }
2444
2445 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2446 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2447 fidl::encoding::EmptyStruct,
2448 i32,
2449 >>(
2450 fidl::encoding::FlexibleResult::new(result),
2451 self.tx_id,
2452 0x73f333d223cec34f,
2453 fidl::encoding::DynamicFlags::FLEXIBLE,
2454 )
2455 }
2456}
2457
2458#[must_use = "FIDL methods require a response to be sent"]
2459#[derive(Debug)]
2460pub struct WlanPhyGetCountryResponder {
2461 control_handle: std::mem::ManuallyDrop<WlanPhyControlHandle>,
2462 tx_id: u32,
2463}
2464
2465impl std::ops::Drop for WlanPhyGetCountryResponder {
2469 fn drop(&mut self) {
2470 self.control_handle.shutdown();
2471 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2473 }
2474}
2475
2476impl fidl::endpoints::Responder for WlanPhyGetCountryResponder {
2477 type ControlHandle = WlanPhyControlHandle;
2478
2479 fn control_handle(&self) -> &WlanPhyControlHandle {
2480 &self.control_handle
2481 }
2482
2483 fn drop_without_shutdown(mut self) {
2484 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2486 std::mem::forget(self);
2488 }
2489}
2490
2491impl WlanPhyGetCountryResponder {
2492 pub fn send(self, mut result: Result<&[u8; 2], i32>) -> Result<(), fidl::Error> {
2496 let _result = self.send_raw(result);
2497 if _result.is_err() {
2498 self.control_handle.shutdown();
2499 }
2500 self.drop_without_shutdown();
2501 _result
2502 }
2503
2504 pub fn send_no_shutdown_on_err(
2506 self,
2507 mut result: Result<&[u8; 2], i32>,
2508 ) -> Result<(), fidl::Error> {
2509 let _result = self.send_raw(result);
2510 self.drop_without_shutdown();
2511 _result
2512 }
2513
2514 fn send_raw(&self, mut result: Result<&[u8; 2], i32>) -> Result<(), fidl::Error> {
2515 self.control_handle
2516 .inner
2517 .send::<fidl::encoding::FlexibleResultType<WlanPhyGetCountryResponse, i32>>(
2518 fidl::encoding::FlexibleResult::new(result.map(|country| (country,))),
2519 self.tx_id,
2520 0x13ee2c5158d8507a,
2521 fidl::encoding::DynamicFlags::FLEXIBLE,
2522 )
2523 }
2524}
2525
2526#[must_use = "FIDL methods require a response to be sent"]
2527#[derive(Debug)]
2528pub struct WlanPhySetPowerSaveModeResponder {
2529 control_handle: std::mem::ManuallyDrop<WlanPhyControlHandle>,
2530 tx_id: u32,
2531}
2532
2533impl std::ops::Drop for WlanPhySetPowerSaveModeResponder {
2537 fn drop(&mut self) {
2538 self.control_handle.shutdown();
2539 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2541 }
2542}
2543
2544impl fidl::endpoints::Responder for WlanPhySetPowerSaveModeResponder {
2545 type ControlHandle = WlanPhyControlHandle;
2546
2547 fn control_handle(&self) -> &WlanPhyControlHandle {
2548 &self.control_handle
2549 }
2550
2551 fn drop_without_shutdown(mut self) {
2552 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2554 std::mem::forget(self);
2556 }
2557}
2558
2559impl WlanPhySetPowerSaveModeResponder {
2560 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2564 let _result = self.send_raw(result);
2565 if _result.is_err() {
2566 self.control_handle.shutdown();
2567 }
2568 self.drop_without_shutdown();
2569 _result
2570 }
2571
2572 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2574 let _result = self.send_raw(result);
2575 self.drop_without_shutdown();
2576 _result
2577 }
2578
2579 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2580 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2581 fidl::encoding::EmptyStruct,
2582 i32,
2583 >>(
2584 fidl::encoding::FlexibleResult::new(result),
2585 self.tx_id,
2586 0x4e164c65070f890d,
2587 fidl::encoding::DynamicFlags::FLEXIBLE,
2588 )
2589 }
2590}
2591
2592#[must_use = "FIDL methods require a response to be sent"]
2593#[derive(Debug)]
2594pub struct WlanPhyGetPowerSaveModeResponder {
2595 control_handle: std::mem::ManuallyDrop<WlanPhyControlHandle>,
2596 tx_id: u32,
2597}
2598
2599impl std::ops::Drop for WlanPhyGetPowerSaveModeResponder {
2603 fn drop(&mut self) {
2604 self.control_handle.shutdown();
2605 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2607 }
2608}
2609
2610impl fidl::endpoints::Responder for WlanPhyGetPowerSaveModeResponder {
2611 type ControlHandle = WlanPhyControlHandle;
2612
2613 fn control_handle(&self) -> &WlanPhyControlHandle {
2614 &self.control_handle
2615 }
2616
2617 fn drop_without_shutdown(mut self) {
2618 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2620 std::mem::forget(self);
2622 }
2623}
2624
2625impl WlanPhyGetPowerSaveModeResponder {
2626 pub fn send(
2630 self,
2631 mut result: Result<&WlanPhyGetPowerSaveModeResponse, i32>,
2632 ) -> Result<(), fidl::Error> {
2633 let _result = self.send_raw(result);
2634 if _result.is_err() {
2635 self.control_handle.shutdown();
2636 }
2637 self.drop_without_shutdown();
2638 _result
2639 }
2640
2641 pub fn send_no_shutdown_on_err(
2643 self,
2644 mut result: Result<&WlanPhyGetPowerSaveModeResponse, i32>,
2645 ) -> Result<(), fidl::Error> {
2646 let _result = self.send_raw(result);
2647 self.drop_without_shutdown();
2648 _result
2649 }
2650
2651 fn send_raw(
2652 &self,
2653 mut result: Result<&WlanPhyGetPowerSaveModeResponse, i32>,
2654 ) -> Result<(), fidl::Error> {
2655 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2656 WlanPhyGetPowerSaveModeResponse,
2657 i32,
2658 >>(
2659 fidl::encoding::FlexibleResult::new(result),
2660 self.tx_id,
2661 0x1cbd3390a4230826,
2662 fidl::encoding::DynamicFlags::FLEXIBLE,
2663 )
2664 }
2665}
2666
2667#[must_use = "FIDL methods require a response to be sent"]
2668#[derive(Debug)]
2669pub struct WlanPhyPowerDownResponder {
2670 control_handle: std::mem::ManuallyDrop<WlanPhyControlHandle>,
2671 tx_id: u32,
2672}
2673
2674impl std::ops::Drop for WlanPhyPowerDownResponder {
2678 fn drop(&mut self) {
2679 self.control_handle.shutdown();
2680 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2682 }
2683}
2684
2685impl fidl::endpoints::Responder for WlanPhyPowerDownResponder {
2686 type ControlHandle = WlanPhyControlHandle;
2687
2688 fn control_handle(&self) -> &WlanPhyControlHandle {
2689 &self.control_handle
2690 }
2691
2692 fn drop_without_shutdown(mut self) {
2693 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2695 std::mem::forget(self);
2697 }
2698}
2699
2700impl WlanPhyPowerDownResponder {
2701 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2705 let _result = self.send_raw(result);
2706 if _result.is_err() {
2707 self.control_handle.shutdown();
2708 }
2709 self.drop_without_shutdown();
2710 _result
2711 }
2712
2713 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2715 let _result = self.send_raw(result);
2716 self.drop_without_shutdown();
2717 _result
2718 }
2719
2720 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2721 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2722 fidl::encoding::EmptyStruct,
2723 i32,
2724 >>(
2725 fidl::encoding::FlexibleResult::new(result),
2726 self.tx_id,
2727 0x79fb1043c6355d0a,
2728 fidl::encoding::DynamicFlags::FLEXIBLE,
2729 )
2730 }
2731}
2732
2733#[must_use = "FIDL methods require a response to be sent"]
2734#[derive(Debug)]
2735pub struct WlanPhyPowerUpResponder {
2736 control_handle: std::mem::ManuallyDrop<WlanPhyControlHandle>,
2737 tx_id: u32,
2738}
2739
2740impl std::ops::Drop for WlanPhyPowerUpResponder {
2744 fn drop(&mut self) {
2745 self.control_handle.shutdown();
2746 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2748 }
2749}
2750
2751impl fidl::endpoints::Responder for WlanPhyPowerUpResponder {
2752 type ControlHandle = WlanPhyControlHandle;
2753
2754 fn control_handle(&self) -> &WlanPhyControlHandle {
2755 &self.control_handle
2756 }
2757
2758 fn drop_without_shutdown(mut self) {
2759 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2761 std::mem::forget(self);
2763 }
2764}
2765
2766impl WlanPhyPowerUpResponder {
2767 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2771 let _result = self.send_raw(result);
2772 if _result.is_err() {
2773 self.control_handle.shutdown();
2774 }
2775 self.drop_without_shutdown();
2776 _result
2777 }
2778
2779 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2781 let _result = self.send_raw(result);
2782 self.drop_without_shutdown();
2783 _result
2784 }
2785
2786 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2787 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2788 fidl::encoding::EmptyStruct,
2789 i32,
2790 >>(
2791 fidl::encoding::FlexibleResult::new(result),
2792 self.tx_id,
2793 0x6dcde9a4259494f2,
2794 fidl::encoding::DynamicFlags::FLEXIBLE,
2795 )
2796 }
2797}
2798
2799#[must_use = "FIDL methods require a response to be sent"]
2800#[derive(Debug)]
2801pub struct WlanPhyResetResponder {
2802 control_handle: std::mem::ManuallyDrop<WlanPhyControlHandle>,
2803 tx_id: u32,
2804}
2805
2806impl std::ops::Drop for WlanPhyResetResponder {
2810 fn drop(&mut self) {
2811 self.control_handle.shutdown();
2812 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2814 }
2815}
2816
2817impl fidl::endpoints::Responder for WlanPhyResetResponder {
2818 type ControlHandle = WlanPhyControlHandle;
2819
2820 fn control_handle(&self) -> &WlanPhyControlHandle {
2821 &self.control_handle
2822 }
2823
2824 fn drop_without_shutdown(mut self) {
2825 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2827 std::mem::forget(self);
2829 }
2830}
2831
2832impl WlanPhyResetResponder {
2833 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2837 let _result = self.send_raw(result);
2838 if _result.is_err() {
2839 self.control_handle.shutdown();
2840 }
2841 self.drop_without_shutdown();
2842 _result
2843 }
2844
2845 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2847 let _result = self.send_raw(result);
2848 self.drop_without_shutdown();
2849 _result
2850 }
2851
2852 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2853 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2854 fidl::encoding::EmptyStruct,
2855 i32,
2856 >>(
2857 fidl::encoding::FlexibleResult::new(result),
2858 self.tx_id,
2859 0x2f0f1d8f2f22988f,
2860 fidl::encoding::DynamicFlags::FLEXIBLE,
2861 )
2862 }
2863}
2864
2865#[must_use = "FIDL methods require a response to be sent"]
2866#[derive(Debug)]
2867pub struct WlanPhyGetPowerStateResponder {
2868 control_handle: std::mem::ManuallyDrop<WlanPhyControlHandle>,
2869 tx_id: u32,
2870}
2871
2872impl std::ops::Drop for WlanPhyGetPowerStateResponder {
2876 fn drop(&mut self) {
2877 self.control_handle.shutdown();
2878 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2880 }
2881}
2882
2883impl fidl::endpoints::Responder for WlanPhyGetPowerStateResponder {
2884 type ControlHandle = WlanPhyControlHandle;
2885
2886 fn control_handle(&self) -> &WlanPhyControlHandle {
2887 &self.control_handle
2888 }
2889
2890 fn drop_without_shutdown(mut self) {
2891 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2893 std::mem::forget(self);
2895 }
2896}
2897
2898impl WlanPhyGetPowerStateResponder {
2899 pub fn send(
2903 self,
2904 mut result: Result<&WlanPhyGetPowerStateResponse, i32>,
2905 ) -> Result<(), fidl::Error> {
2906 let _result = self.send_raw(result);
2907 if _result.is_err() {
2908 self.control_handle.shutdown();
2909 }
2910 self.drop_without_shutdown();
2911 _result
2912 }
2913
2914 pub fn send_no_shutdown_on_err(
2916 self,
2917 mut result: Result<&WlanPhyGetPowerStateResponse, i32>,
2918 ) -> Result<(), fidl::Error> {
2919 let _result = self.send_raw(result);
2920 self.drop_without_shutdown();
2921 _result
2922 }
2923
2924 fn send_raw(
2925 &self,
2926 mut result: Result<&WlanPhyGetPowerStateResponse, i32>,
2927 ) -> Result<(), fidl::Error> {
2928 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2929 WlanPhyGetPowerStateResponse,
2930 i32,
2931 >>(
2932 fidl::encoding::FlexibleResult::new(result),
2933 self.tx_id,
2934 0x4639d1e5e93102c1,
2935 fidl::encoding::DynamicFlags::FLEXIBLE,
2936 )
2937 }
2938}
2939
2940#[must_use = "FIDL methods require a response to be sent"]
2941#[derive(Debug)]
2942pub struct WlanPhySetBtCoexistenceModeResponder {
2943 control_handle: std::mem::ManuallyDrop<WlanPhyControlHandle>,
2944 tx_id: u32,
2945}
2946
2947impl std::ops::Drop for WlanPhySetBtCoexistenceModeResponder {
2951 fn drop(&mut self) {
2952 self.control_handle.shutdown();
2953 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2955 }
2956}
2957
2958impl fidl::endpoints::Responder for WlanPhySetBtCoexistenceModeResponder {
2959 type ControlHandle = WlanPhyControlHandle;
2960
2961 fn control_handle(&self) -> &WlanPhyControlHandle {
2962 &self.control_handle
2963 }
2964
2965 fn drop_without_shutdown(mut self) {
2966 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2968 std::mem::forget(self);
2970 }
2971}
2972
2973impl WlanPhySetBtCoexistenceModeResponder {
2974 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2978 let _result = self.send_raw(result);
2979 if _result.is_err() {
2980 self.control_handle.shutdown();
2981 }
2982 self.drop_without_shutdown();
2983 _result
2984 }
2985
2986 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2988 let _result = self.send_raw(result);
2989 self.drop_without_shutdown();
2990 _result
2991 }
2992
2993 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2994 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2995 fidl::encoding::EmptyStruct,
2996 i32,
2997 >>(
2998 fidl::encoding::FlexibleResult::new(result),
2999 self.tx_id,
3000 0x5ac69f24a87cac05,
3001 fidl::encoding::DynamicFlags::FLEXIBLE,
3002 )
3003 }
3004}
3005
3006#[must_use = "FIDL methods require a response to be sent"]
3007#[derive(Debug)]
3008pub struct WlanPhySetTxPowerScenarioResponder {
3009 control_handle: std::mem::ManuallyDrop<WlanPhyControlHandle>,
3010 tx_id: u32,
3011}
3012
3013impl std::ops::Drop for WlanPhySetTxPowerScenarioResponder {
3017 fn drop(&mut self) {
3018 self.control_handle.shutdown();
3019 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3021 }
3022}
3023
3024impl fidl::endpoints::Responder for WlanPhySetTxPowerScenarioResponder {
3025 type ControlHandle = WlanPhyControlHandle;
3026
3027 fn control_handle(&self) -> &WlanPhyControlHandle {
3028 &self.control_handle
3029 }
3030
3031 fn drop_without_shutdown(mut self) {
3032 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3034 std::mem::forget(self);
3036 }
3037}
3038
3039impl WlanPhySetTxPowerScenarioResponder {
3040 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3044 let _result = self.send_raw(result);
3045 if _result.is_err() {
3046 self.control_handle.shutdown();
3047 }
3048 self.drop_without_shutdown();
3049 _result
3050 }
3051
3052 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3054 let _result = self.send_raw(result);
3055 self.drop_without_shutdown();
3056 _result
3057 }
3058
3059 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3060 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3061 fidl::encoding::EmptyStruct,
3062 i32,
3063 >>(
3064 fidl::encoding::FlexibleResult::new(result),
3065 self.tx_id,
3066 0x72e4d055cd3a18dc,
3067 fidl::encoding::DynamicFlags::FLEXIBLE,
3068 )
3069 }
3070}
3071
3072#[must_use = "FIDL methods require a response to be sent"]
3073#[derive(Debug)]
3074pub struct WlanPhyResetTxPowerScenarioResponder {
3075 control_handle: std::mem::ManuallyDrop<WlanPhyControlHandle>,
3076 tx_id: u32,
3077}
3078
3079impl std::ops::Drop for WlanPhyResetTxPowerScenarioResponder {
3083 fn drop(&mut self) {
3084 self.control_handle.shutdown();
3085 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3087 }
3088}
3089
3090impl fidl::endpoints::Responder for WlanPhyResetTxPowerScenarioResponder {
3091 type ControlHandle = WlanPhyControlHandle;
3092
3093 fn control_handle(&self) -> &WlanPhyControlHandle {
3094 &self.control_handle
3095 }
3096
3097 fn drop_without_shutdown(mut self) {
3098 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3100 std::mem::forget(self);
3102 }
3103}
3104
3105impl WlanPhyResetTxPowerScenarioResponder {
3106 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3110 let _result = self.send_raw(result);
3111 if _result.is_err() {
3112 self.control_handle.shutdown();
3113 }
3114 self.drop_without_shutdown();
3115 _result
3116 }
3117
3118 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3120 let _result = self.send_raw(result);
3121 self.drop_without_shutdown();
3122 _result
3123 }
3124
3125 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3126 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3127 fidl::encoding::EmptyStruct,
3128 i32,
3129 >>(
3130 fidl::encoding::FlexibleResult::new(result),
3131 self.tx_id,
3132 0x78c3bd271b3bb712,
3133 fidl::encoding::DynamicFlags::FLEXIBLE,
3134 )
3135 }
3136}
3137
3138#[must_use = "FIDL methods require a response to be sent"]
3139#[derive(Debug)]
3140pub struct WlanPhyGetTxPowerScenarioResponder {
3141 control_handle: std::mem::ManuallyDrop<WlanPhyControlHandle>,
3142 tx_id: u32,
3143}
3144
3145impl std::ops::Drop for WlanPhyGetTxPowerScenarioResponder {
3149 fn drop(&mut self) {
3150 self.control_handle.shutdown();
3151 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3153 }
3154}
3155
3156impl fidl::endpoints::Responder for WlanPhyGetTxPowerScenarioResponder {
3157 type ControlHandle = WlanPhyControlHandle;
3158
3159 fn control_handle(&self) -> &WlanPhyControlHandle {
3160 &self.control_handle
3161 }
3162
3163 fn drop_without_shutdown(mut self) {
3164 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3166 std::mem::forget(self);
3168 }
3169}
3170
3171impl WlanPhyGetTxPowerScenarioResponder {
3172 pub fn send(
3176 self,
3177 mut result: Result<fidl_fuchsia_wlan_internal::TxPowerScenario, i32>,
3178 ) -> Result<(), fidl::Error> {
3179 let _result = self.send_raw(result);
3180 if _result.is_err() {
3181 self.control_handle.shutdown();
3182 }
3183 self.drop_without_shutdown();
3184 _result
3185 }
3186
3187 pub fn send_no_shutdown_on_err(
3189 self,
3190 mut result: Result<fidl_fuchsia_wlan_internal::TxPowerScenario, i32>,
3191 ) -> Result<(), fidl::Error> {
3192 let _result = self.send_raw(result);
3193 self.drop_without_shutdown();
3194 _result
3195 }
3196
3197 fn send_raw(
3198 &self,
3199 mut result: Result<fidl_fuchsia_wlan_internal::TxPowerScenario, i32>,
3200 ) -> Result<(), fidl::Error> {
3201 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3202 WlanPhyGetTxPowerScenarioResponse,
3203 i32,
3204 >>(
3205 fidl::encoding::FlexibleResult::new(result.map(|scenario| (scenario,))),
3206 self.tx_id,
3207 0x62f9717d964b3c8e,
3208 fidl::encoding::DynamicFlags::FLEXIBLE,
3209 )
3210 }
3211}
3212
3213#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3214pub struct WlanPhyNotifyMarker;
3215
3216impl fidl::endpoints::ProtocolMarker for WlanPhyNotifyMarker {
3217 type Proxy = WlanPhyNotifyProxy;
3218 type RequestStream = WlanPhyNotifyRequestStream;
3219 #[cfg(target_os = "fuchsia")]
3220 type SynchronousProxy = WlanPhyNotifySynchronousProxy;
3221
3222 const DEBUG_NAME: &'static str = "fuchsia.wlan.phy.WlanPhyNotify";
3223}
3224impl fidl::endpoints::DiscoverableProtocolMarker for WlanPhyNotifyMarker {}
3225pub type WlanPhyNotifyOnCriticalErrorResult = Result<(), WlanPhyNotifyError>;
3226pub type WlanPhyNotifyOnCountryCodeChangeResult = Result<(), WlanPhyNotifyError>;
3227
3228pub trait WlanPhyNotifyProxyInterface: Send + Sync {
3229 type OnCriticalErrorResponseFut: std::future::Future<Output = Result<WlanPhyNotifyOnCriticalErrorResult, fidl::Error>>
3230 + Send;
3231 fn r#on_critical_error(
3232 &self,
3233 payload: &WlanPhyNotifyOnCriticalErrorRequest,
3234 ) -> Self::OnCriticalErrorResponseFut;
3235 type OnCountryCodeChangeResponseFut: std::future::Future<Output = Result<WlanPhyNotifyOnCountryCodeChangeResult, fidl::Error>>
3236 + Send;
3237 fn r#on_country_code_change(
3238 &self,
3239 payload: &WlanPhyNotifyOnCountryCodeChangeRequest,
3240 ) -> Self::OnCountryCodeChangeResponseFut;
3241}
3242#[derive(Debug)]
3243#[cfg(target_os = "fuchsia")]
3244pub struct WlanPhyNotifySynchronousProxy {
3245 client: fidl::client::sync::Client,
3246}
3247
3248#[cfg(target_os = "fuchsia")]
3249impl fidl::endpoints::SynchronousProxy for WlanPhyNotifySynchronousProxy {
3250 type Proxy = WlanPhyNotifyProxy;
3251 type Protocol = WlanPhyNotifyMarker;
3252
3253 fn from_channel(inner: fidl::Channel) -> Self {
3254 Self::new(inner)
3255 }
3256
3257 fn into_channel(self) -> fidl::Channel {
3258 self.client.into_channel()
3259 }
3260
3261 fn as_channel(&self) -> &fidl::Channel {
3262 self.client.as_channel()
3263 }
3264}
3265
3266#[cfg(target_os = "fuchsia")]
3267impl WlanPhyNotifySynchronousProxy {
3268 pub fn new(channel: fidl::Channel) -> Self {
3269 Self { client: fidl::client::sync::Client::new(channel) }
3270 }
3271
3272 pub fn into_channel(self) -> fidl::Channel {
3273 self.client.into_channel()
3274 }
3275
3276 pub fn wait_for_event(
3279 &self,
3280 deadline: zx::MonotonicInstant,
3281 ) -> Result<WlanPhyNotifyEvent, fidl::Error> {
3282 WlanPhyNotifyEvent::decode(self.client.wait_for_event::<WlanPhyNotifyMarker>(deadline)?)
3283 }
3284
3285 pub fn r#on_critical_error(
3288 &self,
3289 mut payload: &WlanPhyNotifyOnCriticalErrorRequest,
3290 ___deadline: zx::MonotonicInstant,
3291 ) -> Result<WlanPhyNotifyOnCriticalErrorResult, fidl::Error> {
3292 let _response = self.client.send_query::<
3293 WlanPhyNotifyOnCriticalErrorRequest,
3294 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, WlanPhyNotifyError>,
3295 WlanPhyNotifyMarker,
3296 >(
3297 payload,
3298 0x621a4bea612fda2,
3299 fidl::encoding::DynamicFlags::FLEXIBLE,
3300 ___deadline,
3301 )?
3302 .into_result::<WlanPhyNotifyMarker>("on_critical_error")?;
3303 Ok(_response.map(|x| x))
3304 }
3305
3306 pub fn r#on_country_code_change(
3309 &self,
3310 mut payload: &WlanPhyNotifyOnCountryCodeChangeRequest,
3311 ___deadline: zx::MonotonicInstant,
3312 ) -> Result<WlanPhyNotifyOnCountryCodeChangeResult, fidl::Error> {
3313 let _response = self.client.send_query::<
3314 WlanPhyNotifyOnCountryCodeChangeRequest,
3315 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, WlanPhyNotifyError>,
3316 WlanPhyNotifyMarker,
3317 >(
3318 payload,
3319 0x9db74ddfe1fa156,
3320 fidl::encoding::DynamicFlags::FLEXIBLE,
3321 ___deadline,
3322 )?
3323 .into_result::<WlanPhyNotifyMarker>("on_country_code_change")?;
3324 Ok(_response.map(|x| x))
3325 }
3326}
3327
3328#[cfg(target_os = "fuchsia")]
3329impl From<WlanPhyNotifySynchronousProxy> for zx::NullableHandle {
3330 fn from(value: WlanPhyNotifySynchronousProxy) -> Self {
3331 value.into_channel().into()
3332 }
3333}
3334
3335#[cfg(target_os = "fuchsia")]
3336impl From<fidl::Channel> for WlanPhyNotifySynchronousProxy {
3337 fn from(value: fidl::Channel) -> Self {
3338 Self::new(value)
3339 }
3340}
3341
3342#[cfg(target_os = "fuchsia")]
3343impl fidl::endpoints::FromClient for WlanPhyNotifySynchronousProxy {
3344 type Protocol = WlanPhyNotifyMarker;
3345
3346 fn from_client(value: fidl::endpoints::ClientEnd<WlanPhyNotifyMarker>) -> Self {
3347 Self::new(value.into_channel())
3348 }
3349}
3350
3351#[derive(Debug, Clone)]
3352pub struct WlanPhyNotifyProxy {
3353 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
3354}
3355
3356impl fidl::endpoints::Proxy for WlanPhyNotifyProxy {
3357 type Protocol = WlanPhyNotifyMarker;
3358
3359 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
3360 Self::new(inner)
3361 }
3362
3363 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
3364 self.client.into_channel().map_err(|client| Self { client })
3365 }
3366
3367 fn as_channel(&self) -> &::fidl::AsyncChannel {
3368 self.client.as_channel()
3369 }
3370}
3371
3372impl WlanPhyNotifyProxy {
3373 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
3375 let protocol_name = <WlanPhyNotifyMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3376 Self { client: fidl::client::Client::new(channel, protocol_name) }
3377 }
3378
3379 pub fn take_event_stream(&self) -> WlanPhyNotifyEventStream {
3385 WlanPhyNotifyEventStream { event_receiver: self.client.take_event_receiver() }
3386 }
3387
3388 pub fn r#on_critical_error(
3391 &self,
3392 mut payload: &WlanPhyNotifyOnCriticalErrorRequest,
3393 ) -> fidl::client::QueryResponseFut<
3394 WlanPhyNotifyOnCriticalErrorResult,
3395 fidl::encoding::DefaultFuchsiaResourceDialect,
3396 > {
3397 WlanPhyNotifyProxyInterface::r#on_critical_error(self, payload)
3398 }
3399
3400 pub fn r#on_country_code_change(
3403 &self,
3404 mut payload: &WlanPhyNotifyOnCountryCodeChangeRequest,
3405 ) -> fidl::client::QueryResponseFut<
3406 WlanPhyNotifyOnCountryCodeChangeResult,
3407 fidl::encoding::DefaultFuchsiaResourceDialect,
3408 > {
3409 WlanPhyNotifyProxyInterface::r#on_country_code_change(self, payload)
3410 }
3411}
3412
3413impl WlanPhyNotifyProxyInterface for WlanPhyNotifyProxy {
3414 type OnCriticalErrorResponseFut = fidl::client::QueryResponseFut<
3415 WlanPhyNotifyOnCriticalErrorResult,
3416 fidl::encoding::DefaultFuchsiaResourceDialect,
3417 >;
3418 fn r#on_critical_error(
3419 &self,
3420 mut payload: &WlanPhyNotifyOnCriticalErrorRequest,
3421 ) -> Self::OnCriticalErrorResponseFut {
3422 fn _decode(
3423 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3424 ) -> Result<WlanPhyNotifyOnCriticalErrorResult, fidl::Error> {
3425 let _response = fidl::client::decode_transaction_body::<
3426 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, WlanPhyNotifyError>,
3427 fidl::encoding::DefaultFuchsiaResourceDialect,
3428 0x621a4bea612fda2,
3429 >(_buf?)?
3430 .into_result::<WlanPhyNotifyMarker>("on_critical_error")?;
3431 Ok(_response.map(|x| x))
3432 }
3433 self.client.send_query_and_decode::<
3434 WlanPhyNotifyOnCriticalErrorRequest,
3435 WlanPhyNotifyOnCriticalErrorResult,
3436 >(
3437 payload,
3438 0x621a4bea612fda2,
3439 fidl::encoding::DynamicFlags::FLEXIBLE,
3440 _decode,
3441 )
3442 }
3443
3444 type OnCountryCodeChangeResponseFut = fidl::client::QueryResponseFut<
3445 WlanPhyNotifyOnCountryCodeChangeResult,
3446 fidl::encoding::DefaultFuchsiaResourceDialect,
3447 >;
3448 fn r#on_country_code_change(
3449 &self,
3450 mut payload: &WlanPhyNotifyOnCountryCodeChangeRequest,
3451 ) -> Self::OnCountryCodeChangeResponseFut {
3452 fn _decode(
3453 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3454 ) -> Result<WlanPhyNotifyOnCountryCodeChangeResult, fidl::Error> {
3455 let _response = fidl::client::decode_transaction_body::<
3456 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, WlanPhyNotifyError>,
3457 fidl::encoding::DefaultFuchsiaResourceDialect,
3458 0x9db74ddfe1fa156,
3459 >(_buf?)?
3460 .into_result::<WlanPhyNotifyMarker>("on_country_code_change")?;
3461 Ok(_response.map(|x| x))
3462 }
3463 self.client.send_query_and_decode::<
3464 WlanPhyNotifyOnCountryCodeChangeRequest,
3465 WlanPhyNotifyOnCountryCodeChangeResult,
3466 >(
3467 payload,
3468 0x9db74ddfe1fa156,
3469 fidl::encoding::DynamicFlags::FLEXIBLE,
3470 _decode,
3471 )
3472 }
3473}
3474
3475pub struct WlanPhyNotifyEventStream {
3476 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3477}
3478
3479impl std::marker::Unpin for WlanPhyNotifyEventStream {}
3480
3481impl futures::stream::FusedStream for WlanPhyNotifyEventStream {
3482 fn is_terminated(&self) -> bool {
3483 self.event_receiver.is_terminated()
3484 }
3485}
3486
3487impl futures::Stream for WlanPhyNotifyEventStream {
3488 type Item = Result<WlanPhyNotifyEvent, fidl::Error>;
3489
3490 fn poll_next(
3491 mut self: std::pin::Pin<&mut Self>,
3492 cx: &mut std::task::Context<'_>,
3493 ) -> std::task::Poll<Option<Self::Item>> {
3494 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3495 &mut self.event_receiver,
3496 cx
3497 )?) {
3498 Some(buf) => std::task::Poll::Ready(Some(WlanPhyNotifyEvent::decode(buf))),
3499 None => std::task::Poll::Ready(None),
3500 }
3501 }
3502}
3503
3504#[derive(Debug)]
3505pub enum WlanPhyNotifyEvent {
3506 #[non_exhaustive]
3507 _UnknownEvent {
3508 ordinal: u64,
3510 },
3511}
3512
3513impl WlanPhyNotifyEvent {
3514 fn decode(
3516 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3517 ) -> Result<WlanPhyNotifyEvent, fidl::Error> {
3518 let (bytes, _handles) = buf.split_mut();
3519 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3520 debug_assert_eq!(tx_header.tx_id, 0);
3521 match tx_header.ordinal {
3522 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
3523 Ok(WlanPhyNotifyEvent::_UnknownEvent { ordinal: tx_header.ordinal })
3524 }
3525 _ => Err(fidl::Error::UnknownOrdinal {
3526 ordinal: tx_header.ordinal,
3527 protocol_name: <WlanPhyNotifyMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3528 }),
3529 }
3530 }
3531}
3532
3533pub struct WlanPhyNotifyRequestStream {
3535 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3536 is_terminated: bool,
3537}
3538
3539impl std::marker::Unpin for WlanPhyNotifyRequestStream {}
3540
3541impl futures::stream::FusedStream for WlanPhyNotifyRequestStream {
3542 fn is_terminated(&self) -> bool {
3543 self.is_terminated
3544 }
3545}
3546
3547impl fidl::endpoints::RequestStream for WlanPhyNotifyRequestStream {
3548 type Protocol = WlanPhyNotifyMarker;
3549 type ControlHandle = WlanPhyNotifyControlHandle;
3550
3551 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3552 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3553 }
3554
3555 fn control_handle(&self) -> Self::ControlHandle {
3556 WlanPhyNotifyControlHandle { inner: self.inner.clone() }
3557 }
3558
3559 fn into_inner(
3560 self,
3561 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3562 {
3563 (self.inner, self.is_terminated)
3564 }
3565
3566 fn from_inner(
3567 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3568 is_terminated: bool,
3569 ) -> Self {
3570 Self { inner, is_terminated }
3571 }
3572}
3573
3574impl futures::Stream for WlanPhyNotifyRequestStream {
3575 type Item = Result<WlanPhyNotifyRequest, fidl::Error>;
3576
3577 fn poll_next(
3578 mut self: std::pin::Pin<&mut Self>,
3579 cx: &mut std::task::Context<'_>,
3580 ) -> std::task::Poll<Option<Self::Item>> {
3581 let this = &mut *self;
3582 if this.inner.check_shutdown(cx) {
3583 this.is_terminated = true;
3584 return std::task::Poll::Ready(None);
3585 }
3586 if this.is_terminated {
3587 panic!("polled WlanPhyNotifyRequestStream after completion");
3588 }
3589 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3590 |bytes, handles| {
3591 match this.inner.channel().read_etc(cx, bytes, handles) {
3592 std::task::Poll::Ready(Ok(())) => {}
3593 std::task::Poll::Pending => return std::task::Poll::Pending,
3594 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3595 this.is_terminated = true;
3596 return std::task::Poll::Ready(None);
3597 }
3598 std::task::Poll::Ready(Err(e)) => {
3599 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3600 e.into(),
3601 ))));
3602 }
3603 }
3604
3605 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3607
3608 std::task::Poll::Ready(Some(match header.ordinal {
3609 0x621a4bea612fda2 => {
3610 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3611 let mut req = fidl::new_empty!(
3612 WlanPhyNotifyOnCriticalErrorRequest,
3613 fidl::encoding::DefaultFuchsiaResourceDialect
3614 );
3615 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanPhyNotifyOnCriticalErrorRequest>(&header, _body_bytes, handles, &mut req)?;
3616 let control_handle =
3617 WlanPhyNotifyControlHandle { inner: this.inner.clone() };
3618 Ok(WlanPhyNotifyRequest::OnCriticalError {
3619 payload: req,
3620 responder: WlanPhyNotifyOnCriticalErrorResponder {
3621 control_handle: std::mem::ManuallyDrop::new(control_handle),
3622 tx_id: header.tx_id,
3623 },
3624 })
3625 }
3626 0x9db74ddfe1fa156 => {
3627 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3628 let mut req = fidl::new_empty!(
3629 WlanPhyNotifyOnCountryCodeChangeRequest,
3630 fidl::encoding::DefaultFuchsiaResourceDialect
3631 );
3632 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanPhyNotifyOnCountryCodeChangeRequest>(&header, _body_bytes, handles, &mut req)?;
3633 let control_handle =
3634 WlanPhyNotifyControlHandle { inner: this.inner.clone() };
3635 Ok(WlanPhyNotifyRequest::OnCountryCodeChange {
3636 payload: req,
3637 responder: WlanPhyNotifyOnCountryCodeChangeResponder {
3638 control_handle: std::mem::ManuallyDrop::new(control_handle),
3639 tx_id: header.tx_id,
3640 },
3641 })
3642 }
3643 _ if header.tx_id == 0
3644 && header
3645 .dynamic_flags()
3646 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3647 {
3648 Ok(WlanPhyNotifyRequest::_UnknownMethod {
3649 ordinal: header.ordinal,
3650 control_handle: WlanPhyNotifyControlHandle {
3651 inner: this.inner.clone(),
3652 },
3653 method_type: fidl::MethodType::OneWay,
3654 })
3655 }
3656 _ if header
3657 .dynamic_flags()
3658 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3659 {
3660 this.inner.send_framework_err(
3661 fidl::encoding::FrameworkErr::UnknownMethod,
3662 header.tx_id,
3663 header.ordinal,
3664 header.dynamic_flags(),
3665 (bytes, handles),
3666 )?;
3667 Ok(WlanPhyNotifyRequest::_UnknownMethod {
3668 ordinal: header.ordinal,
3669 control_handle: WlanPhyNotifyControlHandle {
3670 inner: this.inner.clone(),
3671 },
3672 method_type: fidl::MethodType::TwoWay,
3673 })
3674 }
3675 _ => Err(fidl::Error::UnknownOrdinal {
3676 ordinal: header.ordinal,
3677 protocol_name:
3678 <WlanPhyNotifyMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3679 }),
3680 }))
3681 },
3682 )
3683 }
3684}
3685
3686#[derive(Debug)]
3689pub enum WlanPhyNotifyRequest {
3690 OnCriticalError {
3693 payload: WlanPhyNotifyOnCriticalErrorRequest,
3694 responder: WlanPhyNotifyOnCriticalErrorResponder,
3695 },
3696 OnCountryCodeChange {
3699 payload: WlanPhyNotifyOnCountryCodeChangeRequest,
3700 responder: WlanPhyNotifyOnCountryCodeChangeResponder,
3701 },
3702 #[non_exhaustive]
3704 _UnknownMethod {
3705 ordinal: u64,
3707 control_handle: WlanPhyNotifyControlHandle,
3708 method_type: fidl::MethodType,
3709 },
3710}
3711
3712impl WlanPhyNotifyRequest {
3713 #[allow(irrefutable_let_patterns)]
3714 pub fn into_on_critical_error(
3715 self,
3716 ) -> Option<(WlanPhyNotifyOnCriticalErrorRequest, WlanPhyNotifyOnCriticalErrorResponder)> {
3717 if let WlanPhyNotifyRequest::OnCriticalError { payload, responder } = self {
3718 Some((payload, responder))
3719 } else {
3720 None
3721 }
3722 }
3723
3724 #[allow(irrefutable_let_patterns)]
3725 pub fn into_on_country_code_change(
3726 self,
3727 ) -> Option<(WlanPhyNotifyOnCountryCodeChangeRequest, WlanPhyNotifyOnCountryCodeChangeResponder)>
3728 {
3729 if let WlanPhyNotifyRequest::OnCountryCodeChange { payload, responder } = self {
3730 Some((payload, responder))
3731 } else {
3732 None
3733 }
3734 }
3735
3736 pub fn method_name(&self) -> &'static str {
3738 match *self {
3739 WlanPhyNotifyRequest::OnCriticalError { .. } => "on_critical_error",
3740 WlanPhyNotifyRequest::OnCountryCodeChange { .. } => "on_country_code_change",
3741 WlanPhyNotifyRequest::_UnknownMethod {
3742 method_type: fidl::MethodType::OneWay, ..
3743 } => "unknown one-way method",
3744 WlanPhyNotifyRequest::_UnknownMethod {
3745 method_type: fidl::MethodType::TwoWay, ..
3746 } => "unknown two-way method",
3747 }
3748 }
3749}
3750
3751#[derive(Debug, Clone)]
3752pub struct WlanPhyNotifyControlHandle {
3753 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3754}
3755
3756impl WlanPhyNotifyControlHandle {
3757 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
3758 self.inner.shutdown_with_epitaph(status.into())
3759 }
3760}
3761
3762impl fidl::endpoints::ControlHandle for WlanPhyNotifyControlHandle {
3763 fn shutdown(&self) {
3764 self.inner.shutdown()
3765 }
3766
3767 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
3768 self.inner.shutdown_with_epitaph(status)
3769 }
3770
3771 fn is_closed(&self) -> bool {
3772 self.inner.channel().is_closed()
3773 }
3774 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3775 self.inner.channel().on_closed()
3776 }
3777
3778 #[cfg(target_os = "fuchsia")]
3779 fn signal_peer(
3780 &self,
3781 clear_mask: zx::Signals,
3782 set_mask: zx::Signals,
3783 ) -> Result<(), zx_status::Status> {
3784 use fidl::Peered;
3785 self.inner.channel().signal_peer(clear_mask, set_mask)
3786 }
3787}
3788
3789impl WlanPhyNotifyControlHandle {}
3790
3791#[must_use = "FIDL methods require a response to be sent"]
3792#[derive(Debug)]
3793pub struct WlanPhyNotifyOnCriticalErrorResponder {
3794 control_handle: std::mem::ManuallyDrop<WlanPhyNotifyControlHandle>,
3795 tx_id: u32,
3796}
3797
3798impl std::ops::Drop for WlanPhyNotifyOnCriticalErrorResponder {
3802 fn drop(&mut self) {
3803 self.control_handle.shutdown();
3804 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3806 }
3807}
3808
3809impl fidl::endpoints::Responder for WlanPhyNotifyOnCriticalErrorResponder {
3810 type ControlHandle = WlanPhyNotifyControlHandle;
3811
3812 fn control_handle(&self) -> &WlanPhyNotifyControlHandle {
3813 &self.control_handle
3814 }
3815
3816 fn drop_without_shutdown(mut self) {
3817 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3819 std::mem::forget(self);
3821 }
3822}
3823
3824impl WlanPhyNotifyOnCriticalErrorResponder {
3825 pub fn send(self, mut result: Result<(), WlanPhyNotifyError>) -> Result<(), fidl::Error> {
3829 let _result = self.send_raw(result);
3830 if _result.is_err() {
3831 self.control_handle.shutdown();
3832 }
3833 self.drop_without_shutdown();
3834 _result
3835 }
3836
3837 pub fn send_no_shutdown_on_err(
3839 self,
3840 mut result: Result<(), WlanPhyNotifyError>,
3841 ) -> Result<(), fidl::Error> {
3842 let _result = self.send_raw(result);
3843 self.drop_without_shutdown();
3844 _result
3845 }
3846
3847 fn send_raw(&self, mut result: Result<(), WlanPhyNotifyError>) -> Result<(), fidl::Error> {
3848 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3849 fidl::encoding::EmptyStruct,
3850 WlanPhyNotifyError,
3851 >>(
3852 fidl::encoding::FlexibleResult::new(result),
3853 self.tx_id,
3854 0x621a4bea612fda2,
3855 fidl::encoding::DynamicFlags::FLEXIBLE,
3856 )
3857 }
3858}
3859
3860#[must_use = "FIDL methods require a response to be sent"]
3861#[derive(Debug)]
3862pub struct WlanPhyNotifyOnCountryCodeChangeResponder {
3863 control_handle: std::mem::ManuallyDrop<WlanPhyNotifyControlHandle>,
3864 tx_id: u32,
3865}
3866
3867impl std::ops::Drop for WlanPhyNotifyOnCountryCodeChangeResponder {
3871 fn drop(&mut self) {
3872 self.control_handle.shutdown();
3873 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3875 }
3876}
3877
3878impl fidl::endpoints::Responder for WlanPhyNotifyOnCountryCodeChangeResponder {
3879 type ControlHandle = WlanPhyNotifyControlHandle;
3880
3881 fn control_handle(&self) -> &WlanPhyNotifyControlHandle {
3882 &self.control_handle
3883 }
3884
3885 fn drop_without_shutdown(mut self) {
3886 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3888 std::mem::forget(self);
3890 }
3891}
3892
3893impl WlanPhyNotifyOnCountryCodeChangeResponder {
3894 pub fn send(self, mut result: Result<(), WlanPhyNotifyError>) -> Result<(), fidl::Error> {
3898 let _result = self.send_raw(result);
3899 if _result.is_err() {
3900 self.control_handle.shutdown();
3901 }
3902 self.drop_without_shutdown();
3903 _result
3904 }
3905
3906 pub fn send_no_shutdown_on_err(
3908 self,
3909 mut result: Result<(), WlanPhyNotifyError>,
3910 ) -> Result<(), fidl::Error> {
3911 let _result = self.send_raw(result);
3912 self.drop_without_shutdown();
3913 _result
3914 }
3915
3916 fn send_raw(&self, mut result: Result<(), WlanPhyNotifyError>) -> Result<(), fidl::Error> {
3917 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
3918 fidl::encoding::EmptyStruct,
3919 WlanPhyNotifyError,
3920 >>(
3921 fidl::encoding::FlexibleResult::new(result),
3922 self.tx_id,
3923 0x9db74ddfe1fa156,
3924 fidl::encoding::DynamicFlags::FLEXIBLE,
3925 )
3926 }
3927}
3928
3929#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3930pub struct ServiceMarker;
3931
3932#[cfg(target_os = "fuchsia")]
3933impl fidl::endpoints::ServiceMarker for ServiceMarker {
3934 type Proxy = ServiceProxy;
3935 type Request = ServiceRequest;
3936 const SERVICE_NAME: &'static str = "fuchsia.wlan.phy.Service";
3937}
3938
3939#[cfg(target_os = "fuchsia")]
3942pub enum ServiceRequest {
3943 Device(WlanPhyRequestStream),
3944}
3945
3946#[cfg(target_os = "fuchsia")]
3947impl fidl::endpoints::ServiceRequest for ServiceRequest {
3948 type Service = ServiceMarker;
3949
3950 fn dispatch(name: &str, _channel: fidl::AsyncChannel) -> Self {
3951 match name {
3952 "device" => Self::Device(
3953 <WlanPhyRequestStream as fidl::endpoints::RequestStream>::from_channel(_channel),
3954 ),
3955 _ => panic!("no such member protocol name for service Service"),
3956 }
3957 }
3958
3959 fn member_names() -> &'static [&'static str] {
3960 &["device"]
3961 }
3962}
3963#[cfg(target_os = "fuchsia")]
3964pub struct ServiceProxy(#[allow(dead_code)] Box<dyn fidl::endpoints::MemberOpener>);
3965
3966#[cfg(target_os = "fuchsia")]
3967impl fidl::endpoints::ServiceProxy for ServiceProxy {
3968 type Service = ServiceMarker;
3969
3970 fn from_member_opener(opener: Box<dyn fidl::endpoints::MemberOpener>) -> Self {
3971 Self(opener)
3972 }
3973}
3974
3975#[cfg(target_os = "fuchsia")]
3976impl ServiceProxy {
3977 pub fn connect_to_device(&self) -> Result<WlanPhyProxy, fidl::Error> {
3978 let (proxy, server_end) = fidl::endpoints::create_proxy::<WlanPhyMarker>();
3979 self.connect_channel_to_device(server_end)?;
3980 Ok(proxy)
3981 }
3982
3983 pub fn connect_to_device_sync(&self) -> Result<WlanPhySynchronousProxy, fidl::Error> {
3986 let (proxy, server_end) = fidl::endpoints::create_sync_proxy::<WlanPhyMarker>();
3987 self.connect_channel_to_device(server_end)?;
3988 Ok(proxy)
3989 }
3990
3991 pub fn connect_channel_to_device(
3994 &self,
3995 server_end: fidl::endpoints::ServerEnd<WlanPhyMarker>,
3996 ) -> Result<(), fidl::Error> {
3997 self.0.open_member("device", server_end.into_channel())
3998 }
3999
4000 pub fn instance_name(&self) -> &str {
4001 self.0.instance_name()
4002 }
4003}
4004
4005mod internal {
4006 use super::*;
4007
4008 impl WlanPhyCreateIfaceRequest {
4009 #[inline(always)]
4010 fn max_ordinal_present(&self) -> u64 {
4011 if let Some(_) = self.init_sta_addr {
4012 return 3;
4013 }
4014 if let Some(_) = self.mlme_channel {
4015 return 2;
4016 }
4017 if let Some(_) = self.role {
4018 return 1;
4019 }
4020 0
4021 }
4022 }
4023
4024 impl fidl::encoding::ResourceTypeMarker for WlanPhyCreateIfaceRequest {
4025 type Borrowed<'a> = &'a mut Self;
4026 fn take_or_borrow<'a>(
4027 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4028 ) -> Self::Borrowed<'a> {
4029 value
4030 }
4031 }
4032
4033 unsafe impl fidl::encoding::TypeMarker for WlanPhyCreateIfaceRequest {
4034 type Owned = Self;
4035
4036 #[inline(always)]
4037 fn inline_align(_context: fidl::encoding::Context) -> usize {
4038 8
4039 }
4040
4041 #[inline(always)]
4042 fn inline_size(_context: fidl::encoding::Context) -> usize {
4043 16
4044 }
4045 }
4046
4047 unsafe impl
4048 fidl::encoding::Encode<
4049 WlanPhyCreateIfaceRequest,
4050 fidl::encoding::DefaultFuchsiaResourceDialect,
4051 > for &mut WlanPhyCreateIfaceRequest
4052 {
4053 unsafe fn encode(
4054 self,
4055 encoder: &mut fidl::encoding::Encoder<
4056 '_,
4057 fidl::encoding::DefaultFuchsiaResourceDialect,
4058 >,
4059 offset: usize,
4060 mut depth: fidl::encoding::Depth,
4061 ) -> fidl::Result<()> {
4062 encoder.debug_check_bounds::<WlanPhyCreateIfaceRequest>(offset);
4063 let max_ordinal: u64 = self.max_ordinal_present();
4065 encoder.write_num(max_ordinal, offset);
4066 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4067 if max_ordinal == 0 {
4069 return Ok(());
4070 }
4071 depth.increment()?;
4072 let envelope_size = 8;
4073 let bytes_len = max_ordinal as usize * envelope_size;
4074 #[allow(unused_variables)]
4075 let offset = encoder.out_of_line_offset(bytes_len);
4076 let mut _prev_end_offset: usize = 0;
4077 if 1 > max_ordinal {
4078 return Ok(());
4079 }
4080
4081 let cur_offset: usize = (1 - 1) * envelope_size;
4084
4085 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4087
4088 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_common::WlanMacRole, fidl::encoding::DefaultFuchsiaResourceDialect>(
4093 self.role.as_ref().map(<fidl_fuchsia_wlan_common::WlanMacRole as fidl::encoding::ValueTypeMarker>::borrow),
4094 encoder, offset + cur_offset, depth
4095 )?;
4096
4097 _prev_end_offset = cur_offset + envelope_size;
4098 if 2 > max_ordinal {
4099 return Ok(());
4100 }
4101
4102 let cur_offset: usize = (2 - 1) * envelope_size;
4105
4106 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4108
4109 fidl::encoding::encode_in_envelope_optional::<
4114 fidl::encoding::HandleType<
4115 fidl::Channel,
4116 { fidl::ObjectType::CHANNEL.into_raw() },
4117 2147483648,
4118 >,
4119 fidl::encoding::DefaultFuchsiaResourceDialect,
4120 >(
4121 self.mlme_channel.as_mut().map(
4122 <fidl::encoding::HandleType<
4123 fidl::Channel,
4124 { fidl::ObjectType::CHANNEL.into_raw() },
4125 2147483648,
4126 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
4127 ),
4128 encoder,
4129 offset + cur_offset,
4130 depth,
4131 )?;
4132
4133 _prev_end_offset = cur_offset + envelope_size;
4134 if 3 > max_ordinal {
4135 return Ok(());
4136 }
4137
4138 let cur_offset: usize = (3 - 1) * envelope_size;
4141
4142 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4144
4145 fidl::encoding::encode_in_envelope_optional::<
4150 fidl::encoding::Array<u8, 6>,
4151 fidl::encoding::DefaultFuchsiaResourceDialect,
4152 >(
4153 self.init_sta_addr
4154 .as_ref()
4155 .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
4156 encoder,
4157 offset + cur_offset,
4158 depth,
4159 )?;
4160
4161 _prev_end_offset = cur_offset + envelope_size;
4162
4163 Ok(())
4164 }
4165 }
4166
4167 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4168 for WlanPhyCreateIfaceRequest
4169 {
4170 #[inline(always)]
4171 fn new_empty() -> Self {
4172 Self::default()
4173 }
4174
4175 unsafe fn decode(
4176 &mut self,
4177 decoder: &mut fidl::encoding::Decoder<
4178 '_,
4179 fidl::encoding::DefaultFuchsiaResourceDialect,
4180 >,
4181 offset: usize,
4182 mut depth: fidl::encoding::Depth,
4183 ) -> fidl::Result<()> {
4184 decoder.debug_check_bounds::<Self>(offset);
4185 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4186 None => return Err(fidl::Error::NotNullable),
4187 Some(len) => len,
4188 };
4189 if len == 0 {
4191 return Ok(());
4192 };
4193 depth.increment()?;
4194 let envelope_size = 8;
4195 let bytes_len = len * envelope_size;
4196 let offset = decoder.out_of_line_offset(bytes_len)?;
4197 let mut _next_ordinal_to_read = 0;
4199 let mut next_offset = offset;
4200 let end_offset = offset + bytes_len;
4201 _next_ordinal_to_read += 1;
4202 if next_offset >= end_offset {
4203 return Ok(());
4204 }
4205
4206 while _next_ordinal_to_read < 1 {
4208 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4209 _next_ordinal_to_read += 1;
4210 next_offset += envelope_size;
4211 }
4212
4213 let next_out_of_line = decoder.next_out_of_line();
4214 let handles_before = decoder.remaining_handles();
4215 if let Some((inlined, num_bytes, num_handles)) =
4216 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4217 {
4218 let member_inline_size = <fidl_fuchsia_wlan_common::WlanMacRole as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4219 if inlined != (member_inline_size <= 4) {
4220 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4221 }
4222 let inner_offset;
4223 let mut inner_depth = depth.clone();
4224 if inlined {
4225 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4226 inner_offset = next_offset;
4227 } else {
4228 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4229 inner_depth.increment()?;
4230 }
4231 let val_ref = self.role.get_or_insert_with(|| {
4232 fidl::new_empty!(
4233 fidl_fuchsia_wlan_common::WlanMacRole,
4234 fidl::encoding::DefaultFuchsiaResourceDialect
4235 )
4236 });
4237 fidl::decode!(
4238 fidl_fuchsia_wlan_common::WlanMacRole,
4239 fidl::encoding::DefaultFuchsiaResourceDialect,
4240 val_ref,
4241 decoder,
4242 inner_offset,
4243 inner_depth
4244 )?;
4245 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4246 {
4247 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4248 }
4249 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4250 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4251 }
4252 }
4253
4254 next_offset += envelope_size;
4255 _next_ordinal_to_read += 1;
4256 if next_offset >= end_offset {
4257 return Ok(());
4258 }
4259
4260 while _next_ordinal_to_read < 2 {
4262 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4263 _next_ordinal_to_read += 1;
4264 next_offset += envelope_size;
4265 }
4266
4267 let next_out_of_line = decoder.next_out_of_line();
4268 let handles_before = decoder.remaining_handles();
4269 if let Some((inlined, num_bytes, num_handles)) =
4270 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4271 {
4272 let member_inline_size = <fidl::encoding::HandleType<
4273 fidl::Channel,
4274 { fidl::ObjectType::CHANNEL.into_raw() },
4275 2147483648,
4276 > as fidl::encoding::TypeMarker>::inline_size(
4277 decoder.context
4278 );
4279 if inlined != (member_inline_size <= 4) {
4280 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4281 }
4282 let inner_offset;
4283 let mut inner_depth = depth.clone();
4284 if inlined {
4285 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4286 inner_offset = next_offset;
4287 } else {
4288 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4289 inner_depth.increment()?;
4290 }
4291 let val_ref =
4292 self.mlme_channel.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
4293 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
4294 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4295 {
4296 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4297 }
4298 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4299 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4300 }
4301 }
4302
4303 next_offset += envelope_size;
4304 _next_ordinal_to_read += 1;
4305 if next_offset >= end_offset {
4306 return Ok(());
4307 }
4308
4309 while _next_ordinal_to_read < 3 {
4311 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4312 _next_ordinal_to_read += 1;
4313 next_offset += envelope_size;
4314 }
4315
4316 let next_out_of_line = decoder.next_out_of_line();
4317 let handles_before = decoder.remaining_handles();
4318 if let Some((inlined, num_bytes, num_handles)) =
4319 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4320 {
4321 let member_inline_size =
4322 <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
4323 decoder.context,
4324 );
4325 if inlined != (member_inline_size <= 4) {
4326 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4327 }
4328 let inner_offset;
4329 let mut inner_depth = depth.clone();
4330 if inlined {
4331 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4332 inner_offset = next_offset;
4333 } else {
4334 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4335 inner_depth.increment()?;
4336 }
4337 let val_ref =
4338 self.init_sta_addr.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, fidl::encoding::DefaultFuchsiaResourceDialect));
4339 fidl::decode!(fidl::encoding::Array<u8, 6>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
4340 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4341 {
4342 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4343 }
4344 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4345 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4346 }
4347 }
4348
4349 next_offset += envelope_size;
4350
4351 while next_offset < end_offset {
4353 _next_ordinal_to_read += 1;
4354 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4355 next_offset += envelope_size;
4356 }
4357
4358 Ok(())
4359 }
4360 }
4361
4362 impl WlanPhyInitRequest {
4363 #[inline(always)]
4364 fn max_ordinal_present(&self) -> u64 {
4365 if let Some(_) = self.notify_client {
4366 return 1;
4367 }
4368 0
4369 }
4370 }
4371
4372 impl fidl::encoding::ResourceTypeMarker for WlanPhyInitRequest {
4373 type Borrowed<'a> = &'a mut Self;
4374 fn take_or_borrow<'a>(
4375 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4376 ) -> Self::Borrowed<'a> {
4377 value
4378 }
4379 }
4380
4381 unsafe impl fidl::encoding::TypeMarker for WlanPhyInitRequest {
4382 type Owned = Self;
4383
4384 #[inline(always)]
4385 fn inline_align(_context: fidl::encoding::Context) -> usize {
4386 8
4387 }
4388
4389 #[inline(always)]
4390 fn inline_size(_context: fidl::encoding::Context) -> usize {
4391 16
4392 }
4393 }
4394
4395 unsafe impl
4396 fidl::encoding::Encode<WlanPhyInitRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
4397 for &mut WlanPhyInitRequest
4398 {
4399 unsafe fn encode(
4400 self,
4401 encoder: &mut fidl::encoding::Encoder<
4402 '_,
4403 fidl::encoding::DefaultFuchsiaResourceDialect,
4404 >,
4405 offset: usize,
4406 mut depth: fidl::encoding::Depth,
4407 ) -> fidl::Result<()> {
4408 encoder.debug_check_bounds::<WlanPhyInitRequest>(offset);
4409 let max_ordinal: u64 = self.max_ordinal_present();
4411 encoder.write_num(max_ordinal, offset);
4412 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4413 if max_ordinal == 0 {
4415 return Ok(());
4416 }
4417 depth.increment()?;
4418 let envelope_size = 8;
4419 let bytes_len = max_ordinal as usize * envelope_size;
4420 #[allow(unused_variables)]
4421 let offset = encoder.out_of_line_offset(bytes_len);
4422 let mut _prev_end_offset: usize = 0;
4423 if 1 > max_ordinal {
4424 return Ok(());
4425 }
4426
4427 let cur_offset: usize = (1 - 1) * envelope_size;
4430
4431 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4433
4434 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<WlanPhyNotifyMarker>>, fidl::encoding::DefaultFuchsiaResourceDialect>(
4439 self.notify_client.as_mut().map(<fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<WlanPhyNotifyMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
4440 encoder, offset + cur_offset, depth
4441 )?;
4442
4443 _prev_end_offset = cur_offset + envelope_size;
4444
4445 Ok(())
4446 }
4447 }
4448
4449 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4450 for WlanPhyInitRequest
4451 {
4452 #[inline(always)]
4453 fn new_empty() -> Self {
4454 Self::default()
4455 }
4456
4457 unsafe fn decode(
4458 &mut self,
4459 decoder: &mut fidl::encoding::Decoder<
4460 '_,
4461 fidl::encoding::DefaultFuchsiaResourceDialect,
4462 >,
4463 offset: usize,
4464 mut depth: fidl::encoding::Depth,
4465 ) -> fidl::Result<()> {
4466 decoder.debug_check_bounds::<Self>(offset);
4467 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4468 None => return Err(fidl::Error::NotNullable),
4469 Some(len) => len,
4470 };
4471 if len == 0 {
4473 return Ok(());
4474 };
4475 depth.increment()?;
4476 let envelope_size = 8;
4477 let bytes_len = len * envelope_size;
4478 let offset = decoder.out_of_line_offset(bytes_len)?;
4479 let mut _next_ordinal_to_read = 0;
4481 let mut next_offset = offset;
4482 let end_offset = offset + bytes_len;
4483 _next_ordinal_to_read += 1;
4484 if next_offset >= end_offset {
4485 return Ok(());
4486 }
4487
4488 while _next_ordinal_to_read < 1 {
4490 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4491 _next_ordinal_to_read += 1;
4492 next_offset += envelope_size;
4493 }
4494
4495 let next_out_of_line = decoder.next_out_of_line();
4496 let handles_before = decoder.remaining_handles();
4497 if let Some((inlined, num_bytes, num_handles)) =
4498 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4499 {
4500 let member_inline_size = <fidl::encoding::Endpoint<
4501 fidl::endpoints::ClientEnd<WlanPhyNotifyMarker>,
4502 > as fidl::encoding::TypeMarker>::inline_size(
4503 decoder.context
4504 );
4505 if inlined != (member_inline_size <= 4) {
4506 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4507 }
4508 let inner_offset;
4509 let mut inner_depth = depth.clone();
4510 if inlined {
4511 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4512 inner_offset = next_offset;
4513 } else {
4514 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4515 inner_depth.increment()?;
4516 }
4517 let val_ref = self.notify_client.get_or_insert_with(|| {
4518 fidl::new_empty!(
4519 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<WlanPhyNotifyMarker>>,
4520 fidl::encoding::DefaultFuchsiaResourceDialect
4521 )
4522 });
4523 fidl::decode!(
4524 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<WlanPhyNotifyMarker>>,
4525 fidl::encoding::DefaultFuchsiaResourceDialect,
4526 val_ref,
4527 decoder,
4528 inner_offset,
4529 inner_depth
4530 )?;
4531 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4532 {
4533 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4534 }
4535 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4536 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4537 }
4538 }
4539
4540 next_offset += envelope_size;
4541
4542 while next_offset < end_offset {
4544 _next_ordinal_to_read += 1;
4545 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4546 next_offset += envelope_size;
4547 }
4548
4549 Ok(())
4550 }
4551 }
4552}