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 _};
10use futures::future::{self, MaybeDone, TryFutureExt};
11use zx_status;
12
13pub const WLAN_MAC_MAX_RATES: u32 = 263;
14
15bitflags! {
16 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
17 pub struct WlanRxInfoFlags: u32 {
18 const FCS_INVALID = 1;
20 const FRAME_BODY_PADDING_4 = 2;
22 }
23}
24
25impl WlanRxInfoFlags {
26 #[inline(always)]
27 pub fn from_bits_allow_unknown(bits: u32) -> Self {
28 Self::from_bits_retain(bits)
29 }
30
31 #[inline(always)]
32 pub fn has_unknown_bits(&self) -> bool {
33 self.get_unknown_bits() != 0
34 }
35
36 #[inline(always)]
37 pub fn get_unknown_bits(&self) -> u32 {
38 self.bits() & !Self::all().bits()
39 }
40}
41
42bitflags! {
43 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
44 pub struct WlanRxInfoValid: u32 {
45 const PHY = 1;
46 const DATA_RATE = 2;
47 const CHAN_WIDTH = 4;
48 const MCS = 8;
49 const RSSI = 16;
50 const SNR = 32;
51 }
52}
53
54impl WlanRxInfoValid {
55 #[inline(always)]
56 pub fn from_bits_allow_unknown(bits: u32) -> Self {
57 Self::from_bits_retain(bits)
58 }
59
60 #[inline(always)]
61 pub fn has_unknown_bits(&self) -> bool {
62 self.get_unknown_bits() != 0
63 }
64
65 #[inline(always)]
66 pub fn get_unknown_bits(&self) -> u32 {
67 self.bits() & !Self::all().bits()
68 }
69}
70
71bitflags! {
72 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
73 pub struct WlanTxInfoFlags: u32 {
74 const PROTECTED = 1;
76 const FAVOR_RELIABILITY = 2;
79 const QOS = 4;
81 }
82}
83
84impl WlanTxInfoFlags {
85 #[inline(always)]
86 pub fn from_bits_allow_unknown(bits: u32) -> Self {
87 Self::from_bits_retain(bits)
88 }
89
90 #[inline(always)]
91 pub fn has_unknown_bits(&self) -> bool {
92 self.get_unknown_bits() != 0
93 }
94
95 #[inline(always)]
96 pub fn get_unknown_bits(&self) -> u32 {
97 self.bits() & !Self::all().bits()
98 }
99}
100
101bitflags! {
102 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
103 pub struct WlanTxInfoValid: u32 {
104 const DATA_RATE = 1;
105 const TX_VECTOR_IDX = 2;
106 const PHY = 4;
107 const CHANNEL_BANDWIDTH = 8;
108 const MCS = 16;
109 }
110}
111
112impl WlanTxInfoValid {
113 #[inline(always)]
114 pub fn from_bits_allow_unknown(bits: u32) -> Self {
115 Self::from_bits_retain(bits)
116 }
117
118 #[inline(always)]
119 pub fn has_unknown_bits(&self) -> bool {
120 self.get_unknown_bits() != 0
121 }
122
123 #[inline(always)]
124 pub fn get_unknown_bits(&self) -> u32 {
125 self.bits() & !Self::all().bits()
126 }
127}
128
129#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
130#[repr(u8)]
131pub enum WlanProtection {
132 None = 0,
133 Rx = 1,
134 Tx = 2,
135 RxTx = 3,
136}
137
138impl WlanProtection {
139 #[inline]
140 pub fn from_primitive(prim: u8) -> Option<Self> {
141 match prim {
142 0 => Some(Self::None),
143 1 => Some(Self::Rx),
144 2 => Some(Self::Tx),
145 3 => Some(Self::RxTx),
146 _ => None,
147 }
148 }
149
150 #[inline]
151 pub const fn into_primitive(self) -> u8 {
152 self as u8
153 }
154
155 #[deprecated = "Strict enums should not use `is_unknown`"]
156 #[inline]
157 pub fn is_unknown(&self) -> bool {
158 false
159 }
160}
161
162#[derive(Clone, Debug, PartialEq)]
163pub struct WlanRxInfo {
164 pub rx_flags: WlanRxInfoFlags,
167 pub valid_fields: WlanRxInfoValid,
170 pub phy: fidl_fuchsia_wlan_common::WlanPhyType,
172 pub data_rate: u32,
174 pub channel: fidl_fuchsia_wlan_common::WlanChannel,
176 pub mcs: u8,
179 pub rssi_dbm: i8,
181 pub snr_dbh: i16,
183}
184
185impl fidl::Persistable for WlanRxInfo {}
186
187#[derive(Clone, Debug, PartialEq)]
188pub struct WlanRxPacket {
189 pub mac_frame: Vec<u8>,
190 pub info: WlanRxInfo,
191}
192
193impl fidl::Persistable for WlanRxPacket {}
194
195#[derive(Clone, Debug, PartialEq)]
196pub struct WlanSoftmacBaseJoinBssRequest {
197 pub join_request: fidl_fuchsia_wlan_common::JoinBssRequest,
198}
199
200impl fidl::Persistable for WlanSoftmacBaseJoinBssRequest {}
201
202#[derive(Clone, Debug, PartialEq)]
203pub struct WlanSoftmacBaseNotifyAssociationCompleteRequest {
204 pub assoc_cfg: WlanAssociationConfig,
205}
206
207impl fidl::Persistable for WlanSoftmacBaseNotifyAssociationCompleteRequest {}
208
209#[derive(Clone, Debug, PartialEq)]
210pub struct WlanSoftmacBaseQueryDiscoverySupportResponse {
211 pub resp: fidl_fuchsia_wlan_common::DiscoverySupport,
212}
213
214impl fidl::Persistable for WlanSoftmacBaseQueryDiscoverySupportResponse {}
215
216#[derive(Clone, Debug, PartialEq)]
217pub struct WlanSoftmacBaseQueryMacSublayerSupportResponse {
218 pub resp: fidl_fuchsia_wlan_common::MacSublayerSupport,
219}
220
221impl fidl::Persistable for WlanSoftmacBaseQueryMacSublayerSupportResponse {}
222
223#[derive(Clone, Debug, PartialEq)]
224pub struct WlanSoftmacBaseQuerySecuritySupportResponse {
225 pub resp: fidl_fuchsia_wlan_common::SecuritySupport,
226}
227
228impl fidl::Persistable for WlanSoftmacBaseQuerySecuritySupportResponse {}
229
230#[derive(Clone, Debug, PartialEq)]
231pub struct WlanSoftmacBaseQuerySpectrumManagementSupportResponse {
232 pub resp: fidl_fuchsia_wlan_common::SpectrumManagementSupport,
233}
234
235impl fidl::Persistable for WlanSoftmacBaseQuerySpectrumManagementSupportResponse {}
236
237#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
238#[repr(C)]
239pub struct WlanSoftmacBridgeSetEthernetStatusRequest {
240 pub status: u32,
241}
242
243impl fidl::Persistable for WlanSoftmacBridgeSetEthernetStatusRequest {}
244
245#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
246pub struct WlanSoftmacBridgeStartRequest {
247 pub ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
248 pub ethernet_tx: u64,
249 pub wlan_rx: u64,
250}
251
252impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
253 for WlanSoftmacBridgeStartRequest
254{
255}
256
257#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
258pub struct WlanSoftmacBridgeStartResponse {
259 pub sme_channel: fidl::Channel,
260}
261
262impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
263 for WlanSoftmacBridgeStartResponse
264{
265}
266
267#[derive(Clone, Debug, PartialEq)]
268pub struct WlanSoftmacIfcBaseReportTxResultRequest {
269 pub tx_result: fidl_fuchsia_wlan_common::WlanTxResult,
270}
271
272impl fidl::Persistable for WlanSoftmacIfcBaseReportTxResultRequest {}
273
274#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
275pub struct WlanTxInfo {
276 pub tx_flags: u32,
279 pub valid_fields: u32,
283 pub tx_vector_idx: u16,
284 pub phy: fidl_fuchsia_wlan_common::WlanPhyType,
285 pub channel_bandwidth: fidl_fuchsia_wlan_common::ChannelBandwidth,
286 pub mcs: u8,
289}
290
291impl fidl::Persistable for WlanTxInfo {}
292
293#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
294pub struct WlanTxPacket {
295 pub mac_frame: Vec<u8>,
296 pub info: WlanTxInfo,
299}
300
301impl fidl::Persistable for WlanTxPacket {}
302
303#[derive(Clone, Debug, Default, PartialEq)]
304pub struct EthernetRxTransferRequest {
305 pub packet_address: Option<u64>,
306 pub packet_size: Option<u64>,
307 #[doc(hidden)]
308 pub __source_breaking: fidl::marker::SourceBreaking,
309}
310
311impl fidl::Persistable for EthernetRxTransferRequest {}
312
313#[derive(Clone, Debug, Default, PartialEq)]
314pub struct EthernetTxTransferRequest {
315 pub packet_address: Option<u64>,
316 pub packet_size: Option<u64>,
317 pub async_id: Option<u64>,
318 pub borrowed_operation: Option<u64>,
319 pub complete_borrowed_operation: Option<u64>,
320 #[doc(hidden)]
321 pub __source_breaking: fidl::marker::SourceBreaking,
322}
323
324impl fidl::Persistable for EthernetTxTransferRequest {}
325
326#[derive(Clone, Debug, Default, PartialEq)]
332pub struct WlanAssociationConfig {
333 pub bssid: Option<[u8; 6]>,
335 pub aid: Option<u16>,
338 pub listen_interval: Option<u16>,
339 pub channel: Option<fidl_fuchsia_wlan_common::WlanChannel>,
341 pub qos: Option<bool>,
343 pub wmm_params: Option<fidl_fuchsia_wlan_common::WlanWmmParameters>,
345 pub rates: Option<Vec<u8>>,
348 pub capability_info: Option<u16>,
350 pub ht_cap: Option<fidl_fuchsia_wlan_ieee80211::HtCapabilities>,
354 pub ht_op: Option<fidl_fuchsia_wlan_ieee80211::HtOperation>,
355 pub vht_cap: Option<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>,
357 pub vht_op: Option<fidl_fuchsia_wlan_ieee80211::VhtOperation>,
358 #[doc(hidden)]
359 pub __source_breaking: fidl::marker::SourceBreaking,
360}
361
362impl fidl::Persistable for WlanAssociationConfig {}
363
364#[derive(Clone, Debug, Default, PartialEq)]
365pub struct WlanKeyConfiguration {
366 pub protection: Option<WlanProtection>,
368 pub cipher_oui: Option<[u8; 3]>,
371 pub cipher_type: Option<u8>,
372 pub key_type: Option<fidl_fuchsia_wlan_common::WlanKeyType>,
374 pub peer_addr: Option<[u8; 6]>,
377 pub key_idx: Option<u8>,
380 pub key: Option<Vec<u8>>,
381 pub rsc: Option<u64>,
384 #[doc(hidden)]
385 pub __source_breaking: fidl::marker::SourceBreaking,
386}
387
388impl fidl::Persistable for WlanKeyConfiguration {}
389
390#[derive(Clone, Debug, Default, PartialEq)]
391pub struct WlanRxTransferRequest {
392 pub packet_address: Option<u64>,
393 pub packet_size: Option<u64>,
394 pub packet_info: Option<WlanRxInfo>,
395 pub async_id: Option<u64>,
396 pub arena: Option<u64>,
397 #[doc(hidden)]
398 pub __source_breaking: fidl::marker::SourceBreaking,
399}
400
401impl fidl::Persistable for WlanRxTransferRequest {}
402
403#[derive(Clone, Debug, Default, PartialEq)]
405pub struct WlanSoftmacBandCapability {
406 pub band: Option<fidl_fuchsia_wlan_ieee80211::WlanBand>,
407 pub basic_rate_count: Option<u8>,
418 pub basic_rate_list: Option<[u8; 12]>,
433 pub ht_supported: Option<bool>,
448 pub ht_caps: Option<fidl_fuchsia_wlan_ieee80211::HtCapabilities>,
449 pub vht_supported: Option<bool>,
464 pub vht_caps: Option<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>,
465 pub operating_channel_count: Option<u16>,
477 pub operating_channel_list: Option<[u8; 256]>,
492 pub basic_rates: Option<Vec<u8>>,
497 pub operating_channels: Option<Vec<u8>>,
505 #[doc(hidden)]
506 pub __source_breaking: fidl::marker::SourceBreaking,
507}
508
509impl fidl::Persistable for WlanSoftmacBandCapability {}
510
511#[derive(Clone, Debug, Default, PartialEq)]
512pub struct WlanSoftmacBaseCancelScanRequest {
513 pub scan_id: Option<u64>,
514 #[doc(hidden)]
515 pub __source_breaking: fidl::marker::SourceBreaking,
516}
517
518impl fidl::Persistable for WlanSoftmacBaseCancelScanRequest {}
519
520#[derive(Clone, Debug, Default, PartialEq)]
521pub struct WlanSoftmacBaseClearAssociationRequest {
522 pub peer_addr: Option<[u8; 6]>,
523 #[doc(hidden)]
524 pub __source_breaking: fidl::marker::SourceBreaking,
525}
526
527impl fidl::Persistable for WlanSoftmacBaseClearAssociationRequest {}
528
529#[derive(Clone, Debug, Default, PartialEq)]
530pub struct WlanSoftmacBaseEnableBeaconingRequest {
531 pub packet_template: Option<WlanTxPacket>,
535 pub tim_ele_offset: Option<u64>,
538 pub beacon_interval: Option<u16>,
540 #[doc(hidden)]
541 pub __source_breaking: fidl::marker::SourceBreaking,
542}
543
544impl fidl::Persistable for WlanSoftmacBaseEnableBeaconingRequest {}
545
546#[derive(Clone, Debug, Default, PartialEq)]
547pub struct WlanSoftmacBaseSetChannelRequest {
548 pub channel: Option<fidl_fuchsia_wlan_common::WlanChannel>,
549 #[doc(hidden)]
550 pub __source_breaking: fidl::marker::SourceBreaking,
551}
552
553impl fidl::Persistable for WlanSoftmacBaseSetChannelRequest {}
554
555#[derive(Clone, Debug, Default, PartialEq)]
556pub struct WlanSoftmacBaseStartPassiveScanRequest {
557 pub channels: Option<Vec<u8>>,
567 pub min_channel_time: Option<i64>,
569 pub max_channel_time: Option<i64>,
571 pub min_home_time: Option<i64>,
575 #[doc(hidden)]
576 pub __source_breaking: fidl::marker::SourceBreaking,
577}
578
579impl fidl::Persistable for WlanSoftmacBaseStartPassiveScanRequest {}
580
581#[derive(Clone, Debug, Default, PartialEq)]
582pub struct WlanSoftmacBaseUpdateWmmParametersRequest {
583 pub ac: Option<fidl_fuchsia_wlan_ieee80211::WlanAccessCategory>,
584 pub params: Option<fidl_fuchsia_wlan_common::WlanWmmParameters>,
585 #[doc(hidden)]
586 pub __source_breaking: fidl::marker::SourceBreaking,
587}
588
589impl fidl::Persistable for WlanSoftmacBaseUpdateWmmParametersRequest {}
590
591#[derive(Clone, Debug, Default, PartialEq)]
592pub struct WlanSoftmacBaseStartActiveScanResponse {
593 pub scan_id: Option<u64>,
594 #[doc(hidden)]
595 pub __source_breaking: fidl::marker::SourceBreaking,
596}
597
598impl fidl::Persistable for WlanSoftmacBaseStartActiveScanResponse {}
599
600#[derive(Clone, Debug, Default, PartialEq)]
601pub struct WlanSoftmacBaseStartPassiveScanResponse {
602 pub scan_id: Option<u64>,
603 #[doc(hidden)]
604 pub __source_breaking: fidl::marker::SourceBreaking,
605}
606
607impl fidl::Persistable for WlanSoftmacBaseStartPassiveScanResponse {}
608
609#[derive(Clone, Debug, Default, PartialEq)]
610pub struct WlanSoftmacIfcBaseNotifyScanCompleteRequest {
611 pub status: Option<i32>,
612 pub scan_id: Option<u64>,
613 #[doc(hidden)]
614 pub __source_breaking: fidl::marker::SourceBreaking,
615}
616
617impl fidl::Persistable for WlanSoftmacIfcBaseNotifyScanCompleteRequest {}
618
619#[derive(Clone, Debug, Default, PartialEq)]
622pub struct WlanSoftmacQueryResponse {
623 pub sta_addr: Option<[u8; 6]>,
625 pub mac_role: Option<fidl_fuchsia_wlan_common::WlanMacRole>,
627 pub supported_phys: Option<Vec<fidl_fuchsia_wlan_common::WlanPhyType>>,
629 pub hardware_capability: Option<u32>,
631 pub band_caps: Option<Vec<WlanSoftmacBandCapability>>,
633 #[doc(hidden)]
634 pub __source_breaking: fidl::marker::SourceBreaking,
635}
636
637impl fidl::Persistable for WlanSoftmacQueryResponse {}
638
639#[derive(Clone, Debug, Default, PartialEq)]
641pub struct WlanSoftmacStartActiveScanRequest {
642 pub channels: Option<Vec<u8>>,
650 pub ssids: Option<Vec<fidl_fuchsia_wlan_ieee80211::CSsid>>,
656 pub mac_header: Option<Vec<u8>>,
659 pub ies: Option<Vec<u8>>,
667 pub min_channel_time: Option<i64>,
669 pub max_channel_time: Option<i64>,
671 pub min_home_time: Option<i64>,
675 pub min_probes_per_channel: Option<u8>,
682 pub max_probes_per_channel: Option<u8>,
690 #[doc(hidden)]
691 pub __source_breaking: fidl::marker::SourceBreaking,
692}
693
694impl fidl::Persistable for WlanSoftmacStartActiveScanRequest {}
695
696#[derive(Clone, Debug, Default, PartialEq)]
697pub struct WlanTxTransferRequest {
698 pub packet_address: Option<u64>,
699 pub packet_size: Option<u64>,
700 pub packet_info: Option<WlanTxInfo>,
701 pub async_id: Option<u64>,
702 pub arena: Option<u64>,
703 #[doc(hidden)]
704 pub __source_breaking: fidl::marker::SourceBreaking,
705}
706
707impl fidl::Persistable for WlanTxTransferRequest {}
708
709#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
710pub struct EthernetRxMarker;
711
712impl fidl::endpoints::ProtocolMarker for EthernetRxMarker {
713 type Proxy = EthernetRxProxy;
714 type RequestStream = EthernetRxRequestStream;
715 #[cfg(target_os = "fuchsia")]
716 type SynchronousProxy = EthernetRxSynchronousProxy;
717
718 const DEBUG_NAME: &'static str = "(anonymous) EthernetRx";
719}
720pub type EthernetRxTransferResult = Result<(), i32>;
721
722pub trait EthernetRxProxyInterface: Send + Sync {
723 type TransferResponseFut: std::future::Future<Output = Result<EthernetRxTransferResult, fidl::Error>>
724 + Send;
725 fn r#transfer(&self, payload: &EthernetRxTransferRequest) -> Self::TransferResponseFut;
726}
727#[derive(Debug)]
728#[cfg(target_os = "fuchsia")]
729pub struct EthernetRxSynchronousProxy {
730 client: fidl::client::sync::Client,
731}
732
733#[cfg(target_os = "fuchsia")]
734impl fidl::endpoints::SynchronousProxy for EthernetRxSynchronousProxy {
735 type Proxy = EthernetRxProxy;
736 type Protocol = EthernetRxMarker;
737
738 fn from_channel(inner: fidl::Channel) -> Self {
739 Self::new(inner)
740 }
741
742 fn into_channel(self) -> fidl::Channel {
743 self.client.into_channel()
744 }
745
746 fn as_channel(&self) -> &fidl::Channel {
747 self.client.as_channel()
748 }
749}
750
751#[cfg(target_os = "fuchsia")]
752impl EthernetRxSynchronousProxy {
753 pub fn new(channel: fidl::Channel) -> Self {
754 let protocol_name = <EthernetRxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
755 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
756 }
757
758 pub fn into_channel(self) -> fidl::Channel {
759 self.client.into_channel()
760 }
761
762 pub fn wait_for_event(
765 &self,
766 deadline: zx::MonotonicInstant,
767 ) -> Result<EthernetRxEvent, fidl::Error> {
768 EthernetRxEvent::decode(self.client.wait_for_event(deadline)?)
769 }
770
771 pub fn r#transfer(
772 &self,
773 mut payload: &EthernetRxTransferRequest,
774 ___deadline: zx::MonotonicInstant,
775 ) -> Result<EthernetRxTransferResult, fidl::Error> {
776 let _response = self.client.send_query::<
777 EthernetRxTransferRequest,
778 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
779 >(
780 payload,
781 0x199ff3498ef8a22a,
782 fidl::encoding::DynamicFlags::empty(),
783 ___deadline,
784 )?;
785 Ok(_response.map(|x| x))
786 }
787}
788
789#[derive(Debug, Clone)]
790pub struct EthernetRxProxy {
791 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
792}
793
794impl fidl::endpoints::Proxy for EthernetRxProxy {
795 type Protocol = EthernetRxMarker;
796
797 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
798 Self::new(inner)
799 }
800
801 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
802 self.client.into_channel().map_err(|client| Self { client })
803 }
804
805 fn as_channel(&self) -> &::fidl::AsyncChannel {
806 self.client.as_channel()
807 }
808}
809
810impl EthernetRxProxy {
811 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
813 let protocol_name = <EthernetRxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
814 Self { client: fidl::client::Client::new(channel, protocol_name) }
815 }
816
817 pub fn take_event_stream(&self) -> EthernetRxEventStream {
823 EthernetRxEventStream { event_receiver: self.client.take_event_receiver() }
824 }
825
826 pub fn r#transfer(
827 &self,
828 mut payload: &EthernetRxTransferRequest,
829 ) -> fidl::client::QueryResponseFut<
830 EthernetRxTransferResult,
831 fidl::encoding::DefaultFuchsiaResourceDialect,
832 > {
833 EthernetRxProxyInterface::r#transfer(self, payload)
834 }
835}
836
837impl EthernetRxProxyInterface for EthernetRxProxy {
838 type TransferResponseFut = fidl::client::QueryResponseFut<
839 EthernetRxTransferResult,
840 fidl::encoding::DefaultFuchsiaResourceDialect,
841 >;
842 fn r#transfer(&self, mut payload: &EthernetRxTransferRequest) -> Self::TransferResponseFut {
843 fn _decode(
844 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
845 ) -> Result<EthernetRxTransferResult, fidl::Error> {
846 let _response = fidl::client::decode_transaction_body::<
847 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
848 fidl::encoding::DefaultFuchsiaResourceDialect,
849 0x199ff3498ef8a22a,
850 >(_buf?)?;
851 Ok(_response.map(|x| x))
852 }
853 self.client.send_query_and_decode::<EthernetRxTransferRequest, EthernetRxTransferResult>(
854 payload,
855 0x199ff3498ef8a22a,
856 fidl::encoding::DynamicFlags::empty(),
857 _decode,
858 )
859 }
860}
861
862pub struct EthernetRxEventStream {
863 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
864}
865
866impl std::marker::Unpin for EthernetRxEventStream {}
867
868impl futures::stream::FusedStream for EthernetRxEventStream {
869 fn is_terminated(&self) -> bool {
870 self.event_receiver.is_terminated()
871 }
872}
873
874impl futures::Stream for EthernetRxEventStream {
875 type Item = Result<EthernetRxEvent, fidl::Error>;
876
877 fn poll_next(
878 mut self: std::pin::Pin<&mut Self>,
879 cx: &mut std::task::Context<'_>,
880 ) -> std::task::Poll<Option<Self::Item>> {
881 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
882 &mut self.event_receiver,
883 cx
884 )?) {
885 Some(buf) => std::task::Poll::Ready(Some(EthernetRxEvent::decode(buf))),
886 None => std::task::Poll::Ready(None),
887 }
888 }
889}
890
891#[derive(Debug)]
892pub enum EthernetRxEvent {}
893
894impl EthernetRxEvent {
895 fn decode(
897 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
898 ) -> Result<EthernetRxEvent, fidl::Error> {
899 let (bytes, _handles) = buf.split_mut();
900 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
901 debug_assert_eq!(tx_header.tx_id, 0);
902 match tx_header.ordinal {
903 _ => Err(fidl::Error::UnknownOrdinal {
904 ordinal: tx_header.ordinal,
905 protocol_name: <EthernetRxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
906 }),
907 }
908 }
909}
910
911pub struct EthernetRxRequestStream {
913 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
914 is_terminated: bool,
915}
916
917impl std::marker::Unpin for EthernetRxRequestStream {}
918
919impl futures::stream::FusedStream for EthernetRxRequestStream {
920 fn is_terminated(&self) -> bool {
921 self.is_terminated
922 }
923}
924
925impl fidl::endpoints::RequestStream for EthernetRxRequestStream {
926 type Protocol = EthernetRxMarker;
927 type ControlHandle = EthernetRxControlHandle;
928
929 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
930 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
931 }
932
933 fn control_handle(&self) -> Self::ControlHandle {
934 EthernetRxControlHandle { inner: self.inner.clone() }
935 }
936
937 fn into_inner(
938 self,
939 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
940 {
941 (self.inner, self.is_terminated)
942 }
943
944 fn from_inner(
945 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
946 is_terminated: bool,
947 ) -> Self {
948 Self { inner, is_terminated }
949 }
950}
951
952impl futures::Stream for EthernetRxRequestStream {
953 type Item = Result<EthernetRxRequest, fidl::Error>;
954
955 fn poll_next(
956 mut self: std::pin::Pin<&mut Self>,
957 cx: &mut std::task::Context<'_>,
958 ) -> std::task::Poll<Option<Self::Item>> {
959 let this = &mut *self;
960 if this.inner.check_shutdown(cx) {
961 this.is_terminated = true;
962 return std::task::Poll::Ready(None);
963 }
964 if this.is_terminated {
965 panic!("polled EthernetRxRequestStream after completion");
966 }
967 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
968 |bytes, handles| {
969 match this.inner.channel().read_etc(cx, bytes, handles) {
970 std::task::Poll::Ready(Ok(())) => {}
971 std::task::Poll::Pending => return std::task::Poll::Pending,
972 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
973 this.is_terminated = true;
974 return std::task::Poll::Ready(None);
975 }
976 std::task::Poll::Ready(Err(e)) => {
977 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
978 e.into(),
979 ))))
980 }
981 }
982
983 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
985
986 std::task::Poll::Ready(Some(match header.ordinal {
987 0x199ff3498ef8a22a => {
988 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
989 let mut req = fidl::new_empty!(
990 EthernetRxTransferRequest,
991 fidl::encoding::DefaultFuchsiaResourceDialect
992 );
993 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<EthernetRxTransferRequest>(&header, _body_bytes, handles, &mut req)?;
994 let control_handle = EthernetRxControlHandle { inner: this.inner.clone() };
995 Ok(EthernetRxRequest::Transfer {
996 payload: req,
997 responder: EthernetRxTransferResponder {
998 control_handle: std::mem::ManuallyDrop::new(control_handle),
999 tx_id: header.tx_id,
1000 },
1001 })
1002 }
1003 _ => Err(fidl::Error::UnknownOrdinal {
1004 ordinal: header.ordinal,
1005 protocol_name:
1006 <EthernetRxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1007 }),
1008 }))
1009 },
1010 )
1011 }
1012}
1013
1014#[derive(Debug)]
1023pub enum EthernetRxRequest {
1024 Transfer { payload: EthernetRxTransferRequest, responder: EthernetRxTransferResponder },
1025}
1026
1027impl EthernetRxRequest {
1028 #[allow(irrefutable_let_patterns)]
1029 pub fn into_transfer(self) -> Option<(EthernetRxTransferRequest, EthernetRxTransferResponder)> {
1030 if let EthernetRxRequest::Transfer { payload, responder } = self {
1031 Some((payload, responder))
1032 } else {
1033 None
1034 }
1035 }
1036
1037 pub fn method_name(&self) -> &'static str {
1039 match *self {
1040 EthernetRxRequest::Transfer { .. } => "transfer",
1041 }
1042 }
1043}
1044
1045#[derive(Debug, Clone)]
1046pub struct EthernetRxControlHandle {
1047 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1048}
1049
1050impl fidl::endpoints::ControlHandle for EthernetRxControlHandle {
1051 fn shutdown(&self) {
1052 self.inner.shutdown()
1053 }
1054 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1055 self.inner.shutdown_with_epitaph(status)
1056 }
1057
1058 fn is_closed(&self) -> bool {
1059 self.inner.channel().is_closed()
1060 }
1061 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1062 self.inner.channel().on_closed()
1063 }
1064
1065 #[cfg(target_os = "fuchsia")]
1066 fn signal_peer(
1067 &self,
1068 clear_mask: zx::Signals,
1069 set_mask: zx::Signals,
1070 ) -> Result<(), zx_status::Status> {
1071 use fidl::Peered;
1072 self.inner.channel().signal_peer(clear_mask, set_mask)
1073 }
1074}
1075
1076impl EthernetRxControlHandle {}
1077
1078#[must_use = "FIDL methods require a response to be sent"]
1079#[derive(Debug)]
1080pub struct EthernetRxTransferResponder {
1081 control_handle: std::mem::ManuallyDrop<EthernetRxControlHandle>,
1082 tx_id: u32,
1083}
1084
1085impl std::ops::Drop for EthernetRxTransferResponder {
1089 fn drop(&mut self) {
1090 self.control_handle.shutdown();
1091 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1093 }
1094}
1095
1096impl fidl::endpoints::Responder for EthernetRxTransferResponder {
1097 type ControlHandle = EthernetRxControlHandle;
1098
1099 fn control_handle(&self) -> &EthernetRxControlHandle {
1100 &self.control_handle
1101 }
1102
1103 fn drop_without_shutdown(mut self) {
1104 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1106 std::mem::forget(self);
1108 }
1109}
1110
1111impl EthernetRxTransferResponder {
1112 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
1116 let _result = self.send_raw(result);
1117 if _result.is_err() {
1118 self.control_handle.shutdown();
1119 }
1120 self.drop_without_shutdown();
1121 _result
1122 }
1123
1124 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
1126 let _result = self.send_raw(result);
1127 self.drop_without_shutdown();
1128 _result
1129 }
1130
1131 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
1132 self.control_handle
1133 .inner
1134 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
1135 result,
1136 self.tx_id,
1137 0x199ff3498ef8a22a,
1138 fidl::encoding::DynamicFlags::empty(),
1139 )
1140 }
1141}
1142
1143#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1144pub struct EthernetTxMarker;
1145
1146impl fidl::endpoints::ProtocolMarker for EthernetTxMarker {
1147 type Proxy = EthernetTxProxy;
1148 type RequestStream = EthernetTxRequestStream;
1149 #[cfg(target_os = "fuchsia")]
1150 type SynchronousProxy = EthernetTxSynchronousProxy;
1151
1152 const DEBUG_NAME: &'static str = "(anonymous) EthernetTx";
1153}
1154pub type EthernetTxTransferResult = Result<(), i32>;
1155
1156pub trait EthernetTxProxyInterface: Send + Sync {
1157 type TransferResponseFut: std::future::Future<Output = Result<EthernetTxTransferResult, fidl::Error>>
1158 + Send;
1159 fn r#transfer(&self, payload: &EthernetTxTransferRequest) -> Self::TransferResponseFut;
1160}
1161#[derive(Debug)]
1162#[cfg(target_os = "fuchsia")]
1163pub struct EthernetTxSynchronousProxy {
1164 client: fidl::client::sync::Client,
1165}
1166
1167#[cfg(target_os = "fuchsia")]
1168impl fidl::endpoints::SynchronousProxy for EthernetTxSynchronousProxy {
1169 type Proxy = EthernetTxProxy;
1170 type Protocol = EthernetTxMarker;
1171
1172 fn from_channel(inner: fidl::Channel) -> Self {
1173 Self::new(inner)
1174 }
1175
1176 fn into_channel(self) -> fidl::Channel {
1177 self.client.into_channel()
1178 }
1179
1180 fn as_channel(&self) -> &fidl::Channel {
1181 self.client.as_channel()
1182 }
1183}
1184
1185#[cfg(target_os = "fuchsia")]
1186impl EthernetTxSynchronousProxy {
1187 pub fn new(channel: fidl::Channel) -> Self {
1188 let protocol_name = <EthernetTxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1189 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1190 }
1191
1192 pub fn into_channel(self) -> fidl::Channel {
1193 self.client.into_channel()
1194 }
1195
1196 pub fn wait_for_event(
1199 &self,
1200 deadline: zx::MonotonicInstant,
1201 ) -> Result<EthernetTxEvent, fidl::Error> {
1202 EthernetTxEvent::decode(self.client.wait_for_event(deadline)?)
1203 }
1204
1205 pub fn r#transfer(
1206 &self,
1207 mut payload: &EthernetTxTransferRequest,
1208 ___deadline: zx::MonotonicInstant,
1209 ) -> Result<EthernetTxTransferResult, fidl::Error> {
1210 let _response = self.client.send_query::<
1211 EthernetTxTransferRequest,
1212 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1213 >(
1214 payload,
1215 0x616dafedf07d00e7,
1216 fidl::encoding::DynamicFlags::empty(),
1217 ___deadline,
1218 )?;
1219 Ok(_response.map(|x| x))
1220 }
1221}
1222
1223#[derive(Debug, Clone)]
1224pub struct EthernetTxProxy {
1225 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1226}
1227
1228impl fidl::endpoints::Proxy for EthernetTxProxy {
1229 type Protocol = EthernetTxMarker;
1230
1231 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1232 Self::new(inner)
1233 }
1234
1235 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1236 self.client.into_channel().map_err(|client| Self { client })
1237 }
1238
1239 fn as_channel(&self) -> &::fidl::AsyncChannel {
1240 self.client.as_channel()
1241 }
1242}
1243
1244impl EthernetTxProxy {
1245 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1247 let protocol_name = <EthernetTxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1248 Self { client: fidl::client::Client::new(channel, protocol_name) }
1249 }
1250
1251 pub fn take_event_stream(&self) -> EthernetTxEventStream {
1257 EthernetTxEventStream { event_receiver: self.client.take_event_receiver() }
1258 }
1259
1260 pub fn r#transfer(
1261 &self,
1262 mut payload: &EthernetTxTransferRequest,
1263 ) -> fidl::client::QueryResponseFut<
1264 EthernetTxTransferResult,
1265 fidl::encoding::DefaultFuchsiaResourceDialect,
1266 > {
1267 EthernetTxProxyInterface::r#transfer(self, payload)
1268 }
1269}
1270
1271impl EthernetTxProxyInterface for EthernetTxProxy {
1272 type TransferResponseFut = fidl::client::QueryResponseFut<
1273 EthernetTxTransferResult,
1274 fidl::encoding::DefaultFuchsiaResourceDialect,
1275 >;
1276 fn r#transfer(&self, mut payload: &EthernetTxTransferRequest) -> Self::TransferResponseFut {
1277 fn _decode(
1278 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1279 ) -> Result<EthernetTxTransferResult, fidl::Error> {
1280 let _response = fidl::client::decode_transaction_body::<
1281 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1282 fidl::encoding::DefaultFuchsiaResourceDialect,
1283 0x616dafedf07d00e7,
1284 >(_buf?)?;
1285 Ok(_response.map(|x| x))
1286 }
1287 self.client.send_query_and_decode::<EthernetTxTransferRequest, EthernetTxTransferResult>(
1288 payload,
1289 0x616dafedf07d00e7,
1290 fidl::encoding::DynamicFlags::empty(),
1291 _decode,
1292 )
1293 }
1294}
1295
1296pub struct EthernetTxEventStream {
1297 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1298}
1299
1300impl std::marker::Unpin for EthernetTxEventStream {}
1301
1302impl futures::stream::FusedStream for EthernetTxEventStream {
1303 fn is_terminated(&self) -> bool {
1304 self.event_receiver.is_terminated()
1305 }
1306}
1307
1308impl futures::Stream for EthernetTxEventStream {
1309 type Item = Result<EthernetTxEvent, fidl::Error>;
1310
1311 fn poll_next(
1312 mut self: std::pin::Pin<&mut Self>,
1313 cx: &mut std::task::Context<'_>,
1314 ) -> std::task::Poll<Option<Self::Item>> {
1315 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1316 &mut self.event_receiver,
1317 cx
1318 )?) {
1319 Some(buf) => std::task::Poll::Ready(Some(EthernetTxEvent::decode(buf))),
1320 None => std::task::Poll::Ready(None),
1321 }
1322 }
1323}
1324
1325#[derive(Debug)]
1326pub enum EthernetTxEvent {}
1327
1328impl EthernetTxEvent {
1329 fn decode(
1331 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1332 ) -> Result<EthernetTxEvent, fidl::Error> {
1333 let (bytes, _handles) = buf.split_mut();
1334 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1335 debug_assert_eq!(tx_header.tx_id, 0);
1336 match tx_header.ordinal {
1337 _ => Err(fidl::Error::UnknownOrdinal {
1338 ordinal: tx_header.ordinal,
1339 protocol_name: <EthernetTxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1340 }),
1341 }
1342 }
1343}
1344
1345pub struct EthernetTxRequestStream {
1347 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1348 is_terminated: bool,
1349}
1350
1351impl std::marker::Unpin for EthernetTxRequestStream {}
1352
1353impl futures::stream::FusedStream for EthernetTxRequestStream {
1354 fn is_terminated(&self) -> bool {
1355 self.is_terminated
1356 }
1357}
1358
1359impl fidl::endpoints::RequestStream for EthernetTxRequestStream {
1360 type Protocol = EthernetTxMarker;
1361 type ControlHandle = EthernetTxControlHandle;
1362
1363 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1364 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1365 }
1366
1367 fn control_handle(&self) -> Self::ControlHandle {
1368 EthernetTxControlHandle { inner: self.inner.clone() }
1369 }
1370
1371 fn into_inner(
1372 self,
1373 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1374 {
1375 (self.inner, self.is_terminated)
1376 }
1377
1378 fn from_inner(
1379 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1380 is_terminated: bool,
1381 ) -> Self {
1382 Self { inner, is_terminated }
1383 }
1384}
1385
1386impl futures::Stream for EthernetTxRequestStream {
1387 type Item = Result<EthernetTxRequest, fidl::Error>;
1388
1389 fn poll_next(
1390 mut self: std::pin::Pin<&mut Self>,
1391 cx: &mut std::task::Context<'_>,
1392 ) -> std::task::Poll<Option<Self::Item>> {
1393 let this = &mut *self;
1394 if this.inner.check_shutdown(cx) {
1395 this.is_terminated = true;
1396 return std::task::Poll::Ready(None);
1397 }
1398 if this.is_terminated {
1399 panic!("polled EthernetTxRequestStream after completion");
1400 }
1401 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1402 |bytes, handles| {
1403 match this.inner.channel().read_etc(cx, bytes, handles) {
1404 std::task::Poll::Ready(Ok(())) => {}
1405 std::task::Poll::Pending => return std::task::Poll::Pending,
1406 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1407 this.is_terminated = true;
1408 return std::task::Poll::Ready(None);
1409 }
1410 std::task::Poll::Ready(Err(e)) => {
1411 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1412 e.into(),
1413 ))))
1414 }
1415 }
1416
1417 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1419
1420 std::task::Poll::Ready(Some(match header.ordinal {
1421 0x616dafedf07d00e7 => {
1422 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1423 let mut req = fidl::new_empty!(
1424 EthernetTxTransferRequest,
1425 fidl::encoding::DefaultFuchsiaResourceDialect
1426 );
1427 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<EthernetTxTransferRequest>(&header, _body_bytes, handles, &mut req)?;
1428 let control_handle = EthernetTxControlHandle { inner: this.inner.clone() };
1429 Ok(EthernetTxRequest::Transfer {
1430 payload: req,
1431 responder: EthernetTxTransferResponder {
1432 control_handle: std::mem::ManuallyDrop::new(control_handle),
1433 tx_id: header.tx_id,
1434 },
1435 })
1436 }
1437 _ => Err(fidl::Error::UnknownOrdinal {
1438 ordinal: header.ordinal,
1439 protocol_name:
1440 <EthernetTxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1441 }),
1442 }))
1443 },
1444 )
1445 }
1446}
1447
1448#[derive(Debug)]
1468pub enum EthernetTxRequest {
1469 Transfer { payload: EthernetTxTransferRequest, responder: EthernetTxTransferResponder },
1470}
1471
1472impl EthernetTxRequest {
1473 #[allow(irrefutable_let_patterns)]
1474 pub fn into_transfer(self) -> Option<(EthernetTxTransferRequest, EthernetTxTransferResponder)> {
1475 if let EthernetTxRequest::Transfer { payload, responder } = self {
1476 Some((payload, responder))
1477 } else {
1478 None
1479 }
1480 }
1481
1482 pub fn method_name(&self) -> &'static str {
1484 match *self {
1485 EthernetTxRequest::Transfer { .. } => "transfer",
1486 }
1487 }
1488}
1489
1490#[derive(Debug, Clone)]
1491pub struct EthernetTxControlHandle {
1492 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1493}
1494
1495impl fidl::endpoints::ControlHandle for EthernetTxControlHandle {
1496 fn shutdown(&self) {
1497 self.inner.shutdown()
1498 }
1499 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1500 self.inner.shutdown_with_epitaph(status)
1501 }
1502
1503 fn is_closed(&self) -> bool {
1504 self.inner.channel().is_closed()
1505 }
1506 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1507 self.inner.channel().on_closed()
1508 }
1509
1510 #[cfg(target_os = "fuchsia")]
1511 fn signal_peer(
1512 &self,
1513 clear_mask: zx::Signals,
1514 set_mask: zx::Signals,
1515 ) -> Result<(), zx_status::Status> {
1516 use fidl::Peered;
1517 self.inner.channel().signal_peer(clear_mask, set_mask)
1518 }
1519}
1520
1521impl EthernetTxControlHandle {}
1522
1523#[must_use = "FIDL methods require a response to be sent"]
1524#[derive(Debug)]
1525pub struct EthernetTxTransferResponder {
1526 control_handle: std::mem::ManuallyDrop<EthernetTxControlHandle>,
1527 tx_id: u32,
1528}
1529
1530impl std::ops::Drop for EthernetTxTransferResponder {
1534 fn drop(&mut self) {
1535 self.control_handle.shutdown();
1536 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1538 }
1539}
1540
1541impl fidl::endpoints::Responder for EthernetTxTransferResponder {
1542 type ControlHandle = EthernetTxControlHandle;
1543
1544 fn control_handle(&self) -> &EthernetTxControlHandle {
1545 &self.control_handle
1546 }
1547
1548 fn drop_without_shutdown(mut self) {
1549 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1551 std::mem::forget(self);
1553 }
1554}
1555
1556impl EthernetTxTransferResponder {
1557 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
1561 let _result = self.send_raw(result);
1562 if _result.is_err() {
1563 self.control_handle.shutdown();
1564 }
1565 self.drop_without_shutdown();
1566 _result
1567 }
1568
1569 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
1571 let _result = self.send_raw(result);
1572 self.drop_without_shutdown();
1573 _result
1574 }
1575
1576 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
1577 self.control_handle
1578 .inner
1579 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
1580 result,
1581 self.tx_id,
1582 0x616dafedf07d00e7,
1583 fidl::encoding::DynamicFlags::empty(),
1584 )
1585 }
1586}
1587
1588#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1589pub struct WlanRxMarker;
1590
1591impl fidl::endpoints::ProtocolMarker for WlanRxMarker {
1592 type Proxy = WlanRxProxy;
1593 type RequestStream = WlanRxRequestStream;
1594 #[cfg(target_os = "fuchsia")]
1595 type SynchronousProxy = WlanRxSynchronousProxy;
1596
1597 const DEBUG_NAME: &'static str = "(anonymous) WlanRx";
1598}
1599
1600pub trait WlanRxProxyInterface: Send + Sync {
1601 type TransferResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
1602 fn r#transfer(&self, payload: &WlanRxTransferRequest) -> Self::TransferResponseFut;
1603}
1604#[derive(Debug)]
1605#[cfg(target_os = "fuchsia")]
1606pub struct WlanRxSynchronousProxy {
1607 client: fidl::client::sync::Client,
1608}
1609
1610#[cfg(target_os = "fuchsia")]
1611impl fidl::endpoints::SynchronousProxy for WlanRxSynchronousProxy {
1612 type Proxy = WlanRxProxy;
1613 type Protocol = WlanRxMarker;
1614
1615 fn from_channel(inner: fidl::Channel) -> Self {
1616 Self::new(inner)
1617 }
1618
1619 fn into_channel(self) -> fidl::Channel {
1620 self.client.into_channel()
1621 }
1622
1623 fn as_channel(&self) -> &fidl::Channel {
1624 self.client.as_channel()
1625 }
1626}
1627
1628#[cfg(target_os = "fuchsia")]
1629impl WlanRxSynchronousProxy {
1630 pub fn new(channel: fidl::Channel) -> Self {
1631 let protocol_name = <WlanRxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1632 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1633 }
1634
1635 pub fn into_channel(self) -> fidl::Channel {
1636 self.client.into_channel()
1637 }
1638
1639 pub fn wait_for_event(
1642 &self,
1643 deadline: zx::MonotonicInstant,
1644 ) -> Result<WlanRxEvent, fidl::Error> {
1645 WlanRxEvent::decode(self.client.wait_for_event(deadline)?)
1646 }
1647
1648 pub fn r#transfer(
1649 &self,
1650 mut payload: &WlanRxTransferRequest,
1651 ___deadline: zx::MonotonicInstant,
1652 ) -> Result<(), fidl::Error> {
1653 let _response =
1654 self.client.send_query::<WlanRxTransferRequest, fidl::encoding::EmptyPayload>(
1655 payload,
1656 0x2c73b18cbfca6055,
1657 fidl::encoding::DynamicFlags::empty(),
1658 ___deadline,
1659 )?;
1660 Ok(_response)
1661 }
1662}
1663
1664#[derive(Debug, Clone)]
1665pub struct WlanRxProxy {
1666 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1667}
1668
1669impl fidl::endpoints::Proxy for WlanRxProxy {
1670 type Protocol = WlanRxMarker;
1671
1672 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1673 Self::new(inner)
1674 }
1675
1676 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1677 self.client.into_channel().map_err(|client| Self { client })
1678 }
1679
1680 fn as_channel(&self) -> &::fidl::AsyncChannel {
1681 self.client.as_channel()
1682 }
1683}
1684
1685impl WlanRxProxy {
1686 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1688 let protocol_name = <WlanRxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1689 Self { client: fidl::client::Client::new(channel, protocol_name) }
1690 }
1691
1692 pub fn take_event_stream(&self) -> WlanRxEventStream {
1698 WlanRxEventStream { event_receiver: self.client.take_event_receiver() }
1699 }
1700
1701 pub fn r#transfer(
1702 &self,
1703 mut payload: &WlanRxTransferRequest,
1704 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
1705 WlanRxProxyInterface::r#transfer(self, payload)
1706 }
1707}
1708
1709impl WlanRxProxyInterface for WlanRxProxy {
1710 type TransferResponseFut =
1711 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
1712 fn r#transfer(&self, mut payload: &WlanRxTransferRequest) -> Self::TransferResponseFut {
1713 fn _decode(
1714 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1715 ) -> Result<(), fidl::Error> {
1716 let _response = fidl::client::decode_transaction_body::<
1717 fidl::encoding::EmptyPayload,
1718 fidl::encoding::DefaultFuchsiaResourceDialect,
1719 0x2c73b18cbfca6055,
1720 >(_buf?)?;
1721 Ok(_response)
1722 }
1723 self.client.send_query_and_decode::<WlanRxTransferRequest, ()>(
1724 payload,
1725 0x2c73b18cbfca6055,
1726 fidl::encoding::DynamicFlags::empty(),
1727 _decode,
1728 )
1729 }
1730}
1731
1732pub struct WlanRxEventStream {
1733 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1734}
1735
1736impl std::marker::Unpin for WlanRxEventStream {}
1737
1738impl futures::stream::FusedStream for WlanRxEventStream {
1739 fn is_terminated(&self) -> bool {
1740 self.event_receiver.is_terminated()
1741 }
1742}
1743
1744impl futures::Stream for WlanRxEventStream {
1745 type Item = Result<WlanRxEvent, fidl::Error>;
1746
1747 fn poll_next(
1748 mut self: std::pin::Pin<&mut Self>,
1749 cx: &mut std::task::Context<'_>,
1750 ) -> std::task::Poll<Option<Self::Item>> {
1751 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1752 &mut self.event_receiver,
1753 cx
1754 )?) {
1755 Some(buf) => std::task::Poll::Ready(Some(WlanRxEvent::decode(buf))),
1756 None => std::task::Poll::Ready(None),
1757 }
1758 }
1759}
1760
1761#[derive(Debug)]
1762pub enum WlanRxEvent {}
1763
1764impl WlanRxEvent {
1765 fn decode(
1767 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1768 ) -> Result<WlanRxEvent, fidl::Error> {
1769 let (bytes, _handles) = buf.split_mut();
1770 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1771 debug_assert_eq!(tx_header.tx_id, 0);
1772 match tx_header.ordinal {
1773 _ => Err(fidl::Error::UnknownOrdinal {
1774 ordinal: tx_header.ordinal,
1775 protocol_name: <WlanRxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1776 }),
1777 }
1778 }
1779}
1780
1781pub struct WlanRxRequestStream {
1783 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1784 is_terminated: bool,
1785}
1786
1787impl std::marker::Unpin for WlanRxRequestStream {}
1788
1789impl futures::stream::FusedStream for WlanRxRequestStream {
1790 fn is_terminated(&self) -> bool {
1791 self.is_terminated
1792 }
1793}
1794
1795impl fidl::endpoints::RequestStream for WlanRxRequestStream {
1796 type Protocol = WlanRxMarker;
1797 type ControlHandle = WlanRxControlHandle;
1798
1799 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1800 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1801 }
1802
1803 fn control_handle(&self) -> Self::ControlHandle {
1804 WlanRxControlHandle { inner: self.inner.clone() }
1805 }
1806
1807 fn into_inner(
1808 self,
1809 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1810 {
1811 (self.inner, self.is_terminated)
1812 }
1813
1814 fn from_inner(
1815 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1816 is_terminated: bool,
1817 ) -> Self {
1818 Self { inner, is_terminated }
1819 }
1820}
1821
1822impl futures::Stream for WlanRxRequestStream {
1823 type Item = Result<WlanRxRequest, fidl::Error>;
1824
1825 fn poll_next(
1826 mut self: std::pin::Pin<&mut Self>,
1827 cx: &mut std::task::Context<'_>,
1828 ) -> std::task::Poll<Option<Self::Item>> {
1829 let this = &mut *self;
1830 if this.inner.check_shutdown(cx) {
1831 this.is_terminated = true;
1832 return std::task::Poll::Ready(None);
1833 }
1834 if this.is_terminated {
1835 panic!("polled WlanRxRequestStream after completion");
1836 }
1837 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1838 |bytes, handles| {
1839 match this.inner.channel().read_etc(cx, bytes, handles) {
1840 std::task::Poll::Ready(Ok(())) => {}
1841 std::task::Poll::Pending => return std::task::Poll::Pending,
1842 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1843 this.is_terminated = true;
1844 return std::task::Poll::Ready(None);
1845 }
1846 std::task::Poll::Ready(Err(e)) => {
1847 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1848 e.into(),
1849 ))))
1850 }
1851 }
1852
1853 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1855
1856 std::task::Poll::Ready(Some(match header.ordinal {
1857 0x2c73b18cbfca6055 => {
1858 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1859 let mut req = fidl::new_empty!(
1860 WlanRxTransferRequest,
1861 fidl::encoding::DefaultFuchsiaResourceDialect
1862 );
1863 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanRxTransferRequest>(&header, _body_bytes, handles, &mut req)?;
1864 let control_handle = WlanRxControlHandle { inner: this.inner.clone() };
1865 Ok(WlanRxRequest::Transfer {
1866 payload: req,
1867 responder: WlanRxTransferResponder {
1868 control_handle: std::mem::ManuallyDrop::new(control_handle),
1869 tx_id: header.tx_id,
1870 },
1871 })
1872 }
1873 _ => Err(fidl::Error::UnknownOrdinal {
1874 ordinal: header.ordinal,
1875 protocol_name:
1876 <WlanRxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1877 }),
1878 }))
1879 },
1880 )
1881 }
1882}
1883
1884#[derive(Debug)]
1893pub enum WlanRxRequest {
1894 Transfer { payload: WlanRxTransferRequest, responder: WlanRxTransferResponder },
1895}
1896
1897impl WlanRxRequest {
1898 #[allow(irrefutable_let_patterns)]
1899 pub fn into_transfer(self) -> Option<(WlanRxTransferRequest, WlanRxTransferResponder)> {
1900 if let WlanRxRequest::Transfer { payload, responder } = self {
1901 Some((payload, responder))
1902 } else {
1903 None
1904 }
1905 }
1906
1907 pub fn method_name(&self) -> &'static str {
1909 match *self {
1910 WlanRxRequest::Transfer { .. } => "transfer",
1911 }
1912 }
1913}
1914
1915#[derive(Debug, Clone)]
1916pub struct WlanRxControlHandle {
1917 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1918}
1919
1920impl fidl::endpoints::ControlHandle for WlanRxControlHandle {
1921 fn shutdown(&self) {
1922 self.inner.shutdown()
1923 }
1924 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1925 self.inner.shutdown_with_epitaph(status)
1926 }
1927
1928 fn is_closed(&self) -> bool {
1929 self.inner.channel().is_closed()
1930 }
1931 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1932 self.inner.channel().on_closed()
1933 }
1934
1935 #[cfg(target_os = "fuchsia")]
1936 fn signal_peer(
1937 &self,
1938 clear_mask: zx::Signals,
1939 set_mask: zx::Signals,
1940 ) -> Result<(), zx_status::Status> {
1941 use fidl::Peered;
1942 self.inner.channel().signal_peer(clear_mask, set_mask)
1943 }
1944}
1945
1946impl WlanRxControlHandle {}
1947
1948#[must_use = "FIDL methods require a response to be sent"]
1949#[derive(Debug)]
1950pub struct WlanRxTransferResponder {
1951 control_handle: std::mem::ManuallyDrop<WlanRxControlHandle>,
1952 tx_id: u32,
1953}
1954
1955impl std::ops::Drop for WlanRxTransferResponder {
1959 fn drop(&mut self) {
1960 self.control_handle.shutdown();
1961 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1963 }
1964}
1965
1966impl fidl::endpoints::Responder for WlanRxTransferResponder {
1967 type ControlHandle = WlanRxControlHandle;
1968
1969 fn control_handle(&self) -> &WlanRxControlHandle {
1970 &self.control_handle
1971 }
1972
1973 fn drop_without_shutdown(mut self) {
1974 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1976 std::mem::forget(self);
1978 }
1979}
1980
1981impl WlanRxTransferResponder {
1982 pub fn send(self) -> Result<(), fidl::Error> {
1986 let _result = self.send_raw();
1987 if _result.is_err() {
1988 self.control_handle.shutdown();
1989 }
1990 self.drop_without_shutdown();
1991 _result
1992 }
1993
1994 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
1996 let _result = self.send_raw();
1997 self.drop_without_shutdown();
1998 _result
1999 }
2000
2001 fn send_raw(&self) -> Result<(), fidl::Error> {
2002 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
2003 (),
2004 self.tx_id,
2005 0x2c73b18cbfca6055,
2006 fidl::encoding::DynamicFlags::empty(),
2007 )
2008 }
2009}
2010
2011#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2012pub struct WlanSoftmacBaseMarker;
2013
2014impl fidl::endpoints::ProtocolMarker for WlanSoftmacBaseMarker {
2015 type Proxy = WlanSoftmacBaseProxy;
2016 type RequestStream = WlanSoftmacBaseRequestStream;
2017 #[cfg(target_os = "fuchsia")]
2018 type SynchronousProxy = WlanSoftmacBaseSynchronousProxy;
2019
2020 const DEBUG_NAME: &'static str = "(anonymous) WlanSoftmacBase";
2021}
2022pub type WlanSoftmacBaseQueryResult = Result<WlanSoftmacQueryResponse, i32>;
2023pub type WlanSoftmacBaseQueryDiscoverySupportResult =
2024 Result<fidl_fuchsia_wlan_common::DiscoverySupport, i32>;
2025pub type WlanSoftmacBaseQueryMacSublayerSupportResult =
2026 Result<fidl_fuchsia_wlan_common::MacSublayerSupport, i32>;
2027pub type WlanSoftmacBaseQuerySecuritySupportResult =
2028 Result<fidl_fuchsia_wlan_common::SecuritySupport, i32>;
2029pub type WlanSoftmacBaseQuerySpectrumManagementSupportResult =
2030 Result<fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>;
2031pub type WlanSoftmacBaseSetChannelResult = Result<(), i32>;
2032pub type WlanSoftmacBaseJoinBssResult = Result<(), i32>;
2033pub type WlanSoftmacBaseEnableBeaconingResult = Result<(), i32>;
2034pub type WlanSoftmacBaseDisableBeaconingResult = Result<(), i32>;
2035pub type WlanSoftmacBaseInstallKeyResult = Result<(), i32>;
2036pub type WlanSoftmacBaseNotifyAssociationCompleteResult = Result<(), i32>;
2037pub type WlanSoftmacBaseClearAssociationResult = Result<(), i32>;
2038pub type WlanSoftmacBaseStartPassiveScanResult =
2039 Result<WlanSoftmacBaseStartPassiveScanResponse, i32>;
2040pub type WlanSoftmacBaseStartActiveScanResult = Result<WlanSoftmacBaseStartActiveScanResponse, i32>;
2041pub type WlanSoftmacBaseCancelScanResult = Result<(), i32>;
2042pub type WlanSoftmacBaseUpdateWmmParametersResult = Result<(), i32>;
2043
2044pub trait WlanSoftmacBaseProxyInterface: Send + Sync {
2045 type QueryResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseQueryResult, fidl::Error>>
2046 + Send;
2047 fn r#query(&self) -> Self::QueryResponseFut;
2048 type QueryDiscoverySupportResponseFut: std::future::Future<
2049 Output = Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error>,
2050 > + Send;
2051 fn r#query_discovery_support(&self) -> Self::QueryDiscoverySupportResponseFut;
2052 type QueryMacSublayerSupportResponseFut: std::future::Future<
2053 Output = Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error>,
2054 > + Send;
2055 fn r#query_mac_sublayer_support(&self) -> Self::QueryMacSublayerSupportResponseFut;
2056 type QuerySecuritySupportResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error>>
2057 + Send;
2058 fn r#query_security_support(&self) -> Self::QuerySecuritySupportResponseFut;
2059 type QuerySpectrumManagementSupportResponseFut: std::future::Future<
2060 Output = Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error>,
2061 > + Send;
2062 fn r#query_spectrum_management_support(
2063 &self,
2064 ) -> Self::QuerySpectrumManagementSupportResponseFut;
2065 type SetChannelResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseSetChannelResult, fidl::Error>>
2066 + Send;
2067 fn r#set_channel(
2068 &self,
2069 payload: &WlanSoftmacBaseSetChannelRequest,
2070 ) -> Self::SetChannelResponseFut;
2071 type JoinBssResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseJoinBssResult, fidl::Error>>
2072 + Send;
2073 fn r#join_bss(
2074 &self,
2075 join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
2076 ) -> Self::JoinBssResponseFut;
2077 type EnableBeaconingResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error>>
2078 + Send;
2079 fn r#enable_beaconing(
2080 &self,
2081 payload: &WlanSoftmacBaseEnableBeaconingRequest,
2082 ) -> Self::EnableBeaconingResponseFut;
2083 type DisableBeaconingResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error>>
2084 + Send;
2085 fn r#disable_beaconing(&self) -> Self::DisableBeaconingResponseFut;
2086 type InstallKeyResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseInstallKeyResult, fidl::Error>>
2087 + Send;
2088 fn r#install_key(&self, payload: &WlanKeyConfiguration) -> Self::InstallKeyResponseFut;
2089 type NotifyAssociationCompleteResponseFut: std::future::Future<
2090 Output = Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error>,
2091 > + Send;
2092 fn r#notify_association_complete(
2093 &self,
2094 assoc_cfg: &WlanAssociationConfig,
2095 ) -> Self::NotifyAssociationCompleteResponseFut;
2096 type ClearAssociationResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseClearAssociationResult, fidl::Error>>
2097 + Send;
2098 fn r#clear_association(
2099 &self,
2100 payload: &WlanSoftmacBaseClearAssociationRequest,
2101 ) -> Self::ClearAssociationResponseFut;
2102 type StartPassiveScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error>>
2103 + Send;
2104 fn r#start_passive_scan(
2105 &self,
2106 payload: &WlanSoftmacBaseStartPassiveScanRequest,
2107 ) -> Self::StartPassiveScanResponseFut;
2108 type StartActiveScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error>>
2109 + Send;
2110 fn r#start_active_scan(
2111 &self,
2112 payload: &WlanSoftmacStartActiveScanRequest,
2113 ) -> Self::StartActiveScanResponseFut;
2114 type CancelScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseCancelScanResult, fidl::Error>>
2115 + Send;
2116 fn r#cancel_scan(
2117 &self,
2118 payload: &WlanSoftmacBaseCancelScanRequest,
2119 ) -> Self::CancelScanResponseFut;
2120 type UpdateWmmParametersResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error>>
2121 + Send;
2122 fn r#update_wmm_parameters(
2123 &self,
2124 payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
2125 ) -> Self::UpdateWmmParametersResponseFut;
2126}
2127#[derive(Debug)]
2128#[cfg(target_os = "fuchsia")]
2129pub struct WlanSoftmacBaseSynchronousProxy {
2130 client: fidl::client::sync::Client,
2131}
2132
2133#[cfg(target_os = "fuchsia")]
2134impl fidl::endpoints::SynchronousProxy for WlanSoftmacBaseSynchronousProxy {
2135 type Proxy = WlanSoftmacBaseProxy;
2136 type Protocol = WlanSoftmacBaseMarker;
2137
2138 fn from_channel(inner: fidl::Channel) -> Self {
2139 Self::new(inner)
2140 }
2141
2142 fn into_channel(self) -> fidl::Channel {
2143 self.client.into_channel()
2144 }
2145
2146 fn as_channel(&self) -> &fidl::Channel {
2147 self.client.as_channel()
2148 }
2149}
2150
2151#[cfg(target_os = "fuchsia")]
2152impl WlanSoftmacBaseSynchronousProxy {
2153 pub fn new(channel: fidl::Channel) -> Self {
2154 let protocol_name = <WlanSoftmacBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2155 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
2156 }
2157
2158 pub fn into_channel(self) -> fidl::Channel {
2159 self.client.into_channel()
2160 }
2161
2162 pub fn wait_for_event(
2165 &self,
2166 deadline: zx::MonotonicInstant,
2167 ) -> Result<WlanSoftmacBaseEvent, fidl::Error> {
2168 WlanSoftmacBaseEvent::decode(self.client.wait_for_event(deadline)?)
2169 }
2170
2171 pub fn r#query(
2179 &self,
2180 ___deadline: zx::MonotonicInstant,
2181 ) -> Result<WlanSoftmacBaseQueryResult, fidl::Error> {
2182 let _response = self.client.send_query::<
2183 fidl::encoding::EmptyPayload,
2184 fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>,
2185 >(
2186 (),
2187 0x18231a638e508f9d,
2188 fidl::encoding::DynamicFlags::empty(),
2189 ___deadline,
2190 )?;
2191 Ok(_response.map(|x| x))
2192 }
2193
2194 pub fn r#query_discovery_support(
2198 &self,
2199 ___deadline: zx::MonotonicInstant,
2200 ) -> Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error> {
2201 let _response =
2202 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
2203 WlanSoftmacBaseQueryDiscoverySupportResponse,
2204 i32,
2205 >>(
2206 (),
2207 0x16797affc0cb58ae,
2208 fidl::encoding::DynamicFlags::empty(),
2209 ___deadline,
2210 )?;
2211 Ok(_response.map(|x| x.resp))
2212 }
2213
2214 pub fn r#query_mac_sublayer_support(
2222 &self,
2223 ___deadline: zx::MonotonicInstant,
2224 ) -> Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error> {
2225 let _response =
2226 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
2227 WlanSoftmacBaseQueryMacSublayerSupportResponse,
2228 i32,
2229 >>(
2230 (),
2231 0x7302c3f8c131f075,
2232 fidl::encoding::DynamicFlags::empty(),
2233 ___deadline,
2234 )?;
2235 Ok(_response.map(|x| x.resp))
2236 }
2237
2238 pub fn r#query_security_support(
2241 &self,
2242 ___deadline: zx::MonotonicInstant,
2243 ) -> Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error> {
2244 let _response =
2245 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
2246 WlanSoftmacBaseQuerySecuritySupportResponse,
2247 i32,
2248 >>(
2249 (),
2250 0x3691bb75abf6354,
2251 fidl::encoding::DynamicFlags::empty(),
2252 ___deadline,
2253 )?;
2254 Ok(_response.map(|x| x.resp))
2255 }
2256
2257 pub fn r#query_spectrum_management_support(
2261 &self,
2262 ___deadline: zx::MonotonicInstant,
2263 ) -> Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error> {
2264 let _response = self
2265 .client
2266 .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
2267 WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
2268 i32,
2269 >>(
2270 (), 0x347d78dc1d4d27bf, fidl::encoding::DynamicFlags::empty(), ___deadline
2271 )?;
2272 Ok(_response.map(|x| x.resp))
2273 }
2274
2275 pub fn r#set_channel(
2283 &self,
2284 mut payload: &WlanSoftmacBaseSetChannelRequest,
2285 ___deadline: zx::MonotonicInstant,
2286 ) -> Result<WlanSoftmacBaseSetChannelResult, fidl::Error> {
2287 let _response = self.client.send_query::<
2288 WlanSoftmacBaseSetChannelRequest,
2289 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2290 >(
2291 payload,
2292 0x12836b533cd63ece,
2293 fidl::encoding::DynamicFlags::empty(),
2294 ___deadline,
2295 )?;
2296 Ok(_response.map(|x| x))
2297 }
2298
2299 pub fn r#join_bss(
2309 &self,
2310 mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
2311 ___deadline: zx::MonotonicInstant,
2312 ) -> Result<WlanSoftmacBaseJoinBssResult, fidl::Error> {
2313 let _response = self.client.send_query::<
2314 WlanSoftmacBaseJoinBssRequest,
2315 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2316 >(
2317 (join_request,),
2318 0x1336fb5455b77a6e,
2319 fidl::encoding::DynamicFlags::empty(),
2320 ___deadline,
2321 )?;
2322 Ok(_response.map(|x| x))
2323 }
2324
2325 pub fn r#enable_beaconing(
2340 &self,
2341 mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
2342 ___deadline: zx::MonotonicInstant,
2343 ) -> Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error> {
2344 let _response = self.client.send_query::<
2345 WlanSoftmacBaseEnableBeaconingRequest,
2346 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2347 >(
2348 payload,
2349 0x6c35807632c64576,
2350 fidl::encoding::DynamicFlags::empty(),
2351 ___deadline,
2352 )?;
2353 Ok(_response.map(|x| x))
2354 }
2355
2356 pub fn r#disable_beaconing(
2358 &self,
2359 ___deadline: zx::MonotonicInstant,
2360 ) -> Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error> {
2361 let _response = self.client.send_query::<
2362 fidl::encoding::EmptyPayload,
2363 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2364 >(
2365 (),
2366 0x3303b30f99dbb406,
2367 fidl::encoding::DynamicFlags::empty(),
2368 ___deadline,
2369 )?;
2370 Ok(_response.map(|x| x))
2371 }
2372
2373 pub fn r#install_key(
2380 &self,
2381 mut payload: &WlanKeyConfiguration,
2382 ___deadline: zx::MonotonicInstant,
2383 ) -> Result<WlanSoftmacBaseInstallKeyResult, fidl::Error> {
2384 let _response = self.client.send_query::<
2385 WlanKeyConfiguration,
2386 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2387 >(
2388 payload,
2389 0x7decf9b4200b9131,
2390 fidl::encoding::DynamicFlags::empty(),
2391 ___deadline,
2392 )?;
2393 Ok(_response.map(|x| x))
2394 }
2395
2396 pub fn r#notify_association_complete(
2406 &self,
2407 mut assoc_cfg: &WlanAssociationConfig,
2408 ___deadline: zx::MonotonicInstant,
2409 ) -> Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error> {
2410 let _response = self.client.send_query::<
2411 WlanSoftmacBaseNotifyAssociationCompleteRequest,
2412 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2413 >(
2414 (assoc_cfg,),
2415 0x436ffe3ba461d6cd,
2416 fidl::encoding::DynamicFlags::empty(),
2417 ___deadline,
2418 )?;
2419 Ok(_response.map(|x| x))
2420 }
2421
2422 pub fn r#clear_association(
2424 &self,
2425 mut payload: &WlanSoftmacBaseClearAssociationRequest,
2426 ___deadline: zx::MonotonicInstant,
2427 ) -> Result<WlanSoftmacBaseClearAssociationResult, fidl::Error> {
2428 let _response = self.client.send_query::<
2429 WlanSoftmacBaseClearAssociationRequest,
2430 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2431 >(
2432 payload,
2433 0x581d76c39190a7dd,
2434 fidl::encoding::DynamicFlags::empty(),
2435 ___deadline,
2436 )?;
2437 Ok(_response.map(|x| x))
2438 }
2439
2440 pub fn r#start_passive_scan(
2454 &self,
2455 mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
2456 ___deadline: zx::MonotonicInstant,
2457 ) -> Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error> {
2458 let _response = self.client.send_query::<
2459 WlanSoftmacBaseStartPassiveScanRequest,
2460 fidl::encoding::ResultType<WlanSoftmacBaseStartPassiveScanResponse, i32>,
2461 >(
2462 payload,
2463 0x5662f989cb4083bb,
2464 fidl::encoding::DynamicFlags::empty(),
2465 ___deadline,
2466 )?;
2467 Ok(_response.map(|x| x))
2468 }
2469
2470 pub fn r#start_active_scan(
2484 &self,
2485 mut payload: &WlanSoftmacStartActiveScanRequest,
2486 ___deadline: zx::MonotonicInstant,
2487 ) -> Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error> {
2488 let _response = self.client.send_query::<
2489 WlanSoftmacStartActiveScanRequest,
2490 fidl::encoding::ResultType<WlanSoftmacBaseStartActiveScanResponse, i32>,
2491 >(
2492 payload,
2493 0x4896eafa9937751e,
2494 fidl::encoding::DynamicFlags::empty(),
2495 ___deadline,
2496 )?;
2497 Ok(_response.map(|x| x))
2498 }
2499
2500 pub fn r#cancel_scan(
2514 &self,
2515 mut payload: &WlanSoftmacBaseCancelScanRequest,
2516 ___deadline: zx::MonotonicInstant,
2517 ) -> Result<WlanSoftmacBaseCancelScanResult, fidl::Error> {
2518 let _response = self.client.send_query::<
2519 WlanSoftmacBaseCancelScanRequest,
2520 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2521 >(
2522 payload,
2523 0xf7d859369764556,
2524 fidl::encoding::DynamicFlags::empty(),
2525 ___deadline,
2526 )?;
2527 Ok(_response.map(|x| x))
2528 }
2529
2530 pub fn r#update_wmm_parameters(
2533 &self,
2534 mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
2535 ___deadline: zx::MonotonicInstant,
2536 ) -> Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error> {
2537 let _response = self.client.send_query::<
2538 WlanSoftmacBaseUpdateWmmParametersRequest,
2539 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2540 >(
2541 payload,
2542 0x68522c7122d5f78c,
2543 fidl::encoding::DynamicFlags::empty(),
2544 ___deadline,
2545 )?;
2546 Ok(_response.map(|x| x))
2547 }
2548}
2549
2550#[derive(Debug, Clone)]
2551pub struct WlanSoftmacBaseProxy {
2552 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2553}
2554
2555impl fidl::endpoints::Proxy for WlanSoftmacBaseProxy {
2556 type Protocol = WlanSoftmacBaseMarker;
2557
2558 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2559 Self::new(inner)
2560 }
2561
2562 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2563 self.client.into_channel().map_err(|client| Self { client })
2564 }
2565
2566 fn as_channel(&self) -> &::fidl::AsyncChannel {
2567 self.client.as_channel()
2568 }
2569}
2570
2571impl WlanSoftmacBaseProxy {
2572 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2574 let protocol_name = <WlanSoftmacBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2575 Self { client: fidl::client::Client::new(channel, protocol_name) }
2576 }
2577
2578 pub fn take_event_stream(&self) -> WlanSoftmacBaseEventStream {
2584 WlanSoftmacBaseEventStream { event_receiver: self.client.take_event_receiver() }
2585 }
2586
2587 pub fn r#query(
2595 &self,
2596 ) -> fidl::client::QueryResponseFut<
2597 WlanSoftmacBaseQueryResult,
2598 fidl::encoding::DefaultFuchsiaResourceDialect,
2599 > {
2600 WlanSoftmacBaseProxyInterface::r#query(self)
2601 }
2602
2603 pub fn r#query_discovery_support(
2607 &self,
2608 ) -> fidl::client::QueryResponseFut<
2609 WlanSoftmacBaseQueryDiscoverySupportResult,
2610 fidl::encoding::DefaultFuchsiaResourceDialect,
2611 > {
2612 WlanSoftmacBaseProxyInterface::r#query_discovery_support(self)
2613 }
2614
2615 pub fn r#query_mac_sublayer_support(
2623 &self,
2624 ) -> fidl::client::QueryResponseFut<
2625 WlanSoftmacBaseQueryMacSublayerSupportResult,
2626 fidl::encoding::DefaultFuchsiaResourceDialect,
2627 > {
2628 WlanSoftmacBaseProxyInterface::r#query_mac_sublayer_support(self)
2629 }
2630
2631 pub fn r#query_security_support(
2634 &self,
2635 ) -> fidl::client::QueryResponseFut<
2636 WlanSoftmacBaseQuerySecuritySupportResult,
2637 fidl::encoding::DefaultFuchsiaResourceDialect,
2638 > {
2639 WlanSoftmacBaseProxyInterface::r#query_security_support(self)
2640 }
2641
2642 pub fn r#query_spectrum_management_support(
2646 &self,
2647 ) -> fidl::client::QueryResponseFut<
2648 WlanSoftmacBaseQuerySpectrumManagementSupportResult,
2649 fidl::encoding::DefaultFuchsiaResourceDialect,
2650 > {
2651 WlanSoftmacBaseProxyInterface::r#query_spectrum_management_support(self)
2652 }
2653
2654 pub fn r#set_channel(
2662 &self,
2663 mut payload: &WlanSoftmacBaseSetChannelRequest,
2664 ) -> fidl::client::QueryResponseFut<
2665 WlanSoftmacBaseSetChannelResult,
2666 fidl::encoding::DefaultFuchsiaResourceDialect,
2667 > {
2668 WlanSoftmacBaseProxyInterface::r#set_channel(self, payload)
2669 }
2670
2671 pub fn r#join_bss(
2681 &self,
2682 mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
2683 ) -> fidl::client::QueryResponseFut<
2684 WlanSoftmacBaseJoinBssResult,
2685 fidl::encoding::DefaultFuchsiaResourceDialect,
2686 > {
2687 WlanSoftmacBaseProxyInterface::r#join_bss(self, join_request)
2688 }
2689
2690 pub fn r#enable_beaconing(
2705 &self,
2706 mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
2707 ) -> fidl::client::QueryResponseFut<
2708 WlanSoftmacBaseEnableBeaconingResult,
2709 fidl::encoding::DefaultFuchsiaResourceDialect,
2710 > {
2711 WlanSoftmacBaseProxyInterface::r#enable_beaconing(self, payload)
2712 }
2713
2714 pub fn r#disable_beaconing(
2716 &self,
2717 ) -> fidl::client::QueryResponseFut<
2718 WlanSoftmacBaseDisableBeaconingResult,
2719 fidl::encoding::DefaultFuchsiaResourceDialect,
2720 > {
2721 WlanSoftmacBaseProxyInterface::r#disable_beaconing(self)
2722 }
2723
2724 pub fn r#install_key(
2731 &self,
2732 mut payload: &WlanKeyConfiguration,
2733 ) -> fidl::client::QueryResponseFut<
2734 WlanSoftmacBaseInstallKeyResult,
2735 fidl::encoding::DefaultFuchsiaResourceDialect,
2736 > {
2737 WlanSoftmacBaseProxyInterface::r#install_key(self, payload)
2738 }
2739
2740 pub fn r#notify_association_complete(
2750 &self,
2751 mut assoc_cfg: &WlanAssociationConfig,
2752 ) -> fidl::client::QueryResponseFut<
2753 WlanSoftmacBaseNotifyAssociationCompleteResult,
2754 fidl::encoding::DefaultFuchsiaResourceDialect,
2755 > {
2756 WlanSoftmacBaseProxyInterface::r#notify_association_complete(self, assoc_cfg)
2757 }
2758
2759 pub fn r#clear_association(
2761 &self,
2762 mut payload: &WlanSoftmacBaseClearAssociationRequest,
2763 ) -> fidl::client::QueryResponseFut<
2764 WlanSoftmacBaseClearAssociationResult,
2765 fidl::encoding::DefaultFuchsiaResourceDialect,
2766 > {
2767 WlanSoftmacBaseProxyInterface::r#clear_association(self, payload)
2768 }
2769
2770 pub fn r#start_passive_scan(
2784 &self,
2785 mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
2786 ) -> fidl::client::QueryResponseFut<
2787 WlanSoftmacBaseStartPassiveScanResult,
2788 fidl::encoding::DefaultFuchsiaResourceDialect,
2789 > {
2790 WlanSoftmacBaseProxyInterface::r#start_passive_scan(self, payload)
2791 }
2792
2793 pub fn r#start_active_scan(
2807 &self,
2808 mut payload: &WlanSoftmacStartActiveScanRequest,
2809 ) -> fidl::client::QueryResponseFut<
2810 WlanSoftmacBaseStartActiveScanResult,
2811 fidl::encoding::DefaultFuchsiaResourceDialect,
2812 > {
2813 WlanSoftmacBaseProxyInterface::r#start_active_scan(self, payload)
2814 }
2815
2816 pub fn r#cancel_scan(
2830 &self,
2831 mut payload: &WlanSoftmacBaseCancelScanRequest,
2832 ) -> fidl::client::QueryResponseFut<
2833 WlanSoftmacBaseCancelScanResult,
2834 fidl::encoding::DefaultFuchsiaResourceDialect,
2835 > {
2836 WlanSoftmacBaseProxyInterface::r#cancel_scan(self, payload)
2837 }
2838
2839 pub fn r#update_wmm_parameters(
2842 &self,
2843 mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
2844 ) -> fidl::client::QueryResponseFut<
2845 WlanSoftmacBaseUpdateWmmParametersResult,
2846 fidl::encoding::DefaultFuchsiaResourceDialect,
2847 > {
2848 WlanSoftmacBaseProxyInterface::r#update_wmm_parameters(self, payload)
2849 }
2850}
2851
2852impl WlanSoftmacBaseProxyInterface for WlanSoftmacBaseProxy {
2853 type QueryResponseFut = fidl::client::QueryResponseFut<
2854 WlanSoftmacBaseQueryResult,
2855 fidl::encoding::DefaultFuchsiaResourceDialect,
2856 >;
2857 fn r#query(&self) -> Self::QueryResponseFut {
2858 fn _decode(
2859 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2860 ) -> Result<WlanSoftmacBaseQueryResult, fidl::Error> {
2861 let _response = fidl::client::decode_transaction_body::<
2862 fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>,
2863 fidl::encoding::DefaultFuchsiaResourceDialect,
2864 0x18231a638e508f9d,
2865 >(_buf?)?;
2866 Ok(_response.map(|x| x))
2867 }
2868 self.client
2869 .send_query_and_decode::<fidl::encoding::EmptyPayload, WlanSoftmacBaseQueryResult>(
2870 (),
2871 0x18231a638e508f9d,
2872 fidl::encoding::DynamicFlags::empty(),
2873 _decode,
2874 )
2875 }
2876
2877 type QueryDiscoverySupportResponseFut = fidl::client::QueryResponseFut<
2878 WlanSoftmacBaseQueryDiscoverySupportResult,
2879 fidl::encoding::DefaultFuchsiaResourceDialect,
2880 >;
2881 fn r#query_discovery_support(&self) -> Self::QueryDiscoverySupportResponseFut {
2882 fn _decode(
2883 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2884 ) -> Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error> {
2885 let _response = fidl::client::decode_transaction_body::<
2886 fidl::encoding::ResultType<WlanSoftmacBaseQueryDiscoverySupportResponse, i32>,
2887 fidl::encoding::DefaultFuchsiaResourceDialect,
2888 0x16797affc0cb58ae,
2889 >(_buf?)?;
2890 Ok(_response.map(|x| x.resp))
2891 }
2892 self.client.send_query_and_decode::<
2893 fidl::encoding::EmptyPayload,
2894 WlanSoftmacBaseQueryDiscoverySupportResult,
2895 >(
2896 (),
2897 0x16797affc0cb58ae,
2898 fidl::encoding::DynamicFlags::empty(),
2899 _decode,
2900 )
2901 }
2902
2903 type QueryMacSublayerSupportResponseFut = fidl::client::QueryResponseFut<
2904 WlanSoftmacBaseQueryMacSublayerSupportResult,
2905 fidl::encoding::DefaultFuchsiaResourceDialect,
2906 >;
2907 fn r#query_mac_sublayer_support(&self) -> Self::QueryMacSublayerSupportResponseFut {
2908 fn _decode(
2909 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2910 ) -> Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error> {
2911 let _response = fidl::client::decode_transaction_body::<
2912 fidl::encoding::ResultType<WlanSoftmacBaseQueryMacSublayerSupportResponse, i32>,
2913 fidl::encoding::DefaultFuchsiaResourceDialect,
2914 0x7302c3f8c131f075,
2915 >(_buf?)?;
2916 Ok(_response.map(|x| x.resp))
2917 }
2918 self.client.send_query_and_decode::<
2919 fidl::encoding::EmptyPayload,
2920 WlanSoftmacBaseQueryMacSublayerSupportResult,
2921 >(
2922 (),
2923 0x7302c3f8c131f075,
2924 fidl::encoding::DynamicFlags::empty(),
2925 _decode,
2926 )
2927 }
2928
2929 type QuerySecuritySupportResponseFut = fidl::client::QueryResponseFut<
2930 WlanSoftmacBaseQuerySecuritySupportResult,
2931 fidl::encoding::DefaultFuchsiaResourceDialect,
2932 >;
2933 fn r#query_security_support(&self) -> Self::QuerySecuritySupportResponseFut {
2934 fn _decode(
2935 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2936 ) -> Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error> {
2937 let _response = fidl::client::decode_transaction_body::<
2938 fidl::encoding::ResultType<WlanSoftmacBaseQuerySecuritySupportResponse, i32>,
2939 fidl::encoding::DefaultFuchsiaResourceDialect,
2940 0x3691bb75abf6354,
2941 >(_buf?)?;
2942 Ok(_response.map(|x| x.resp))
2943 }
2944 self.client.send_query_and_decode::<
2945 fidl::encoding::EmptyPayload,
2946 WlanSoftmacBaseQuerySecuritySupportResult,
2947 >(
2948 (),
2949 0x3691bb75abf6354,
2950 fidl::encoding::DynamicFlags::empty(),
2951 _decode,
2952 )
2953 }
2954
2955 type QuerySpectrumManagementSupportResponseFut = fidl::client::QueryResponseFut<
2956 WlanSoftmacBaseQuerySpectrumManagementSupportResult,
2957 fidl::encoding::DefaultFuchsiaResourceDialect,
2958 >;
2959 fn r#query_spectrum_management_support(
2960 &self,
2961 ) -> Self::QuerySpectrumManagementSupportResponseFut {
2962 fn _decode(
2963 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2964 ) -> Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error> {
2965 let _response = fidl::client::decode_transaction_body::<
2966 fidl::encoding::ResultType<
2967 WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
2968 i32,
2969 >,
2970 fidl::encoding::DefaultFuchsiaResourceDialect,
2971 0x347d78dc1d4d27bf,
2972 >(_buf?)?;
2973 Ok(_response.map(|x| x.resp))
2974 }
2975 self.client.send_query_and_decode::<
2976 fidl::encoding::EmptyPayload,
2977 WlanSoftmacBaseQuerySpectrumManagementSupportResult,
2978 >(
2979 (),
2980 0x347d78dc1d4d27bf,
2981 fidl::encoding::DynamicFlags::empty(),
2982 _decode,
2983 )
2984 }
2985
2986 type SetChannelResponseFut = fidl::client::QueryResponseFut<
2987 WlanSoftmacBaseSetChannelResult,
2988 fidl::encoding::DefaultFuchsiaResourceDialect,
2989 >;
2990 fn r#set_channel(
2991 &self,
2992 mut payload: &WlanSoftmacBaseSetChannelRequest,
2993 ) -> Self::SetChannelResponseFut {
2994 fn _decode(
2995 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2996 ) -> Result<WlanSoftmacBaseSetChannelResult, fidl::Error> {
2997 let _response = fidl::client::decode_transaction_body::<
2998 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2999 fidl::encoding::DefaultFuchsiaResourceDialect,
3000 0x12836b533cd63ece,
3001 >(_buf?)?;
3002 Ok(_response.map(|x| x))
3003 }
3004 self.client.send_query_and_decode::<
3005 WlanSoftmacBaseSetChannelRequest,
3006 WlanSoftmacBaseSetChannelResult,
3007 >(
3008 payload,
3009 0x12836b533cd63ece,
3010 fidl::encoding::DynamicFlags::empty(),
3011 _decode,
3012 )
3013 }
3014
3015 type JoinBssResponseFut = fidl::client::QueryResponseFut<
3016 WlanSoftmacBaseJoinBssResult,
3017 fidl::encoding::DefaultFuchsiaResourceDialect,
3018 >;
3019 fn r#join_bss(
3020 &self,
3021 mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
3022 ) -> Self::JoinBssResponseFut {
3023 fn _decode(
3024 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3025 ) -> Result<WlanSoftmacBaseJoinBssResult, fidl::Error> {
3026 let _response = fidl::client::decode_transaction_body::<
3027 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3028 fidl::encoding::DefaultFuchsiaResourceDialect,
3029 0x1336fb5455b77a6e,
3030 >(_buf?)?;
3031 Ok(_response.map(|x| x))
3032 }
3033 self.client
3034 .send_query_and_decode::<WlanSoftmacBaseJoinBssRequest, WlanSoftmacBaseJoinBssResult>(
3035 (join_request,),
3036 0x1336fb5455b77a6e,
3037 fidl::encoding::DynamicFlags::empty(),
3038 _decode,
3039 )
3040 }
3041
3042 type EnableBeaconingResponseFut = fidl::client::QueryResponseFut<
3043 WlanSoftmacBaseEnableBeaconingResult,
3044 fidl::encoding::DefaultFuchsiaResourceDialect,
3045 >;
3046 fn r#enable_beaconing(
3047 &self,
3048 mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
3049 ) -> Self::EnableBeaconingResponseFut {
3050 fn _decode(
3051 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3052 ) -> Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error> {
3053 let _response = fidl::client::decode_transaction_body::<
3054 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3055 fidl::encoding::DefaultFuchsiaResourceDialect,
3056 0x6c35807632c64576,
3057 >(_buf?)?;
3058 Ok(_response.map(|x| x))
3059 }
3060 self.client.send_query_and_decode::<
3061 WlanSoftmacBaseEnableBeaconingRequest,
3062 WlanSoftmacBaseEnableBeaconingResult,
3063 >(
3064 payload,
3065 0x6c35807632c64576,
3066 fidl::encoding::DynamicFlags::empty(),
3067 _decode,
3068 )
3069 }
3070
3071 type DisableBeaconingResponseFut = fidl::client::QueryResponseFut<
3072 WlanSoftmacBaseDisableBeaconingResult,
3073 fidl::encoding::DefaultFuchsiaResourceDialect,
3074 >;
3075 fn r#disable_beaconing(&self) -> Self::DisableBeaconingResponseFut {
3076 fn _decode(
3077 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3078 ) -> Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error> {
3079 let _response = fidl::client::decode_transaction_body::<
3080 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3081 fidl::encoding::DefaultFuchsiaResourceDialect,
3082 0x3303b30f99dbb406,
3083 >(_buf?)?;
3084 Ok(_response.map(|x| x))
3085 }
3086 self.client.send_query_and_decode::<
3087 fidl::encoding::EmptyPayload,
3088 WlanSoftmacBaseDisableBeaconingResult,
3089 >(
3090 (),
3091 0x3303b30f99dbb406,
3092 fidl::encoding::DynamicFlags::empty(),
3093 _decode,
3094 )
3095 }
3096
3097 type InstallKeyResponseFut = fidl::client::QueryResponseFut<
3098 WlanSoftmacBaseInstallKeyResult,
3099 fidl::encoding::DefaultFuchsiaResourceDialect,
3100 >;
3101 fn r#install_key(&self, mut payload: &WlanKeyConfiguration) -> Self::InstallKeyResponseFut {
3102 fn _decode(
3103 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3104 ) -> Result<WlanSoftmacBaseInstallKeyResult, fidl::Error> {
3105 let _response = fidl::client::decode_transaction_body::<
3106 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3107 fidl::encoding::DefaultFuchsiaResourceDialect,
3108 0x7decf9b4200b9131,
3109 >(_buf?)?;
3110 Ok(_response.map(|x| x))
3111 }
3112 self.client.send_query_and_decode::<WlanKeyConfiguration, WlanSoftmacBaseInstallKeyResult>(
3113 payload,
3114 0x7decf9b4200b9131,
3115 fidl::encoding::DynamicFlags::empty(),
3116 _decode,
3117 )
3118 }
3119
3120 type NotifyAssociationCompleteResponseFut = fidl::client::QueryResponseFut<
3121 WlanSoftmacBaseNotifyAssociationCompleteResult,
3122 fidl::encoding::DefaultFuchsiaResourceDialect,
3123 >;
3124 fn r#notify_association_complete(
3125 &self,
3126 mut assoc_cfg: &WlanAssociationConfig,
3127 ) -> Self::NotifyAssociationCompleteResponseFut {
3128 fn _decode(
3129 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3130 ) -> Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error> {
3131 let _response = fidl::client::decode_transaction_body::<
3132 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3133 fidl::encoding::DefaultFuchsiaResourceDialect,
3134 0x436ffe3ba461d6cd,
3135 >(_buf?)?;
3136 Ok(_response.map(|x| x))
3137 }
3138 self.client.send_query_and_decode::<
3139 WlanSoftmacBaseNotifyAssociationCompleteRequest,
3140 WlanSoftmacBaseNotifyAssociationCompleteResult,
3141 >(
3142 (assoc_cfg,),
3143 0x436ffe3ba461d6cd,
3144 fidl::encoding::DynamicFlags::empty(),
3145 _decode,
3146 )
3147 }
3148
3149 type ClearAssociationResponseFut = fidl::client::QueryResponseFut<
3150 WlanSoftmacBaseClearAssociationResult,
3151 fidl::encoding::DefaultFuchsiaResourceDialect,
3152 >;
3153 fn r#clear_association(
3154 &self,
3155 mut payload: &WlanSoftmacBaseClearAssociationRequest,
3156 ) -> Self::ClearAssociationResponseFut {
3157 fn _decode(
3158 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3159 ) -> Result<WlanSoftmacBaseClearAssociationResult, fidl::Error> {
3160 let _response = fidl::client::decode_transaction_body::<
3161 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3162 fidl::encoding::DefaultFuchsiaResourceDialect,
3163 0x581d76c39190a7dd,
3164 >(_buf?)?;
3165 Ok(_response.map(|x| x))
3166 }
3167 self.client.send_query_and_decode::<
3168 WlanSoftmacBaseClearAssociationRequest,
3169 WlanSoftmacBaseClearAssociationResult,
3170 >(
3171 payload,
3172 0x581d76c39190a7dd,
3173 fidl::encoding::DynamicFlags::empty(),
3174 _decode,
3175 )
3176 }
3177
3178 type StartPassiveScanResponseFut = fidl::client::QueryResponseFut<
3179 WlanSoftmacBaseStartPassiveScanResult,
3180 fidl::encoding::DefaultFuchsiaResourceDialect,
3181 >;
3182 fn r#start_passive_scan(
3183 &self,
3184 mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
3185 ) -> Self::StartPassiveScanResponseFut {
3186 fn _decode(
3187 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3188 ) -> Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error> {
3189 let _response = fidl::client::decode_transaction_body::<
3190 fidl::encoding::ResultType<WlanSoftmacBaseStartPassiveScanResponse, i32>,
3191 fidl::encoding::DefaultFuchsiaResourceDialect,
3192 0x5662f989cb4083bb,
3193 >(_buf?)?;
3194 Ok(_response.map(|x| x))
3195 }
3196 self.client.send_query_and_decode::<
3197 WlanSoftmacBaseStartPassiveScanRequest,
3198 WlanSoftmacBaseStartPassiveScanResult,
3199 >(
3200 payload,
3201 0x5662f989cb4083bb,
3202 fidl::encoding::DynamicFlags::empty(),
3203 _decode,
3204 )
3205 }
3206
3207 type StartActiveScanResponseFut = fidl::client::QueryResponseFut<
3208 WlanSoftmacBaseStartActiveScanResult,
3209 fidl::encoding::DefaultFuchsiaResourceDialect,
3210 >;
3211 fn r#start_active_scan(
3212 &self,
3213 mut payload: &WlanSoftmacStartActiveScanRequest,
3214 ) -> Self::StartActiveScanResponseFut {
3215 fn _decode(
3216 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3217 ) -> Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error> {
3218 let _response = fidl::client::decode_transaction_body::<
3219 fidl::encoding::ResultType<WlanSoftmacBaseStartActiveScanResponse, i32>,
3220 fidl::encoding::DefaultFuchsiaResourceDialect,
3221 0x4896eafa9937751e,
3222 >(_buf?)?;
3223 Ok(_response.map(|x| x))
3224 }
3225 self.client.send_query_and_decode::<
3226 WlanSoftmacStartActiveScanRequest,
3227 WlanSoftmacBaseStartActiveScanResult,
3228 >(
3229 payload,
3230 0x4896eafa9937751e,
3231 fidl::encoding::DynamicFlags::empty(),
3232 _decode,
3233 )
3234 }
3235
3236 type CancelScanResponseFut = fidl::client::QueryResponseFut<
3237 WlanSoftmacBaseCancelScanResult,
3238 fidl::encoding::DefaultFuchsiaResourceDialect,
3239 >;
3240 fn r#cancel_scan(
3241 &self,
3242 mut payload: &WlanSoftmacBaseCancelScanRequest,
3243 ) -> Self::CancelScanResponseFut {
3244 fn _decode(
3245 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3246 ) -> Result<WlanSoftmacBaseCancelScanResult, fidl::Error> {
3247 let _response = fidl::client::decode_transaction_body::<
3248 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3249 fidl::encoding::DefaultFuchsiaResourceDialect,
3250 0xf7d859369764556,
3251 >(_buf?)?;
3252 Ok(_response.map(|x| x))
3253 }
3254 self.client.send_query_and_decode::<
3255 WlanSoftmacBaseCancelScanRequest,
3256 WlanSoftmacBaseCancelScanResult,
3257 >(
3258 payload,
3259 0xf7d859369764556,
3260 fidl::encoding::DynamicFlags::empty(),
3261 _decode,
3262 )
3263 }
3264
3265 type UpdateWmmParametersResponseFut = fidl::client::QueryResponseFut<
3266 WlanSoftmacBaseUpdateWmmParametersResult,
3267 fidl::encoding::DefaultFuchsiaResourceDialect,
3268 >;
3269 fn r#update_wmm_parameters(
3270 &self,
3271 mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
3272 ) -> Self::UpdateWmmParametersResponseFut {
3273 fn _decode(
3274 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3275 ) -> Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error> {
3276 let _response = fidl::client::decode_transaction_body::<
3277 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3278 fidl::encoding::DefaultFuchsiaResourceDialect,
3279 0x68522c7122d5f78c,
3280 >(_buf?)?;
3281 Ok(_response.map(|x| x))
3282 }
3283 self.client.send_query_and_decode::<
3284 WlanSoftmacBaseUpdateWmmParametersRequest,
3285 WlanSoftmacBaseUpdateWmmParametersResult,
3286 >(
3287 payload,
3288 0x68522c7122d5f78c,
3289 fidl::encoding::DynamicFlags::empty(),
3290 _decode,
3291 )
3292 }
3293}
3294
3295pub struct WlanSoftmacBaseEventStream {
3296 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3297}
3298
3299impl std::marker::Unpin for WlanSoftmacBaseEventStream {}
3300
3301impl futures::stream::FusedStream for WlanSoftmacBaseEventStream {
3302 fn is_terminated(&self) -> bool {
3303 self.event_receiver.is_terminated()
3304 }
3305}
3306
3307impl futures::Stream for WlanSoftmacBaseEventStream {
3308 type Item = Result<WlanSoftmacBaseEvent, fidl::Error>;
3309
3310 fn poll_next(
3311 mut self: std::pin::Pin<&mut Self>,
3312 cx: &mut std::task::Context<'_>,
3313 ) -> std::task::Poll<Option<Self::Item>> {
3314 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3315 &mut self.event_receiver,
3316 cx
3317 )?) {
3318 Some(buf) => std::task::Poll::Ready(Some(WlanSoftmacBaseEvent::decode(buf))),
3319 None => std::task::Poll::Ready(None),
3320 }
3321 }
3322}
3323
3324#[derive(Debug)]
3325pub enum WlanSoftmacBaseEvent {}
3326
3327impl WlanSoftmacBaseEvent {
3328 fn decode(
3330 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3331 ) -> Result<WlanSoftmacBaseEvent, fidl::Error> {
3332 let (bytes, _handles) = buf.split_mut();
3333 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3334 debug_assert_eq!(tx_header.tx_id, 0);
3335 match tx_header.ordinal {
3336 _ => Err(fidl::Error::UnknownOrdinal {
3337 ordinal: tx_header.ordinal,
3338 protocol_name:
3339 <WlanSoftmacBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3340 }),
3341 }
3342 }
3343}
3344
3345pub struct WlanSoftmacBaseRequestStream {
3347 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3348 is_terminated: bool,
3349}
3350
3351impl std::marker::Unpin for WlanSoftmacBaseRequestStream {}
3352
3353impl futures::stream::FusedStream for WlanSoftmacBaseRequestStream {
3354 fn is_terminated(&self) -> bool {
3355 self.is_terminated
3356 }
3357}
3358
3359impl fidl::endpoints::RequestStream for WlanSoftmacBaseRequestStream {
3360 type Protocol = WlanSoftmacBaseMarker;
3361 type ControlHandle = WlanSoftmacBaseControlHandle;
3362
3363 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3364 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3365 }
3366
3367 fn control_handle(&self) -> Self::ControlHandle {
3368 WlanSoftmacBaseControlHandle { inner: self.inner.clone() }
3369 }
3370
3371 fn into_inner(
3372 self,
3373 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3374 {
3375 (self.inner, self.is_terminated)
3376 }
3377
3378 fn from_inner(
3379 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3380 is_terminated: bool,
3381 ) -> Self {
3382 Self { inner, is_terminated }
3383 }
3384}
3385
3386impl futures::Stream for WlanSoftmacBaseRequestStream {
3387 type Item = Result<WlanSoftmacBaseRequest, fidl::Error>;
3388
3389 fn poll_next(
3390 mut self: std::pin::Pin<&mut Self>,
3391 cx: &mut std::task::Context<'_>,
3392 ) -> std::task::Poll<Option<Self::Item>> {
3393 let this = &mut *self;
3394 if this.inner.check_shutdown(cx) {
3395 this.is_terminated = true;
3396 return std::task::Poll::Ready(None);
3397 }
3398 if this.is_terminated {
3399 panic!("polled WlanSoftmacBaseRequestStream after completion");
3400 }
3401 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3402 |bytes, handles| {
3403 match this.inner.channel().read_etc(cx, bytes, handles) {
3404 std::task::Poll::Ready(Ok(())) => {}
3405 std::task::Poll::Pending => return std::task::Poll::Pending,
3406 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3407 this.is_terminated = true;
3408 return std::task::Poll::Ready(None);
3409 }
3410 std::task::Poll::Ready(Err(e)) => {
3411 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3412 e.into(),
3413 ))))
3414 }
3415 }
3416
3417 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3419
3420 std::task::Poll::Ready(Some(match header.ordinal {
3421 0x18231a638e508f9d => {
3422 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3423 let mut req = fidl::new_empty!(
3424 fidl::encoding::EmptyPayload,
3425 fidl::encoding::DefaultFuchsiaResourceDialect
3426 );
3427 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3428 let control_handle =
3429 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3430 Ok(WlanSoftmacBaseRequest::Query {
3431 responder: WlanSoftmacBaseQueryResponder {
3432 control_handle: std::mem::ManuallyDrop::new(control_handle),
3433 tx_id: header.tx_id,
3434 },
3435 })
3436 }
3437 0x16797affc0cb58ae => {
3438 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3439 let mut req = fidl::new_empty!(
3440 fidl::encoding::EmptyPayload,
3441 fidl::encoding::DefaultFuchsiaResourceDialect
3442 );
3443 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3444 let control_handle =
3445 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3446 Ok(WlanSoftmacBaseRequest::QueryDiscoverySupport {
3447 responder: WlanSoftmacBaseQueryDiscoverySupportResponder {
3448 control_handle: std::mem::ManuallyDrop::new(control_handle),
3449 tx_id: header.tx_id,
3450 },
3451 })
3452 }
3453 0x7302c3f8c131f075 => {
3454 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3455 let mut req = fidl::new_empty!(
3456 fidl::encoding::EmptyPayload,
3457 fidl::encoding::DefaultFuchsiaResourceDialect
3458 );
3459 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3460 let control_handle =
3461 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3462 Ok(WlanSoftmacBaseRequest::QueryMacSublayerSupport {
3463 responder: WlanSoftmacBaseQueryMacSublayerSupportResponder {
3464 control_handle: std::mem::ManuallyDrop::new(control_handle),
3465 tx_id: header.tx_id,
3466 },
3467 })
3468 }
3469 0x3691bb75abf6354 => {
3470 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3471 let mut req = fidl::new_empty!(
3472 fidl::encoding::EmptyPayload,
3473 fidl::encoding::DefaultFuchsiaResourceDialect
3474 );
3475 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3476 let control_handle =
3477 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3478 Ok(WlanSoftmacBaseRequest::QuerySecuritySupport {
3479 responder: WlanSoftmacBaseQuerySecuritySupportResponder {
3480 control_handle: std::mem::ManuallyDrop::new(control_handle),
3481 tx_id: header.tx_id,
3482 },
3483 })
3484 }
3485 0x347d78dc1d4d27bf => {
3486 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3487 let mut req = fidl::new_empty!(
3488 fidl::encoding::EmptyPayload,
3489 fidl::encoding::DefaultFuchsiaResourceDialect
3490 );
3491 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3492 let control_handle =
3493 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3494 Ok(WlanSoftmacBaseRequest::QuerySpectrumManagementSupport {
3495 responder: WlanSoftmacBaseQuerySpectrumManagementSupportResponder {
3496 control_handle: std::mem::ManuallyDrop::new(control_handle),
3497 tx_id: header.tx_id,
3498 },
3499 })
3500 }
3501 0x12836b533cd63ece => {
3502 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3503 let mut req = fidl::new_empty!(
3504 WlanSoftmacBaseSetChannelRequest,
3505 fidl::encoding::DefaultFuchsiaResourceDialect
3506 );
3507 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseSetChannelRequest>(&header, _body_bytes, handles, &mut req)?;
3508 let control_handle =
3509 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3510 Ok(WlanSoftmacBaseRequest::SetChannel {
3511 payload: req,
3512 responder: WlanSoftmacBaseSetChannelResponder {
3513 control_handle: std::mem::ManuallyDrop::new(control_handle),
3514 tx_id: header.tx_id,
3515 },
3516 })
3517 }
3518 0x1336fb5455b77a6e => {
3519 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3520 let mut req = fidl::new_empty!(
3521 WlanSoftmacBaseJoinBssRequest,
3522 fidl::encoding::DefaultFuchsiaResourceDialect
3523 );
3524 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseJoinBssRequest>(&header, _body_bytes, handles, &mut req)?;
3525 let control_handle =
3526 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3527 Ok(WlanSoftmacBaseRequest::JoinBss {
3528 join_request: req.join_request,
3529
3530 responder: WlanSoftmacBaseJoinBssResponder {
3531 control_handle: std::mem::ManuallyDrop::new(control_handle),
3532 tx_id: header.tx_id,
3533 },
3534 })
3535 }
3536 0x6c35807632c64576 => {
3537 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3538 let mut req = fidl::new_empty!(
3539 WlanSoftmacBaseEnableBeaconingRequest,
3540 fidl::encoding::DefaultFuchsiaResourceDialect
3541 );
3542 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseEnableBeaconingRequest>(&header, _body_bytes, handles, &mut req)?;
3543 let control_handle =
3544 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3545 Ok(WlanSoftmacBaseRequest::EnableBeaconing {
3546 payload: req,
3547 responder: WlanSoftmacBaseEnableBeaconingResponder {
3548 control_handle: std::mem::ManuallyDrop::new(control_handle),
3549 tx_id: header.tx_id,
3550 },
3551 })
3552 }
3553 0x3303b30f99dbb406 => {
3554 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3555 let mut req = fidl::new_empty!(
3556 fidl::encoding::EmptyPayload,
3557 fidl::encoding::DefaultFuchsiaResourceDialect
3558 );
3559 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3560 let control_handle =
3561 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3562 Ok(WlanSoftmacBaseRequest::DisableBeaconing {
3563 responder: WlanSoftmacBaseDisableBeaconingResponder {
3564 control_handle: std::mem::ManuallyDrop::new(control_handle),
3565 tx_id: header.tx_id,
3566 },
3567 })
3568 }
3569 0x7decf9b4200b9131 => {
3570 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3571 let mut req = fidl::new_empty!(
3572 WlanKeyConfiguration,
3573 fidl::encoding::DefaultFuchsiaResourceDialect
3574 );
3575 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanKeyConfiguration>(&header, _body_bytes, handles, &mut req)?;
3576 let control_handle =
3577 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3578 Ok(WlanSoftmacBaseRequest::InstallKey {
3579 payload: req,
3580 responder: WlanSoftmacBaseInstallKeyResponder {
3581 control_handle: std::mem::ManuallyDrop::new(control_handle),
3582 tx_id: header.tx_id,
3583 },
3584 })
3585 }
3586 0x436ffe3ba461d6cd => {
3587 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3588 let mut req = fidl::new_empty!(
3589 WlanSoftmacBaseNotifyAssociationCompleteRequest,
3590 fidl::encoding::DefaultFuchsiaResourceDialect
3591 );
3592 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseNotifyAssociationCompleteRequest>(&header, _body_bytes, handles, &mut req)?;
3593 let control_handle =
3594 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3595 Ok(WlanSoftmacBaseRequest::NotifyAssociationComplete {
3596 assoc_cfg: req.assoc_cfg,
3597
3598 responder: WlanSoftmacBaseNotifyAssociationCompleteResponder {
3599 control_handle: std::mem::ManuallyDrop::new(control_handle),
3600 tx_id: header.tx_id,
3601 },
3602 })
3603 }
3604 0x581d76c39190a7dd => {
3605 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3606 let mut req = fidl::new_empty!(
3607 WlanSoftmacBaseClearAssociationRequest,
3608 fidl::encoding::DefaultFuchsiaResourceDialect
3609 );
3610 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseClearAssociationRequest>(&header, _body_bytes, handles, &mut req)?;
3611 let control_handle =
3612 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3613 Ok(WlanSoftmacBaseRequest::ClearAssociation {
3614 payload: req,
3615 responder: WlanSoftmacBaseClearAssociationResponder {
3616 control_handle: std::mem::ManuallyDrop::new(control_handle),
3617 tx_id: header.tx_id,
3618 },
3619 })
3620 }
3621 0x5662f989cb4083bb => {
3622 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3623 let mut req = fidl::new_empty!(
3624 WlanSoftmacBaseStartPassiveScanRequest,
3625 fidl::encoding::DefaultFuchsiaResourceDialect
3626 );
3627 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseStartPassiveScanRequest>(&header, _body_bytes, handles, &mut req)?;
3628 let control_handle =
3629 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3630 Ok(WlanSoftmacBaseRequest::StartPassiveScan {
3631 payload: req,
3632 responder: WlanSoftmacBaseStartPassiveScanResponder {
3633 control_handle: std::mem::ManuallyDrop::new(control_handle),
3634 tx_id: header.tx_id,
3635 },
3636 })
3637 }
3638 0x4896eafa9937751e => {
3639 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3640 let mut req = fidl::new_empty!(
3641 WlanSoftmacStartActiveScanRequest,
3642 fidl::encoding::DefaultFuchsiaResourceDialect
3643 );
3644 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacStartActiveScanRequest>(&header, _body_bytes, handles, &mut req)?;
3645 let control_handle =
3646 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3647 Ok(WlanSoftmacBaseRequest::StartActiveScan {
3648 payload: req,
3649 responder: WlanSoftmacBaseStartActiveScanResponder {
3650 control_handle: std::mem::ManuallyDrop::new(control_handle),
3651 tx_id: header.tx_id,
3652 },
3653 })
3654 }
3655 0xf7d859369764556 => {
3656 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3657 let mut req = fidl::new_empty!(
3658 WlanSoftmacBaseCancelScanRequest,
3659 fidl::encoding::DefaultFuchsiaResourceDialect
3660 );
3661 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseCancelScanRequest>(&header, _body_bytes, handles, &mut req)?;
3662 let control_handle =
3663 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3664 Ok(WlanSoftmacBaseRequest::CancelScan {
3665 payload: req,
3666 responder: WlanSoftmacBaseCancelScanResponder {
3667 control_handle: std::mem::ManuallyDrop::new(control_handle),
3668 tx_id: header.tx_id,
3669 },
3670 })
3671 }
3672 0x68522c7122d5f78c => {
3673 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3674 let mut req = fidl::new_empty!(
3675 WlanSoftmacBaseUpdateWmmParametersRequest,
3676 fidl::encoding::DefaultFuchsiaResourceDialect
3677 );
3678 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseUpdateWmmParametersRequest>(&header, _body_bytes, handles, &mut req)?;
3679 let control_handle =
3680 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3681 Ok(WlanSoftmacBaseRequest::UpdateWmmParameters {
3682 payload: req,
3683 responder: WlanSoftmacBaseUpdateWmmParametersResponder {
3684 control_handle: std::mem::ManuallyDrop::new(control_handle),
3685 tx_id: header.tx_id,
3686 },
3687 })
3688 }
3689 _ => Err(fidl::Error::UnknownOrdinal {
3690 ordinal: header.ordinal,
3691 protocol_name:
3692 <WlanSoftmacBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3693 }),
3694 }))
3695 },
3696 )
3697 }
3698}
3699
3700#[derive(Debug)]
3709pub enum WlanSoftmacBaseRequest {
3710 Query { responder: WlanSoftmacBaseQueryResponder },
3718 QueryDiscoverySupport { responder: WlanSoftmacBaseQueryDiscoverySupportResponder },
3722 QueryMacSublayerSupport { responder: WlanSoftmacBaseQueryMacSublayerSupportResponder },
3730 QuerySecuritySupport { responder: WlanSoftmacBaseQuerySecuritySupportResponder },
3733 QuerySpectrumManagementSupport {
3737 responder: WlanSoftmacBaseQuerySpectrumManagementSupportResponder,
3738 },
3739 SetChannel {
3747 payload: WlanSoftmacBaseSetChannelRequest,
3748 responder: WlanSoftmacBaseSetChannelResponder,
3749 },
3750 JoinBss {
3760 join_request: fidl_fuchsia_wlan_common::JoinBssRequest,
3761 responder: WlanSoftmacBaseJoinBssResponder,
3762 },
3763 EnableBeaconing {
3778 payload: WlanSoftmacBaseEnableBeaconingRequest,
3779 responder: WlanSoftmacBaseEnableBeaconingResponder,
3780 },
3781 DisableBeaconing { responder: WlanSoftmacBaseDisableBeaconingResponder },
3783 InstallKey { payload: WlanKeyConfiguration, responder: WlanSoftmacBaseInstallKeyResponder },
3790 NotifyAssociationComplete {
3800 assoc_cfg: WlanAssociationConfig,
3801 responder: WlanSoftmacBaseNotifyAssociationCompleteResponder,
3802 },
3803 ClearAssociation {
3805 payload: WlanSoftmacBaseClearAssociationRequest,
3806 responder: WlanSoftmacBaseClearAssociationResponder,
3807 },
3808 StartPassiveScan {
3822 payload: WlanSoftmacBaseStartPassiveScanRequest,
3823 responder: WlanSoftmacBaseStartPassiveScanResponder,
3824 },
3825 StartActiveScan {
3839 payload: WlanSoftmacStartActiveScanRequest,
3840 responder: WlanSoftmacBaseStartActiveScanResponder,
3841 },
3842 CancelScan {
3856 payload: WlanSoftmacBaseCancelScanRequest,
3857 responder: WlanSoftmacBaseCancelScanResponder,
3858 },
3859 UpdateWmmParameters {
3862 payload: WlanSoftmacBaseUpdateWmmParametersRequest,
3863 responder: WlanSoftmacBaseUpdateWmmParametersResponder,
3864 },
3865}
3866
3867impl WlanSoftmacBaseRequest {
3868 #[allow(irrefutable_let_patterns)]
3869 pub fn into_query(self) -> Option<(WlanSoftmacBaseQueryResponder)> {
3870 if let WlanSoftmacBaseRequest::Query { responder } = self {
3871 Some((responder))
3872 } else {
3873 None
3874 }
3875 }
3876
3877 #[allow(irrefutable_let_patterns)]
3878 pub fn into_query_discovery_support(
3879 self,
3880 ) -> Option<(WlanSoftmacBaseQueryDiscoverySupportResponder)> {
3881 if let WlanSoftmacBaseRequest::QueryDiscoverySupport { responder } = self {
3882 Some((responder))
3883 } else {
3884 None
3885 }
3886 }
3887
3888 #[allow(irrefutable_let_patterns)]
3889 pub fn into_query_mac_sublayer_support(
3890 self,
3891 ) -> Option<(WlanSoftmacBaseQueryMacSublayerSupportResponder)> {
3892 if let WlanSoftmacBaseRequest::QueryMacSublayerSupport { responder } = self {
3893 Some((responder))
3894 } else {
3895 None
3896 }
3897 }
3898
3899 #[allow(irrefutable_let_patterns)]
3900 pub fn into_query_security_support(
3901 self,
3902 ) -> Option<(WlanSoftmacBaseQuerySecuritySupportResponder)> {
3903 if let WlanSoftmacBaseRequest::QuerySecuritySupport { responder } = self {
3904 Some((responder))
3905 } else {
3906 None
3907 }
3908 }
3909
3910 #[allow(irrefutable_let_patterns)]
3911 pub fn into_query_spectrum_management_support(
3912 self,
3913 ) -> Option<(WlanSoftmacBaseQuerySpectrumManagementSupportResponder)> {
3914 if let WlanSoftmacBaseRequest::QuerySpectrumManagementSupport { responder } = self {
3915 Some((responder))
3916 } else {
3917 None
3918 }
3919 }
3920
3921 #[allow(irrefutable_let_patterns)]
3922 pub fn into_set_channel(
3923 self,
3924 ) -> Option<(WlanSoftmacBaseSetChannelRequest, WlanSoftmacBaseSetChannelResponder)> {
3925 if let WlanSoftmacBaseRequest::SetChannel { payload, responder } = self {
3926 Some((payload, responder))
3927 } else {
3928 None
3929 }
3930 }
3931
3932 #[allow(irrefutable_let_patterns)]
3933 pub fn into_join_bss(
3934 self,
3935 ) -> Option<(fidl_fuchsia_wlan_common::JoinBssRequest, WlanSoftmacBaseJoinBssResponder)> {
3936 if let WlanSoftmacBaseRequest::JoinBss { join_request, responder } = self {
3937 Some((join_request, responder))
3938 } else {
3939 None
3940 }
3941 }
3942
3943 #[allow(irrefutable_let_patterns)]
3944 pub fn into_enable_beaconing(
3945 self,
3946 ) -> Option<(WlanSoftmacBaseEnableBeaconingRequest, WlanSoftmacBaseEnableBeaconingResponder)>
3947 {
3948 if let WlanSoftmacBaseRequest::EnableBeaconing { payload, responder } = self {
3949 Some((payload, responder))
3950 } else {
3951 None
3952 }
3953 }
3954
3955 #[allow(irrefutable_let_patterns)]
3956 pub fn into_disable_beaconing(self) -> Option<(WlanSoftmacBaseDisableBeaconingResponder)> {
3957 if let WlanSoftmacBaseRequest::DisableBeaconing { responder } = self {
3958 Some((responder))
3959 } else {
3960 None
3961 }
3962 }
3963
3964 #[allow(irrefutable_let_patterns)]
3965 pub fn into_install_key(
3966 self,
3967 ) -> Option<(WlanKeyConfiguration, WlanSoftmacBaseInstallKeyResponder)> {
3968 if let WlanSoftmacBaseRequest::InstallKey { payload, responder } = self {
3969 Some((payload, responder))
3970 } else {
3971 None
3972 }
3973 }
3974
3975 #[allow(irrefutable_let_patterns)]
3976 pub fn into_notify_association_complete(
3977 self,
3978 ) -> Option<(WlanAssociationConfig, WlanSoftmacBaseNotifyAssociationCompleteResponder)> {
3979 if let WlanSoftmacBaseRequest::NotifyAssociationComplete { assoc_cfg, responder } = self {
3980 Some((assoc_cfg, responder))
3981 } else {
3982 None
3983 }
3984 }
3985
3986 #[allow(irrefutable_let_patterns)]
3987 pub fn into_clear_association(
3988 self,
3989 ) -> Option<(WlanSoftmacBaseClearAssociationRequest, WlanSoftmacBaseClearAssociationResponder)>
3990 {
3991 if let WlanSoftmacBaseRequest::ClearAssociation { payload, responder } = self {
3992 Some((payload, responder))
3993 } else {
3994 None
3995 }
3996 }
3997
3998 #[allow(irrefutable_let_patterns)]
3999 pub fn into_start_passive_scan(
4000 self,
4001 ) -> Option<(WlanSoftmacBaseStartPassiveScanRequest, WlanSoftmacBaseStartPassiveScanResponder)>
4002 {
4003 if let WlanSoftmacBaseRequest::StartPassiveScan { payload, responder } = self {
4004 Some((payload, responder))
4005 } else {
4006 None
4007 }
4008 }
4009
4010 #[allow(irrefutable_let_patterns)]
4011 pub fn into_start_active_scan(
4012 self,
4013 ) -> Option<(WlanSoftmacStartActiveScanRequest, WlanSoftmacBaseStartActiveScanResponder)> {
4014 if let WlanSoftmacBaseRequest::StartActiveScan { payload, responder } = self {
4015 Some((payload, responder))
4016 } else {
4017 None
4018 }
4019 }
4020
4021 #[allow(irrefutable_let_patterns)]
4022 pub fn into_cancel_scan(
4023 self,
4024 ) -> Option<(WlanSoftmacBaseCancelScanRequest, WlanSoftmacBaseCancelScanResponder)> {
4025 if let WlanSoftmacBaseRequest::CancelScan { payload, responder } = self {
4026 Some((payload, responder))
4027 } else {
4028 None
4029 }
4030 }
4031
4032 #[allow(irrefutable_let_patterns)]
4033 pub fn into_update_wmm_parameters(
4034 self,
4035 ) -> Option<(
4036 WlanSoftmacBaseUpdateWmmParametersRequest,
4037 WlanSoftmacBaseUpdateWmmParametersResponder,
4038 )> {
4039 if let WlanSoftmacBaseRequest::UpdateWmmParameters { payload, responder } = self {
4040 Some((payload, responder))
4041 } else {
4042 None
4043 }
4044 }
4045
4046 pub fn method_name(&self) -> &'static str {
4048 match *self {
4049 WlanSoftmacBaseRequest::Query { .. } => "query",
4050 WlanSoftmacBaseRequest::QueryDiscoverySupport { .. } => "query_discovery_support",
4051 WlanSoftmacBaseRequest::QueryMacSublayerSupport { .. } => "query_mac_sublayer_support",
4052 WlanSoftmacBaseRequest::QuerySecuritySupport { .. } => "query_security_support",
4053 WlanSoftmacBaseRequest::QuerySpectrumManagementSupport { .. } => {
4054 "query_spectrum_management_support"
4055 }
4056 WlanSoftmacBaseRequest::SetChannel { .. } => "set_channel",
4057 WlanSoftmacBaseRequest::JoinBss { .. } => "join_bss",
4058 WlanSoftmacBaseRequest::EnableBeaconing { .. } => "enable_beaconing",
4059 WlanSoftmacBaseRequest::DisableBeaconing { .. } => "disable_beaconing",
4060 WlanSoftmacBaseRequest::InstallKey { .. } => "install_key",
4061 WlanSoftmacBaseRequest::NotifyAssociationComplete { .. } => {
4062 "notify_association_complete"
4063 }
4064 WlanSoftmacBaseRequest::ClearAssociation { .. } => "clear_association",
4065 WlanSoftmacBaseRequest::StartPassiveScan { .. } => "start_passive_scan",
4066 WlanSoftmacBaseRequest::StartActiveScan { .. } => "start_active_scan",
4067 WlanSoftmacBaseRequest::CancelScan { .. } => "cancel_scan",
4068 WlanSoftmacBaseRequest::UpdateWmmParameters { .. } => "update_wmm_parameters",
4069 }
4070 }
4071}
4072
4073#[derive(Debug, Clone)]
4074pub struct WlanSoftmacBaseControlHandle {
4075 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4076}
4077
4078impl fidl::endpoints::ControlHandle for WlanSoftmacBaseControlHandle {
4079 fn shutdown(&self) {
4080 self.inner.shutdown()
4081 }
4082 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4083 self.inner.shutdown_with_epitaph(status)
4084 }
4085
4086 fn is_closed(&self) -> bool {
4087 self.inner.channel().is_closed()
4088 }
4089 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4090 self.inner.channel().on_closed()
4091 }
4092
4093 #[cfg(target_os = "fuchsia")]
4094 fn signal_peer(
4095 &self,
4096 clear_mask: zx::Signals,
4097 set_mask: zx::Signals,
4098 ) -> Result<(), zx_status::Status> {
4099 use fidl::Peered;
4100 self.inner.channel().signal_peer(clear_mask, set_mask)
4101 }
4102}
4103
4104impl WlanSoftmacBaseControlHandle {}
4105
4106#[must_use = "FIDL methods require a response to be sent"]
4107#[derive(Debug)]
4108pub struct WlanSoftmacBaseQueryResponder {
4109 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4110 tx_id: u32,
4111}
4112
4113impl std::ops::Drop for WlanSoftmacBaseQueryResponder {
4117 fn drop(&mut self) {
4118 self.control_handle.shutdown();
4119 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4121 }
4122}
4123
4124impl fidl::endpoints::Responder for WlanSoftmacBaseQueryResponder {
4125 type ControlHandle = WlanSoftmacBaseControlHandle;
4126
4127 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4128 &self.control_handle
4129 }
4130
4131 fn drop_without_shutdown(mut self) {
4132 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4134 std::mem::forget(self);
4136 }
4137}
4138
4139impl WlanSoftmacBaseQueryResponder {
4140 pub fn send(
4144 self,
4145 mut result: Result<&WlanSoftmacQueryResponse, i32>,
4146 ) -> Result<(), fidl::Error> {
4147 let _result = self.send_raw(result);
4148 if _result.is_err() {
4149 self.control_handle.shutdown();
4150 }
4151 self.drop_without_shutdown();
4152 _result
4153 }
4154
4155 pub fn send_no_shutdown_on_err(
4157 self,
4158 mut result: Result<&WlanSoftmacQueryResponse, i32>,
4159 ) -> Result<(), fidl::Error> {
4160 let _result = self.send_raw(result);
4161 self.drop_without_shutdown();
4162 _result
4163 }
4164
4165 fn send_raw(
4166 &self,
4167 mut result: Result<&WlanSoftmacQueryResponse, i32>,
4168 ) -> Result<(), fidl::Error> {
4169 self.control_handle.inner.send::<fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>>(
4170 result,
4171 self.tx_id,
4172 0x18231a638e508f9d,
4173 fidl::encoding::DynamicFlags::empty(),
4174 )
4175 }
4176}
4177
4178#[must_use = "FIDL methods require a response to be sent"]
4179#[derive(Debug)]
4180pub struct WlanSoftmacBaseQueryDiscoverySupportResponder {
4181 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4182 tx_id: u32,
4183}
4184
4185impl std::ops::Drop for WlanSoftmacBaseQueryDiscoverySupportResponder {
4189 fn drop(&mut self) {
4190 self.control_handle.shutdown();
4191 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4193 }
4194}
4195
4196impl fidl::endpoints::Responder for WlanSoftmacBaseQueryDiscoverySupportResponder {
4197 type ControlHandle = WlanSoftmacBaseControlHandle;
4198
4199 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4200 &self.control_handle
4201 }
4202
4203 fn drop_without_shutdown(mut self) {
4204 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4206 std::mem::forget(self);
4208 }
4209}
4210
4211impl WlanSoftmacBaseQueryDiscoverySupportResponder {
4212 pub fn send(
4216 self,
4217 mut result: Result<&fidl_fuchsia_wlan_common::DiscoverySupport, i32>,
4218 ) -> Result<(), fidl::Error> {
4219 let _result = self.send_raw(result);
4220 if _result.is_err() {
4221 self.control_handle.shutdown();
4222 }
4223 self.drop_without_shutdown();
4224 _result
4225 }
4226
4227 pub fn send_no_shutdown_on_err(
4229 self,
4230 mut result: Result<&fidl_fuchsia_wlan_common::DiscoverySupport, i32>,
4231 ) -> Result<(), fidl::Error> {
4232 let _result = self.send_raw(result);
4233 self.drop_without_shutdown();
4234 _result
4235 }
4236
4237 fn send_raw(
4238 &self,
4239 mut result: Result<&fidl_fuchsia_wlan_common::DiscoverySupport, i32>,
4240 ) -> Result<(), fidl::Error> {
4241 self.control_handle.inner.send::<fidl::encoding::ResultType<
4242 WlanSoftmacBaseQueryDiscoverySupportResponse,
4243 i32,
4244 >>(
4245 result.map(|resp| (resp,)),
4246 self.tx_id,
4247 0x16797affc0cb58ae,
4248 fidl::encoding::DynamicFlags::empty(),
4249 )
4250 }
4251}
4252
4253#[must_use = "FIDL methods require a response to be sent"]
4254#[derive(Debug)]
4255pub struct WlanSoftmacBaseQueryMacSublayerSupportResponder {
4256 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4257 tx_id: u32,
4258}
4259
4260impl std::ops::Drop for WlanSoftmacBaseQueryMacSublayerSupportResponder {
4264 fn drop(&mut self) {
4265 self.control_handle.shutdown();
4266 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4268 }
4269}
4270
4271impl fidl::endpoints::Responder for WlanSoftmacBaseQueryMacSublayerSupportResponder {
4272 type ControlHandle = WlanSoftmacBaseControlHandle;
4273
4274 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4275 &self.control_handle
4276 }
4277
4278 fn drop_without_shutdown(mut self) {
4279 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4281 std::mem::forget(self);
4283 }
4284}
4285
4286impl WlanSoftmacBaseQueryMacSublayerSupportResponder {
4287 pub fn send(
4291 self,
4292 mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
4293 ) -> Result<(), fidl::Error> {
4294 let _result = self.send_raw(result);
4295 if _result.is_err() {
4296 self.control_handle.shutdown();
4297 }
4298 self.drop_without_shutdown();
4299 _result
4300 }
4301
4302 pub fn send_no_shutdown_on_err(
4304 self,
4305 mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
4306 ) -> Result<(), fidl::Error> {
4307 let _result = self.send_raw(result);
4308 self.drop_without_shutdown();
4309 _result
4310 }
4311
4312 fn send_raw(
4313 &self,
4314 mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
4315 ) -> Result<(), fidl::Error> {
4316 self.control_handle.inner.send::<fidl::encoding::ResultType<
4317 WlanSoftmacBaseQueryMacSublayerSupportResponse,
4318 i32,
4319 >>(
4320 result.map(|resp| (resp,)),
4321 self.tx_id,
4322 0x7302c3f8c131f075,
4323 fidl::encoding::DynamicFlags::empty(),
4324 )
4325 }
4326}
4327
4328#[must_use = "FIDL methods require a response to be sent"]
4329#[derive(Debug)]
4330pub struct WlanSoftmacBaseQuerySecuritySupportResponder {
4331 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4332 tx_id: u32,
4333}
4334
4335impl std::ops::Drop for WlanSoftmacBaseQuerySecuritySupportResponder {
4339 fn drop(&mut self) {
4340 self.control_handle.shutdown();
4341 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4343 }
4344}
4345
4346impl fidl::endpoints::Responder for WlanSoftmacBaseQuerySecuritySupportResponder {
4347 type ControlHandle = WlanSoftmacBaseControlHandle;
4348
4349 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4350 &self.control_handle
4351 }
4352
4353 fn drop_without_shutdown(mut self) {
4354 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4356 std::mem::forget(self);
4358 }
4359}
4360
4361impl WlanSoftmacBaseQuerySecuritySupportResponder {
4362 pub fn send(
4366 self,
4367 mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
4368 ) -> Result<(), fidl::Error> {
4369 let _result = self.send_raw(result);
4370 if _result.is_err() {
4371 self.control_handle.shutdown();
4372 }
4373 self.drop_without_shutdown();
4374 _result
4375 }
4376
4377 pub fn send_no_shutdown_on_err(
4379 self,
4380 mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
4381 ) -> Result<(), fidl::Error> {
4382 let _result = self.send_raw(result);
4383 self.drop_without_shutdown();
4384 _result
4385 }
4386
4387 fn send_raw(
4388 &self,
4389 mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
4390 ) -> Result<(), fidl::Error> {
4391 self.control_handle.inner.send::<fidl::encoding::ResultType<
4392 WlanSoftmacBaseQuerySecuritySupportResponse,
4393 i32,
4394 >>(
4395 result.map(|resp| (resp,)),
4396 self.tx_id,
4397 0x3691bb75abf6354,
4398 fidl::encoding::DynamicFlags::empty(),
4399 )
4400 }
4401}
4402
4403#[must_use = "FIDL methods require a response to be sent"]
4404#[derive(Debug)]
4405pub struct WlanSoftmacBaseQuerySpectrumManagementSupportResponder {
4406 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4407 tx_id: u32,
4408}
4409
4410impl std::ops::Drop for WlanSoftmacBaseQuerySpectrumManagementSupportResponder {
4414 fn drop(&mut self) {
4415 self.control_handle.shutdown();
4416 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4418 }
4419}
4420
4421impl fidl::endpoints::Responder for WlanSoftmacBaseQuerySpectrumManagementSupportResponder {
4422 type ControlHandle = WlanSoftmacBaseControlHandle;
4423
4424 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4425 &self.control_handle
4426 }
4427
4428 fn drop_without_shutdown(mut self) {
4429 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4431 std::mem::forget(self);
4433 }
4434}
4435
4436impl WlanSoftmacBaseQuerySpectrumManagementSupportResponder {
4437 pub fn send(
4441 self,
4442 mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
4443 ) -> Result<(), fidl::Error> {
4444 let _result = self.send_raw(result);
4445 if _result.is_err() {
4446 self.control_handle.shutdown();
4447 }
4448 self.drop_without_shutdown();
4449 _result
4450 }
4451
4452 pub fn send_no_shutdown_on_err(
4454 self,
4455 mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
4456 ) -> Result<(), fidl::Error> {
4457 let _result = self.send_raw(result);
4458 self.drop_without_shutdown();
4459 _result
4460 }
4461
4462 fn send_raw(
4463 &self,
4464 mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
4465 ) -> Result<(), fidl::Error> {
4466 self.control_handle.inner.send::<fidl::encoding::ResultType<
4467 WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
4468 i32,
4469 >>(
4470 result.map(|resp| (resp,)),
4471 self.tx_id,
4472 0x347d78dc1d4d27bf,
4473 fidl::encoding::DynamicFlags::empty(),
4474 )
4475 }
4476}
4477
4478#[must_use = "FIDL methods require a response to be sent"]
4479#[derive(Debug)]
4480pub struct WlanSoftmacBaseSetChannelResponder {
4481 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4482 tx_id: u32,
4483}
4484
4485impl std::ops::Drop for WlanSoftmacBaseSetChannelResponder {
4489 fn drop(&mut self) {
4490 self.control_handle.shutdown();
4491 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4493 }
4494}
4495
4496impl fidl::endpoints::Responder for WlanSoftmacBaseSetChannelResponder {
4497 type ControlHandle = WlanSoftmacBaseControlHandle;
4498
4499 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4500 &self.control_handle
4501 }
4502
4503 fn drop_without_shutdown(mut self) {
4504 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4506 std::mem::forget(self);
4508 }
4509}
4510
4511impl WlanSoftmacBaseSetChannelResponder {
4512 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4516 let _result = self.send_raw(result);
4517 if _result.is_err() {
4518 self.control_handle.shutdown();
4519 }
4520 self.drop_without_shutdown();
4521 _result
4522 }
4523
4524 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4526 let _result = self.send_raw(result);
4527 self.drop_without_shutdown();
4528 _result
4529 }
4530
4531 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4532 self.control_handle
4533 .inner
4534 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4535 result,
4536 self.tx_id,
4537 0x12836b533cd63ece,
4538 fidl::encoding::DynamicFlags::empty(),
4539 )
4540 }
4541}
4542
4543#[must_use = "FIDL methods require a response to be sent"]
4544#[derive(Debug)]
4545pub struct WlanSoftmacBaseJoinBssResponder {
4546 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4547 tx_id: u32,
4548}
4549
4550impl std::ops::Drop for WlanSoftmacBaseJoinBssResponder {
4554 fn drop(&mut self) {
4555 self.control_handle.shutdown();
4556 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4558 }
4559}
4560
4561impl fidl::endpoints::Responder for WlanSoftmacBaseJoinBssResponder {
4562 type ControlHandle = WlanSoftmacBaseControlHandle;
4563
4564 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4565 &self.control_handle
4566 }
4567
4568 fn drop_without_shutdown(mut self) {
4569 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4571 std::mem::forget(self);
4573 }
4574}
4575
4576impl WlanSoftmacBaseJoinBssResponder {
4577 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4581 let _result = self.send_raw(result);
4582 if _result.is_err() {
4583 self.control_handle.shutdown();
4584 }
4585 self.drop_without_shutdown();
4586 _result
4587 }
4588
4589 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4591 let _result = self.send_raw(result);
4592 self.drop_without_shutdown();
4593 _result
4594 }
4595
4596 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4597 self.control_handle
4598 .inner
4599 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4600 result,
4601 self.tx_id,
4602 0x1336fb5455b77a6e,
4603 fidl::encoding::DynamicFlags::empty(),
4604 )
4605 }
4606}
4607
4608#[must_use = "FIDL methods require a response to be sent"]
4609#[derive(Debug)]
4610pub struct WlanSoftmacBaseEnableBeaconingResponder {
4611 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4612 tx_id: u32,
4613}
4614
4615impl std::ops::Drop for WlanSoftmacBaseEnableBeaconingResponder {
4619 fn drop(&mut self) {
4620 self.control_handle.shutdown();
4621 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4623 }
4624}
4625
4626impl fidl::endpoints::Responder for WlanSoftmacBaseEnableBeaconingResponder {
4627 type ControlHandle = WlanSoftmacBaseControlHandle;
4628
4629 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4630 &self.control_handle
4631 }
4632
4633 fn drop_without_shutdown(mut self) {
4634 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4636 std::mem::forget(self);
4638 }
4639}
4640
4641impl WlanSoftmacBaseEnableBeaconingResponder {
4642 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4646 let _result = self.send_raw(result);
4647 if _result.is_err() {
4648 self.control_handle.shutdown();
4649 }
4650 self.drop_without_shutdown();
4651 _result
4652 }
4653
4654 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4656 let _result = self.send_raw(result);
4657 self.drop_without_shutdown();
4658 _result
4659 }
4660
4661 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4662 self.control_handle
4663 .inner
4664 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4665 result,
4666 self.tx_id,
4667 0x6c35807632c64576,
4668 fidl::encoding::DynamicFlags::empty(),
4669 )
4670 }
4671}
4672
4673#[must_use = "FIDL methods require a response to be sent"]
4674#[derive(Debug)]
4675pub struct WlanSoftmacBaseDisableBeaconingResponder {
4676 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4677 tx_id: u32,
4678}
4679
4680impl std::ops::Drop for WlanSoftmacBaseDisableBeaconingResponder {
4684 fn drop(&mut self) {
4685 self.control_handle.shutdown();
4686 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4688 }
4689}
4690
4691impl fidl::endpoints::Responder for WlanSoftmacBaseDisableBeaconingResponder {
4692 type ControlHandle = WlanSoftmacBaseControlHandle;
4693
4694 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4695 &self.control_handle
4696 }
4697
4698 fn drop_without_shutdown(mut self) {
4699 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4701 std::mem::forget(self);
4703 }
4704}
4705
4706impl WlanSoftmacBaseDisableBeaconingResponder {
4707 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4711 let _result = self.send_raw(result);
4712 if _result.is_err() {
4713 self.control_handle.shutdown();
4714 }
4715 self.drop_without_shutdown();
4716 _result
4717 }
4718
4719 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4721 let _result = self.send_raw(result);
4722 self.drop_without_shutdown();
4723 _result
4724 }
4725
4726 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4727 self.control_handle
4728 .inner
4729 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4730 result,
4731 self.tx_id,
4732 0x3303b30f99dbb406,
4733 fidl::encoding::DynamicFlags::empty(),
4734 )
4735 }
4736}
4737
4738#[must_use = "FIDL methods require a response to be sent"]
4739#[derive(Debug)]
4740pub struct WlanSoftmacBaseInstallKeyResponder {
4741 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4742 tx_id: u32,
4743}
4744
4745impl std::ops::Drop for WlanSoftmacBaseInstallKeyResponder {
4749 fn drop(&mut self) {
4750 self.control_handle.shutdown();
4751 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4753 }
4754}
4755
4756impl fidl::endpoints::Responder for WlanSoftmacBaseInstallKeyResponder {
4757 type ControlHandle = WlanSoftmacBaseControlHandle;
4758
4759 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4760 &self.control_handle
4761 }
4762
4763 fn drop_without_shutdown(mut self) {
4764 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4766 std::mem::forget(self);
4768 }
4769}
4770
4771impl WlanSoftmacBaseInstallKeyResponder {
4772 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4776 let _result = self.send_raw(result);
4777 if _result.is_err() {
4778 self.control_handle.shutdown();
4779 }
4780 self.drop_without_shutdown();
4781 _result
4782 }
4783
4784 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4786 let _result = self.send_raw(result);
4787 self.drop_without_shutdown();
4788 _result
4789 }
4790
4791 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4792 self.control_handle
4793 .inner
4794 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4795 result,
4796 self.tx_id,
4797 0x7decf9b4200b9131,
4798 fidl::encoding::DynamicFlags::empty(),
4799 )
4800 }
4801}
4802
4803#[must_use = "FIDL methods require a response to be sent"]
4804#[derive(Debug)]
4805pub struct WlanSoftmacBaseNotifyAssociationCompleteResponder {
4806 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4807 tx_id: u32,
4808}
4809
4810impl std::ops::Drop for WlanSoftmacBaseNotifyAssociationCompleteResponder {
4814 fn drop(&mut self) {
4815 self.control_handle.shutdown();
4816 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4818 }
4819}
4820
4821impl fidl::endpoints::Responder for WlanSoftmacBaseNotifyAssociationCompleteResponder {
4822 type ControlHandle = WlanSoftmacBaseControlHandle;
4823
4824 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4825 &self.control_handle
4826 }
4827
4828 fn drop_without_shutdown(mut self) {
4829 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4831 std::mem::forget(self);
4833 }
4834}
4835
4836impl WlanSoftmacBaseNotifyAssociationCompleteResponder {
4837 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4841 let _result = self.send_raw(result);
4842 if _result.is_err() {
4843 self.control_handle.shutdown();
4844 }
4845 self.drop_without_shutdown();
4846 _result
4847 }
4848
4849 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4851 let _result = self.send_raw(result);
4852 self.drop_without_shutdown();
4853 _result
4854 }
4855
4856 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4857 self.control_handle
4858 .inner
4859 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4860 result,
4861 self.tx_id,
4862 0x436ffe3ba461d6cd,
4863 fidl::encoding::DynamicFlags::empty(),
4864 )
4865 }
4866}
4867
4868#[must_use = "FIDL methods require a response to be sent"]
4869#[derive(Debug)]
4870pub struct WlanSoftmacBaseClearAssociationResponder {
4871 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4872 tx_id: u32,
4873}
4874
4875impl std::ops::Drop for WlanSoftmacBaseClearAssociationResponder {
4879 fn drop(&mut self) {
4880 self.control_handle.shutdown();
4881 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4883 }
4884}
4885
4886impl fidl::endpoints::Responder for WlanSoftmacBaseClearAssociationResponder {
4887 type ControlHandle = WlanSoftmacBaseControlHandle;
4888
4889 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4890 &self.control_handle
4891 }
4892
4893 fn drop_without_shutdown(mut self) {
4894 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4896 std::mem::forget(self);
4898 }
4899}
4900
4901impl WlanSoftmacBaseClearAssociationResponder {
4902 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4906 let _result = self.send_raw(result);
4907 if _result.is_err() {
4908 self.control_handle.shutdown();
4909 }
4910 self.drop_without_shutdown();
4911 _result
4912 }
4913
4914 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4916 let _result = self.send_raw(result);
4917 self.drop_without_shutdown();
4918 _result
4919 }
4920
4921 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4922 self.control_handle
4923 .inner
4924 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4925 result,
4926 self.tx_id,
4927 0x581d76c39190a7dd,
4928 fidl::encoding::DynamicFlags::empty(),
4929 )
4930 }
4931}
4932
4933#[must_use = "FIDL methods require a response to be sent"]
4934#[derive(Debug)]
4935pub struct WlanSoftmacBaseStartPassiveScanResponder {
4936 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4937 tx_id: u32,
4938}
4939
4940impl std::ops::Drop for WlanSoftmacBaseStartPassiveScanResponder {
4944 fn drop(&mut self) {
4945 self.control_handle.shutdown();
4946 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4948 }
4949}
4950
4951impl fidl::endpoints::Responder for WlanSoftmacBaseStartPassiveScanResponder {
4952 type ControlHandle = WlanSoftmacBaseControlHandle;
4953
4954 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4955 &self.control_handle
4956 }
4957
4958 fn drop_without_shutdown(mut self) {
4959 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4961 std::mem::forget(self);
4963 }
4964}
4965
4966impl WlanSoftmacBaseStartPassiveScanResponder {
4967 pub fn send(
4971 self,
4972 mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
4973 ) -> Result<(), fidl::Error> {
4974 let _result = self.send_raw(result);
4975 if _result.is_err() {
4976 self.control_handle.shutdown();
4977 }
4978 self.drop_without_shutdown();
4979 _result
4980 }
4981
4982 pub fn send_no_shutdown_on_err(
4984 self,
4985 mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
4986 ) -> Result<(), fidl::Error> {
4987 let _result = self.send_raw(result);
4988 self.drop_without_shutdown();
4989 _result
4990 }
4991
4992 fn send_raw(
4993 &self,
4994 mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
4995 ) -> Result<(), fidl::Error> {
4996 self.control_handle.inner.send::<fidl::encoding::ResultType<
4997 WlanSoftmacBaseStartPassiveScanResponse,
4998 i32,
4999 >>(
5000 result,
5001 self.tx_id,
5002 0x5662f989cb4083bb,
5003 fidl::encoding::DynamicFlags::empty(),
5004 )
5005 }
5006}
5007
5008#[must_use = "FIDL methods require a response to be sent"]
5009#[derive(Debug)]
5010pub struct WlanSoftmacBaseStartActiveScanResponder {
5011 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
5012 tx_id: u32,
5013}
5014
5015impl std::ops::Drop for WlanSoftmacBaseStartActiveScanResponder {
5019 fn drop(&mut self) {
5020 self.control_handle.shutdown();
5021 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5023 }
5024}
5025
5026impl fidl::endpoints::Responder for WlanSoftmacBaseStartActiveScanResponder {
5027 type ControlHandle = WlanSoftmacBaseControlHandle;
5028
5029 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
5030 &self.control_handle
5031 }
5032
5033 fn drop_without_shutdown(mut self) {
5034 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5036 std::mem::forget(self);
5038 }
5039}
5040
5041impl WlanSoftmacBaseStartActiveScanResponder {
5042 pub fn send(
5046 self,
5047 mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
5048 ) -> Result<(), fidl::Error> {
5049 let _result = self.send_raw(result);
5050 if _result.is_err() {
5051 self.control_handle.shutdown();
5052 }
5053 self.drop_without_shutdown();
5054 _result
5055 }
5056
5057 pub fn send_no_shutdown_on_err(
5059 self,
5060 mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
5061 ) -> Result<(), fidl::Error> {
5062 let _result = self.send_raw(result);
5063 self.drop_without_shutdown();
5064 _result
5065 }
5066
5067 fn send_raw(
5068 &self,
5069 mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
5070 ) -> Result<(), fidl::Error> {
5071 self.control_handle.inner.send::<fidl::encoding::ResultType<
5072 WlanSoftmacBaseStartActiveScanResponse,
5073 i32,
5074 >>(
5075 result,
5076 self.tx_id,
5077 0x4896eafa9937751e,
5078 fidl::encoding::DynamicFlags::empty(),
5079 )
5080 }
5081}
5082
5083#[must_use = "FIDL methods require a response to be sent"]
5084#[derive(Debug)]
5085pub struct WlanSoftmacBaseCancelScanResponder {
5086 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
5087 tx_id: u32,
5088}
5089
5090impl std::ops::Drop for WlanSoftmacBaseCancelScanResponder {
5094 fn drop(&mut self) {
5095 self.control_handle.shutdown();
5096 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5098 }
5099}
5100
5101impl fidl::endpoints::Responder for WlanSoftmacBaseCancelScanResponder {
5102 type ControlHandle = WlanSoftmacBaseControlHandle;
5103
5104 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
5105 &self.control_handle
5106 }
5107
5108 fn drop_without_shutdown(mut self) {
5109 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5111 std::mem::forget(self);
5113 }
5114}
5115
5116impl WlanSoftmacBaseCancelScanResponder {
5117 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5121 let _result = self.send_raw(result);
5122 if _result.is_err() {
5123 self.control_handle.shutdown();
5124 }
5125 self.drop_without_shutdown();
5126 _result
5127 }
5128
5129 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5131 let _result = self.send_raw(result);
5132 self.drop_without_shutdown();
5133 _result
5134 }
5135
5136 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5137 self.control_handle
5138 .inner
5139 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5140 result,
5141 self.tx_id,
5142 0xf7d859369764556,
5143 fidl::encoding::DynamicFlags::empty(),
5144 )
5145 }
5146}
5147
5148#[must_use = "FIDL methods require a response to be sent"]
5149#[derive(Debug)]
5150pub struct WlanSoftmacBaseUpdateWmmParametersResponder {
5151 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
5152 tx_id: u32,
5153}
5154
5155impl std::ops::Drop for WlanSoftmacBaseUpdateWmmParametersResponder {
5159 fn drop(&mut self) {
5160 self.control_handle.shutdown();
5161 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5163 }
5164}
5165
5166impl fidl::endpoints::Responder for WlanSoftmacBaseUpdateWmmParametersResponder {
5167 type ControlHandle = WlanSoftmacBaseControlHandle;
5168
5169 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
5170 &self.control_handle
5171 }
5172
5173 fn drop_without_shutdown(mut self) {
5174 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5176 std::mem::forget(self);
5178 }
5179}
5180
5181impl WlanSoftmacBaseUpdateWmmParametersResponder {
5182 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5186 let _result = self.send_raw(result);
5187 if _result.is_err() {
5188 self.control_handle.shutdown();
5189 }
5190 self.drop_without_shutdown();
5191 _result
5192 }
5193
5194 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5196 let _result = self.send_raw(result);
5197 self.drop_without_shutdown();
5198 _result
5199 }
5200
5201 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5202 self.control_handle
5203 .inner
5204 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5205 result,
5206 self.tx_id,
5207 0x68522c7122d5f78c,
5208 fidl::encoding::DynamicFlags::empty(),
5209 )
5210 }
5211}
5212
5213#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5214pub struct WlanSoftmacBridgeMarker;
5215
5216impl fidl::endpoints::ProtocolMarker for WlanSoftmacBridgeMarker {
5217 type Proxy = WlanSoftmacBridgeProxy;
5218 type RequestStream = WlanSoftmacBridgeRequestStream;
5219 #[cfg(target_os = "fuchsia")]
5220 type SynchronousProxy = WlanSoftmacBridgeSynchronousProxy;
5221
5222 const DEBUG_NAME: &'static str = "(anonymous) WlanSoftmacBridge";
5223}
5224pub type WlanSoftmacBridgeStartResult = Result<fidl::Channel, i32>;
5225
5226pub trait WlanSoftmacBridgeProxyInterface: Send + Sync {
5227 type QueryResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseQueryResult, fidl::Error>>
5228 + Send;
5229 fn r#query(&self) -> Self::QueryResponseFut;
5230 type QueryDiscoverySupportResponseFut: std::future::Future<
5231 Output = Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error>,
5232 > + Send;
5233 fn r#query_discovery_support(&self) -> Self::QueryDiscoverySupportResponseFut;
5234 type QueryMacSublayerSupportResponseFut: std::future::Future<
5235 Output = Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error>,
5236 > + Send;
5237 fn r#query_mac_sublayer_support(&self) -> Self::QueryMacSublayerSupportResponseFut;
5238 type QuerySecuritySupportResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error>>
5239 + Send;
5240 fn r#query_security_support(&self) -> Self::QuerySecuritySupportResponseFut;
5241 type QuerySpectrumManagementSupportResponseFut: std::future::Future<
5242 Output = Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error>,
5243 > + Send;
5244 fn r#query_spectrum_management_support(
5245 &self,
5246 ) -> Self::QuerySpectrumManagementSupportResponseFut;
5247 type SetChannelResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseSetChannelResult, fidl::Error>>
5248 + Send;
5249 fn r#set_channel(
5250 &self,
5251 payload: &WlanSoftmacBaseSetChannelRequest,
5252 ) -> Self::SetChannelResponseFut;
5253 type JoinBssResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseJoinBssResult, fidl::Error>>
5254 + Send;
5255 fn r#join_bss(
5256 &self,
5257 join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
5258 ) -> Self::JoinBssResponseFut;
5259 type EnableBeaconingResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error>>
5260 + Send;
5261 fn r#enable_beaconing(
5262 &self,
5263 payload: &WlanSoftmacBaseEnableBeaconingRequest,
5264 ) -> Self::EnableBeaconingResponseFut;
5265 type DisableBeaconingResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error>>
5266 + Send;
5267 fn r#disable_beaconing(&self) -> Self::DisableBeaconingResponseFut;
5268 type InstallKeyResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseInstallKeyResult, fidl::Error>>
5269 + Send;
5270 fn r#install_key(&self, payload: &WlanKeyConfiguration) -> Self::InstallKeyResponseFut;
5271 type NotifyAssociationCompleteResponseFut: std::future::Future<
5272 Output = Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error>,
5273 > + Send;
5274 fn r#notify_association_complete(
5275 &self,
5276 assoc_cfg: &WlanAssociationConfig,
5277 ) -> Self::NotifyAssociationCompleteResponseFut;
5278 type ClearAssociationResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseClearAssociationResult, fidl::Error>>
5279 + Send;
5280 fn r#clear_association(
5281 &self,
5282 payload: &WlanSoftmacBaseClearAssociationRequest,
5283 ) -> Self::ClearAssociationResponseFut;
5284 type StartPassiveScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error>>
5285 + Send;
5286 fn r#start_passive_scan(
5287 &self,
5288 payload: &WlanSoftmacBaseStartPassiveScanRequest,
5289 ) -> Self::StartPassiveScanResponseFut;
5290 type StartActiveScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error>>
5291 + Send;
5292 fn r#start_active_scan(
5293 &self,
5294 payload: &WlanSoftmacStartActiveScanRequest,
5295 ) -> Self::StartActiveScanResponseFut;
5296 type CancelScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseCancelScanResult, fidl::Error>>
5297 + Send;
5298 fn r#cancel_scan(
5299 &self,
5300 payload: &WlanSoftmacBaseCancelScanRequest,
5301 ) -> Self::CancelScanResponseFut;
5302 type UpdateWmmParametersResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error>>
5303 + Send;
5304 fn r#update_wmm_parameters(
5305 &self,
5306 payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
5307 ) -> Self::UpdateWmmParametersResponseFut;
5308 type StartResponseFut: std::future::Future<Output = Result<WlanSoftmacBridgeStartResult, fidl::Error>>
5309 + Send;
5310 fn r#start(
5311 &self,
5312 ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
5313 ethernet_tx: u64,
5314 wlan_rx: u64,
5315 ) -> Self::StartResponseFut;
5316 type SetEthernetStatusResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
5317 fn r#set_ethernet_status(&self, status: u32) -> Self::SetEthernetStatusResponseFut;
5318}
5319#[derive(Debug)]
5320#[cfg(target_os = "fuchsia")]
5321pub struct WlanSoftmacBridgeSynchronousProxy {
5322 client: fidl::client::sync::Client,
5323}
5324
5325#[cfg(target_os = "fuchsia")]
5326impl fidl::endpoints::SynchronousProxy for WlanSoftmacBridgeSynchronousProxy {
5327 type Proxy = WlanSoftmacBridgeProxy;
5328 type Protocol = WlanSoftmacBridgeMarker;
5329
5330 fn from_channel(inner: fidl::Channel) -> Self {
5331 Self::new(inner)
5332 }
5333
5334 fn into_channel(self) -> fidl::Channel {
5335 self.client.into_channel()
5336 }
5337
5338 fn as_channel(&self) -> &fidl::Channel {
5339 self.client.as_channel()
5340 }
5341}
5342
5343#[cfg(target_os = "fuchsia")]
5344impl WlanSoftmacBridgeSynchronousProxy {
5345 pub fn new(channel: fidl::Channel) -> Self {
5346 let protocol_name =
5347 <WlanSoftmacBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5348 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
5349 }
5350
5351 pub fn into_channel(self) -> fidl::Channel {
5352 self.client.into_channel()
5353 }
5354
5355 pub fn wait_for_event(
5358 &self,
5359 deadline: zx::MonotonicInstant,
5360 ) -> Result<WlanSoftmacBridgeEvent, fidl::Error> {
5361 WlanSoftmacBridgeEvent::decode(self.client.wait_for_event(deadline)?)
5362 }
5363
5364 pub fn r#query(
5372 &self,
5373 ___deadline: zx::MonotonicInstant,
5374 ) -> Result<WlanSoftmacBaseQueryResult, fidl::Error> {
5375 let _response = self.client.send_query::<
5376 fidl::encoding::EmptyPayload,
5377 fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>,
5378 >(
5379 (),
5380 0x18231a638e508f9d,
5381 fidl::encoding::DynamicFlags::empty(),
5382 ___deadline,
5383 )?;
5384 Ok(_response.map(|x| x))
5385 }
5386
5387 pub fn r#query_discovery_support(
5391 &self,
5392 ___deadline: zx::MonotonicInstant,
5393 ) -> Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error> {
5394 let _response =
5395 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
5396 WlanSoftmacBaseQueryDiscoverySupportResponse,
5397 i32,
5398 >>(
5399 (),
5400 0x16797affc0cb58ae,
5401 fidl::encoding::DynamicFlags::empty(),
5402 ___deadline,
5403 )?;
5404 Ok(_response.map(|x| x.resp))
5405 }
5406
5407 pub fn r#query_mac_sublayer_support(
5415 &self,
5416 ___deadline: zx::MonotonicInstant,
5417 ) -> Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error> {
5418 let _response =
5419 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
5420 WlanSoftmacBaseQueryMacSublayerSupportResponse,
5421 i32,
5422 >>(
5423 (),
5424 0x7302c3f8c131f075,
5425 fidl::encoding::DynamicFlags::empty(),
5426 ___deadline,
5427 )?;
5428 Ok(_response.map(|x| x.resp))
5429 }
5430
5431 pub fn r#query_security_support(
5434 &self,
5435 ___deadline: zx::MonotonicInstant,
5436 ) -> Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error> {
5437 let _response =
5438 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
5439 WlanSoftmacBaseQuerySecuritySupportResponse,
5440 i32,
5441 >>(
5442 (),
5443 0x3691bb75abf6354,
5444 fidl::encoding::DynamicFlags::empty(),
5445 ___deadline,
5446 )?;
5447 Ok(_response.map(|x| x.resp))
5448 }
5449
5450 pub fn r#query_spectrum_management_support(
5454 &self,
5455 ___deadline: zx::MonotonicInstant,
5456 ) -> Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error> {
5457 let _response = self
5458 .client
5459 .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
5460 WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
5461 i32,
5462 >>(
5463 (), 0x347d78dc1d4d27bf, fidl::encoding::DynamicFlags::empty(), ___deadline
5464 )?;
5465 Ok(_response.map(|x| x.resp))
5466 }
5467
5468 pub fn r#set_channel(
5476 &self,
5477 mut payload: &WlanSoftmacBaseSetChannelRequest,
5478 ___deadline: zx::MonotonicInstant,
5479 ) -> Result<WlanSoftmacBaseSetChannelResult, fidl::Error> {
5480 let _response = self.client.send_query::<
5481 WlanSoftmacBaseSetChannelRequest,
5482 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5483 >(
5484 payload,
5485 0x12836b533cd63ece,
5486 fidl::encoding::DynamicFlags::empty(),
5487 ___deadline,
5488 )?;
5489 Ok(_response.map(|x| x))
5490 }
5491
5492 pub fn r#join_bss(
5502 &self,
5503 mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
5504 ___deadline: zx::MonotonicInstant,
5505 ) -> Result<WlanSoftmacBaseJoinBssResult, fidl::Error> {
5506 let _response = self.client.send_query::<
5507 WlanSoftmacBaseJoinBssRequest,
5508 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5509 >(
5510 (join_request,),
5511 0x1336fb5455b77a6e,
5512 fidl::encoding::DynamicFlags::empty(),
5513 ___deadline,
5514 )?;
5515 Ok(_response.map(|x| x))
5516 }
5517
5518 pub fn r#enable_beaconing(
5533 &self,
5534 mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
5535 ___deadline: zx::MonotonicInstant,
5536 ) -> Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error> {
5537 let _response = self.client.send_query::<
5538 WlanSoftmacBaseEnableBeaconingRequest,
5539 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5540 >(
5541 payload,
5542 0x6c35807632c64576,
5543 fidl::encoding::DynamicFlags::empty(),
5544 ___deadline,
5545 )?;
5546 Ok(_response.map(|x| x))
5547 }
5548
5549 pub fn r#disable_beaconing(
5551 &self,
5552 ___deadline: zx::MonotonicInstant,
5553 ) -> Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error> {
5554 let _response = self.client.send_query::<
5555 fidl::encoding::EmptyPayload,
5556 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5557 >(
5558 (),
5559 0x3303b30f99dbb406,
5560 fidl::encoding::DynamicFlags::empty(),
5561 ___deadline,
5562 )?;
5563 Ok(_response.map(|x| x))
5564 }
5565
5566 pub fn r#install_key(
5573 &self,
5574 mut payload: &WlanKeyConfiguration,
5575 ___deadline: zx::MonotonicInstant,
5576 ) -> Result<WlanSoftmacBaseInstallKeyResult, fidl::Error> {
5577 let _response = self.client.send_query::<
5578 WlanKeyConfiguration,
5579 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5580 >(
5581 payload,
5582 0x7decf9b4200b9131,
5583 fidl::encoding::DynamicFlags::empty(),
5584 ___deadline,
5585 )?;
5586 Ok(_response.map(|x| x))
5587 }
5588
5589 pub fn r#notify_association_complete(
5599 &self,
5600 mut assoc_cfg: &WlanAssociationConfig,
5601 ___deadline: zx::MonotonicInstant,
5602 ) -> Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error> {
5603 let _response = self.client.send_query::<
5604 WlanSoftmacBaseNotifyAssociationCompleteRequest,
5605 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5606 >(
5607 (assoc_cfg,),
5608 0x436ffe3ba461d6cd,
5609 fidl::encoding::DynamicFlags::empty(),
5610 ___deadline,
5611 )?;
5612 Ok(_response.map(|x| x))
5613 }
5614
5615 pub fn r#clear_association(
5617 &self,
5618 mut payload: &WlanSoftmacBaseClearAssociationRequest,
5619 ___deadline: zx::MonotonicInstant,
5620 ) -> Result<WlanSoftmacBaseClearAssociationResult, fidl::Error> {
5621 let _response = self.client.send_query::<
5622 WlanSoftmacBaseClearAssociationRequest,
5623 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5624 >(
5625 payload,
5626 0x581d76c39190a7dd,
5627 fidl::encoding::DynamicFlags::empty(),
5628 ___deadline,
5629 )?;
5630 Ok(_response.map(|x| x))
5631 }
5632
5633 pub fn r#start_passive_scan(
5647 &self,
5648 mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
5649 ___deadline: zx::MonotonicInstant,
5650 ) -> Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error> {
5651 let _response = self.client.send_query::<
5652 WlanSoftmacBaseStartPassiveScanRequest,
5653 fidl::encoding::ResultType<WlanSoftmacBaseStartPassiveScanResponse, i32>,
5654 >(
5655 payload,
5656 0x5662f989cb4083bb,
5657 fidl::encoding::DynamicFlags::empty(),
5658 ___deadline,
5659 )?;
5660 Ok(_response.map(|x| x))
5661 }
5662
5663 pub fn r#start_active_scan(
5677 &self,
5678 mut payload: &WlanSoftmacStartActiveScanRequest,
5679 ___deadline: zx::MonotonicInstant,
5680 ) -> Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error> {
5681 let _response = self.client.send_query::<
5682 WlanSoftmacStartActiveScanRequest,
5683 fidl::encoding::ResultType<WlanSoftmacBaseStartActiveScanResponse, i32>,
5684 >(
5685 payload,
5686 0x4896eafa9937751e,
5687 fidl::encoding::DynamicFlags::empty(),
5688 ___deadline,
5689 )?;
5690 Ok(_response.map(|x| x))
5691 }
5692
5693 pub fn r#cancel_scan(
5707 &self,
5708 mut payload: &WlanSoftmacBaseCancelScanRequest,
5709 ___deadline: zx::MonotonicInstant,
5710 ) -> Result<WlanSoftmacBaseCancelScanResult, fidl::Error> {
5711 let _response = self.client.send_query::<
5712 WlanSoftmacBaseCancelScanRequest,
5713 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5714 >(
5715 payload,
5716 0xf7d859369764556,
5717 fidl::encoding::DynamicFlags::empty(),
5718 ___deadline,
5719 )?;
5720 Ok(_response.map(|x| x))
5721 }
5722
5723 pub fn r#update_wmm_parameters(
5726 &self,
5727 mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
5728 ___deadline: zx::MonotonicInstant,
5729 ) -> Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error> {
5730 let _response = self.client.send_query::<
5731 WlanSoftmacBaseUpdateWmmParametersRequest,
5732 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5733 >(
5734 payload,
5735 0x68522c7122d5f78c,
5736 fidl::encoding::DynamicFlags::empty(),
5737 ___deadline,
5738 )?;
5739 Ok(_response.map(|x| x))
5740 }
5741
5742 pub fn r#start(
5782 &self,
5783 mut ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
5784 mut ethernet_tx: u64,
5785 mut wlan_rx: u64,
5786 ___deadline: zx::MonotonicInstant,
5787 ) -> Result<WlanSoftmacBridgeStartResult, fidl::Error> {
5788 let _response = self.client.send_query::<
5789 WlanSoftmacBridgeStartRequest,
5790 fidl::encoding::ResultType<WlanSoftmacBridgeStartResponse, i32>,
5791 >(
5792 (ifc_bridge, ethernet_tx, wlan_rx,),
5793 0x7b2c15a507020d4d,
5794 fidl::encoding::DynamicFlags::empty(),
5795 ___deadline,
5796 )?;
5797 Ok(_response.map(|x| x.sme_channel))
5798 }
5799
5800 pub fn r#set_ethernet_status(
5818 &self,
5819 mut status: u32,
5820 ___deadline: zx::MonotonicInstant,
5821 ) -> Result<(), fidl::Error> {
5822 let _response = self
5823 .client
5824 .send_query::<WlanSoftmacBridgeSetEthernetStatusRequest, fidl::encoding::EmptyPayload>(
5825 (status,),
5826 0x412503cb3aaa350b,
5827 fidl::encoding::DynamicFlags::empty(),
5828 ___deadline,
5829 )?;
5830 Ok(_response)
5831 }
5832}
5833
5834#[derive(Debug, Clone)]
5835pub struct WlanSoftmacBridgeProxy {
5836 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
5837}
5838
5839impl fidl::endpoints::Proxy for WlanSoftmacBridgeProxy {
5840 type Protocol = WlanSoftmacBridgeMarker;
5841
5842 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
5843 Self::new(inner)
5844 }
5845
5846 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
5847 self.client.into_channel().map_err(|client| Self { client })
5848 }
5849
5850 fn as_channel(&self) -> &::fidl::AsyncChannel {
5851 self.client.as_channel()
5852 }
5853}
5854
5855impl WlanSoftmacBridgeProxy {
5856 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
5858 let protocol_name =
5859 <WlanSoftmacBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5860 Self { client: fidl::client::Client::new(channel, protocol_name) }
5861 }
5862
5863 pub fn take_event_stream(&self) -> WlanSoftmacBridgeEventStream {
5869 WlanSoftmacBridgeEventStream { event_receiver: self.client.take_event_receiver() }
5870 }
5871
5872 pub fn r#query(
5880 &self,
5881 ) -> fidl::client::QueryResponseFut<
5882 WlanSoftmacBaseQueryResult,
5883 fidl::encoding::DefaultFuchsiaResourceDialect,
5884 > {
5885 WlanSoftmacBridgeProxyInterface::r#query(self)
5886 }
5887
5888 pub fn r#query_discovery_support(
5892 &self,
5893 ) -> fidl::client::QueryResponseFut<
5894 WlanSoftmacBaseQueryDiscoverySupportResult,
5895 fidl::encoding::DefaultFuchsiaResourceDialect,
5896 > {
5897 WlanSoftmacBridgeProxyInterface::r#query_discovery_support(self)
5898 }
5899
5900 pub fn r#query_mac_sublayer_support(
5908 &self,
5909 ) -> fidl::client::QueryResponseFut<
5910 WlanSoftmacBaseQueryMacSublayerSupportResult,
5911 fidl::encoding::DefaultFuchsiaResourceDialect,
5912 > {
5913 WlanSoftmacBridgeProxyInterface::r#query_mac_sublayer_support(self)
5914 }
5915
5916 pub fn r#query_security_support(
5919 &self,
5920 ) -> fidl::client::QueryResponseFut<
5921 WlanSoftmacBaseQuerySecuritySupportResult,
5922 fidl::encoding::DefaultFuchsiaResourceDialect,
5923 > {
5924 WlanSoftmacBridgeProxyInterface::r#query_security_support(self)
5925 }
5926
5927 pub fn r#query_spectrum_management_support(
5931 &self,
5932 ) -> fidl::client::QueryResponseFut<
5933 WlanSoftmacBaseQuerySpectrumManagementSupportResult,
5934 fidl::encoding::DefaultFuchsiaResourceDialect,
5935 > {
5936 WlanSoftmacBridgeProxyInterface::r#query_spectrum_management_support(self)
5937 }
5938
5939 pub fn r#set_channel(
5947 &self,
5948 mut payload: &WlanSoftmacBaseSetChannelRequest,
5949 ) -> fidl::client::QueryResponseFut<
5950 WlanSoftmacBaseSetChannelResult,
5951 fidl::encoding::DefaultFuchsiaResourceDialect,
5952 > {
5953 WlanSoftmacBridgeProxyInterface::r#set_channel(self, payload)
5954 }
5955
5956 pub fn r#join_bss(
5966 &self,
5967 mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
5968 ) -> fidl::client::QueryResponseFut<
5969 WlanSoftmacBaseJoinBssResult,
5970 fidl::encoding::DefaultFuchsiaResourceDialect,
5971 > {
5972 WlanSoftmacBridgeProxyInterface::r#join_bss(self, join_request)
5973 }
5974
5975 pub fn r#enable_beaconing(
5990 &self,
5991 mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
5992 ) -> fidl::client::QueryResponseFut<
5993 WlanSoftmacBaseEnableBeaconingResult,
5994 fidl::encoding::DefaultFuchsiaResourceDialect,
5995 > {
5996 WlanSoftmacBridgeProxyInterface::r#enable_beaconing(self, payload)
5997 }
5998
5999 pub fn r#disable_beaconing(
6001 &self,
6002 ) -> fidl::client::QueryResponseFut<
6003 WlanSoftmacBaseDisableBeaconingResult,
6004 fidl::encoding::DefaultFuchsiaResourceDialect,
6005 > {
6006 WlanSoftmacBridgeProxyInterface::r#disable_beaconing(self)
6007 }
6008
6009 pub fn r#install_key(
6016 &self,
6017 mut payload: &WlanKeyConfiguration,
6018 ) -> fidl::client::QueryResponseFut<
6019 WlanSoftmacBaseInstallKeyResult,
6020 fidl::encoding::DefaultFuchsiaResourceDialect,
6021 > {
6022 WlanSoftmacBridgeProxyInterface::r#install_key(self, payload)
6023 }
6024
6025 pub fn r#notify_association_complete(
6035 &self,
6036 mut assoc_cfg: &WlanAssociationConfig,
6037 ) -> fidl::client::QueryResponseFut<
6038 WlanSoftmacBaseNotifyAssociationCompleteResult,
6039 fidl::encoding::DefaultFuchsiaResourceDialect,
6040 > {
6041 WlanSoftmacBridgeProxyInterface::r#notify_association_complete(self, assoc_cfg)
6042 }
6043
6044 pub fn r#clear_association(
6046 &self,
6047 mut payload: &WlanSoftmacBaseClearAssociationRequest,
6048 ) -> fidl::client::QueryResponseFut<
6049 WlanSoftmacBaseClearAssociationResult,
6050 fidl::encoding::DefaultFuchsiaResourceDialect,
6051 > {
6052 WlanSoftmacBridgeProxyInterface::r#clear_association(self, payload)
6053 }
6054
6055 pub fn r#start_passive_scan(
6069 &self,
6070 mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
6071 ) -> fidl::client::QueryResponseFut<
6072 WlanSoftmacBaseStartPassiveScanResult,
6073 fidl::encoding::DefaultFuchsiaResourceDialect,
6074 > {
6075 WlanSoftmacBridgeProxyInterface::r#start_passive_scan(self, payload)
6076 }
6077
6078 pub fn r#start_active_scan(
6092 &self,
6093 mut payload: &WlanSoftmacStartActiveScanRequest,
6094 ) -> fidl::client::QueryResponseFut<
6095 WlanSoftmacBaseStartActiveScanResult,
6096 fidl::encoding::DefaultFuchsiaResourceDialect,
6097 > {
6098 WlanSoftmacBridgeProxyInterface::r#start_active_scan(self, payload)
6099 }
6100
6101 pub fn r#cancel_scan(
6115 &self,
6116 mut payload: &WlanSoftmacBaseCancelScanRequest,
6117 ) -> fidl::client::QueryResponseFut<
6118 WlanSoftmacBaseCancelScanResult,
6119 fidl::encoding::DefaultFuchsiaResourceDialect,
6120 > {
6121 WlanSoftmacBridgeProxyInterface::r#cancel_scan(self, payload)
6122 }
6123
6124 pub fn r#update_wmm_parameters(
6127 &self,
6128 mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
6129 ) -> fidl::client::QueryResponseFut<
6130 WlanSoftmacBaseUpdateWmmParametersResult,
6131 fidl::encoding::DefaultFuchsiaResourceDialect,
6132 > {
6133 WlanSoftmacBridgeProxyInterface::r#update_wmm_parameters(self, payload)
6134 }
6135
6136 pub fn r#start(
6176 &self,
6177 mut ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
6178 mut ethernet_tx: u64,
6179 mut wlan_rx: u64,
6180 ) -> fidl::client::QueryResponseFut<
6181 WlanSoftmacBridgeStartResult,
6182 fidl::encoding::DefaultFuchsiaResourceDialect,
6183 > {
6184 WlanSoftmacBridgeProxyInterface::r#start(self, ifc_bridge, ethernet_tx, wlan_rx)
6185 }
6186
6187 pub fn r#set_ethernet_status(
6205 &self,
6206 mut status: u32,
6207 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
6208 WlanSoftmacBridgeProxyInterface::r#set_ethernet_status(self, status)
6209 }
6210}
6211
6212impl WlanSoftmacBridgeProxyInterface for WlanSoftmacBridgeProxy {
6213 type QueryResponseFut = fidl::client::QueryResponseFut<
6214 WlanSoftmacBaseQueryResult,
6215 fidl::encoding::DefaultFuchsiaResourceDialect,
6216 >;
6217 fn r#query(&self) -> Self::QueryResponseFut {
6218 fn _decode(
6219 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6220 ) -> Result<WlanSoftmacBaseQueryResult, fidl::Error> {
6221 let _response = fidl::client::decode_transaction_body::<
6222 fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>,
6223 fidl::encoding::DefaultFuchsiaResourceDialect,
6224 0x18231a638e508f9d,
6225 >(_buf?)?;
6226 Ok(_response.map(|x| x))
6227 }
6228 self.client
6229 .send_query_and_decode::<fidl::encoding::EmptyPayload, WlanSoftmacBaseQueryResult>(
6230 (),
6231 0x18231a638e508f9d,
6232 fidl::encoding::DynamicFlags::empty(),
6233 _decode,
6234 )
6235 }
6236
6237 type QueryDiscoverySupportResponseFut = fidl::client::QueryResponseFut<
6238 WlanSoftmacBaseQueryDiscoverySupportResult,
6239 fidl::encoding::DefaultFuchsiaResourceDialect,
6240 >;
6241 fn r#query_discovery_support(&self) -> Self::QueryDiscoverySupportResponseFut {
6242 fn _decode(
6243 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6244 ) -> Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error> {
6245 let _response = fidl::client::decode_transaction_body::<
6246 fidl::encoding::ResultType<WlanSoftmacBaseQueryDiscoverySupportResponse, i32>,
6247 fidl::encoding::DefaultFuchsiaResourceDialect,
6248 0x16797affc0cb58ae,
6249 >(_buf?)?;
6250 Ok(_response.map(|x| x.resp))
6251 }
6252 self.client.send_query_and_decode::<
6253 fidl::encoding::EmptyPayload,
6254 WlanSoftmacBaseQueryDiscoverySupportResult,
6255 >(
6256 (),
6257 0x16797affc0cb58ae,
6258 fidl::encoding::DynamicFlags::empty(),
6259 _decode,
6260 )
6261 }
6262
6263 type QueryMacSublayerSupportResponseFut = fidl::client::QueryResponseFut<
6264 WlanSoftmacBaseQueryMacSublayerSupportResult,
6265 fidl::encoding::DefaultFuchsiaResourceDialect,
6266 >;
6267 fn r#query_mac_sublayer_support(&self) -> Self::QueryMacSublayerSupportResponseFut {
6268 fn _decode(
6269 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6270 ) -> Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error> {
6271 let _response = fidl::client::decode_transaction_body::<
6272 fidl::encoding::ResultType<WlanSoftmacBaseQueryMacSublayerSupportResponse, i32>,
6273 fidl::encoding::DefaultFuchsiaResourceDialect,
6274 0x7302c3f8c131f075,
6275 >(_buf?)?;
6276 Ok(_response.map(|x| x.resp))
6277 }
6278 self.client.send_query_and_decode::<
6279 fidl::encoding::EmptyPayload,
6280 WlanSoftmacBaseQueryMacSublayerSupportResult,
6281 >(
6282 (),
6283 0x7302c3f8c131f075,
6284 fidl::encoding::DynamicFlags::empty(),
6285 _decode,
6286 )
6287 }
6288
6289 type QuerySecuritySupportResponseFut = fidl::client::QueryResponseFut<
6290 WlanSoftmacBaseQuerySecuritySupportResult,
6291 fidl::encoding::DefaultFuchsiaResourceDialect,
6292 >;
6293 fn r#query_security_support(&self) -> Self::QuerySecuritySupportResponseFut {
6294 fn _decode(
6295 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6296 ) -> Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error> {
6297 let _response = fidl::client::decode_transaction_body::<
6298 fidl::encoding::ResultType<WlanSoftmacBaseQuerySecuritySupportResponse, i32>,
6299 fidl::encoding::DefaultFuchsiaResourceDialect,
6300 0x3691bb75abf6354,
6301 >(_buf?)?;
6302 Ok(_response.map(|x| x.resp))
6303 }
6304 self.client.send_query_and_decode::<
6305 fidl::encoding::EmptyPayload,
6306 WlanSoftmacBaseQuerySecuritySupportResult,
6307 >(
6308 (),
6309 0x3691bb75abf6354,
6310 fidl::encoding::DynamicFlags::empty(),
6311 _decode,
6312 )
6313 }
6314
6315 type QuerySpectrumManagementSupportResponseFut = fidl::client::QueryResponseFut<
6316 WlanSoftmacBaseQuerySpectrumManagementSupportResult,
6317 fidl::encoding::DefaultFuchsiaResourceDialect,
6318 >;
6319 fn r#query_spectrum_management_support(
6320 &self,
6321 ) -> Self::QuerySpectrumManagementSupportResponseFut {
6322 fn _decode(
6323 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6324 ) -> Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error> {
6325 let _response = fidl::client::decode_transaction_body::<
6326 fidl::encoding::ResultType<
6327 WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
6328 i32,
6329 >,
6330 fidl::encoding::DefaultFuchsiaResourceDialect,
6331 0x347d78dc1d4d27bf,
6332 >(_buf?)?;
6333 Ok(_response.map(|x| x.resp))
6334 }
6335 self.client.send_query_and_decode::<
6336 fidl::encoding::EmptyPayload,
6337 WlanSoftmacBaseQuerySpectrumManagementSupportResult,
6338 >(
6339 (),
6340 0x347d78dc1d4d27bf,
6341 fidl::encoding::DynamicFlags::empty(),
6342 _decode,
6343 )
6344 }
6345
6346 type SetChannelResponseFut = fidl::client::QueryResponseFut<
6347 WlanSoftmacBaseSetChannelResult,
6348 fidl::encoding::DefaultFuchsiaResourceDialect,
6349 >;
6350 fn r#set_channel(
6351 &self,
6352 mut payload: &WlanSoftmacBaseSetChannelRequest,
6353 ) -> Self::SetChannelResponseFut {
6354 fn _decode(
6355 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6356 ) -> Result<WlanSoftmacBaseSetChannelResult, fidl::Error> {
6357 let _response = fidl::client::decode_transaction_body::<
6358 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6359 fidl::encoding::DefaultFuchsiaResourceDialect,
6360 0x12836b533cd63ece,
6361 >(_buf?)?;
6362 Ok(_response.map(|x| x))
6363 }
6364 self.client.send_query_and_decode::<
6365 WlanSoftmacBaseSetChannelRequest,
6366 WlanSoftmacBaseSetChannelResult,
6367 >(
6368 payload,
6369 0x12836b533cd63ece,
6370 fidl::encoding::DynamicFlags::empty(),
6371 _decode,
6372 )
6373 }
6374
6375 type JoinBssResponseFut = fidl::client::QueryResponseFut<
6376 WlanSoftmacBaseJoinBssResult,
6377 fidl::encoding::DefaultFuchsiaResourceDialect,
6378 >;
6379 fn r#join_bss(
6380 &self,
6381 mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
6382 ) -> Self::JoinBssResponseFut {
6383 fn _decode(
6384 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6385 ) -> Result<WlanSoftmacBaseJoinBssResult, fidl::Error> {
6386 let _response = fidl::client::decode_transaction_body::<
6387 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6388 fidl::encoding::DefaultFuchsiaResourceDialect,
6389 0x1336fb5455b77a6e,
6390 >(_buf?)?;
6391 Ok(_response.map(|x| x))
6392 }
6393 self.client
6394 .send_query_and_decode::<WlanSoftmacBaseJoinBssRequest, WlanSoftmacBaseJoinBssResult>(
6395 (join_request,),
6396 0x1336fb5455b77a6e,
6397 fidl::encoding::DynamicFlags::empty(),
6398 _decode,
6399 )
6400 }
6401
6402 type EnableBeaconingResponseFut = fidl::client::QueryResponseFut<
6403 WlanSoftmacBaseEnableBeaconingResult,
6404 fidl::encoding::DefaultFuchsiaResourceDialect,
6405 >;
6406 fn r#enable_beaconing(
6407 &self,
6408 mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
6409 ) -> Self::EnableBeaconingResponseFut {
6410 fn _decode(
6411 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6412 ) -> Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error> {
6413 let _response = fidl::client::decode_transaction_body::<
6414 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6415 fidl::encoding::DefaultFuchsiaResourceDialect,
6416 0x6c35807632c64576,
6417 >(_buf?)?;
6418 Ok(_response.map(|x| x))
6419 }
6420 self.client.send_query_and_decode::<
6421 WlanSoftmacBaseEnableBeaconingRequest,
6422 WlanSoftmacBaseEnableBeaconingResult,
6423 >(
6424 payload,
6425 0x6c35807632c64576,
6426 fidl::encoding::DynamicFlags::empty(),
6427 _decode,
6428 )
6429 }
6430
6431 type DisableBeaconingResponseFut = fidl::client::QueryResponseFut<
6432 WlanSoftmacBaseDisableBeaconingResult,
6433 fidl::encoding::DefaultFuchsiaResourceDialect,
6434 >;
6435 fn r#disable_beaconing(&self) -> Self::DisableBeaconingResponseFut {
6436 fn _decode(
6437 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6438 ) -> Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error> {
6439 let _response = fidl::client::decode_transaction_body::<
6440 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6441 fidl::encoding::DefaultFuchsiaResourceDialect,
6442 0x3303b30f99dbb406,
6443 >(_buf?)?;
6444 Ok(_response.map(|x| x))
6445 }
6446 self.client.send_query_and_decode::<
6447 fidl::encoding::EmptyPayload,
6448 WlanSoftmacBaseDisableBeaconingResult,
6449 >(
6450 (),
6451 0x3303b30f99dbb406,
6452 fidl::encoding::DynamicFlags::empty(),
6453 _decode,
6454 )
6455 }
6456
6457 type InstallKeyResponseFut = fidl::client::QueryResponseFut<
6458 WlanSoftmacBaseInstallKeyResult,
6459 fidl::encoding::DefaultFuchsiaResourceDialect,
6460 >;
6461 fn r#install_key(&self, mut payload: &WlanKeyConfiguration) -> Self::InstallKeyResponseFut {
6462 fn _decode(
6463 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6464 ) -> Result<WlanSoftmacBaseInstallKeyResult, fidl::Error> {
6465 let _response = fidl::client::decode_transaction_body::<
6466 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6467 fidl::encoding::DefaultFuchsiaResourceDialect,
6468 0x7decf9b4200b9131,
6469 >(_buf?)?;
6470 Ok(_response.map(|x| x))
6471 }
6472 self.client.send_query_and_decode::<WlanKeyConfiguration, WlanSoftmacBaseInstallKeyResult>(
6473 payload,
6474 0x7decf9b4200b9131,
6475 fidl::encoding::DynamicFlags::empty(),
6476 _decode,
6477 )
6478 }
6479
6480 type NotifyAssociationCompleteResponseFut = fidl::client::QueryResponseFut<
6481 WlanSoftmacBaseNotifyAssociationCompleteResult,
6482 fidl::encoding::DefaultFuchsiaResourceDialect,
6483 >;
6484 fn r#notify_association_complete(
6485 &self,
6486 mut assoc_cfg: &WlanAssociationConfig,
6487 ) -> Self::NotifyAssociationCompleteResponseFut {
6488 fn _decode(
6489 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6490 ) -> Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error> {
6491 let _response = fidl::client::decode_transaction_body::<
6492 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6493 fidl::encoding::DefaultFuchsiaResourceDialect,
6494 0x436ffe3ba461d6cd,
6495 >(_buf?)?;
6496 Ok(_response.map(|x| x))
6497 }
6498 self.client.send_query_and_decode::<
6499 WlanSoftmacBaseNotifyAssociationCompleteRequest,
6500 WlanSoftmacBaseNotifyAssociationCompleteResult,
6501 >(
6502 (assoc_cfg,),
6503 0x436ffe3ba461d6cd,
6504 fidl::encoding::DynamicFlags::empty(),
6505 _decode,
6506 )
6507 }
6508
6509 type ClearAssociationResponseFut = fidl::client::QueryResponseFut<
6510 WlanSoftmacBaseClearAssociationResult,
6511 fidl::encoding::DefaultFuchsiaResourceDialect,
6512 >;
6513 fn r#clear_association(
6514 &self,
6515 mut payload: &WlanSoftmacBaseClearAssociationRequest,
6516 ) -> Self::ClearAssociationResponseFut {
6517 fn _decode(
6518 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6519 ) -> Result<WlanSoftmacBaseClearAssociationResult, fidl::Error> {
6520 let _response = fidl::client::decode_transaction_body::<
6521 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6522 fidl::encoding::DefaultFuchsiaResourceDialect,
6523 0x581d76c39190a7dd,
6524 >(_buf?)?;
6525 Ok(_response.map(|x| x))
6526 }
6527 self.client.send_query_and_decode::<
6528 WlanSoftmacBaseClearAssociationRequest,
6529 WlanSoftmacBaseClearAssociationResult,
6530 >(
6531 payload,
6532 0x581d76c39190a7dd,
6533 fidl::encoding::DynamicFlags::empty(),
6534 _decode,
6535 )
6536 }
6537
6538 type StartPassiveScanResponseFut = fidl::client::QueryResponseFut<
6539 WlanSoftmacBaseStartPassiveScanResult,
6540 fidl::encoding::DefaultFuchsiaResourceDialect,
6541 >;
6542 fn r#start_passive_scan(
6543 &self,
6544 mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
6545 ) -> Self::StartPassiveScanResponseFut {
6546 fn _decode(
6547 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6548 ) -> Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error> {
6549 let _response = fidl::client::decode_transaction_body::<
6550 fidl::encoding::ResultType<WlanSoftmacBaseStartPassiveScanResponse, i32>,
6551 fidl::encoding::DefaultFuchsiaResourceDialect,
6552 0x5662f989cb4083bb,
6553 >(_buf?)?;
6554 Ok(_response.map(|x| x))
6555 }
6556 self.client.send_query_and_decode::<
6557 WlanSoftmacBaseStartPassiveScanRequest,
6558 WlanSoftmacBaseStartPassiveScanResult,
6559 >(
6560 payload,
6561 0x5662f989cb4083bb,
6562 fidl::encoding::DynamicFlags::empty(),
6563 _decode,
6564 )
6565 }
6566
6567 type StartActiveScanResponseFut = fidl::client::QueryResponseFut<
6568 WlanSoftmacBaseStartActiveScanResult,
6569 fidl::encoding::DefaultFuchsiaResourceDialect,
6570 >;
6571 fn r#start_active_scan(
6572 &self,
6573 mut payload: &WlanSoftmacStartActiveScanRequest,
6574 ) -> Self::StartActiveScanResponseFut {
6575 fn _decode(
6576 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6577 ) -> Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error> {
6578 let _response = fidl::client::decode_transaction_body::<
6579 fidl::encoding::ResultType<WlanSoftmacBaseStartActiveScanResponse, i32>,
6580 fidl::encoding::DefaultFuchsiaResourceDialect,
6581 0x4896eafa9937751e,
6582 >(_buf?)?;
6583 Ok(_response.map(|x| x))
6584 }
6585 self.client.send_query_and_decode::<
6586 WlanSoftmacStartActiveScanRequest,
6587 WlanSoftmacBaseStartActiveScanResult,
6588 >(
6589 payload,
6590 0x4896eafa9937751e,
6591 fidl::encoding::DynamicFlags::empty(),
6592 _decode,
6593 )
6594 }
6595
6596 type CancelScanResponseFut = fidl::client::QueryResponseFut<
6597 WlanSoftmacBaseCancelScanResult,
6598 fidl::encoding::DefaultFuchsiaResourceDialect,
6599 >;
6600 fn r#cancel_scan(
6601 &self,
6602 mut payload: &WlanSoftmacBaseCancelScanRequest,
6603 ) -> Self::CancelScanResponseFut {
6604 fn _decode(
6605 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6606 ) -> Result<WlanSoftmacBaseCancelScanResult, fidl::Error> {
6607 let _response = fidl::client::decode_transaction_body::<
6608 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6609 fidl::encoding::DefaultFuchsiaResourceDialect,
6610 0xf7d859369764556,
6611 >(_buf?)?;
6612 Ok(_response.map(|x| x))
6613 }
6614 self.client.send_query_and_decode::<
6615 WlanSoftmacBaseCancelScanRequest,
6616 WlanSoftmacBaseCancelScanResult,
6617 >(
6618 payload,
6619 0xf7d859369764556,
6620 fidl::encoding::DynamicFlags::empty(),
6621 _decode,
6622 )
6623 }
6624
6625 type UpdateWmmParametersResponseFut = fidl::client::QueryResponseFut<
6626 WlanSoftmacBaseUpdateWmmParametersResult,
6627 fidl::encoding::DefaultFuchsiaResourceDialect,
6628 >;
6629 fn r#update_wmm_parameters(
6630 &self,
6631 mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
6632 ) -> Self::UpdateWmmParametersResponseFut {
6633 fn _decode(
6634 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6635 ) -> Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error> {
6636 let _response = fidl::client::decode_transaction_body::<
6637 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6638 fidl::encoding::DefaultFuchsiaResourceDialect,
6639 0x68522c7122d5f78c,
6640 >(_buf?)?;
6641 Ok(_response.map(|x| x))
6642 }
6643 self.client.send_query_and_decode::<
6644 WlanSoftmacBaseUpdateWmmParametersRequest,
6645 WlanSoftmacBaseUpdateWmmParametersResult,
6646 >(
6647 payload,
6648 0x68522c7122d5f78c,
6649 fidl::encoding::DynamicFlags::empty(),
6650 _decode,
6651 )
6652 }
6653
6654 type StartResponseFut = fidl::client::QueryResponseFut<
6655 WlanSoftmacBridgeStartResult,
6656 fidl::encoding::DefaultFuchsiaResourceDialect,
6657 >;
6658 fn r#start(
6659 &self,
6660 mut ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
6661 mut ethernet_tx: u64,
6662 mut wlan_rx: u64,
6663 ) -> Self::StartResponseFut {
6664 fn _decode(
6665 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6666 ) -> Result<WlanSoftmacBridgeStartResult, fidl::Error> {
6667 let _response = fidl::client::decode_transaction_body::<
6668 fidl::encoding::ResultType<WlanSoftmacBridgeStartResponse, i32>,
6669 fidl::encoding::DefaultFuchsiaResourceDialect,
6670 0x7b2c15a507020d4d,
6671 >(_buf?)?;
6672 Ok(_response.map(|x| x.sme_channel))
6673 }
6674 self.client
6675 .send_query_and_decode::<WlanSoftmacBridgeStartRequest, WlanSoftmacBridgeStartResult>(
6676 (ifc_bridge, ethernet_tx, wlan_rx),
6677 0x7b2c15a507020d4d,
6678 fidl::encoding::DynamicFlags::empty(),
6679 _decode,
6680 )
6681 }
6682
6683 type SetEthernetStatusResponseFut =
6684 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
6685 fn r#set_ethernet_status(&self, mut status: u32) -> Self::SetEthernetStatusResponseFut {
6686 fn _decode(
6687 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6688 ) -> Result<(), fidl::Error> {
6689 let _response = fidl::client::decode_transaction_body::<
6690 fidl::encoding::EmptyPayload,
6691 fidl::encoding::DefaultFuchsiaResourceDialect,
6692 0x412503cb3aaa350b,
6693 >(_buf?)?;
6694 Ok(_response)
6695 }
6696 self.client.send_query_and_decode::<WlanSoftmacBridgeSetEthernetStatusRequest, ()>(
6697 (status,),
6698 0x412503cb3aaa350b,
6699 fidl::encoding::DynamicFlags::empty(),
6700 _decode,
6701 )
6702 }
6703}
6704
6705pub struct WlanSoftmacBridgeEventStream {
6706 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6707}
6708
6709impl std::marker::Unpin for WlanSoftmacBridgeEventStream {}
6710
6711impl futures::stream::FusedStream for WlanSoftmacBridgeEventStream {
6712 fn is_terminated(&self) -> bool {
6713 self.event_receiver.is_terminated()
6714 }
6715}
6716
6717impl futures::Stream for WlanSoftmacBridgeEventStream {
6718 type Item = Result<WlanSoftmacBridgeEvent, fidl::Error>;
6719
6720 fn poll_next(
6721 mut self: std::pin::Pin<&mut Self>,
6722 cx: &mut std::task::Context<'_>,
6723 ) -> std::task::Poll<Option<Self::Item>> {
6724 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6725 &mut self.event_receiver,
6726 cx
6727 )?) {
6728 Some(buf) => std::task::Poll::Ready(Some(WlanSoftmacBridgeEvent::decode(buf))),
6729 None => std::task::Poll::Ready(None),
6730 }
6731 }
6732}
6733
6734#[derive(Debug)]
6735pub enum WlanSoftmacBridgeEvent {}
6736
6737impl WlanSoftmacBridgeEvent {
6738 fn decode(
6740 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6741 ) -> Result<WlanSoftmacBridgeEvent, fidl::Error> {
6742 let (bytes, _handles) = buf.split_mut();
6743 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6744 debug_assert_eq!(tx_header.tx_id, 0);
6745 match tx_header.ordinal {
6746 _ => Err(fidl::Error::UnknownOrdinal {
6747 ordinal: tx_header.ordinal,
6748 protocol_name:
6749 <WlanSoftmacBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6750 }),
6751 }
6752 }
6753}
6754
6755pub struct WlanSoftmacBridgeRequestStream {
6757 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6758 is_terminated: bool,
6759}
6760
6761impl std::marker::Unpin for WlanSoftmacBridgeRequestStream {}
6762
6763impl futures::stream::FusedStream for WlanSoftmacBridgeRequestStream {
6764 fn is_terminated(&self) -> bool {
6765 self.is_terminated
6766 }
6767}
6768
6769impl fidl::endpoints::RequestStream for WlanSoftmacBridgeRequestStream {
6770 type Protocol = WlanSoftmacBridgeMarker;
6771 type ControlHandle = WlanSoftmacBridgeControlHandle;
6772
6773 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6774 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6775 }
6776
6777 fn control_handle(&self) -> Self::ControlHandle {
6778 WlanSoftmacBridgeControlHandle { inner: self.inner.clone() }
6779 }
6780
6781 fn into_inner(
6782 self,
6783 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6784 {
6785 (self.inner, self.is_terminated)
6786 }
6787
6788 fn from_inner(
6789 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6790 is_terminated: bool,
6791 ) -> Self {
6792 Self { inner, is_terminated }
6793 }
6794}
6795
6796impl futures::Stream for WlanSoftmacBridgeRequestStream {
6797 type Item = Result<WlanSoftmacBridgeRequest, fidl::Error>;
6798
6799 fn poll_next(
6800 mut self: std::pin::Pin<&mut Self>,
6801 cx: &mut std::task::Context<'_>,
6802 ) -> std::task::Poll<Option<Self::Item>> {
6803 let this = &mut *self;
6804 if this.inner.check_shutdown(cx) {
6805 this.is_terminated = true;
6806 return std::task::Poll::Ready(None);
6807 }
6808 if this.is_terminated {
6809 panic!("polled WlanSoftmacBridgeRequestStream after completion");
6810 }
6811 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6812 |bytes, handles| {
6813 match this.inner.channel().read_etc(cx, bytes, handles) {
6814 std::task::Poll::Ready(Ok(())) => {}
6815 std::task::Poll::Pending => return std::task::Poll::Pending,
6816 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6817 this.is_terminated = true;
6818 return std::task::Poll::Ready(None);
6819 }
6820 std::task::Poll::Ready(Err(e)) => {
6821 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6822 e.into(),
6823 ))))
6824 }
6825 }
6826
6827 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6829
6830 std::task::Poll::Ready(Some(match header.ordinal {
6831 0x18231a638e508f9d => {
6832 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6833 let mut req = fidl::new_empty!(
6834 fidl::encoding::EmptyPayload,
6835 fidl::encoding::DefaultFuchsiaResourceDialect
6836 );
6837 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6838 let control_handle =
6839 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6840 Ok(WlanSoftmacBridgeRequest::Query {
6841 responder: WlanSoftmacBridgeQueryResponder {
6842 control_handle: std::mem::ManuallyDrop::new(control_handle),
6843 tx_id: header.tx_id,
6844 },
6845 })
6846 }
6847 0x16797affc0cb58ae => {
6848 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6849 let mut req = fidl::new_empty!(
6850 fidl::encoding::EmptyPayload,
6851 fidl::encoding::DefaultFuchsiaResourceDialect
6852 );
6853 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6854 let control_handle =
6855 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6856 Ok(WlanSoftmacBridgeRequest::QueryDiscoverySupport {
6857 responder: WlanSoftmacBridgeQueryDiscoverySupportResponder {
6858 control_handle: std::mem::ManuallyDrop::new(control_handle),
6859 tx_id: header.tx_id,
6860 },
6861 })
6862 }
6863 0x7302c3f8c131f075 => {
6864 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6865 let mut req = fidl::new_empty!(
6866 fidl::encoding::EmptyPayload,
6867 fidl::encoding::DefaultFuchsiaResourceDialect
6868 );
6869 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6870 let control_handle =
6871 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6872 Ok(WlanSoftmacBridgeRequest::QueryMacSublayerSupport {
6873 responder: WlanSoftmacBridgeQueryMacSublayerSupportResponder {
6874 control_handle: std::mem::ManuallyDrop::new(control_handle),
6875 tx_id: header.tx_id,
6876 },
6877 })
6878 }
6879 0x3691bb75abf6354 => {
6880 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6881 let mut req = fidl::new_empty!(
6882 fidl::encoding::EmptyPayload,
6883 fidl::encoding::DefaultFuchsiaResourceDialect
6884 );
6885 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6886 let control_handle =
6887 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6888 Ok(WlanSoftmacBridgeRequest::QuerySecuritySupport {
6889 responder: WlanSoftmacBridgeQuerySecuritySupportResponder {
6890 control_handle: std::mem::ManuallyDrop::new(control_handle),
6891 tx_id: header.tx_id,
6892 },
6893 })
6894 }
6895 0x347d78dc1d4d27bf => {
6896 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6897 let mut req = fidl::new_empty!(
6898 fidl::encoding::EmptyPayload,
6899 fidl::encoding::DefaultFuchsiaResourceDialect
6900 );
6901 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6902 let control_handle =
6903 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6904 Ok(WlanSoftmacBridgeRequest::QuerySpectrumManagementSupport {
6905 responder: WlanSoftmacBridgeQuerySpectrumManagementSupportResponder {
6906 control_handle: std::mem::ManuallyDrop::new(control_handle),
6907 tx_id: header.tx_id,
6908 },
6909 })
6910 }
6911 0x12836b533cd63ece => {
6912 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6913 let mut req = fidl::new_empty!(
6914 WlanSoftmacBaseSetChannelRequest,
6915 fidl::encoding::DefaultFuchsiaResourceDialect
6916 );
6917 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseSetChannelRequest>(&header, _body_bytes, handles, &mut req)?;
6918 let control_handle =
6919 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6920 Ok(WlanSoftmacBridgeRequest::SetChannel {
6921 payload: req,
6922 responder: WlanSoftmacBridgeSetChannelResponder {
6923 control_handle: std::mem::ManuallyDrop::new(control_handle),
6924 tx_id: header.tx_id,
6925 },
6926 })
6927 }
6928 0x1336fb5455b77a6e => {
6929 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6930 let mut req = fidl::new_empty!(
6931 WlanSoftmacBaseJoinBssRequest,
6932 fidl::encoding::DefaultFuchsiaResourceDialect
6933 );
6934 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseJoinBssRequest>(&header, _body_bytes, handles, &mut req)?;
6935 let control_handle =
6936 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6937 Ok(WlanSoftmacBridgeRequest::JoinBss {
6938 join_request: req.join_request,
6939
6940 responder: WlanSoftmacBridgeJoinBssResponder {
6941 control_handle: std::mem::ManuallyDrop::new(control_handle),
6942 tx_id: header.tx_id,
6943 },
6944 })
6945 }
6946 0x6c35807632c64576 => {
6947 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6948 let mut req = fidl::new_empty!(
6949 WlanSoftmacBaseEnableBeaconingRequest,
6950 fidl::encoding::DefaultFuchsiaResourceDialect
6951 );
6952 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseEnableBeaconingRequest>(&header, _body_bytes, handles, &mut req)?;
6953 let control_handle =
6954 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6955 Ok(WlanSoftmacBridgeRequest::EnableBeaconing {
6956 payload: req,
6957 responder: WlanSoftmacBridgeEnableBeaconingResponder {
6958 control_handle: std::mem::ManuallyDrop::new(control_handle),
6959 tx_id: header.tx_id,
6960 },
6961 })
6962 }
6963 0x3303b30f99dbb406 => {
6964 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6965 let mut req = fidl::new_empty!(
6966 fidl::encoding::EmptyPayload,
6967 fidl::encoding::DefaultFuchsiaResourceDialect
6968 );
6969 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6970 let control_handle =
6971 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6972 Ok(WlanSoftmacBridgeRequest::DisableBeaconing {
6973 responder: WlanSoftmacBridgeDisableBeaconingResponder {
6974 control_handle: std::mem::ManuallyDrop::new(control_handle),
6975 tx_id: header.tx_id,
6976 },
6977 })
6978 }
6979 0x7decf9b4200b9131 => {
6980 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6981 let mut req = fidl::new_empty!(
6982 WlanKeyConfiguration,
6983 fidl::encoding::DefaultFuchsiaResourceDialect
6984 );
6985 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanKeyConfiguration>(&header, _body_bytes, handles, &mut req)?;
6986 let control_handle =
6987 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6988 Ok(WlanSoftmacBridgeRequest::InstallKey {
6989 payload: req,
6990 responder: WlanSoftmacBridgeInstallKeyResponder {
6991 control_handle: std::mem::ManuallyDrop::new(control_handle),
6992 tx_id: header.tx_id,
6993 },
6994 })
6995 }
6996 0x436ffe3ba461d6cd => {
6997 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6998 let mut req = fidl::new_empty!(
6999 WlanSoftmacBaseNotifyAssociationCompleteRequest,
7000 fidl::encoding::DefaultFuchsiaResourceDialect
7001 );
7002 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseNotifyAssociationCompleteRequest>(&header, _body_bytes, handles, &mut req)?;
7003 let control_handle =
7004 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
7005 Ok(WlanSoftmacBridgeRequest::NotifyAssociationComplete {
7006 assoc_cfg: req.assoc_cfg,
7007
7008 responder: WlanSoftmacBridgeNotifyAssociationCompleteResponder {
7009 control_handle: std::mem::ManuallyDrop::new(control_handle),
7010 tx_id: header.tx_id,
7011 },
7012 })
7013 }
7014 0x581d76c39190a7dd => {
7015 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7016 let mut req = fidl::new_empty!(
7017 WlanSoftmacBaseClearAssociationRequest,
7018 fidl::encoding::DefaultFuchsiaResourceDialect
7019 );
7020 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseClearAssociationRequest>(&header, _body_bytes, handles, &mut req)?;
7021 let control_handle =
7022 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
7023 Ok(WlanSoftmacBridgeRequest::ClearAssociation {
7024 payload: req,
7025 responder: WlanSoftmacBridgeClearAssociationResponder {
7026 control_handle: std::mem::ManuallyDrop::new(control_handle),
7027 tx_id: header.tx_id,
7028 },
7029 })
7030 }
7031 0x5662f989cb4083bb => {
7032 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7033 let mut req = fidl::new_empty!(
7034 WlanSoftmacBaseStartPassiveScanRequest,
7035 fidl::encoding::DefaultFuchsiaResourceDialect
7036 );
7037 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseStartPassiveScanRequest>(&header, _body_bytes, handles, &mut req)?;
7038 let control_handle =
7039 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
7040 Ok(WlanSoftmacBridgeRequest::StartPassiveScan {
7041 payload: req,
7042 responder: WlanSoftmacBridgeStartPassiveScanResponder {
7043 control_handle: std::mem::ManuallyDrop::new(control_handle),
7044 tx_id: header.tx_id,
7045 },
7046 })
7047 }
7048 0x4896eafa9937751e => {
7049 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7050 let mut req = fidl::new_empty!(
7051 WlanSoftmacStartActiveScanRequest,
7052 fidl::encoding::DefaultFuchsiaResourceDialect
7053 );
7054 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacStartActiveScanRequest>(&header, _body_bytes, handles, &mut req)?;
7055 let control_handle =
7056 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
7057 Ok(WlanSoftmacBridgeRequest::StartActiveScan {
7058 payload: req,
7059 responder: WlanSoftmacBridgeStartActiveScanResponder {
7060 control_handle: std::mem::ManuallyDrop::new(control_handle),
7061 tx_id: header.tx_id,
7062 },
7063 })
7064 }
7065 0xf7d859369764556 => {
7066 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7067 let mut req = fidl::new_empty!(
7068 WlanSoftmacBaseCancelScanRequest,
7069 fidl::encoding::DefaultFuchsiaResourceDialect
7070 );
7071 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseCancelScanRequest>(&header, _body_bytes, handles, &mut req)?;
7072 let control_handle =
7073 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
7074 Ok(WlanSoftmacBridgeRequest::CancelScan {
7075 payload: req,
7076 responder: WlanSoftmacBridgeCancelScanResponder {
7077 control_handle: std::mem::ManuallyDrop::new(control_handle),
7078 tx_id: header.tx_id,
7079 },
7080 })
7081 }
7082 0x68522c7122d5f78c => {
7083 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7084 let mut req = fidl::new_empty!(
7085 WlanSoftmacBaseUpdateWmmParametersRequest,
7086 fidl::encoding::DefaultFuchsiaResourceDialect
7087 );
7088 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseUpdateWmmParametersRequest>(&header, _body_bytes, handles, &mut req)?;
7089 let control_handle =
7090 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
7091 Ok(WlanSoftmacBridgeRequest::UpdateWmmParameters {
7092 payload: req,
7093 responder: WlanSoftmacBridgeUpdateWmmParametersResponder {
7094 control_handle: std::mem::ManuallyDrop::new(control_handle),
7095 tx_id: header.tx_id,
7096 },
7097 })
7098 }
7099 0x7b2c15a507020d4d => {
7100 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7101 let mut req = fidl::new_empty!(
7102 WlanSoftmacBridgeStartRequest,
7103 fidl::encoding::DefaultFuchsiaResourceDialect
7104 );
7105 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBridgeStartRequest>(&header, _body_bytes, handles, &mut req)?;
7106 let control_handle =
7107 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
7108 Ok(WlanSoftmacBridgeRequest::Start {
7109 ifc_bridge: req.ifc_bridge,
7110 ethernet_tx: req.ethernet_tx,
7111 wlan_rx: req.wlan_rx,
7112
7113 responder: WlanSoftmacBridgeStartResponder {
7114 control_handle: std::mem::ManuallyDrop::new(control_handle),
7115 tx_id: header.tx_id,
7116 },
7117 })
7118 }
7119 0x412503cb3aaa350b => {
7120 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7121 let mut req = fidl::new_empty!(
7122 WlanSoftmacBridgeSetEthernetStatusRequest,
7123 fidl::encoding::DefaultFuchsiaResourceDialect
7124 );
7125 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBridgeSetEthernetStatusRequest>(&header, _body_bytes, handles, &mut req)?;
7126 let control_handle =
7127 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
7128 Ok(WlanSoftmacBridgeRequest::SetEthernetStatus {
7129 status: req.status,
7130
7131 responder: WlanSoftmacBridgeSetEthernetStatusResponder {
7132 control_handle: std::mem::ManuallyDrop::new(control_handle),
7133 tx_id: header.tx_id,
7134 },
7135 })
7136 }
7137 _ => Err(fidl::Error::UnknownOrdinal {
7138 ordinal: header.ordinal,
7139 protocol_name:
7140 <WlanSoftmacBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7141 }),
7142 }))
7143 },
7144 )
7145 }
7146}
7147
7148#[derive(Debug)]
7152pub enum WlanSoftmacBridgeRequest {
7153 Query { responder: WlanSoftmacBridgeQueryResponder },
7161 QueryDiscoverySupport { responder: WlanSoftmacBridgeQueryDiscoverySupportResponder },
7165 QueryMacSublayerSupport { responder: WlanSoftmacBridgeQueryMacSublayerSupportResponder },
7173 QuerySecuritySupport { responder: WlanSoftmacBridgeQuerySecuritySupportResponder },
7176 QuerySpectrumManagementSupport {
7180 responder: WlanSoftmacBridgeQuerySpectrumManagementSupportResponder,
7181 },
7182 SetChannel {
7190 payload: WlanSoftmacBaseSetChannelRequest,
7191 responder: WlanSoftmacBridgeSetChannelResponder,
7192 },
7193 JoinBss {
7203 join_request: fidl_fuchsia_wlan_common::JoinBssRequest,
7204 responder: WlanSoftmacBridgeJoinBssResponder,
7205 },
7206 EnableBeaconing {
7221 payload: WlanSoftmacBaseEnableBeaconingRequest,
7222 responder: WlanSoftmacBridgeEnableBeaconingResponder,
7223 },
7224 DisableBeaconing { responder: WlanSoftmacBridgeDisableBeaconingResponder },
7226 InstallKey { payload: WlanKeyConfiguration, responder: WlanSoftmacBridgeInstallKeyResponder },
7233 NotifyAssociationComplete {
7243 assoc_cfg: WlanAssociationConfig,
7244 responder: WlanSoftmacBridgeNotifyAssociationCompleteResponder,
7245 },
7246 ClearAssociation {
7248 payload: WlanSoftmacBaseClearAssociationRequest,
7249 responder: WlanSoftmacBridgeClearAssociationResponder,
7250 },
7251 StartPassiveScan {
7265 payload: WlanSoftmacBaseStartPassiveScanRequest,
7266 responder: WlanSoftmacBridgeStartPassiveScanResponder,
7267 },
7268 StartActiveScan {
7282 payload: WlanSoftmacStartActiveScanRequest,
7283 responder: WlanSoftmacBridgeStartActiveScanResponder,
7284 },
7285 CancelScan {
7299 payload: WlanSoftmacBaseCancelScanRequest,
7300 responder: WlanSoftmacBridgeCancelScanResponder,
7301 },
7302 UpdateWmmParameters {
7305 payload: WlanSoftmacBaseUpdateWmmParametersRequest,
7306 responder: WlanSoftmacBridgeUpdateWmmParametersResponder,
7307 },
7308 Start {
7348 ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
7349 ethernet_tx: u64,
7350 wlan_rx: u64,
7351 responder: WlanSoftmacBridgeStartResponder,
7352 },
7353 SetEthernetStatus { status: u32, responder: WlanSoftmacBridgeSetEthernetStatusResponder },
7371}
7372
7373impl WlanSoftmacBridgeRequest {
7374 #[allow(irrefutable_let_patterns)]
7375 pub fn into_query(self) -> Option<(WlanSoftmacBridgeQueryResponder)> {
7376 if let WlanSoftmacBridgeRequest::Query { responder } = self {
7377 Some((responder))
7378 } else {
7379 None
7380 }
7381 }
7382
7383 #[allow(irrefutable_let_patterns)]
7384 pub fn into_query_discovery_support(
7385 self,
7386 ) -> Option<(WlanSoftmacBridgeQueryDiscoverySupportResponder)> {
7387 if let WlanSoftmacBridgeRequest::QueryDiscoverySupport { responder } = self {
7388 Some((responder))
7389 } else {
7390 None
7391 }
7392 }
7393
7394 #[allow(irrefutable_let_patterns)]
7395 pub fn into_query_mac_sublayer_support(
7396 self,
7397 ) -> Option<(WlanSoftmacBridgeQueryMacSublayerSupportResponder)> {
7398 if let WlanSoftmacBridgeRequest::QueryMacSublayerSupport { responder } = self {
7399 Some((responder))
7400 } else {
7401 None
7402 }
7403 }
7404
7405 #[allow(irrefutable_let_patterns)]
7406 pub fn into_query_security_support(
7407 self,
7408 ) -> Option<(WlanSoftmacBridgeQuerySecuritySupportResponder)> {
7409 if let WlanSoftmacBridgeRequest::QuerySecuritySupport { responder } = self {
7410 Some((responder))
7411 } else {
7412 None
7413 }
7414 }
7415
7416 #[allow(irrefutable_let_patterns)]
7417 pub fn into_query_spectrum_management_support(
7418 self,
7419 ) -> Option<(WlanSoftmacBridgeQuerySpectrumManagementSupportResponder)> {
7420 if let WlanSoftmacBridgeRequest::QuerySpectrumManagementSupport { responder } = self {
7421 Some((responder))
7422 } else {
7423 None
7424 }
7425 }
7426
7427 #[allow(irrefutable_let_patterns)]
7428 pub fn into_set_channel(
7429 self,
7430 ) -> Option<(WlanSoftmacBaseSetChannelRequest, WlanSoftmacBridgeSetChannelResponder)> {
7431 if let WlanSoftmacBridgeRequest::SetChannel { payload, responder } = self {
7432 Some((payload, responder))
7433 } else {
7434 None
7435 }
7436 }
7437
7438 #[allow(irrefutable_let_patterns)]
7439 pub fn into_join_bss(
7440 self,
7441 ) -> Option<(fidl_fuchsia_wlan_common::JoinBssRequest, WlanSoftmacBridgeJoinBssResponder)> {
7442 if let WlanSoftmacBridgeRequest::JoinBss { join_request, responder } = self {
7443 Some((join_request, responder))
7444 } else {
7445 None
7446 }
7447 }
7448
7449 #[allow(irrefutable_let_patterns)]
7450 pub fn into_enable_beaconing(
7451 self,
7452 ) -> Option<(WlanSoftmacBaseEnableBeaconingRequest, WlanSoftmacBridgeEnableBeaconingResponder)>
7453 {
7454 if let WlanSoftmacBridgeRequest::EnableBeaconing { payload, responder } = self {
7455 Some((payload, responder))
7456 } else {
7457 None
7458 }
7459 }
7460
7461 #[allow(irrefutable_let_patterns)]
7462 pub fn into_disable_beaconing(self) -> Option<(WlanSoftmacBridgeDisableBeaconingResponder)> {
7463 if let WlanSoftmacBridgeRequest::DisableBeaconing { responder } = self {
7464 Some((responder))
7465 } else {
7466 None
7467 }
7468 }
7469
7470 #[allow(irrefutable_let_patterns)]
7471 pub fn into_install_key(
7472 self,
7473 ) -> Option<(WlanKeyConfiguration, WlanSoftmacBridgeInstallKeyResponder)> {
7474 if let WlanSoftmacBridgeRequest::InstallKey { payload, responder } = self {
7475 Some((payload, responder))
7476 } else {
7477 None
7478 }
7479 }
7480
7481 #[allow(irrefutable_let_patterns)]
7482 pub fn into_notify_association_complete(
7483 self,
7484 ) -> Option<(WlanAssociationConfig, WlanSoftmacBridgeNotifyAssociationCompleteResponder)> {
7485 if let WlanSoftmacBridgeRequest::NotifyAssociationComplete { assoc_cfg, responder } = self {
7486 Some((assoc_cfg, responder))
7487 } else {
7488 None
7489 }
7490 }
7491
7492 #[allow(irrefutable_let_patterns)]
7493 pub fn into_clear_association(
7494 self,
7495 ) -> Option<(WlanSoftmacBaseClearAssociationRequest, WlanSoftmacBridgeClearAssociationResponder)>
7496 {
7497 if let WlanSoftmacBridgeRequest::ClearAssociation { payload, responder } = self {
7498 Some((payload, responder))
7499 } else {
7500 None
7501 }
7502 }
7503
7504 #[allow(irrefutable_let_patterns)]
7505 pub fn into_start_passive_scan(
7506 self,
7507 ) -> Option<(WlanSoftmacBaseStartPassiveScanRequest, WlanSoftmacBridgeStartPassiveScanResponder)>
7508 {
7509 if let WlanSoftmacBridgeRequest::StartPassiveScan { payload, responder } = self {
7510 Some((payload, responder))
7511 } else {
7512 None
7513 }
7514 }
7515
7516 #[allow(irrefutable_let_patterns)]
7517 pub fn into_start_active_scan(
7518 self,
7519 ) -> Option<(WlanSoftmacStartActiveScanRequest, WlanSoftmacBridgeStartActiveScanResponder)>
7520 {
7521 if let WlanSoftmacBridgeRequest::StartActiveScan { payload, responder } = self {
7522 Some((payload, responder))
7523 } else {
7524 None
7525 }
7526 }
7527
7528 #[allow(irrefutable_let_patterns)]
7529 pub fn into_cancel_scan(
7530 self,
7531 ) -> Option<(WlanSoftmacBaseCancelScanRequest, WlanSoftmacBridgeCancelScanResponder)> {
7532 if let WlanSoftmacBridgeRequest::CancelScan { payload, responder } = self {
7533 Some((payload, responder))
7534 } else {
7535 None
7536 }
7537 }
7538
7539 #[allow(irrefutable_let_patterns)]
7540 pub fn into_update_wmm_parameters(
7541 self,
7542 ) -> Option<(
7543 WlanSoftmacBaseUpdateWmmParametersRequest,
7544 WlanSoftmacBridgeUpdateWmmParametersResponder,
7545 )> {
7546 if let WlanSoftmacBridgeRequest::UpdateWmmParameters { payload, responder } = self {
7547 Some((payload, responder))
7548 } else {
7549 None
7550 }
7551 }
7552
7553 #[allow(irrefutable_let_patterns)]
7554 pub fn into_start(
7555 self,
7556 ) -> Option<(
7557 fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
7558 u64,
7559 u64,
7560 WlanSoftmacBridgeStartResponder,
7561 )> {
7562 if let WlanSoftmacBridgeRequest::Start { ifc_bridge, ethernet_tx, wlan_rx, responder } =
7563 self
7564 {
7565 Some((ifc_bridge, ethernet_tx, wlan_rx, responder))
7566 } else {
7567 None
7568 }
7569 }
7570
7571 #[allow(irrefutable_let_patterns)]
7572 pub fn into_set_ethernet_status(
7573 self,
7574 ) -> Option<(u32, WlanSoftmacBridgeSetEthernetStatusResponder)> {
7575 if let WlanSoftmacBridgeRequest::SetEthernetStatus { status, responder } = self {
7576 Some((status, responder))
7577 } else {
7578 None
7579 }
7580 }
7581
7582 pub fn method_name(&self) -> &'static str {
7584 match *self {
7585 WlanSoftmacBridgeRequest::Query { .. } => "query",
7586 WlanSoftmacBridgeRequest::QueryDiscoverySupport { .. } => "query_discovery_support",
7587 WlanSoftmacBridgeRequest::QueryMacSublayerSupport { .. } => {
7588 "query_mac_sublayer_support"
7589 }
7590 WlanSoftmacBridgeRequest::QuerySecuritySupport { .. } => "query_security_support",
7591 WlanSoftmacBridgeRequest::QuerySpectrumManagementSupport { .. } => {
7592 "query_spectrum_management_support"
7593 }
7594 WlanSoftmacBridgeRequest::SetChannel { .. } => "set_channel",
7595 WlanSoftmacBridgeRequest::JoinBss { .. } => "join_bss",
7596 WlanSoftmacBridgeRequest::EnableBeaconing { .. } => "enable_beaconing",
7597 WlanSoftmacBridgeRequest::DisableBeaconing { .. } => "disable_beaconing",
7598 WlanSoftmacBridgeRequest::InstallKey { .. } => "install_key",
7599 WlanSoftmacBridgeRequest::NotifyAssociationComplete { .. } => {
7600 "notify_association_complete"
7601 }
7602 WlanSoftmacBridgeRequest::ClearAssociation { .. } => "clear_association",
7603 WlanSoftmacBridgeRequest::StartPassiveScan { .. } => "start_passive_scan",
7604 WlanSoftmacBridgeRequest::StartActiveScan { .. } => "start_active_scan",
7605 WlanSoftmacBridgeRequest::CancelScan { .. } => "cancel_scan",
7606 WlanSoftmacBridgeRequest::UpdateWmmParameters { .. } => "update_wmm_parameters",
7607 WlanSoftmacBridgeRequest::Start { .. } => "start",
7608 WlanSoftmacBridgeRequest::SetEthernetStatus { .. } => "set_ethernet_status",
7609 }
7610 }
7611}
7612
7613#[derive(Debug, Clone)]
7614pub struct WlanSoftmacBridgeControlHandle {
7615 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7616}
7617
7618impl fidl::endpoints::ControlHandle for WlanSoftmacBridgeControlHandle {
7619 fn shutdown(&self) {
7620 self.inner.shutdown()
7621 }
7622 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7623 self.inner.shutdown_with_epitaph(status)
7624 }
7625
7626 fn is_closed(&self) -> bool {
7627 self.inner.channel().is_closed()
7628 }
7629 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
7630 self.inner.channel().on_closed()
7631 }
7632
7633 #[cfg(target_os = "fuchsia")]
7634 fn signal_peer(
7635 &self,
7636 clear_mask: zx::Signals,
7637 set_mask: zx::Signals,
7638 ) -> Result<(), zx_status::Status> {
7639 use fidl::Peered;
7640 self.inner.channel().signal_peer(clear_mask, set_mask)
7641 }
7642}
7643
7644impl WlanSoftmacBridgeControlHandle {}
7645
7646#[must_use = "FIDL methods require a response to be sent"]
7647#[derive(Debug)]
7648pub struct WlanSoftmacBridgeQueryResponder {
7649 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7650 tx_id: u32,
7651}
7652
7653impl std::ops::Drop for WlanSoftmacBridgeQueryResponder {
7657 fn drop(&mut self) {
7658 self.control_handle.shutdown();
7659 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7661 }
7662}
7663
7664impl fidl::endpoints::Responder for WlanSoftmacBridgeQueryResponder {
7665 type ControlHandle = WlanSoftmacBridgeControlHandle;
7666
7667 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7668 &self.control_handle
7669 }
7670
7671 fn drop_without_shutdown(mut self) {
7672 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7674 std::mem::forget(self);
7676 }
7677}
7678
7679impl WlanSoftmacBridgeQueryResponder {
7680 pub fn send(
7684 self,
7685 mut result: Result<&WlanSoftmacQueryResponse, i32>,
7686 ) -> Result<(), fidl::Error> {
7687 let _result = self.send_raw(result);
7688 if _result.is_err() {
7689 self.control_handle.shutdown();
7690 }
7691 self.drop_without_shutdown();
7692 _result
7693 }
7694
7695 pub fn send_no_shutdown_on_err(
7697 self,
7698 mut result: Result<&WlanSoftmacQueryResponse, i32>,
7699 ) -> Result<(), fidl::Error> {
7700 let _result = self.send_raw(result);
7701 self.drop_without_shutdown();
7702 _result
7703 }
7704
7705 fn send_raw(
7706 &self,
7707 mut result: Result<&WlanSoftmacQueryResponse, i32>,
7708 ) -> Result<(), fidl::Error> {
7709 self.control_handle.inner.send::<fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>>(
7710 result,
7711 self.tx_id,
7712 0x18231a638e508f9d,
7713 fidl::encoding::DynamicFlags::empty(),
7714 )
7715 }
7716}
7717
7718#[must_use = "FIDL methods require a response to be sent"]
7719#[derive(Debug)]
7720pub struct WlanSoftmacBridgeQueryDiscoverySupportResponder {
7721 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7722 tx_id: u32,
7723}
7724
7725impl std::ops::Drop for WlanSoftmacBridgeQueryDiscoverySupportResponder {
7729 fn drop(&mut self) {
7730 self.control_handle.shutdown();
7731 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7733 }
7734}
7735
7736impl fidl::endpoints::Responder for WlanSoftmacBridgeQueryDiscoverySupportResponder {
7737 type ControlHandle = WlanSoftmacBridgeControlHandle;
7738
7739 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7740 &self.control_handle
7741 }
7742
7743 fn drop_without_shutdown(mut self) {
7744 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7746 std::mem::forget(self);
7748 }
7749}
7750
7751impl WlanSoftmacBridgeQueryDiscoverySupportResponder {
7752 pub fn send(
7756 self,
7757 mut result: Result<&fidl_fuchsia_wlan_common::DiscoverySupport, i32>,
7758 ) -> Result<(), fidl::Error> {
7759 let _result = self.send_raw(result);
7760 if _result.is_err() {
7761 self.control_handle.shutdown();
7762 }
7763 self.drop_without_shutdown();
7764 _result
7765 }
7766
7767 pub fn send_no_shutdown_on_err(
7769 self,
7770 mut result: Result<&fidl_fuchsia_wlan_common::DiscoverySupport, i32>,
7771 ) -> Result<(), fidl::Error> {
7772 let _result = self.send_raw(result);
7773 self.drop_without_shutdown();
7774 _result
7775 }
7776
7777 fn send_raw(
7778 &self,
7779 mut result: Result<&fidl_fuchsia_wlan_common::DiscoverySupport, i32>,
7780 ) -> Result<(), fidl::Error> {
7781 self.control_handle.inner.send::<fidl::encoding::ResultType<
7782 WlanSoftmacBaseQueryDiscoverySupportResponse,
7783 i32,
7784 >>(
7785 result.map(|resp| (resp,)),
7786 self.tx_id,
7787 0x16797affc0cb58ae,
7788 fidl::encoding::DynamicFlags::empty(),
7789 )
7790 }
7791}
7792
7793#[must_use = "FIDL methods require a response to be sent"]
7794#[derive(Debug)]
7795pub struct WlanSoftmacBridgeQueryMacSublayerSupportResponder {
7796 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7797 tx_id: u32,
7798}
7799
7800impl std::ops::Drop for WlanSoftmacBridgeQueryMacSublayerSupportResponder {
7804 fn drop(&mut self) {
7805 self.control_handle.shutdown();
7806 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7808 }
7809}
7810
7811impl fidl::endpoints::Responder for WlanSoftmacBridgeQueryMacSublayerSupportResponder {
7812 type ControlHandle = WlanSoftmacBridgeControlHandle;
7813
7814 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7815 &self.control_handle
7816 }
7817
7818 fn drop_without_shutdown(mut self) {
7819 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7821 std::mem::forget(self);
7823 }
7824}
7825
7826impl WlanSoftmacBridgeQueryMacSublayerSupportResponder {
7827 pub fn send(
7831 self,
7832 mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
7833 ) -> Result<(), fidl::Error> {
7834 let _result = self.send_raw(result);
7835 if _result.is_err() {
7836 self.control_handle.shutdown();
7837 }
7838 self.drop_without_shutdown();
7839 _result
7840 }
7841
7842 pub fn send_no_shutdown_on_err(
7844 self,
7845 mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
7846 ) -> Result<(), fidl::Error> {
7847 let _result = self.send_raw(result);
7848 self.drop_without_shutdown();
7849 _result
7850 }
7851
7852 fn send_raw(
7853 &self,
7854 mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
7855 ) -> Result<(), fidl::Error> {
7856 self.control_handle.inner.send::<fidl::encoding::ResultType<
7857 WlanSoftmacBaseQueryMacSublayerSupportResponse,
7858 i32,
7859 >>(
7860 result.map(|resp| (resp,)),
7861 self.tx_id,
7862 0x7302c3f8c131f075,
7863 fidl::encoding::DynamicFlags::empty(),
7864 )
7865 }
7866}
7867
7868#[must_use = "FIDL methods require a response to be sent"]
7869#[derive(Debug)]
7870pub struct WlanSoftmacBridgeQuerySecuritySupportResponder {
7871 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7872 tx_id: u32,
7873}
7874
7875impl std::ops::Drop for WlanSoftmacBridgeQuerySecuritySupportResponder {
7879 fn drop(&mut self) {
7880 self.control_handle.shutdown();
7881 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7883 }
7884}
7885
7886impl fidl::endpoints::Responder for WlanSoftmacBridgeQuerySecuritySupportResponder {
7887 type ControlHandle = WlanSoftmacBridgeControlHandle;
7888
7889 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7890 &self.control_handle
7891 }
7892
7893 fn drop_without_shutdown(mut self) {
7894 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7896 std::mem::forget(self);
7898 }
7899}
7900
7901impl WlanSoftmacBridgeQuerySecuritySupportResponder {
7902 pub fn send(
7906 self,
7907 mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
7908 ) -> Result<(), fidl::Error> {
7909 let _result = self.send_raw(result);
7910 if _result.is_err() {
7911 self.control_handle.shutdown();
7912 }
7913 self.drop_without_shutdown();
7914 _result
7915 }
7916
7917 pub fn send_no_shutdown_on_err(
7919 self,
7920 mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
7921 ) -> Result<(), fidl::Error> {
7922 let _result = self.send_raw(result);
7923 self.drop_without_shutdown();
7924 _result
7925 }
7926
7927 fn send_raw(
7928 &self,
7929 mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
7930 ) -> Result<(), fidl::Error> {
7931 self.control_handle.inner.send::<fidl::encoding::ResultType<
7932 WlanSoftmacBaseQuerySecuritySupportResponse,
7933 i32,
7934 >>(
7935 result.map(|resp| (resp,)),
7936 self.tx_id,
7937 0x3691bb75abf6354,
7938 fidl::encoding::DynamicFlags::empty(),
7939 )
7940 }
7941}
7942
7943#[must_use = "FIDL methods require a response to be sent"]
7944#[derive(Debug)]
7945pub struct WlanSoftmacBridgeQuerySpectrumManagementSupportResponder {
7946 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7947 tx_id: u32,
7948}
7949
7950impl std::ops::Drop for WlanSoftmacBridgeQuerySpectrumManagementSupportResponder {
7954 fn drop(&mut self) {
7955 self.control_handle.shutdown();
7956 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7958 }
7959}
7960
7961impl fidl::endpoints::Responder for WlanSoftmacBridgeQuerySpectrumManagementSupportResponder {
7962 type ControlHandle = WlanSoftmacBridgeControlHandle;
7963
7964 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7965 &self.control_handle
7966 }
7967
7968 fn drop_without_shutdown(mut self) {
7969 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7971 std::mem::forget(self);
7973 }
7974}
7975
7976impl WlanSoftmacBridgeQuerySpectrumManagementSupportResponder {
7977 pub fn send(
7981 self,
7982 mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
7983 ) -> Result<(), fidl::Error> {
7984 let _result = self.send_raw(result);
7985 if _result.is_err() {
7986 self.control_handle.shutdown();
7987 }
7988 self.drop_without_shutdown();
7989 _result
7990 }
7991
7992 pub fn send_no_shutdown_on_err(
7994 self,
7995 mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
7996 ) -> Result<(), fidl::Error> {
7997 let _result = self.send_raw(result);
7998 self.drop_without_shutdown();
7999 _result
8000 }
8001
8002 fn send_raw(
8003 &self,
8004 mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
8005 ) -> Result<(), fidl::Error> {
8006 self.control_handle.inner.send::<fidl::encoding::ResultType<
8007 WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
8008 i32,
8009 >>(
8010 result.map(|resp| (resp,)),
8011 self.tx_id,
8012 0x347d78dc1d4d27bf,
8013 fidl::encoding::DynamicFlags::empty(),
8014 )
8015 }
8016}
8017
8018#[must_use = "FIDL methods require a response to be sent"]
8019#[derive(Debug)]
8020pub struct WlanSoftmacBridgeSetChannelResponder {
8021 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
8022 tx_id: u32,
8023}
8024
8025impl std::ops::Drop for WlanSoftmacBridgeSetChannelResponder {
8029 fn drop(&mut self) {
8030 self.control_handle.shutdown();
8031 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8033 }
8034}
8035
8036impl fidl::endpoints::Responder for WlanSoftmacBridgeSetChannelResponder {
8037 type ControlHandle = WlanSoftmacBridgeControlHandle;
8038
8039 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8040 &self.control_handle
8041 }
8042
8043 fn drop_without_shutdown(mut self) {
8044 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8046 std::mem::forget(self);
8048 }
8049}
8050
8051impl WlanSoftmacBridgeSetChannelResponder {
8052 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8056 let _result = self.send_raw(result);
8057 if _result.is_err() {
8058 self.control_handle.shutdown();
8059 }
8060 self.drop_without_shutdown();
8061 _result
8062 }
8063
8064 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8066 let _result = self.send_raw(result);
8067 self.drop_without_shutdown();
8068 _result
8069 }
8070
8071 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8072 self.control_handle
8073 .inner
8074 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8075 result,
8076 self.tx_id,
8077 0x12836b533cd63ece,
8078 fidl::encoding::DynamicFlags::empty(),
8079 )
8080 }
8081}
8082
8083#[must_use = "FIDL methods require a response to be sent"]
8084#[derive(Debug)]
8085pub struct WlanSoftmacBridgeJoinBssResponder {
8086 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
8087 tx_id: u32,
8088}
8089
8090impl std::ops::Drop for WlanSoftmacBridgeJoinBssResponder {
8094 fn drop(&mut self) {
8095 self.control_handle.shutdown();
8096 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8098 }
8099}
8100
8101impl fidl::endpoints::Responder for WlanSoftmacBridgeJoinBssResponder {
8102 type ControlHandle = WlanSoftmacBridgeControlHandle;
8103
8104 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8105 &self.control_handle
8106 }
8107
8108 fn drop_without_shutdown(mut self) {
8109 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8111 std::mem::forget(self);
8113 }
8114}
8115
8116impl WlanSoftmacBridgeJoinBssResponder {
8117 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8121 let _result = self.send_raw(result);
8122 if _result.is_err() {
8123 self.control_handle.shutdown();
8124 }
8125 self.drop_without_shutdown();
8126 _result
8127 }
8128
8129 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8131 let _result = self.send_raw(result);
8132 self.drop_without_shutdown();
8133 _result
8134 }
8135
8136 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8137 self.control_handle
8138 .inner
8139 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8140 result,
8141 self.tx_id,
8142 0x1336fb5455b77a6e,
8143 fidl::encoding::DynamicFlags::empty(),
8144 )
8145 }
8146}
8147
8148#[must_use = "FIDL methods require a response to be sent"]
8149#[derive(Debug)]
8150pub struct WlanSoftmacBridgeEnableBeaconingResponder {
8151 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
8152 tx_id: u32,
8153}
8154
8155impl std::ops::Drop for WlanSoftmacBridgeEnableBeaconingResponder {
8159 fn drop(&mut self) {
8160 self.control_handle.shutdown();
8161 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8163 }
8164}
8165
8166impl fidl::endpoints::Responder for WlanSoftmacBridgeEnableBeaconingResponder {
8167 type ControlHandle = WlanSoftmacBridgeControlHandle;
8168
8169 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8170 &self.control_handle
8171 }
8172
8173 fn drop_without_shutdown(mut self) {
8174 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8176 std::mem::forget(self);
8178 }
8179}
8180
8181impl WlanSoftmacBridgeEnableBeaconingResponder {
8182 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8186 let _result = self.send_raw(result);
8187 if _result.is_err() {
8188 self.control_handle.shutdown();
8189 }
8190 self.drop_without_shutdown();
8191 _result
8192 }
8193
8194 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8196 let _result = self.send_raw(result);
8197 self.drop_without_shutdown();
8198 _result
8199 }
8200
8201 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8202 self.control_handle
8203 .inner
8204 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8205 result,
8206 self.tx_id,
8207 0x6c35807632c64576,
8208 fidl::encoding::DynamicFlags::empty(),
8209 )
8210 }
8211}
8212
8213#[must_use = "FIDL methods require a response to be sent"]
8214#[derive(Debug)]
8215pub struct WlanSoftmacBridgeDisableBeaconingResponder {
8216 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
8217 tx_id: u32,
8218}
8219
8220impl std::ops::Drop for WlanSoftmacBridgeDisableBeaconingResponder {
8224 fn drop(&mut self) {
8225 self.control_handle.shutdown();
8226 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8228 }
8229}
8230
8231impl fidl::endpoints::Responder for WlanSoftmacBridgeDisableBeaconingResponder {
8232 type ControlHandle = WlanSoftmacBridgeControlHandle;
8233
8234 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8235 &self.control_handle
8236 }
8237
8238 fn drop_without_shutdown(mut self) {
8239 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8241 std::mem::forget(self);
8243 }
8244}
8245
8246impl WlanSoftmacBridgeDisableBeaconingResponder {
8247 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8251 let _result = self.send_raw(result);
8252 if _result.is_err() {
8253 self.control_handle.shutdown();
8254 }
8255 self.drop_without_shutdown();
8256 _result
8257 }
8258
8259 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8261 let _result = self.send_raw(result);
8262 self.drop_without_shutdown();
8263 _result
8264 }
8265
8266 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8267 self.control_handle
8268 .inner
8269 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8270 result,
8271 self.tx_id,
8272 0x3303b30f99dbb406,
8273 fidl::encoding::DynamicFlags::empty(),
8274 )
8275 }
8276}
8277
8278#[must_use = "FIDL methods require a response to be sent"]
8279#[derive(Debug)]
8280pub struct WlanSoftmacBridgeInstallKeyResponder {
8281 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
8282 tx_id: u32,
8283}
8284
8285impl std::ops::Drop for WlanSoftmacBridgeInstallKeyResponder {
8289 fn drop(&mut self) {
8290 self.control_handle.shutdown();
8291 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8293 }
8294}
8295
8296impl fidl::endpoints::Responder for WlanSoftmacBridgeInstallKeyResponder {
8297 type ControlHandle = WlanSoftmacBridgeControlHandle;
8298
8299 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8300 &self.control_handle
8301 }
8302
8303 fn drop_without_shutdown(mut self) {
8304 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8306 std::mem::forget(self);
8308 }
8309}
8310
8311impl WlanSoftmacBridgeInstallKeyResponder {
8312 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8316 let _result = self.send_raw(result);
8317 if _result.is_err() {
8318 self.control_handle.shutdown();
8319 }
8320 self.drop_without_shutdown();
8321 _result
8322 }
8323
8324 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8326 let _result = self.send_raw(result);
8327 self.drop_without_shutdown();
8328 _result
8329 }
8330
8331 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8332 self.control_handle
8333 .inner
8334 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8335 result,
8336 self.tx_id,
8337 0x7decf9b4200b9131,
8338 fidl::encoding::DynamicFlags::empty(),
8339 )
8340 }
8341}
8342
8343#[must_use = "FIDL methods require a response to be sent"]
8344#[derive(Debug)]
8345pub struct WlanSoftmacBridgeNotifyAssociationCompleteResponder {
8346 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
8347 tx_id: u32,
8348}
8349
8350impl std::ops::Drop for WlanSoftmacBridgeNotifyAssociationCompleteResponder {
8354 fn drop(&mut self) {
8355 self.control_handle.shutdown();
8356 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8358 }
8359}
8360
8361impl fidl::endpoints::Responder for WlanSoftmacBridgeNotifyAssociationCompleteResponder {
8362 type ControlHandle = WlanSoftmacBridgeControlHandle;
8363
8364 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8365 &self.control_handle
8366 }
8367
8368 fn drop_without_shutdown(mut self) {
8369 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8371 std::mem::forget(self);
8373 }
8374}
8375
8376impl WlanSoftmacBridgeNotifyAssociationCompleteResponder {
8377 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8381 let _result = self.send_raw(result);
8382 if _result.is_err() {
8383 self.control_handle.shutdown();
8384 }
8385 self.drop_without_shutdown();
8386 _result
8387 }
8388
8389 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8391 let _result = self.send_raw(result);
8392 self.drop_without_shutdown();
8393 _result
8394 }
8395
8396 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8397 self.control_handle
8398 .inner
8399 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8400 result,
8401 self.tx_id,
8402 0x436ffe3ba461d6cd,
8403 fidl::encoding::DynamicFlags::empty(),
8404 )
8405 }
8406}
8407
8408#[must_use = "FIDL methods require a response to be sent"]
8409#[derive(Debug)]
8410pub struct WlanSoftmacBridgeClearAssociationResponder {
8411 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
8412 tx_id: u32,
8413}
8414
8415impl std::ops::Drop for WlanSoftmacBridgeClearAssociationResponder {
8419 fn drop(&mut self) {
8420 self.control_handle.shutdown();
8421 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8423 }
8424}
8425
8426impl fidl::endpoints::Responder for WlanSoftmacBridgeClearAssociationResponder {
8427 type ControlHandle = WlanSoftmacBridgeControlHandle;
8428
8429 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8430 &self.control_handle
8431 }
8432
8433 fn drop_without_shutdown(mut self) {
8434 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8436 std::mem::forget(self);
8438 }
8439}
8440
8441impl WlanSoftmacBridgeClearAssociationResponder {
8442 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8446 let _result = self.send_raw(result);
8447 if _result.is_err() {
8448 self.control_handle.shutdown();
8449 }
8450 self.drop_without_shutdown();
8451 _result
8452 }
8453
8454 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8456 let _result = self.send_raw(result);
8457 self.drop_without_shutdown();
8458 _result
8459 }
8460
8461 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8462 self.control_handle
8463 .inner
8464 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8465 result,
8466 self.tx_id,
8467 0x581d76c39190a7dd,
8468 fidl::encoding::DynamicFlags::empty(),
8469 )
8470 }
8471}
8472
8473#[must_use = "FIDL methods require a response to be sent"]
8474#[derive(Debug)]
8475pub struct WlanSoftmacBridgeStartPassiveScanResponder {
8476 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
8477 tx_id: u32,
8478}
8479
8480impl std::ops::Drop for WlanSoftmacBridgeStartPassiveScanResponder {
8484 fn drop(&mut self) {
8485 self.control_handle.shutdown();
8486 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8488 }
8489}
8490
8491impl fidl::endpoints::Responder for WlanSoftmacBridgeStartPassiveScanResponder {
8492 type ControlHandle = WlanSoftmacBridgeControlHandle;
8493
8494 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8495 &self.control_handle
8496 }
8497
8498 fn drop_without_shutdown(mut self) {
8499 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8501 std::mem::forget(self);
8503 }
8504}
8505
8506impl WlanSoftmacBridgeStartPassiveScanResponder {
8507 pub fn send(
8511 self,
8512 mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
8513 ) -> Result<(), fidl::Error> {
8514 let _result = self.send_raw(result);
8515 if _result.is_err() {
8516 self.control_handle.shutdown();
8517 }
8518 self.drop_without_shutdown();
8519 _result
8520 }
8521
8522 pub fn send_no_shutdown_on_err(
8524 self,
8525 mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
8526 ) -> Result<(), fidl::Error> {
8527 let _result = self.send_raw(result);
8528 self.drop_without_shutdown();
8529 _result
8530 }
8531
8532 fn send_raw(
8533 &self,
8534 mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
8535 ) -> Result<(), fidl::Error> {
8536 self.control_handle.inner.send::<fidl::encoding::ResultType<
8537 WlanSoftmacBaseStartPassiveScanResponse,
8538 i32,
8539 >>(
8540 result,
8541 self.tx_id,
8542 0x5662f989cb4083bb,
8543 fidl::encoding::DynamicFlags::empty(),
8544 )
8545 }
8546}
8547
8548#[must_use = "FIDL methods require a response to be sent"]
8549#[derive(Debug)]
8550pub struct WlanSoftmacBridgeStartActiveScanResponder {
8551 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
8552 tx_id: u32,
8553}
8554
8555impl std::ops::Drop for WlanSoftmacBridgeStartActiveScanResponder {
8559 fn drop(&mut self) {
8560 self.control_handle.shutdown();
8561 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8563 }
8564}
8565
8566impl fidl::endpoints::Responder for WlanSoftmacBridgeStartActiveScanResponder {
8567 type ControlHandle = WlanSoftmacBridgeControlHandle;
8568
8569 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8570 &self.control_handle
8571 }
8572
8573 fn drop_without_shutdown(mut self) {
8574 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8576 std::mem::forget(self);
8578 }
8579}
8580
8581impl WlanSoftmacBridgeStartActiveScanResponder {
8582 pub fn send(
8586 self,
8587 mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
8588 ) -> Result<(), fidl::Error> {
8589 let _result = self.send_raw(result);
8590 if _result.is_err() {
8591 self.control_handle.shutdown();
8592 }
8593 self.drop_without_shutdown();
8594 _result
8595 }
8596
8597 pub fn send_no_shutdown_on_err(
8599 self,
8600 mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
8601 ) -> Result<(), fidl::Error> {
8602 let _result = self.send_raw(result);
8603 self.drop_without_shutdown();
8604 _result
8605 }
8606
8607 fn send_raw(
8608 &self,
8609 mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
8610 ) -> Result<(), fidl::Error> {
8611 self.control_handle.inner.send::<fidl::encoding::ResultType<
8612 WlanSoftmacBaseStartActiveScanResponse,
8613 i32,
8614 >>(
8615 result,
8616 self.tx_id,
8617 0x4896eafa9937751e,
8618 fidl::encoding::DynamicFlags::empty(),
8619 )
8620 }
8621}
8622
8623#[must_use = "FIDL methods require a response to be sent"]
8624#[derive(Debug)]
8625pub struct WlanSoftmacBridgeCancelScanResponder {
8626 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
8627 tx_id: u32,
8628}
8629
8630impl std::ops::Drop for WlanSoftmacBridgeCancelScanResponder {
8634 fn drop(&mut self) {
8635 self.control_handle.shutdown();
8636 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8638 }
8639}
8640
8641impl fidl::endpoints::Responder for WlanSoftmacBridgeCancelScanResponder {
8642 type ControlHandle = WlanSoftmacBridgeControlHandle;
8643
8644 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8645 &self.control_handle
8646 }
8647
8648 fn drop_without_shutdown(mut self) {
8649 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8651 std::mem::forget(self);
8653 }
8654}
8655
8656impl WlanSoftmacBridgeCancelScanResponder {
8657 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8661 let _result = self.send_raw(result);
8662 if _result.is_err() {
8663 self.control_handle.shutdown();
8664 }
8665 self.drop_without_shutdown();
8666 _result
8667 }
8668
8669 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8671 let _result = self.send_raw(result);
8672 self.drop_without_shutdown();
8673 _result
8674 }
8675
8676 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8677 self.control_handle
8678 .inner
8679 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8680 result,
8681 self.tx_id,
8682 0xf7d859369764556,
8683 fidl::encoding::DynamicFlags::empty(),
8684 )
8685 }
8686}
8687
8688#[must_use = "FIDL methods require a response to be sent"]
8689#[derive(Debug)]
8690pub struct WlanSoftmacBridgeUpdateWmmParametersResponder {
8691 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
8692 tx_id: u32,
8693}
8694
8695impl std::ops::Drop for WlanSoftmacBridgeUpdateWmmParametersResponder {
8699 fn drop(&mut self) {
8700 self.control_handle.shutdown();
8701 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8703 }
8704}
8705
8706impl fidl::endpoints::Responder for WlanSoftmacBridgeUpdateWmmParametersResponder {
8707 type ControlHandle = WlanSoftmacBridgeControlHandle;
8708
8709 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8710 &self.control_handle
8711 }
8712
8713 fn drop_without_shutdown(mut self) {
8714 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8716 std::mem::forget(self);
8718 }
8719}
8720
8721impl WlanSoftmacBridgeUpdateWmmParametersResponder {
8722 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8726 let _result = self.send_raw(result);
8727 if _result.is_err() {
8728 self.control_handle.shutdown();
8729 }
8730 self.drop_without_shutdown();
8731 _result
8732 }
8733
8734 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8736 let _result = self.send_raw(result);
8737 self.drop_without_shutdown();
8738 _result
8739 }
8740
8741 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8742 self.control_handle
8743 .inner
8744 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8745 result,
8746 self.tx_id,
8747 0x68522c7122d5f78c,
8748 fidl::encoding::DynamicFlags::empty(),
8749 )
8750 }
8751}
8752
8753#[must_use = "FIDL methods require a response to be sent"]
8754#[derive(Debug)]
8755pub struct WlanSoftmacBridgeStartResponder {
8756 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
8757 tx_id: u32,
8758}
8759
8760impl std::ops::Drop for WlanSoftmacBridgeStartResponder {
8764 fn drop(&mut self) {
8765 self.control_handle.shutdown();
8766 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8768 }
8769}
8770
8771impl fidl::endpoints::Responder for WlanSoftmacBridgeStartResponder {
8772 type ControlHandle = WlanSoftmacBridgeControlHandle;
8773
8774 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8775 &self.control_handle
8776 }
8777
8778 fn drop_without_shutdown(mut self) {
8779 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8781 std::mem::forget(self);
8783 }
8784}
8785
8786impl WlanSoftmacBridgeStartResponder {
8787 pub fn send(self, mut result: Result<fidl::Channel, i32>) -> Result<(), fidl::Error> {
8791 let _result = self.send_raw(result);
8792 if _result.is_err() {
8793 self.control_handle.shutdown();
8794 }
8795 self.drop_without_shutdown();
8796 _result
8797 }
8798
8799 pub fn send_no_shutdown_on_err(
8801 self,
8802 mut result: Result<fidl::Channel, i32>,
8803 ) -> Result<(), fidl::Error> {
8804 let _result = self.send_raw(result);
8805 self.drop_without_shutdown();
8806 _result
8807 }
8808
8809 fn send_raw(&self, mut result: Result<fidl::Channel, i32>) -> Result<(), fidl::Error> {
8810 self.control_handle
8811 .inner
8812 .send::<fidl::encoding::ResultType<WlanSoftmacBridgeStartResponse, i32>>(
8813 result.map(|sme_channel| (sme_channel,)),
8814 self.tx_id,
8815 0x7b2c15a507020d4d,
8816 fidl::encoding::DynamicFlags::empty(),
8817 )
8818 }
8819}
8820
8821#[must_use = "FIDL methods require a response to be sent"]
8822#[derive(Debug)]
8823pub struct WlanSoftmacBridgeSetEthernetStatusResponder {
8824 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
8825 tx_id: u32,
8826}
8827
8828impl std::ops::Drop for WlanSoftmacBridgeSetEthernetStatusResponder {
8832 fn drop(&mut self) {
8833 self.control_handle.shutdown();
8834 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8836 }
8837}
8838
8839impl fidl::endpoints::Responder for WlanSoftmacBridgeSetEthernetStatusResponder {
8840 type ControlHandle = WlanSoftmacBridgeControlHandle;
8841
8842 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8843 &self.control_handle
8844 }
8845
8846 fn drop_without_shutdown(mut self) {
8847 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8849 std::mem::forget(self);
8851 }
8852}
8853
8854impl WlanSoftmacBridgeSetEthernetStatusResponder {
8855 pub fn send(self) -> Result<(), fidl::Error> {
8859 let _result = self.send_raw();
8860 if _result.is_err() {
8861 self.control_handle.shutdown();
8862 }
8863 self.drop_without_shutdown();
8864 _result
8865 }
8866
8867 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
8869 let _result = self.send_raw();
8870 self.drop_without_shutdown();
8871 _result
8872 }
8873
8874 fn send_raw(&self) -> Result<(), fidl::Error> {
8875 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
8876 (),
8877 self.tx_id,
8878 0x412503cb3aaa350b,
8879 fidl::encoding::DynamicFlags::empty(),
8880 )
8881 }
8882}
8883
8884#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
8885pub struct WlanSoftmacIfcBaseMarker;
8886
8887impl fidl::endpoints::ProtocolMarker for WlanSoftmacIfcBaseMarker {
8888 type Proxy = WlanSoftmacIfcBaseProxy;
8889 type RequestStream = WlanSoftmacIfcBaseRequestStream;
8890 #[cfg(target_os = "fuchsia")]
8891 type SynchronousProxy = WlanSoftmacIfcBaseSynchronousProxy;
8892
8893 const DEBUG_NAME: &'static str = "(anonymous) WlanSoftmacIfcBase";
8894}
8895
8896pub trait WlanSoftmacIfcBaseProxyInterface: Send + Sync {
8897 type ReportTxResultResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
8898 fn r#report_tx_result(
8899 &self,
8900 tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
8901 ) -> Self::ReportTxResultResponseFut;
8902 type NotifyScanCompleteResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
8903 fn r#notify_scan_complete(
8904 &self,
8905 payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
8906 ) -> Self::NotifyScanCompleteResponseFut;
8907}
8908#[derive(Debug)]
8909#[cfg(target_os = "fuchsia")]
8910pub struct WlanSoftmacIfcBaseSynchronousProxy {
8911 client: fidl::client::sync::Client,
8912}
8913
8914#[cfg(target_os = "fuchsia")]
8915impl fidl::endpoints::SynchronousProxy for WlanSoftmacIfcBaseSynchronousProxy {
8916 type Proxy = WlanSoftmacIfcBaseProxy;
8917 type Protocol = WlanSoftmacIfcBaseMarker;
8918
8919 fn from_channel(inner: fidl::Channel) -> Self {
8920 Self::new(inner)
8921 }
8922
8923 fn into_channel(self) -> fidl::Channel {
8924 self.client.into_channel()
8925 }
8926
8927 fn as_channel(&self) -> &fidl::Channel {
8928 self.client.as_channel()
8929 }
8930}
8931
8932#[cfg(target_os = "fuchsia")]
8933impl WlanSoftmacIfcBaseSynchronousProxy {
8934 pub fn new(channel: fidl::Channel) -> Self {
8935 let protocol_name =
8936 <WlanSoftmacIfcBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
8937 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
8938 }
8939
8940 pub fn into_channel(self) -> fidl::Channel {
8941 self.client.into_channel()
8942 }
8943
8944 pub fn wait_for_event(
8947 &self,
8948 deadline: zx::MonotonicInstant,
8949 ) -> Result<WlanSoftmacIfcBaseEvent, fidl::Error> {
8950 WlanSoftmacIfcBaseEvent::decode(self.client.wait_for_event(deadline)?)
8951 }
8952
8953 pub fn r#report_tx_result(
8958 &self,
8959 mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
8960 ___deadline: zx::MonotonicInstant,
8961 ) -> Result<(), fidl::Error> {
8962 let _response = self
8963 .client
8964 .send_query::<WlanSoftmacIfcBaseReportTxResultRequest, fidl::encoding::EmptyPayload>(
8965 (tx_result,),
8966 0x5835c2f13d94e09a,
8967 fidl::encoding::DynamicFlags::empty(),
8968 ___deadline,
8969 )?;
8970 Ok(_response)
8971 }
8972
8973 pub fn r#notify_scan_complete(
8985 &self,
8986 mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
8987 ___deadline: zx::MonotonicInstant,
8988 ) -> Result<(), fidl::Error> {
8989 let _response = self.client.send_query::<
8990 WlanSoftmacIfcBaseNotifyScanCompleteRequest,
8991 fidl::encoding::EmptyPayload,
8992 >(
8993 payload,
8994 0x7045e3cd460dc42c,
8995 fidl::encoding::DynamicFlags::empty(),
8996 ___deadline,
8997 )?;
8998 Ok(_response)
8999 }
9000}
9001
9002#[derive(Debug, Clone)]
9003pub struct WlanSoftmacIfcBaseProxy {
9004 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
9005}
9006
9007impl fidl::endpoints::Proxy for WlanSoftmacIfcBaseProxy {
9008 type Protocol = WlanSoftmacIfcBaseMarker;
9009
9010 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
9011 Self::new(inner)
9012 }
9013
9014 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
9015 self.client.into_channel().map_err(|client| Self { client })
9016 }
9017
9018 fn as_channel(&self) -> &::fidl::AsyncChannel {
9019 self.client.as_channel()
9020 }
9021}
9022
9023impl WlanSoftmacIfcBaseProxy {
9024 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
9026 let protocol_name =
9027 <WlanSoftmacIfcBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
9028 Self { client: fidl::client::Client::new(channel, protocol_name) }
9029 }
9030
9031 pub fn take_event_stream(&self) -> WlanSoftmacIfcBaseEventStream {
9037 WlanSoftmacIfcBaseEventStream { event_receiver: self.client.take_event_receiver() }
9038 }
9039
9040 pub fn r#report_tx_result(
9045 &self,
9046 mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
9047 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
9048 WlanSoftmacIfcBaseProxyInterface::r#report_tx_result(self, tx_result)
9049 }
9050
9051 pub fn r#notify_scan_complete(
9063 &self,
9064 mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
9065 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
9066 WlanSoftmacIfcBaseProxyInterface::r#notify_scan_complete(self, payload)
9067 }
9068}
9069
9070impl WlanSoftmacIfcBaseProxyInterface for WlanSoftmacIfcBaseProxy {
9071 type ReportTxResultResponseFut =
9072 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
9073 fn r#report_tx_result(
9074 &self,
9075 mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
9076 ) -> Self::ReportTxResultResponseFut {
9077 fn _decode(
9078 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9079 ) -> Result<(), fidl::Error> {
9080 let _response = fidl::client::decode_transaction_body::<
9081 fidl::encoding::EmptyPayload,
9082 fidl::encoding::DefaultFuchsiaResourceDialect,
9083 0x5835c2f13d94e09a,
9084 >(_buf?)?;
9085 Ok(_response)
9086 }
9087 self.client.send_query_and_decode::<WlanSoftmacIfcBaseReportTxResultRequest, ()>(
9088 (tx_result,),
9089 0x5835c2f13d94e09a,
9090 fidl::encoding::DynamicFlags::empty(),
9091 _decode,
9092 )
9093 }
9094
9095 type NotifyScanCompleteResponseFut =
9096 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
9097 fn r#notify_scan_complete(
9098 &self,
9099 mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
9100 ) -> Self::NotifyScanCompleteResponseFut {
9101 fn _decode(
9102 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9103 ) -> Result<(), fidl::Error> {
9104 let _response = fidl::client::decode_transaction_body::<
9105 fidl::encoding::EmptyPayload,
9106 fidl::encoding::DefaultFuchsiaResourceDialect,
9107 0x7045e3cd460dc42c,
9108 >(_buf?)?;
9109 Ok(_response)
9110 }
9111 self.client.send_query_and_decode::<WlanSoftmacIfcBaseNotifyScanCompleteRequest, ()>(
9112 payload,
9113 0x7045e3cd460dc42c,
9114 fidl::encoding::DynamicFlags::empty(),
9115 _decode,
9116 )
9117 }
9118}
9119
9120pub struct WlanSoftmacIfcBaseEventStream {
9121 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
9122}
9123
9124impl std::marker::Unpin for WlanSoftmacIfcBaseEventStream {}
9125
9126impl futures::stream::FusedStream for WlanSoftmacIfcBaseEventStream {
9127 fn is_terminated(&self) -> bool {
9128 self.event_receiver.is_terminated()
9129 }
9130}
9131
9132impl futures::Stream for WlanSoftmacIfcBaseEventStream {
9133 type Item = Result<WlanSoftmacIfcBaseEvent, fidl::Error>;
9134
9135 fn poll_next(
9136 mut self: std::pin::Pin<&mut Self>,
9137 cx: &mut std::task::Context<'_>,
9138 ) -> std::task::Poll<Option<Self::Item>> {
9139 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
9140 &mut self.event_receiver,
9141 cx
9142 )?) {
9143 Some(buf) => std::task::Poll::Ready(Some(WlanSoftmacIfcBaseEvent::decode(buf))),
9144 None => std::task::Poll::Ready(None),
9145 }
9146 }
9147}
9148
9149#[derive(Debug)]
9150pub enum WlanSoftmacIfcBaseEvent {}
9151
9152impl WlanSoftmacIfcBaseEvent {
9153 fn decode(
9155 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
9156 ) -> Result<WlanSoftmacIfcBaseEvent, fidl::Error> {
9157 let (bytes, _handles) = buf.split_mut();
9158 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9159 debug_assert_eq!(tx_header.tx_id, 0);
9160 match tx_header.ordinal {
9161 _ => Err(fidl::Error::UnknownOrdinal {
9162 ordinal: tx_header.ordinal,
9163 protocol_name:
9164 <WlanSoftmacIfcBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9165 }),
9166 }
9167 }
9168}
9169
9170pub struct WlanSoftmacIfcBaseRequestStream {
9172 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9173 is_terminated: bool,
9174}
9175
9176impl std::marker::Unpin for WlanSoftmacIfcBaseRequestStream {}
9177
9178impl futures::stream::FusedStream for WlanSoftmacIfcBaseRequestStream {
9179 fn is_terminated(&self) -> bool {
9180 self.is_terminated
9181 }
9182}
9183
9184impl fidl::endpoints::RequestStream for WlanSoftmacIfcBaseRequestStream {
9185 type Protocol = WlanSoftmacIfcBaseMarker;
9186 type ControlHandle = WlanSoftmacIfcBaseControlHandle;
9187
9188 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
9189 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
9190 }
9191
9192 fn control_handle(&self) -> Self::ControlHandle {
9193 WlanSoftmacIfcBaseControlHandle { inner: self.inner.clone() }
9194 }
9195
9196 fn into_inner(
9197 self,
9198 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
9199 {
9200 (self.inner, self.is_terminated)
9201 }
9202
9203 fn from_inner(
9204 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9205 is_terminated: bool,
9206 ) -> Self {
9207 Self { inner, is_terminated }
9208 }
9209}
9210
9211impl futures::Stream for WlanSoftmacIfcBaseRequestStream {
9212 type Item = Result<WlanSoftmacIfcBaseRequest, fidl::Error>;
9213
9214 fn poll_next(
9215 mut self: std::pin::Pin<&mut Self>,
9216 cx: &mut std::task::Context<'_>,
9217 ) -> std::task::Poll<Option<Self::Item>> {
9218 let this = &mut *self;
9219 if this.inner.check_shutdown(cx) {
9220 this.is_terminated = true;
9221 return std::task::Poll::Ready(None);
9222 }
9223 if this.is_terminated {
9224 panic!("polled WlanSoftmacIfcBaseRequestStream after completion");
9225 }
9226 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
9227 |bytes, handles| {
9228 match this.inner.channel().read_etc(cx, bytes, handles) {
9229 std::task::Poll::Ready(Ok(())) => {}
9230 std::task::Poll::Pending => return std::task::Poll::Pending,
9231 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
9232 this.is_terminated = true;
9233 return std::task::Poll::Ready(None);
9234 }
9235 std::task::Poll::Ready(Err(e)) => {
9236 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
9237 e.into(),
9238 ))))
9239 }
9240 }
9241
9242 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9244
9245 std::task::Poll::Ready(Some(match header.ordinal {
9246 0x5835c2f13d94e09a => {
9247 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9248 let mut req = fidl::new_empty!(WlanSoftmacIfcBaseReportTxResultRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
9249 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacIfcBaseReportTxResultRequest>(&header, _body_bytes, handles, &mut req)?;
9250 let control_handle = WlanSoftmacIfcBaseControlHandle {
9251 inner: this.inner.clone(),
9252 };
9253 Ok(WlanSoftmacIfcBaseRequest::ReportTxResult {tx_result: req.tx_result,
9254
9255 responder: WlanSoftmacIfcBaseReportTxResultResponder {
9256 control_handle: std::mem::ManuallyDrop::new(control_handle),
9257 tx_id: header.tx_id,
9258 },
9259 })
9260 }
9261 0x7045e3cd460dc42c => {
9262 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9263 let mut req = fidl::new_empty!(WlanSoftmacIfcBaseNotifyScanCompleteRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
9264 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacIfcBaseNotifyScanCompleteRequest>(&header, _body_bytes, handles, &mut req)?;
9265 let control_handle = WlanSoftmacIfcBaseControlHandle {
9266 inner: this.inner.clone(),
9267 };
9268 Ok(WlanSoftmacIfcBaseRequest::NotifyScanComplete {payload: req,
9269 responder: WlanSoftmacIfcBaseNotifyScanCompleteResponder {
9270 control_handle: std::mem::ManuallyDrop::new(control_handle),
9271 tx_id: header.tx_id,
9272 },
9273 })
9274 }
9275 _ => Err(fidl::Error::UnknownOrdinal {
9276 ordinal: header.ordinal,
9277 protocol_name: <WlanSoftmacIfcBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9278 }),
9279 }))
9280 },
9281 )
9282 }
9283}
9284
9285#[derive(Debug)]
9296pub enum WlanSoftmacIfcBaseRequest {
9297 ReportTxResult {
9302 tx_result: fidl_fuchsia_wlan_common::WlanTxResult,
9303 responder: WlanSoftmacIfcBaseReportTxResultResponder,
9304 },
9305 NotifyScanComplete {
9317 payload: WlanSoftmacIfcBaseNotifyScanCompleteRequest,
9318 responder: WlanSoftmacIfcBaseNotifyScanCompleteResponder,
9319 },
9320}
9321
9322impl WlanSoftmacIfcBaseRequest {
9323 #[allow(irrefutable_let_patterns)]
9324 pub fn into_report_tx_result(
9325 self,
9326 ) -> Option<(fidl_fuchsia_wlan_common::WlanTxResult, WlanSoftmacIfcBaseReportTxResultResponder)>
9327 {
9328 if let WlanSoftmacIfcBaseRequest::ReportTxResult { tx_result, responder } = self {
9329 Some((tx_result, responder))
9330 } else {
9331 None
9332 }
9333 }
9334
9335 #[allow(irrefutable_let_patterns)]
9336 pub fn into_notify_scan_complete(
9337 self,
9338 ) -> Option<(
9339 WlanSoftmacIfcBaseNotifyScanCompleteRequest,
9340 WlanSoftmacIfcBaseNotifyScanCompleteResponder,
9341 )> {
9342 if let WlanSoftmacIfcBaseRequest::NotifyScanComplete { payload, responder } = self {
9343 Some((payload, responder))
9344 } else {
9345 None
9346 }
9347 }
9348
9349 pub fn method_name(&self) -> &'static str {
9351 match *self {
9352 WlanSoftmacIfcBaseRequest::ReportTxResult { .. } => "report_tx_result",
9353 WlanSoftmacIfcBaseRequest::NotifyScanComplete { .. } => "notify_scan_complete",
9354 }
9355 }
9356}
9357
9358#[derive(Debug, Clone)]
9359pub struct WlanSoftmacIfcBaseControlHandle {
9360 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9361}
9362
9363impl fidl::endpoints::ControlHandle for WlanSoftmacIfcBaseControlHandle {
9364 fn shutdown(&self) {
9365 self.inner.shutdown()
9366 }
9367 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
9368 self.inner.shutdown_with_epitaph(status)
9369 }
9370
9371 fn is_closed(&self) -> bool {
9372 self.inner.channel().is_closed()
9373 }
9374 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
9375 self.inner.channel().on_closed()
9376 }
9377
9378 #[cfg(target_os = "fuchsia")]
9379 fn signal_peer(
9380 &self,
9381 clear_mask: zx::Signals,
9382 set_mask: zx::Signals,
9383 ) -> Result<(), zx_status::Status> {
9384 use fidl::Peered;
9385 self.inner.channel().signal_peer(clear_mask, set_mask)
9386 }
9387}
9388
9389impl WlanSoftmacIfcBaseControlHandle {}
9390
9391#[must_use = "FIDL methods require a response to be sent"]
9392#[derive(Debug)]
9393pub struct WlanSoftmacIfcBaseReportTxResultResponder {
9394 control_handle: std::mem::ManuallyDrop<WlanSoftmacIfcBaseControlHandle>,
9395 tx_id: u32,
9396}
9397
9398impl std::ops::Drop for WlanSoftmacIfcBaseReportTxResultResponder {
9402 fn drop(&mut self) {
9403 self.control_handle.shutdown();
9404 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9406 }
9407}
9408
9409impl fidl::endpoints::Responder for WlanSoftmacIfcBaseReportTxResultResponder {
9410 type ControlHandle = WlanSoftmacIfcBaseControlHandle;
9411
9412 fn control_handle(&self) -> &WlanSoftmacIfcBaseControlHandle {
9413 &self.control_handle
9414 }
9415
9416 fn drop_without_shutdown(mut self) {
9417 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9419 std::mem::forget(self);
9421 }
9422}
9423
9424impl WlanSoftmacIfcBaseReportTxResultResponder {
9425 pub fn send(self) -> Result<(), fidl::Error> {
9429 let _result = self.send_raw();
9430 if _result.is_err() {
9431 self.control_handle.shutdown();
9432 }
9433 self.drop_without_shutdown();
9434 _result
9435 }
9436
9437 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
9439 let _result = self.send_raw();
9440 self.drop_without_shutdown();
9441 _result
9442 }
9443
9444 fn send_raw(&self) -> Result<(), fidl::Error> {
9445 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
9446 (),
9447 self.tx_id,
9448 0x5835c2f13d94e09a,
9449 fidl::encoding::DynamicFlags::empty(),
9450 )
9451 }
9452}
9453
9454#[must_use = "FIDL methods require a response to be sent"]
9455#[derive(Debug)]
9456pub struct WlanSoftmacIfcBaseNotifyScanCompleteResponder {
9457 control_handle: std::mem::ManuallyDrop<WlanSoftmacIfcBaseControlHandle>,
9458 tx_id: u32,
9459}
9460
9461impl std::ops::Drop for WlanSoftmacIfcBaseNotifyScanCompleteResponder {
9465 fn drop(&mut self) {
9466 self.control_handle.shutdown();
9467 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9469 }
9470}
9471
9472impl fidl::endpoints::Responder for WlanSoftmacIfcBaseNotifyScanCompleteResponder {
9473 type ControlHandle = WlanSoftmacIfcBaseControlHandle;
9474
9475 fn control_handle(&self) -> &WlanSoftmacIfcBaseControlHandle {
9476 &self.control_handle
9477 }
9478
9479 fn drop_without_shutdown(mut self) {
9480 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9482 std::mem::forget(self);
9484 }
9485}
9486
9487impl WlanSoftmacIfcBaseNotifyScanCompleteResponder {
9488 pub fn send(self) -> Result<(), fidl::Error> {
9492 let _result = self.send_raw();
9493 if _result.is_err() {
9494 self.control_handle.shutdown();
9495 }
9496 self.drop_without_shutdown();
9497 _result
9498 }
9499
9500 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
9502 let _result = self.send_raw();
9503 self.drop_without_shutdown();
9504 _result
9505 }
9506
9507 fn send_raw(&self) -> Result<(), fidl::Error> {
9508 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
9509 (),
9510 self.tx_id,
9511 0x7045e3cd460dc42c,
9512 fidl::encoding::DynamicFlags::empty(),
9513 )
9514 }
9515}
9516
9517#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
9518pub struct WlanSoftmacIfcBridgeMarker;
9519
9520impl fidl::endpoints::ProtocolMarker for WlanSoftmacIfcBridgeMarker {
9521 type Proxy = WlanSoftmacIfcBridgeProxy;
9522 type RequestStream = WlanSoftmacIfcBridgeRequestStream;
9523 #[cfg(target_os = "fuchsia")]
9524 type SynchronousProxy = WlanSoftmacIfcBridgeSynchronousProxy;
9525
9526 const DEBUG_NAME: &'static str = "(anonymous) WlanSoftmacIfcBridge";
9527}
9528
9529pub trait WlanSoftmacIfcBridgeProxyInterface: Send + Sync {
9530 type ReportTxResultResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
9531 fn r#report_tx_result(
9532 &self,
9533 tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
9534 ) -> Self::ReportTxResultResponseFut;
9535 type NotifyScanCompleteResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
9536 fn r#notify_scan_complete(
9537 &self,
9538 payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
9539 ) -> Self::NotifyScanCompleteResponseFut;
9540 type StopBridgedDriverResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
9541 fn r#stop_bridged_driver(&self) -> Self::StopBridgedDriverResponseFut;
9542}
9543#[derive(Debug)]
9544#[cfg(target_os = "fuchsia")]
9545pub struct WlanSoftmacIfcBridgeSynchronousProxy {
9546 client: fidl::client::sync::Client,
9547}
9548
9549#[cfg(target_os = "fuchsia")]
9550impl fidl::endpoints::SynchronousProxy for WlanSoftmacIfcBridgeSynchronousProxy {
9551 type Proxy = WlanSoftmacIfcBridgeProxy;
9552 type Protocol = WlanSoftmacIfcBridgeMarker;
9553
9554 fn from_channel(inner: fidl::Channel) -> Self {
9555 Self::new(inner)
9556 }
9557
9558 fn into_channel(self) -> fidl::Channel {
9559 self.client.into_channel()
9560 }
9561
9562 fn as_channel(&self) -> &fidl::Channel {
9563 self.client.as_channel()
9564 }
9565}
9566
9567#[cfg(target_os = "fuchsia")]
9568impl WlanSoftmacIfcBridgeSynchronousProxy {
9569 pub fn new(channel: fidl::Channel) -> Self {
9570 let protocol_name =
9571 <WlanSoftmacIfcBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
9572 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
9573 }
9574
9575 pub fn into_channel(self) -> fidl::Channel {
9576 self.client.into_channel()
9577 }
9578
9579 pub fn wait_for_event(
9582 &self,
9583 deadline: zx::MonotonicInstant,
9584 ) -> Result<WlanSoftmacIfcBridgeEvent, fidl::Error> {
9585 WlanSoftmacIfcBridgeEvent::decode(self.client.wait_for_event(deadline)?)
9586 }
9587
9588 pub fn r#report_tx_result(
9593 &self,
9594 mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
9595 ___deadline: zx::MonotonicInstant,
9596 ) -> Result<(), fidl::Error> {
9597 let _response = self
9598 .client
9599 .send_query::<WlanSoftmacIfcBaseReportTxResultRequest, fidl::encoding::EmptyPayload>(
9600 (tx_result,),
9601 0x5835c2f13d94e09a,
9602 fidl::encoding::DynamicFlags::empty(),
9603 ___deadline,
9604 )?;
9605 Ok(_response)
9606 }
9607
9608 pub fn r#notify_scan_complete(
9620 &self,
9621 mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
9622 ___deadline: zx::MonotonicInstant,
9623 ) -> Result<(), fidl::Error> {
9624 let _response = self.client.send_query::<
9625 WlanSoftmacIfcBaseNotifyScanCompleteRequest,
9626 fidl::encoding::EmptyPayload,
9627 >(
9628 payload,
9629 0x7045e3cd460dc42c,
9630 fidl::encoding::DynamicFlags::empty(),
9631 ___deadline,
9632 )?;
9633 Ok(_response)
9634 }
9635
9636 pub fn r#stop_bridged_driver(
9644 &self,
9645 ___deadline: zx::MonotonicInstant,
9646 ) -> Result<(), fidl::Error> {
9647 let _response =
9648 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
9649 (),
9650 0x112dbd0cc2251151,
9651 fidl::encoding::DynamicFlags::empty(),
9652 ___deadline,
9653 )?;
9654 Ok(_response)
9655 }
9656}
9657
9658#[derive(Debug, Clone)]
9659pub struct WlanSoftmacIfcBridgeProxy {
9660 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
9661}
9662
9663impl fidl::endpoints::Proxy for WlanSoftmacIfcBridgeProxy {
9664 type Protocol = WlanSoftmacIfcBridgeMarker;
9665
9666 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
9667 Self::new(inner)
9668 }
9669
9670 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
9671 self.client.into_channel().map_err(|client| Self { client })
9672 }
9673
9674 fn as_channel(&self) -> &::fidl::AsyncChannel {
9675 self.client.as_channel()
9676 }
9677}
9678
9679impl WlanSoftmacIfcBridgeProxy {
9680 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
9682 let protocol_name =
9683 <WlanSoftmacIfcBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
9684 Self { client: fidl::client::Client::new(channel, protocol_name) }
9685 }
9686
9687 pub fn take_event_stream(&self) -> WlanSoftmacIfcBridgeEventStream {
9693 WlanSoftmacIfcBridgeEventStream { event_receiver: self.client.take_event_receiver() }
9694 }
9695
9696 pub fn r#report_tx_result(
9701 &self,
9702 mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
9703 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
9704 WlanSoftmacIfcBridgeProxyInterface::r#report_tx_result(self, tx_result)
9705 }
9706
9707 pub fn r#notify_scan_complete(
9719 &self,
9720 mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
9721 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
9722 WlanSoftmacIfcBridgeProxyInterface::r#notify_scan_complete(self, payload)
9723 }
9724
9725 pub fn r#stop_bridged_driver(
9733 &self,
9734 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
9735 WlanSoftmacIfcBridgeProxyInterface::r#stop_bridged_driver(self)
9736 }
9737}
9738
9739impl WlanSoftmacIfcBridgeProxyInterface for WlanSoftmacIfcBridgeProxy {
9740 type ReportTxResultResponseFut =
9741 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
9742 fn r#report_tx_result(
9743 &self,
9744 mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
9745 ) -> Self::ReportTxResultResponseFut {
9746 fn _decode(
9747 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9748 ) -> Result<(), fidl::Error> {
9749 let _response = fidl::client::decode_transaction_body::<
9750 fidl::encoding::EmptyPayload,
9751 fidl::encoding::DefaultFuchsiaResourceDialect,
9752 0x5835c2f13d94e09a,
9753 >(_buf?)?;
9754 Ok(_response)
9755 }
9756 self.client.send_query_and_decode::<WlanSoftmacIfcBaseReportTxResultRequest, ()>(
9757 (tx_result,),
9758 0x5835c2f13d94e09a,
9759 fidl::encoding::DynamicFlags::empty(),
9760 _decode,
9761 )
9762 }
9763
9764 type NotifyScanCompleteResponseFut =
9765 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
9766 fn r#notify_scan_complete(
9767 &self,
9768 mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
9769 ) -> Self::NotifyScanCompleteResponseFut {
9770 fn _decode(
9771 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9772 ) -> Result<(), fidl::Error> {
9773 let _response = fidl::client::decode_transaction_body::<
9774 fidl::encoding::EmptyPayload,
9775 fidl::encoding::DefaultFuchsiaResourceDialect,
9776 0x7045e3cd460dc42c,
9777 >(_buf?)?;
9778 Ok(_response)
9779 }
9780 self.client.send_query_and_decode::<WlanSoftmacIfcBaseNotifyScanCompleteRequest, ()>(
9781 payload,
9782 0x7045e3cd460dc42c,
9783 fidl::encoding::DynamicFlags::empty(),
9784 _decode,
9785 )
9786 }
9787
9788 type StopBridgedDriverResponseFut =
9789 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
9790 fn r#stop_bridged_driver(&self) -> Self::StopBridgedDriverResponseFut {
9791 fn _decode(
9792 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9793 ) -> Result<(), fidl::Error> {
9794 let _response = fidl::client::decode_transaction_body::<
9795 fidl::encoding::EmptyPayload,
9796 fidl::encoding::DefaultFuchsiaResourceDialect,
9797 0x112dbd0cc2251151,
9798 >(_buf?)?;
9799 Ok(_response)
9800 }
9801 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
9802 (),
9803 0x112dbd0cc2251151,
9804 fidl::encoding::DynamicFlags::empty(),
9805 _decode,
9806 )
9807 }
9808}
9809
9810pub struct WlanSoftmacIfcBridgeEventStream {
9811 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
9812}
9813
9814impl std::marker::Unpin for WlanSoftmacIfcBridgeEventStream {}
9815
9816impl futures::stream::FusedStream for WlanSoftmacIfcBridgeEventStream {
9817 fn is_terminated(&self) -> bool {
9818 self.event_receiver.is_terminated()
9819 }
9820}
9821
9822impl futures::Stream for WlanSoftmacIfcBridgeEventStream {
9823 type Item = Result<WlanSoftmacIfcBridgeEvent, fidl::Error>;
9824
9825 fn poll_next(
9826 mut self: std::pin::Pin<&mut Self>,
9827 cx: &mut std::task::Context<'_>,
9828 ) -> std::task::Poll<Option<Self::Item>> {
9829 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
9830 &mut self.event_receiver,
9831 cx
9832 )?) {
9833 Some(buf) => std::task::Poll::Ready(Some(WlanSoftmacIfcBridgeEvent::decode(buf))),
9834 None => std::task::Poll::Ready(None),
9835 }
9836 }
9837}
9838
9839#[derive(Debug)]
9840pub enum WlanSoftmacIfcBridgeEvent {}
9841
9842impl WlanSoftmacIfcBridgeEvent {
9843 fn decode(
9845 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
9846 ) -> Result<WlanSoftmacIfcBridgeEvent, fidl::Error> {
9847 let (bytes, _handles) = buf.split_mut();
9848 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9849 debug_assert_eq!(tx_header.tx_id, 0);
9850 match tx_header.ordinal {
9851 _ => Err(fidl::Error::UnknownOrdinal {
9852 ordinal: tx_header.ordinal,
9853 protocol_name:
9854 <WlanSoftmacIfcBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9855 }),
9856 }
9857 }
9858}
9859
9860pub struct WlanSoftmacIfcBridgeRequestStream {
9862 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9863 is_terminated: bool,
9864}
9865
9866impl std::marker::Unpin for WlanSoftmacIfcBridgeRequestStream {}
9867
9868impl futures::stream::FusedStream for WlanSoftmacIfcBridgeRequestStream {
9869 fn is_terminated(&self) -> bool {
9870 self.is_terminated
9871 }
9872}
9873
9874impl fidl::endpoints::RequestStream for WlanSoftmacIfcBridgeRequestStream {
9875 type Protocol = WlanSoftmacIfcBridgeMarker;
9876 type ControlHandle = WlanSoftmacIfcBridgeControlHandle;
9877
9878 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
9879 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
9880 }
9881
9882 fn control_handle(&self) -> Self::ControlHandle {
9883 WlanSoftmacIfcBridgeControlHandle { inner: self.inner.clone() }
9884 }
9885
9886 fn into_inner(
9887 self,
9888 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
9889 {
9890 (self.inner, self.is_terminated)
9891 }
9892
9893 fn from_inner(
9894 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9895 is_terminated: bool,
9896 ) -> Self {
9897 Self { inner, is_terminated }
9898 }
9899}
9900
9901impl futures::Stream for WlanSoftmacIfcBridgeRequestStream {
9902 type Item = Result<WlanSoftmacIfcBridgeRequest, fidl::Error>;
9903
9904 fn poll_next(
9905 mut self: std::pin::Pin<&mut Self>,
9906 cx: &mut std::task::Context<'_>,
9907 ) -> std::task::Poll<Option<Self::Item>> {
9908 let this = &mut *self;
9909 if this.inner.check_shutdown(cx) {
9910 this.is_terminated = true;
9911 return std::task::Poll::Ready(None);
9912 }
9913 if this.is_terminated {
9914 panic!("polled WlanSoftmacIfcBridgeRequestStream after completion");
9915 }
9916 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
9917 |bytes, handles| {
9918 match this.inner.channel().read_etc(cx, bytes, handles) {
9919 std::task::Poll::Ready(Ok(())) => {}
9920 std::task::Poll::Pending => return std::task::Poll::Pending,
9921 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
9922 this.is_terminated = true;
9923 return std::task::Poll::Ready(None);
9924 }
9925 std::task::Poll::Ready(Err(e)) => {
9926 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
9927 e.into(),
9928 ))))
9929 }
9930 }
9931
9932 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9934
9935 std::task::Poll::Ready(Some(match header.ordinal {
9936 0x5835c2f13d94e09a => {
9937 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9938 let mut req = fidl::new_empty!(WlanSoftmacIfcBaseReportTxResultRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
9939 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacIfcBaseReportTxResultRequest>(&header, _body_bytes, handles, &mut req)?;
9940 let control_handle = WlanSoftmacIfcBridgeControlHandle {
9941 inner: this.inner.clone(),
9942 };
9943 Ok(WlanSoftmacIfcBridgeRequest::ReportTxResult {tx_result: req.tx_result,
9944
9945 responder: WlanSoftmacIfcBridgeReportTxResultResponder {
9946 control_handle: std::mem::ManuallyDrop::new(control_handle),
9947 tx_id: header.tx_id,
9948 },
9949 })
9950 }
9951 0x7045e3cd460dc42c => {
9952 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9953 let mut req = fidl::new_empty!(WlanSoftmacIfcBaseNotifyScanCompleteRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
9954 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacIfcBaseNotifyScanCompleteRequest>(&header, _body_bytes, handles, &mut req)?;
9955 let control_handle = WlanSoftmacIfcBridgeControlHandle {
9956 inner: this.inner.clone(),
9957 };
9958 Ok(WlanSoftmacIfcBridgeRequest::NotifyScanComplete {payload: req,
9959 responder: WlanSoftmacIfcBridgeNotifyScanCompleteResponder {
9960 control_handle: std::mem::ManuallyDrop::new(control_handle),
9961 tx_id: header.tx_id,
9962 },
9963 })
9964 }
9965 0x112dbd0cc2251151 => {
9966 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9967 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
9968 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9969 let control_handle = WlanSoftmacIfcBridgeControlHandle {
9970 inner: this.inner.clone(),
9971 };
9972 Ok(WlanSoftmacIfcBridgeRequest::StopBridgedDriver {
9973 responder: WlanSoftmacIfcBridgeStopBridgedDriverResponder {
9974 control_handle: std::mem::ManuallyDrop::new(control_handle),
9975 tx_id: header.tx_id,
9976 },
9977 })
9978 }
9979 _ => Err(fidl::Error::UnknownOrdinal {
9980 ordinal: header.ordinal,
9981 protocol_name: <WlanSoftmacIfcBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9982 }),
9983 }))
9984 },
9985 )
9986 }
9987}
9988
9989#[derive(Debug)]
9996pub enum WlanSoftmacIfcBridgeRequest {
9997 ReportTxResult {
10002 tx_result: fidl_fuchsia_wlan_common::WlanTxResult,
10003 responder: WlanSoftmacIfcBridgeReportTxResultResponder,
10004 },
10005 NotifyScanComplete {
10017 payload: WlanSoftmacIfcBaseNotifyScanCompleteRequest,
10018 responder: WlanSoftmacIfcBridgeNotifyScanCompleteResponder,
10019 },
10020 StopBridgedDriver { responder: WlanSoftmacIfcBridgeStopBridgedDriverResponder },
10028}
10029
10030impl WlanSoftmacIfcBridgeRequest {
10031 #[allow(irrefutable_let_patterns)]
10032 pub fn into_report_tx_result(
10033 self,
10034 ) -> Option<(fidl_fuchsia_wlan_common::WlanTxResult, WlanSoftmacIfcBridgeReportTxResultResponder)>
10035 {
10036 if let WlanSoftmacIfcBridgeRequest::ReportTxResult { tx_result, responder } = self {
10037 Some((tx_result, responder))
10038 } else {
10039 None
10040 }
10041 }
10042
10043 #[allow(irrefutable_let_patterns)]
10044 pub fn into_notify_scan_complete(
10045 self,
10046 ) -> Option<(
10047 WlanSoftmacIfcBaseNotifyScanCompleteRequest,
10048 WlanSoftmacIfcBridgeNotifyScanCompleteResponder,
10049 )> {
10050 if let WlanSoftmacIfcBridgeRequest::NotifyScanComplete { payload, responder } = self {
10051 Some((payload, responder))
10052 } else {
10053 None
10054 }
10055 }
10056
10057 #[allow(irrefutable_let_patterns)]
10058 pub fn into_stop_bridged_driver(
10059 self,
10060 ) -> Option<(WlanSoftmacIfcBridgeStopBridgedDriverResponder)> {
10061 if let WlanSoftmacIfcBridgeRequest::StopBridgedDriver { responder } = self {
10062 Some((responder))
10063 } else {
10064 None
10065 }
10066 }
10067
10068 pub fn method_name(&self) -> &'static str {
10070 match *self {
10071 WlanSoftmacIfcBridgeRequest::ReportTxResult { .. } => "report_tx_result",
10072 WlanSoftmacIfcBridgeRequest::NotifyScanComplete { .. } => "notify_scan_complete",
10073 WlanSoftmacIfcBridgeRequest::StopBridgedDriver { .. } => "stop_bridged_driver",
10074 }
10075 }
10076}
10077
10078#[derive(Debug, Clone)]
10079pub struct WlanSoftmacIfcBridgeControlHandle {
10080 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10081}
10082
10083impl fidl::endpoints::ControlHandle for WlanSoftmacIfcBridgeControlHandle {
10084 fn shutdown(&self) {
10085 self.inner.shutdown()
10086 }
10087 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
10088 self.inner.shutdown_with_epitaph(status)
10089 }
10090
10091 fn is_closed(&self) -> bool {
10092 self.inner.channel().is_closed()
10093 }
10094 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
10095 self.inner.channel().on_closed()
10096 }
10097
10098 #[cfg(target_os = "fuchsia")]
10099 fn signal_peer(
10100 &self,
10101 clear_mask: zx::Signals,
10102 set_mask: zx::Signals,
10103 ) -> Result<(), zx_status::Status> {
10104 use fidl::Peered;
10105 self.inner.channel().signal_peer(clear_mask, set_mask)
10106 }
10107}
10108
10109impl WlanSoftmacIfcBridgeControlHandle {}
10110
10111#[must_use = "FIDL methods require a response to be sent"]
10112#[derive(Debug)]
10113pub struct WlanSoftmacIfcBridgeReportTxResultResponder {
10114 control_handle: std::mem::ManuallyDrop<WlanSoftmacIfcBridgeControlHandle>,
10115 tx_id: u32,
10116}
10117
10118impl std::ops::Drop for WlanSoftmacIfcBridgeReportTxResultResponder {
10122 fn drop(&mut self) {
10123 self.control_handle.shutdown();
10124 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10126 }
10127}
10128
10129impl fidl::endpoints::Responder for WlanSoftmacIfcBridgeReportTxResultResponder {
10130 type ControlHandle = WlanSoftmacIfcBridgeControlHandle;
10131
10132 fn control_handle(&self) -> &WlanSoftmacIfcBridgeControlHandle {
10133 &self.control_handle
10134 }
10135
10136 fn drop_without_shutdown(mut self) {
10137 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10139 std::mem::forget(self);
10141 }
10142}
10143
10144impl WlanSoftmacIfcBridgeReportTxResultResponder {
10145 pub fn send(self) -> Result<(), fidl::Error> {
10149 let _result = self.send_raw();
10150 if _result.is_err() {
10151 self.control_handle.shutdown();
10152 }
10153 self.drop_without_shutdown();
10154 _result
10155 }
10156
10157 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
10159 let _result = self.send_raw();
10160 self.drop_without_shutdown();
10161 _result
10162 }
10163
10164 fn send_raw(&self) -> Result<(), fidl::Error> {
10165 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
10166 (),
10167 self.tx_id,
10168 0x5835c2f13d94e09a,
10169 fidl::encoding::DynamicFlags::empty(),
10170 )
10171 }
10172}
10173
10174#[must_use = "FIDL methods require a response to be sent"]
10175#[derive(Debug)]
10176pub struct WlanSoftmacIfcBridgeNotifyScanCompleteResponder {
10177 control_handle: std::mem::ManuallyDrop<WlanSoftmacIfcBridgeControlHandle>,
10178 tx_id: u32,
10179}
10180
10181impl std::ops::Drop for WlanSoftmacIfcBridgeNotifyScanCompleteResponder {
10185 fn drop(&mut self) {
10186 self.control_handle.shutdown();
10187 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10189 }
10190}
10191
10192impl fidl::endpoints::Responder for WlanSoftmacIfcBridgeNotifyScanCompleteResponder {
10193 type ControlHandle = WlanSoftmacIfcBridgeControlHandle;
10194
10195 fn control_handle(&self) -> &WlanSoftmacIfcBridgeControlHandle {
10196 &self.control_handle
10197 }
10198
10199 fn drop_without_shutdown(mut self) {
10200 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10202 std::mem::forget(self);
10204 }
10205}
10206
10207impl WlanSoftmacIfcBridgeNotifyScanCompleteResponder {
10208 pub fn send(self) -> Result<(), fidl::Error> {
10212 let _result = self.send_raw();
10213 if _result.is_err() {
10214 self.control_handle.shutdown();
10215 }
10216 self.drop_without_shutdown();
10217 _result
10218 }
10219
10220 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
10222 let _result = self.send_raw();
10223 self.drop_without_shutdown();
10224 _result
10225 }
10226
10227 fn send_raw(&self) -> Result<(), fidl::Error> {
10228 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
10229 (),
10230 self.tx_id,
10231 0x7045e3cd460dc42c,
10232 fidl::encoding::DynamicFlags::empty(),
10233 )
10234 }
10235}
10236
10237#[must_use = "FIDL methods require a response to be sent"]
10238#[derive(Debug)]
10239pub struct WlanSoftmacIfcBridgeStopBridgedDriverResponder {
10240 control_handle: std::mem::ManuallyDrop<WlanSoftmacIfcBridgeControlHandle>,
10241 tx_id: u32,
10242}
10243
10244impl std::ops::Drop for WlanSoftmacIfcBridgeStopBridgedDriverResponder {
10248 fn drop(&mut self) {
10249 self.control_handle.shutdown();
10250 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10252 }
10253}
10254
10255impl fidl::endpoints::Responder for WlanSoftmacIfcBridgeStopBridgedDriverResponder {
10256 type ControlHandle = WlanSoftmacIfcBridgeControlHandle;
10257
10258 fn control_handle(&self) -> &WlanSoftmacIfcBridgeControlHandle {
10259 &self.control_handle
10260 }
10261
10262 fn drop_without_shutdown(mut self) {
10263 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10265 std::mem::forget(self);
10267 }
10268}
10269
10270impl WlanSoftmacIfcBridgeStopBridgedDriverResponder {
10271 pub fn send(self) -> Result<(), fidl::Error> {
10275 let _result = self.send_raw();
10276 if _result.is_err() {
10277 self.control_handle.shutdown();
10278 }
10279 self.drop_without_shutdown();
10280 _result
10281 }
10282
10283 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
10285 let _result = self.send_raw();
10286 self.drop_without_shutdown();
10287 _result
10288 }
10289
10290 fn send_raw(&self) -> Result<(), fidl::Error> {
10291 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
10292 (),
10293 self.tx_id,
10294 0x112dbd0cc2251151,
10295 fidl::encoding::DynamicFlags::empty(),
10296 )
10297 }
10298}
10299
10300#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
10301pub struct WlanTxMarker;
10302
10303impl fidl::endpoints::ProtocolMarker for WlanTxMarker {
10304 type Proxy = WlanTxProxy;
10305 type RequestStream = WlanTxRequestStream;
10306 #[cfg(target_os = "fuchsia")]
10307 type SynchronousProxy = WlanTxSynchronousProxy;
10308
10309 const DEBUG_NAME: &'static str = "(anonymous) WlanTx";
10310}
10311pub type WlanTxTransferResult = Result<(), i32>;
10312
10313pub trait WlanTxProxyInterface: Send + Sync {
10314 type TransferResponseFut: std::future::Future<Output = Result<WlanTxTransferResult, fidl::Error>>
10315 + Send;
10316 fn r#transfer(&self, payload: &WlanTxTransferRequest) -> Self::TransferResponseFut;
10317}
10318#[derive(Debug)]
10319#[cfg(target_os = "fuchsia")]
10320pub struct WlanTxSynchronousProxy {
10321 client: fidl::client::sync::Client,
10322}
10323
10324#[cfg(target_os = "fuchsia")]
10325impl fidl::endpoints::SynchronousProxy for WlanTxSynchronousProxy {
10326 type Proxy = WlanTxProxy;
10327 type Protocol = WlanTxMarker;
10328
10329 fn from_channel(inner: fidl::Channel) -> Self {
10330 Self::new(inner)
10331 }
10332
10333 fn into_channel(self) -> fidl::Channel {
10334 self.client.into_channel()
10335 }
10336
10337 fn as_channel(&self) -> &fidl::Channel {
10338 self.client.as_channel()
10339 }
10340}
10341
10342#[cfg(target_os = "fuchsia")]
10343impl WlanTxSynchronousProxy {
10344 pub fn new(channel: fidl::Channel) -> Self {
10345 let protocol_name = <WlanTxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
10346 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
10347 }
10348
10349 pub fn into_channel(self) -> fidl::Channel {
10350 self.client.into_channel()
10351 }
10352
10353 pub fn wait_for_event(
10356 &self,
10357 deadline: zx::MonotonicInstant,
10358 ) -> Result<WlanTxEvent, fidl::Error> {
10359 WlanTxEvent::decode(self.client.wait_for_event(deadline)?)
10360 }
10361
10362 pub fn r#transfer(
10363 &self,
10364 mut payload: &WlanTxTransferRequest,
10365 ___deadline: zx::MonotonicInstant,
10366 ) -> Result<WlanTxTransferResult, fidl::Error> {
10367 let _response = self.client.send_query::<
10368 WlanTxTransferRequest,
10369 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
10370 >(
10371 payload,
10372 0x19f8ff7a8b910ab3,
10373 fidl::encoding::DynamicFlags::empty(),
10374 ___deadline,
10375 )?;
10376 Ok(_response.map(|x| x))
10377 }
10378}
10379
10380#[derive(Debug, Clone)]
10381pub struct WlanTxProxy {
10382 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
10383}
10384
10385impl fidl::endpoints::Proxy for WlanTxProxy {
10386 type Protocol = WlanTxMarker;
10387
10388 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
10389 Self::new(inner)
10390 }
10391
10392 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
10393 self.client.into_channel().map_err(|client| Self { client })
10394 }
10395
10396 fn as_channel(&self) -> &::fidl::AsyncChannel {
10397 self.client.as_channel()
10398 }
10399}
10400
10401impl WlanTxProxy {
10402 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
10404 let protocol_name = <WlanTxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
10405 Self { client: fidl::client::Client::new(channel, protocol_name) }
10406 }
10407
10408 pub fn take_event_stream(&self) -> WlanTxEventStream {
10414 WlanTxEventStream { event_receiver: self.client.take_event_receiver() }
10415 }
10416
10417 pub fn r#transfer(
10418 &self,
10419 mut payload: &WlanTxTransferRequest,
10420 ) -> fidl::client::QueryResponseFut<
10421 WlanTxTransferResult,
10422 fidl::encoding::DefaultFuchsiaResourceDialect,
10423 > {
10424 WlanTxProxyInterface::r#transfer(self, payload)
10425 }
10426}
10427
10428impl WlanTxProxyInterface for WlanTxProxy {
10429 type TransferResponseFut = fidl::client::QueryResponseFut<
10430 WlanTxTransferResult,
10431 fidl::encoding::DefaultFuchsiaResourceDialect,
10432 >;
10433 fn r#transfer(&self, mut payload: &WlanTxTransferRequest) -> Self::TransferResponseFut {
10434 fn _decode(
10435 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
10436 ) -> Result<WlanTxTransferResult, fidl::Error> {
10437 let _response = fidl::client::decode_transaction_body::<
10438 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
10439 fidl::encoding::DefaultFuchsiaResourceDialect,
10440 0x19f8ff7a8b910ab3,
10441 >(_buf?)?;
10442 Ok(_response.map(|x| x))
10443 }
10444 self.client.send_query_and_decode::<WlanTxTransferRequest, WlanTxTransferResult>(
10445 payload,
10446 0x19f8ff7a8b910ab3,
10447 fidl::encoding::DynamicFlags::empty(),
10448 _decode,
10449 )
10450 }
10451}
10452
10453pub struct WlanTxEventStream {
10454 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
10455}
10456
10457impl std::marker::Unpin for WlanTxEventStream {}
10458
10459impl futures::stream::FusedStream for WlanTxEventStream {
10460 fn is_terminated(&self) -> bool {
10461 self.event_receiver.is_terminated()
10462 }
10463}
10464
10465impl futures::Stream for WlanTxEventStream {
10466 type Item = Result<WlanTxEvent, fidl::Error>;
10467
10468 fn poll_next(
10469 mut self: std::pin::Pin<&mut Self>,
10470 cx: &mut std::task::Context<'_>,
10471 ) -> std::task::Poll<Option<Self::Item>> {
10472 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
10473 &mut self.event_receiver,
10474 cx
10475 )?) {
10476 Some(buf) => std::task::Poll::Ready(Some(WlanTxEvent::decode(buf))),
10477 None => std::task::Poll::Ready(None),
10478 }
10479 }
10480}
10481
10482#[derive(Debug)]
10483pub enum WlanTxEvent {}
10484
10485impl WlanTxEvent {
10486 fn decode(
10488 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
10489 ) -> Result<WlanTxEvent, fidl::Error> {
10490 let (bytes, _handles) = buf.split_mut();
10491 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
10492 debug_assert_eq!(tx_header.tx_id, 0);
10493 match tx_header.ordinal {
10494 _ => Err(fidl::Error::UnknownOrdinal {
10495 ordinal: tx_header.ordinal,
10496 protocol_name: <WlanTxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
10497 }),
10498 }
10499 }
10500}
10501
10502pub struct WlanTxRequestStream {
10504 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10505 is_terminated: bool,
10506}
10507
10508impl std::marker::Unpin for WlanTxRequestStream {}
10509
10510impl futures::stream::FusedStream for WlanTxRequestStream {
10511 fn is_terminated(&self) -> bool {
10512 self.is_terminated
10513 }
10514}
10515
10516impl fidl::endpoints::RequestStream for WlanTxRequestStream {
10517 type Protocol = WlanTxMarker;
10518 type ControlHandle = WlanTxControlHandle;
10519
10520 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
10521 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
10522 }
10523
10524 fn control_handle(&self) -> Self::ControlHandle {
10525 WlanTxControlHandle { inner: self.inner.clone() }
10526 }
10527
10528 fn into_inner(
10529 self,
10530 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
10531 {
10532 (self.inner, self.is_terminated)
10533 }
10534
10535 fn from_inner(
10536 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10537 is_terminated: bool,
10538 ) -> Self {
10539 Self { inner, is_terminated }
10540 }
10541}
10542
10543impl futures::Stream for WlanTxRequestStream {
10544 type Item = Result<WlanTxRequest, fidl::Error>;
10545
10546 fn poll_next(
10547 mut self: std::pin::Pin<&mut Self>,
10548 cx: &mut std::task::Context<'_>,
10549 ) -> std::task::Poll<Option<Self::Item>> {
10550 let this = &mut *self;
10551 if this.inner.check_shutdown(cx) {
10552 this.is_terminated = true;
10553 return std::task::Poll::Ready(None);
10554 }
10555 if this.is_terminated {
10556 panic!("polled WlanTxRequestStream after completion");
10557 }
10558 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
10559 |bytes, handles| {
10560 match this.inner.channel().read_etc(cx, bytes, handles) {
10561 std::task::Poll::Ready(Ok(())) => {}
10562 std::task::Poll::Pending => return std::task::Poll::Pending,
10563 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
10564 this.is_terminated = true;
10565 return std::task::Poll::Ready(None);
10566 }
10567 std::task::Poll::Ready(Err(e)) => {
10568 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
10569 e.into(),
10570 ))))
10571 }
10572 }
10573
10574 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
10576
10577 std::task::Poll::Ready(Some(match header.ordinal {
10578 0x19f8ff7a8b910ab3 => {
10579 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
10580 let mut req = fidl::new_empty!(
10581 WlanTxTransferRequest,
10582 fidl::encoding::DefaultFuchsiaResourceDialect
10583 );
10584 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanTxTransferRequest>(&header, _body_bytes, handles, &mut req)?;
10585 let control_handle = WlanTxControlHandle { inner: this.inner.clone() };
10586 Ok(WlanTxRequest::Transfer {
10587 payload: req,
10588 responder: WlanTxTransferResponder {
10589 control_handle: std::mem::ManuallyDrop::new(control_handle),
10590 tx_id: header.tx_id,
10591 },
10592 })
10593 }
10594 _ => Err(fidl::Error::UnknownOrdinal {
10595 ordinal: header.ordinal,
10596 protocol_name:
10597 <WlanTxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
10598 }),
10599 }))
10600 },
10601 )
10602 }
10603}
10604
10605#[derive(Debug)]
10614pub enum WlanTxRequest {
10615 Transfer { payload: WlanTxTransferRequest, responder: WlanTxTransferResponder },
10616}
10617
10618impl WlanTxRequest {
10619 #[allow(irrefutable_let_patterns)]
10620 pub fn into_transfer(self) -> Option<(WlanTxTransferRequest, WlanTxTransferResponder)> {
10621 if let WlanTxRequest::Transfer { payload, responder } = self {
10622 Some((payload, responder))
10623 } else {
10624 None
10625 }
10626 }
10627
10628 pub fn method_name(&self) -> &'static str {
10630 match *self {
10631 WlanTxRequest::Transfer { .. } => "transfer",
10632 }
10633 }
10634}
10635
10636#[derive(Debug, Clone)]
10637pub struct WlanTxControlHandle {
10638 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10639}
10640
10641impl fidl::endpoints::ControlHandle for WlanTxControlHandle {
10642 fn shutdown(&self) {
10643 self.inner.shutdown()
10644 }
10645 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
10646 self.inner.shutdown_with_epitaph(status)
10647 }
10648
10649 fn is_closed(&self) -> bool {
10650 self.inner.channel().is_closed()
10651 }
10652 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
10653 self.inner.channel().on_closed()
10654 }
10655
10656 #[cfg(target_os = "fuchsia")]
10657 fn signal_peer(
10658 &self,
10659 clear_mask: zx::Signals,
10660 set_mask: zx::Signals,
10661 ) -> Result<(), zx_status::Status> {
10662 use fidl::Peered;
10663 self.inner.channel().signal_peer(clear_mask, set_mask)
10664 }
10665}
10666
10667impl WlanTxControlHandle {}
10668
10669#[must_use = "FIDL methods require a response to be sent"]
10670#[derive(Debug)]
10671pub struct WlanTxTransferResponder {
10672 control_handle: std::mem::ManuallyDrop<WlanTxControlHandle>,
10673 tx_id: u32,
10674}
10675
10676impl std::ops::Drop for WlanTxTransferResponder {
10680 fn drop(&mut self) {
10681 self.control_handle.shutdown();
10682 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10684 }
10685}
10686
10687impl fidl::endpoints::Responder for WlanTxTransferResponder {
10688 type ControlHandle = WlanTxControlHandle;
10689
10690 fn control_handle(&self) -> &WlanTxControlHandle {
10691 &self.control_handle
10692 }
10693
10694 fn drop_without_shutdown(mut self) {
10695 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10697 std::mem::forget(self);
10699 }
10700}
10701
10702impl WlanTxTransferResponder {
10703 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10707 let _result = self.send_raw(result);
10708 if _result.is_err() {
10709 self.control_handle.shutdown();
10710 }
10711 self.drop_without_shutdown();
10712 _result
10713 }
10714
10715 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10717 let _result = self.send_raw(result);
10718 self.drop_without_shutdown();
10719 _result
10720 }
10721
10722 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10723 self.control_handle
10724 .inner
10725 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10726 result,
10727 self.tx_id,
10728 0x19f8ff7a8b910ab3,
10729 fidl::encoding::DynamicFlags::empty(),
10730 )
10731 }
10732}
10733
10734mod internal {
10735 use super::*;
10736 unsafe impl fidl::encoding::TypeMarker for WlanRxInfoFlags {
10737 type Owned = Self;
10738
10739 #[inline(always)]
10740 fn inline_align(_context: fidl::encoding::Context) -> usize {
10741 4
10742 }
10743
10744 #[inline(always)]
10745 fn inline_size(_context: fidl::encoding::Context) -> usize {
10746 4
10747 }
10748 }
10749
10750 impl fidl::encoding::ValueTypeMarker for WlanRxInfoFlags {
10751 type Borrowed<'a> = Self;
10752 #[inline(always)]
10753 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10754 *value
10755 }
10756 }
10757
10758 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
10759 for WlanRxInfoFlags
10760 {
10761 #[inline]
10762 unsafe fn encode(
10763 self,
10764 encoder: &mut fidl::encoding::Encoder<'_, D>,
10765 offset: usize,
10766 _depth: fidl::encoding::Depth,
10767 ) -> fidl::Result<()> {
10768 encoder.debug_check_bounds::<Self>(offset);
10769 encoder.write_num(self.bits(), offset);
10770 Ok(())
10771 }
10772 }
10773
10774 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WlanRxInfoFlags {
10775 #[inline(always)]
10776 fn new_empty() -> Self {
10777 Self::empty()
10778 }
10779
10780 #[inline]
10781 unsafe fn decode(
10782 &mut self,
10783 decoder: &mut fidl::encoding::Decoder<'_, D>,
10784 offset: usize,
10785 _depth: fidl::encoding::Depth,
10786 ) -> fidl::Result<()> {
10787 decoder.debug_check_bounds::<Self>(offset);
10788 let prim = decoder.read_num::<u32>(offset);
10789 *self = Self::from_bits_allow_unknown(prim);
10790 Ok(())
10791 }
10792 }
10793 unsafe impl fidl::encoding::TypeMarker for WlanRxInfoValid {
10794 type Owned = Self;
10795
10796 #[inline(always)]
10797 fn inline_align(_context: fidl::encoding::Context) -> usize {
10798 4
10799 }
10800
10801 #[inline(always)]
10802 fn inline_size(_context: fidl::encoding::Context) -> usize {
10803 4
10804 }
10805 }
10806
10807 impl fidl::encoding::ValueTypeMarker for WlanRxInfoValid {
10808 type Borrowed<'a> = Self;
10809 #[inline(always)]
10810 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10811 *value
10812 }
10813 }
10814
10815 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
10816 for WlanRxInfoValid
10817 {
10818 #[inline]
10819 unsafe fn encode(
10820 self,
10821 encoder: &mut fidl::encoding::Encoder<'_, D>,
10822 offset: usize,
10823 _depth: fidl::encoding::Depth,
10824 ) -> fidl::Result<()> {
10825 encoder.debug_check_bounds::<Self>(offset);
10826 encoder.write_num(self.bits(), offset);
10827 Ok(())
10828 }
10829 }
10830
10831 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WlanRxInfoValid {
10832 #[inline(always)]
10833 fn new_empty() -> Self {
10834 Self::empty()
10835 }
10836
10837 #[inline]
10838 unsafe fn decode(
10839 &mut self,
10840 decoder: &mut fidl::encoding::Decoder<'_, D>,
10841 offset: usize,
10842 _depth: fidl::encoding::Depth,
10843 ) -> fidl::Result<()> {
10844 decoder.debug_check_bounds::<Self>(offset);
10845 let prim = decoder.read_num::<u32>(offset);
10846 *self = Self::from_bits_allow_unknown(prim);
10847 Ok(())
10848 }
10849 }
10850 unsafe impl fidl::encoding::TypeMarker for WlanTxInfoFlags {
10851 type Owned = Self;
10852
10853 #[inline(always)]
10854 fn inline_align(_context: fidl::encoding::Context) -> usize {
10855 4
10856 }
10857
10858 #[inline(always)]
10859 fn inline_size(_context: fidl::encoding::Context) -> usize {
10860 4
10861 }
10862 }
10863
10864 impl fidl::encoding::ValueTypeMarker for WlanTxInfoFlags {
10865 type Borrowed<'a> = Self;
10866 #[inline(always)]
10867 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10868 *value
10869 }
10870 }
10871
10872 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
10873 for WlanTxInfoFlags
10874 {
10875 #[inline]
10876 unsafe fn encode(
10877 self,
10878 encoder: &mut fidl::encoding::Encoder<'_, D>,
10879 offset: usize,
10880 _depth: fidl::encoding::Depth,
10881 ) -> fidl::Result<()> {
10882 encoder.debug_check_bounds::<Self>(offset);
10883 encoder.write_num(self.bits(), offset);
10884 Ok(())
10885 }
10886 }
10887
10888 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WlanTxInfoFlags {
10889 #[inline(always)]
10890 fn new_empty() -> Self {
10891 Self::empty()
10892 }
10893
10894 #[inline]
10895 unsafe fn decode(
10896 &mut self,
10897 decoder: &mut fidl::encoding::Decoder<'_, D>,
10898 offset: usize,
10899 _depth: fidl::encoding::Depth,
10900 ) -> fidl::Result<()> {
10901 decoder.debug_check_bounds::<Self>(offset);
10902 let prim = decoder.read_num::<u32>(offset);
10903 *self = Self::from_bits_allow_unknown(prim);
10904 Ok(())
10905 }
10906 }
10907 unsafe impl fidl::encoding::TypeMarker for WlanTxInfoValid {
10908 type Owned = Self;
10909
10910 #[inline(always)]
10911 fn inline_align(_context: fidl::encoding::Context) -> usize {
10912 4
10913 }
10914
10915 #[inline(always)]
10916 fn inline_size(_context: fidl::encoding::Context) -> usize {
10917 4
10918 }
10919 }
10920
10921 impl fidl::encoding::ValueTypeMarker for WlanTxInfoValid {
10922 type Borrowed<'a> = Self;
10923 #[inline(always)]
10924 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10925 *value
10926 }
10927 }
10928
10929 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
10930 for WlanTxInfoValid
10931 {
10932 #[inline]
10933 unsafe fn encode(
10934 self,
10935 encoder: &mut fidl::encoding::Encoder<'_, D>,
10936 offset: usize,
10937 _depth: fidl::encoding::Depth,
10938 ) -> fidl::Result<()> {
10939 encoder.debug_check_bounds::<Self>(offset);
10940 encoder.write_num(self.bits(), offset);
10941 Ok(())
10942 }
10943 }
10944
10945 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WlanTxInfoValid {
10946 #[inline(always)]
10947 fn new_empty() -> Self {
10948 Self::empty()
10949 }
10950
10951 #[inline]
10952 unsafe fn decode(
10953 &mut self,
10954 decoder: &mut fidl::encoding::Decoder<'_, D>,
10955 offset: usize,
10956 _depth: fidl::encoding::Depth,
10957 ) -> fidl::Result<()> {
10958 decoder.debug_check_bounds::<Self>(offset);
10959 let prim = decoder.read_num::<u32>(offset);
10960 *self = Self::from_bits_allow_unknown(prim);
10961 Ok(())
10962 }
10963 }
10964 unsafe impl fidl::encoding::TypeMarker for WlanProtection {
10965 type Owned = Self;
10966
10967 #[inline(always)]
10968 fn inline_align(_context: fidl::encoding::Context) -> usize {
10969 std::mem::align_of::<u8>()
10970 }
10971
10972 #[inline(always)]
10973 fn inline_size(_context: fidl::encoding::Context) -> usize {
10974 std::mem::size_of::<u8>()
10975 }
10976
10977 #[inline(always)]
10978 fn encode_is_copy() -> bool {
10979 true
10980 }
10981
10982 #[inline(always)]
10983 fn decode_is_copy() -> bool {
10984 false
10985 }
10986 }
10987
10988 impl fidl::encoding::ValueTypeMarker for WlanProtection {
10989 type Borrowed<'a> = Self;
10990 #[inline(always)]
10991 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10992 *value
10993 }
10994 }
10995
10996 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for WlanProtection {
10997 #[inline]
10998 unsafe fn encode(
10999 self,
11000 encoder: &mut fidl::encoding::Encoder<'_, D>,
11001 offset: usize,
11002 _depth: fidl::encoding::Depth,
11003 ) -> fidl::Result<()> {
11004 encoder.debug_check_bounds::<Self>(offset);
11005 encoder.write_num(self.into_primitive(), offset);
11006 Ok(())
11007 }
11008 }
11009
11010 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WlanProtection {
11011 #[inline(always)]
11012 fn new_empty() -> Self {
11013 Self::None
11014 }
11015
11016 #[inline]
11017 unsafe fn decode(
11018 &mut self,
11019 decoder: &mut fidl::encoding::Decoder<'_, D>,
11020 offset: usize,
11021 _depth: fidl::encoding::Depth,
11022 ) -> fidl::Result<()> {
11023 decoder.debug_check_bounds::<Self>(offset);
11024 let prim = decoder.read_num::<u8>(offset);
11025
11026 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
11027 Ok(())
11028 }
11029 }
11030
11031 impl fidl::encoding::ValueTypeMarker for WlanRxInfo {
11032 type Borrowed<'a> = &'a Self;
11033 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11034 value
11035 }
11036 }
11037
11038 unsafe impl fidl::encoding::TypeMarker for WlanRxInfo {
11039 type Owned = Self;
11040
11041 #[inline(always)]
11042 fn inline_align(_context: fidl::encoding::Context) -> usize {
11043 4
11044 }
11045
11046 #[inline(always)]
11047 fn inline_size(_context: fidl::encoding::Context) -> usize {
11048 32
11049 }
11050 }
11051
11052 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<WlanRxInfo, D>
11053 for &WlanRxInfo
11054 {
11055 #[inline]
11056 unsafe fn encode(
11057 self,
11058 encoder: &mut fidl::encoding::Encoder<'_, D>,
11059 offset: usize,
11060 _depth: fidl::encoding::Depth,
11061 ) -> fidl::Result<()> {
11062 encoder.debug_check_bounds::<WlanRxInfo>(offset);
11063 fidl::encoding::Encode::<WlanRxInfo, D>::encode(
11065 (
11066 <WlanRxInfoFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.rx_flags),
11067 <WlanRxInfoValid as fidl::encoding::ValueTypeMarker>::borrow(&self.valid_fields),
11068 <fidl_fuchsia_wlan_common::WlanPhyType as fidl::encoding::ValueTypeMarker>::borrow(&self.phy),
11069 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.data_rate),
11070 <fidl_fuchsia_wlan_common::WlanChannel as fidl::encoding::ValueTypeMarker>::borrow(&self.channel),
11071 <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.mcs),
11072 <i8 as fidl::encoding::ValueTypeMarker>::borrow(&self.rssi_dbm),
11073 <i16 as fidl::encoding::ValueTypeMarker>::borrow(&self.snr_dbh),
11074 ),
11075 encoder, offset, _depth
11076 )
11077 }
11078 }
11079 unsafe impl<
11080 D: fidl::encoding::ResourceDialect,
11081 T0: fidl::encoding::Encode<WlanRxInfoFlags, D>,
11082 T1: fidl::encoding::Encode<WlanRxInfoValid, D>,
11083 T2: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanPhyType, D>,
11084 T3: fidl::encoding::Encode<u32, D>,
11085 T4: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanChannel, D>,
11086 T5: fidl::encoding::Encode<u8, D>,
11087 T6: fidl::encoding::Encode<i8, D>,
11088 T7: fidl::encoding::Encode<i16, D>,
11089 > fidl::encoding::Encode<WlanRxInfo, D> for (T0, T1, T2, T3, T4, T5, T6, T7)
11090 {
11091 #[inline]
11092 unsafe fn encode(
11093 self,
11094 encoder: &mut fidl::encoding::Encoder<'_, D>,
11095 offset: usize,
11096 depth: fidl::encoding::Depth,
11097 ) -> fidl::Result<()> {
11098 encoder.debug_check_bounds::<WlanRxInfo>(offset);
11099 self.0.encode(encoder, offset + 0, depth)?;
11103 self.1.encode(encoder, offset + 4, depth)?;
11104 self.2.encode(encoder, offset + 8, depth)?;
11105 self.3.encode(encoder, offset + 12, depth)?;
11106 self.4.encode(encoder, offset + 16, depth)?;
11107 self.5.encode(encoder, offset + 28, depth)?;
11108 self.6.encode(encoder, offset + 29, depth)?;
11109 self.7.encode(encoder, offset + 30, depth)?;
11110 Ok(())
11111 }
11112 }
11113
11114 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WlanRxInfo {
11115 #[inline(always)]
11116 fn new_empty() -> Self {
11117 Self {
11118 rx_flags: fidl::new_empty!(WlanRxInfoFlags, D),
11119 valid_fields: fidl::new_empty!(WlanRxInfoValid, D),
11120 phy: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanPhyType, D),
11121 data_rate: fidl::new_empty!(u32, D),
11122 channel: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanChannel, D),
11123 mcs: fidl::new_empty!(u8, D),
11124 rssi_dbm: fidl::new_empty!(i8, D),
11125 snr_dbh: fidl::new_empty!(i16, D),
11126 }
11127 }
11128
11129 #[inline]
11130 unsafe fn decode(
11131 &mut self,
11132 decoder: &mut fidl::encoding::Decoder<'_, D>,
11133 offset: usize,
11134 _depth: fidl::encoding::Depth,
11135 ) -> fidl::Result<()> {
11136 decoder.debug_check_bounds::<Self>(offset);
11137 fidl::decode!(WlanRxInfoFlags, D, &mut self.rx_flags, decoder, offset + 0, _depth)?;
11139 fidl::decode!(WlanRxInfoValid, D, &mut self.valid_fields, decoder, offset + 4, _depth)?;
11140 fidl::decode!(
11141 fidl_fuchsia_wlan_common::WlanPhyType,
11142 D,
11143 &mut self.phy,
11144 decoder,
11145 offset + 8,
11146 _depth
11147 )?;
11148 fidl::decode!(u32, D, &mut self.data_rate, decoder, offset + 12, _depth)?;
11149 fidl::decode!(
11150 fidl_fuchsia_wlan_common::WlanChannel,
11151 D,
11152 &mut self.channel,
11153 decoder,
11154 offset + 16,
11155 _depth
11156 )?;
11157 fidl::decode!(u8, D, &mut self.mcs, decoder, offset + 28, _depth)?;
11158 fidl::decode!(i8, D, &mut self.rssi_dbm, decoder, offset + 29, _depth)?;
11159 fidl::decode!(i16, D, &mut self.snr_dbh, decoder, offset + 30, _depth)?;
11160 Ok(())
11161 }
11162 }
11163
11164 impl fidl::encoding::ValueTypeMarker for WlanRxPacket {
11165 type Borrowed<'a> = &'a Self;
11166 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11167 value
11168 }
11169 }
11170
11171 unsafe impl fidl::encoding::TypeMarker for WlanRxPacket {
11172 type Owned = Self;
11173
11174 #[inline(always)]
11175 fn inline_align(_context: fidl::encoding::Context) -> usize {
11176 8
11177 }
11178
11179 #[inline(always)]
11180 fn inline_size(_context: fidl::encoding::Context) -> usize {
11181 48
11182 }
11183 }
11184
11185 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<WlanRxPacket, D>
11186 for &WlanRxPacket
11187 {
11188 #[inline]
11189 unsafe fn encode(
11190 self,
11191 encoder: &mut fidl::encoding::Encoder<'_, D>,
11192 offset: usize,
11193 _depth: fidl::encoding::Depth,
11194 ) -> fidl::Result<()> {
11195 encoder.debug_check_bounds::<WlanRxPacket>(offset);
11196 fidl::encoding::Encode::<WlanRxPacket, D>::encode(
11198 (
11199 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.mac_frame),
11200 <WlanRxInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),
11201 ),
11202 encoder, offset, _depth
11203 )
11204 }
11205 }
11206 unsafe impl<
11207 D: fidl::encoding::ResourceDialect,
11208 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
11209 T1: fidl::encoding::Encode<WlanRxInfo, D>,
11210 > fidl::encoding::Encode<WlanRxPacket, D> for (T0, T1)
11211 {
11212 #[inline]
11213 unsafe fn encode(
11214 self,
11215 encoder: &mut fidl::encoding::Encoder<'_, D>,
11216 offset: usize,
11217 depth: fidl::encoding::Depth,
11218 ) -> fidl::Result<()> {
11219 encoder.debug_check_bounds::<WlanRxPacket>(offset);
11220 self.0.encode(encoder, offset + 0, depth)?;
11224 self.1.encode(encoder, offset + 16, depth)?;
11225 Ok(())
11226 }
11227 }
11228
11229 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WlanRxPacket {
11230 #[inline(always)]
11231 fn new_empty() -> Self {
11232 Self {
11233 mac_frame: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
11234 info: fidl::new_empty!(WlanRxInfo, D),
11235 }
11236 }
11237
11238 #[inline]
11239 unsafe fn decode(
11240 &mut self,
11241 decoder: &mut fidl::encoding::Decoder<'_, D>,
11242 offset: usize,
11243 _depth: fidl::encoding::Depth,
11244 ) -> fidl::Result<()> {
11245 decoder.debug_check_bounds::<Self>(offset);
11246 fidl::decode!(
11248 fidl::encoding::UnboundedVector<u8>,
11249 D,
11250 &mut self.mac_frame,
11251 decoder,
11252 offset + 0,
11253 _depth
11254 )?;
11255 fidl::decode!(WlanRxInfo, D, &mut self.info, decoder, offset + 16, _depth)?;
11256 Ok(())
11257 }
11258 }
11259
11260 impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseJoinBssRequest {
11261 type Borrowed<'a> = &'a Self;
11262 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11263 value
11264 }
11265 }
11266
11267 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseJoinBssRequest {
11268 type Owned = Self;
11269
11270 #[inline(always)]
11271 fn inline_align(_context: fidl::encoding::Context) -> usize {
11272 8
11273 }
11274
11275 #[inline(always)]
11276 fn inline_size(_context: fidl::encoding::Context) -> usize {
11277 16
11278 }
11279 }
11280
11281 unsafe impl<D: fidl::encoding::ResourceDialect>
11282 fidl::encoding::Encode<WlanSoftmacBaseJoinBssRequest, D>
11283 for &WlanSoftmacBaseJoinBssRequest
11284 {
11285 #[inline]
11286 unsafe fn encode(
11287 self,
11288 encoder: &mut fidl::encoding::Encoder<'_, D>,
11289 offset: usize,
11290 _depth: fidl::encoding::Depth,
11291 ) -> fidl::Result<()> {
11292 encoder.debug_check_bounds::<WlanSoftmacBaseJoinBssRequest>(offset);
11293 fidl::encoding::Encode::<WlanSoftmacBaseJoinBssRequest, D>::encode(
11295 (
11296 <fidl_fuchsia_wlan_common::JoinBssRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.join_request),
11297 ),
11298 encoder, offset, _depth
11299 )
11300 }
11301 }
11302 unsafe impl<
11303 D: fidl::encoding::ResourceDialect,
11304 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::JoinBssRequest, D>,
11305 > fidl::encoding::Encode<WlanSoftmacBaseJoinBssRequest, D> for (T0,)
11306 {
11307 #[inline]
11308 unsafe fn encode(
11309 self,
11310 encoder: &mut fidl::encoding::Encoder<'_, D>,
11311 offset: usize,
11312 depth: fidl::encoding::Depth,
11313 ) -> fidl::Result<()> {
11314 encoder.debug_check_bounds::<WlanSoftmacBaseJoinBssRequest>(offset);
11315 self.0.encode(encoder, offset + 0, depth)?;
11319 Ok(())
11320 }
11321 }
11322
11323 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11324 for WlanSoftmacBaseJoinBssRequest
11325 {
11326 #[inline(always)]
11327 fn new_empty() -> Self {
11328 Self { join_request: fidl::new_empty!(fidl_fuchsia_wlan_common::JoinBssRequest, D) }
11329 }
11330
11331 #[inline]
11332 unsafe fn decode(
11333 &mut self,
11334 decoder: &mut fidl::encoding::Decoder<'_, D>,
11335 offset: usize,
11336 _depth: fidl::encoding::Depth,
11337 ) -> fidl::Result<()> {
11338 decoder.debug_check_bounds::<Self>(offset);
11339 fidl::decode!(
11341 fidl_fuchsia_wlan_common::JoinBssRequest,
11342 D,
11343 &mut self.join_request,
11344 decoder,
11345 offset + 0,
11346 _depth
11347 )?;
11348 Ok(())
11349 }
11350 }
11351
11352 impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseNotifyAssociationCompleteRequest {
11353 type Borrowed<'a> = &'a Self;
11354 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11355 value
11356 }
11357 }
11358
11359 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseNotifyAssociationCompleteRequest {
11360 type Owned = Self;
11361
11362 #[inline(always)]
11363 fn inline_align(_context: fidl::encoding::Context) -> usize {
11364 8
11365 }
11366
11367 #[inline(always)]
11368 fn inline_size(_context: fidl::encoding::Context) -> usize {
11369 16
11370 }
11371 }
11372
11373 unsafe impl<D: fidl::encoding::ResourceDialect>
11374 fidl::encoding::Encode<WlanSoftmacBaseNotifyAssociationCompleteRequest, D>
11375 for &WlanSoftmacBaseNotifyAssociationCompleteRequest
11376 {
11377 #[inline]
11378 unsafe fn encode(
11379 self,
11380 encoder: &mut fidl::encoding::Encoder<'_, D>,
11381 offset: usize,
11382 _depth: fidl::encoding::Depth,
11383 ) -> fidl::Result<()> {
11384 encoder.debug_check_bounds::<WlanSoftmacBaseNotifyAssociationCompleteRequest>(offset);
11385 fidl::encoding::Encode::<WlanSoftmacBaseNotifyAssociationCompleteRequest, D>::encode(
11387 (<WlanAssociationConfig as fidl::encoding::ValueTypeMarker>::borrow(
11388 &self.assoc_cfg,
11389 ),),
11390 encoder,
11391 offset,
11392 _depth,
11393 )
11394 }
11395 }
11396 unsafe impl<
11397 D: fidl::encoding::ResourceDialect,
11398 T0: fidl::encoding::Encode<WlanAssociationConfig, D>,
11399 > fidl::encoding::Encode<WlanSoftmacBaseNotifyAssociationCompleteRequest, D> for (T0,)
11400 {
11401 #[inline]
11402 unsafe fn encode(
11403 self,
11404 encoder: &mut fidl::encoding::Encoder<'_, D>,
11405 offset: usize,
11406 depth: fidl::encoding::Depth,
11407 ) -> fidl::Result<()> {
11408 encoder.debug_check_bounds::<WlanSoftmacBaseNotifyAssociationCompleteRequest>(offset);
11409 self.0.encode(encoder, offset + 0, depth)?;
11413 Ok(())
11414 }
11415 }
11416
11417 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11418 for WlanSoftmacBaseNotifyAssociationCompleteRequest
11419 {
11420 #[inline(always)]
11421 fn new_empty() -> Self {
11422 Self { assoc_cfg: fidl::new_empty!(WlanAssociationConfig, D) }
11423 }
11424
11425 #[inline]
11426 unsafe fn decode(
11427 &mut self,
11428 decoder: &mut fidl::encoding::Decoder<'_, D>,
11429 offset: usize,
11430 _depth: fidl::encoding::Depth,
11431 ) -> fidl::Result<()> {
11432 decoder.debug_check_bounds::<Self>(offset);
11433 fidl::decode!(
11435 WlanAssociationConfig,
11436 D,
11437 &mut self.assoc_cfg,
11438 decoder,
11439 offset + 0,
11440 _depth
11441 )?;
11442 Ok(())
11443 }
11444 }
11445
11446 impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseQueryDiscoverySupportResponse {
11447 type Borrowed<'a> = &'a Self;
11448 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11449 value
11450 }
11451 }
11452
11453 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseQueryDiscoverySupportResponse {
11454 type Owned = Self;
11455
11456 #[inline(always)]
11457 fn inline_align(_context: fidl::encoding::Context) -> usize {
11458 1
11459 }
11460
11461 #[inline(always)]
11462 fn inline_size(_context: fidl::encoding::Context) -> usize {
11463 3
11464 }
11465 }
11466
11467 unsafe impl<D: fidl::encoding::ResourceDialect>
11468 fidl::encoding::Encode<WlanSoftmacBaseQueryDiscoverySupportResponse, D>
11469 for &WlanSoftmacBaseQueryDiscoverySupportResponse
11470 {
11471 #[inline]
11472 unsafe fn encode(
11473 self,
11474 encoder: &mut fidl::encoding::Encoder<'_, D>,
11475 offset: usize,
11476 _depth: fidl::encoding::Depth,
11477 ) -> fidl::Result<()> {
11478 encoder.debug_check_bounds::<WlanSoftmacBaseQueryDiscoverySupportResponse>(offset);
11479 fidl::encoding::Encode::<WlanSoftmacBaseQueryDiscoverySupportResponse, D>::encode(
11481 (
11482 <fidl_fuchsia_wlan_common::DiscoverySupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
11483 ),
11484 encoder, offset, _depth
11485 )
11486 }
11487 }
11488 unsafe impl<
11489 D: fidl::encoding::ResourceDialect,
11490 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::DiscoverySupport, D>,
11491 > fidl::encoding::Encode<WlanSoftmacBaseQueryDiscoverySupportResponse, D> for (T0,)
11492 {
11493 #[inline]
11494 unsafe fn encode(
11495 self,
11496 encoder: &mut fidl::encoding::Encoder<'_, D>,
11497 offset: usize,
11498 depth: fidl::encoding::Depth,
11499 ) -> fidl::Result<()> {
11500 encoder.debug_check_bounds::<WlanSoftmacBaseQueryDiscoverySupportResponse>(offset);
11501 self.0.encode(encoder, offset + 0, depth)?;
11505 Ok(())
11506 }
11507 }
11508
11509 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11510 for WlanSoftmacBaseQueryDiscoverySupportResponse
11511 {
11512 #[inline(always)]
11513 fn new_empty() -> Self {
11514 Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_common::DiscoverySupport, D) }
11515 }
11516
11517 #[inline]
11518 unsafe fn decode(
11519 &mut self,
11520 decoder: &mut fidl::encoding::Decoder<'_, D>,
11521 offset: usize,
11522 _depth: fidl::encoding::Depth,
11523 ) -> fidl::Result<()> {
11524 decoder.debug_check_bounds::<Self>(offset);
11525 fidl::decode!(
11527 fidl_fuchsia_wlan_common::DiscoverySupport,
11528 D,
11529 &mut self.resp,
11530 decoder,
11531 offset + 0,
11532 _depth
11533 )?;
11534 Ok(())
11535 }
11536 }
11537
11538 impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseQueryMacSublayerSupportResponse {
11539 type Borrowed<'a> = &'a Self;
11540 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11541 value
11542 }
11543 }
11544
11545 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseQueryMacSublayerSupportResponse {
11546 type Owned = Self;
11547
11548 #[inline(always)]
11549 fn inline_align(_context: fidl::encoding::Context) -> usize {
11550 1
11551 }
11552
11553 #[inline(always)]
11554 fn inline_size(_context: fidl::encoding::Context) -> usize {
11555 5
11556 }
11557 }
11558
11559 unsafe impl<D: fidl::encoding::ResourceDialect>
11560 fidl::encoding::Encode<WlanSoftmacBaseQueryMacSublayerSupportResponse, D>
11561 for &WlanSoftmacBaseQueryMacSublayerSupportResponse
11562 {
11563 #[inline]
11564 unsafe fn encode(
11565 self,
11566 encoder: &mut fidl::encoding::Encoder<'_, D>,
11567 offset: usize,
11568 _depth: fidl::encoding::Depth,
11569 ) -> fidl::Result<()> {
11570 encoder.debug_check_bounds::<WlanSoftmacBaseQueryMacSublayerSupportResponse>(offset);
11571 fidl::encoding::Encode::<WlanSoftmacBaseQueryMacSublayerSupportResponse, D>::encode(
11573 (
11574 <fidl_fuchsia_wlan_common::MacSublayerSupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
11575 ),
11576 encoder, offset, _depth
11577 )
11578 }
11579 }
11580 unsafe impl<
11581 D: fidl::encoding::ResourceDialect,
11582 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::MacSublayerSupport, D>,
11583 > fidl::encoding::Encode<WlanSoftmacBaseQueryMacSublayerSupportResponse, D> for (T0,)
11584 {
11585 #[inline]
11586 unsafe fn encode(
11587 self,
11588 encoder: &mut fidl::encoding::Encoder<'_, D>,
11589 offset: usize,
11590 depth: fidl::encoding::Depth,
11591 ) -> fidl::Result<()> {
11592 encoder.debug_check_bounds::<WlanSoftmacBaseQueryMacSublayerSupportResponse>(offset);
11593 self.0.encode(encoder, offset + 0, depth)?;
11597 Ok(())
11598 }
11599 }
11600
11601 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11602 for WlanSoftmacBaseQueryMacSublayerSupportResponse
11603 {
11604 #[inline(always)]
11605 fn new_empty() -> Self {
11606 Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_common::MacSublayerSupport, D) }
11607 }
11608
11609 #[inline]
11610 unsafe fn decode(
11611 &mut self,
11612 decoder: &mut fidl::encoding::Decoder<'_, D>,
11613 offset: usize,
11614 _depth: fidl::encoding::Depth,
11615 ) -> fidl::Result<()> {
11616 decoder.debug_check_bounds::<Self>(offset);
11617 fidl::decode!(
11619 fidl_fuchsia_wlan_common::MacSublayerSupport,
11620 D,
11621 &mut self.resp,
11622 decoder,
11623 offset + 0,
11624 _depth
11625 )?;
11626 Ok(())
11627 }
11628 }
11629
11630 impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseQuerySecuritySupportResponse {
11631 type Borrowed<'a> = &'a Self;
11632 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11633 value
11634 }
11635 }
11636
11637 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseQuerySecuritySupportResponse {
11638 type Owned = Self;
11639
11640 #[inline(always)]
11641 fn inline_align(_context: fidl::encoding::Context) -> usize {
11642 1
11643 }
11644
11645 #[inline(always)]
11646 fn inline_size(_context: fidl::encoding::Context) -> usize {
11647 3
11648 }
11649 }
11650
11651 unsafe impl<D: fidl::encoding::ResourceDialect>
11652 fidl::encoding::Encode<WlanSoftmacBaseQuerySecuritySupportResponse, D>
11653 for &WlanSoftmacBaseQuerySecuritySupportResponse
11654 {
11655 #[inline]
11656 unsafe fn encode(
11657 self,
11658 encoder: &mut fidl::encoding::Encoder<'_, D>,
11659 offset: usize,
11660 _depth: fidl::encoding::Depth,
11661 ) -> fidl::Result<()> {
11662 encoder.debug_check_bounds::<WlanSoftmacBaseQuerySecuritySupportResponse>(offset);
11663 fidl::encoding::Encode::<WlanSoftmacBaseQuerySecuritySupportResponse, D>::encode(
11665 (
11666 <fidl_fuchsia_wlan_common::SecuritySupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
11667 ),
11668 encoder, offset, _depth
11669 )
11670 }
11671 }
11672 unsafe impl<
11673 D: fidl::encoding::ResourceDialect,
11674 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::SecuritySupport, D>,
11675 > fidl::encoding::Encode<WlanSoftmacBaseQuerySecuritySupportResponse, D> for (T0,)
11676 {
11677 #[inline]
11678 unsafe fn encode(
11679 self,
11680 encoder: &mut fidl::encoding::Encoder<'_, D>,
11681 offset: usize,
11682 depth: fidl::encoding::Depth,
11683 ) -> fidl::Result<()> {
11684 encoder.debug_check_bounds::<WlanSoftmacBaseQuerySecuritySupportResponse>(offset);
11685 self.0.encode(encoder, offset + 0, depth)?;
11689 Ok(())
11690 }
11691 }
11692
11693 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11694 for WlanSoftmacBaseQuerySecuritySupportResponse
11695 {
11696 #[inline(always)]
11697 fn new_empty() -> Self {
11698 Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_common::SecuritySupport, D) }
11699 }
11700
11701 #[inline]
11702 unsafe fn decode(
11703 &mut self,
11704 decoder: &mut fidl::encoding::Decoder<'_, D>,
11705 offset: usize,
11706 _depth: fidl::encoding::Depth,
11707 ) -> fidl::Result<()> {
11708 decoder.debug_check_bounds::<Self>(offset);
11709 fidl::decode!(
11711 fidl_fuchsia_wlan_common::SecuritySupport,
11712 D,
11713 &mut self.resp,
11714 decoder,
11715 offset + 0,
11716 _depth
11717 )?;
11718 Ok(())
11719 }
11720 }
11721
11722 impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseQuerySpectrumManagementSupportResponse {
11723 type Borrowed<'a> = &'a Self;
11724 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11725 value
11726 }
11727 }
11728
11729 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseQuerySpectrumManagementSupportResponse {
11730 type Owned = Self;
11731
11732 #[inline(always)]
11733 fn inline_align(_context: fidl::encoding::Context) -> usize {
11734 1
11735 }
11736
11737 #[inline(always)]
11738 fn inline_size(_context: fidl::encoding::Context) -> usize {
11739 1
11740 }
11741 }
11742
11743 unsafe impl<D: fidl::encoding::ResourceDialect>
11744 fidl::encoding::Encode<WlanSoftmacBaseQuerySpectrumManagementSupportResponse, D>
11745 for &WlanSoftmacBaseQuerySpectrumManagementSupportResponse
11746 {
11747 #[inline]
11748 unsafe fn encode(
11749 self,
11750 encoder: &mut fidl::encoding::Encoder<'_, D>,
11751 offset: usize,
11752 _depth: fidl::encoding::Depth,
11753 ) -> fidl::Result<()> {
11754 encoder.debug_check_bounds::<WlanSoftmacBaseQuerySpectrumManagementSupportResponse>(
11755 offset,
11756 );
11757 fidl::encoding::Encode::<WlanSoftmacBaseQuerySpectrumManagementSupportResponse, D>::encode(
11759 (
11760 <fidl_fuchsia_wlan_common::SpectrumManagementSupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
11761 ),
11762 encoder, offset, _depth
11763 )
11764 }
11765 }
11766 unsafe impl<
11767 D: fidl::encoding::ResourceDialect,
11768 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::SpectrumManagementSupport, D>,
11769 > fidl::encoding::Encode<WlanSoftmacBaseQuerySpectrumManagementSupportResponse, D>
11770 for (T0,)
11771 {
11772 #[inline]
11773 unsafe fn encode(
11774 self,
11775 encoder: &mut fidl::encoding::Encoder<'_, D>,
11776 offset: usize,
11777 depth: fidl::encoding::Depth,
11778 ) -> fidl::Result<()> {
11779 encoder.debug_check_bounds::<WlanSoftmacBaseQuerySpectrumManagementSupportResponse>(
11780 offset,
11781 );
11782 self.0.encode(encoder, offset + 0, depth)?;
11786 Ok(())
11787 }
11788 }
11789
11790 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11791 for WlanSoftmacBaseQuerySpectrumManagementSupportResponse
11792 {
11793 #[inline(always)]
11794 fn new_empty() -> Self {
11795 Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_common::SpectrumManagementSupport, D) }
11796 }
11797
11798 #[inline]
11799 unsafe fn decode(
11800 &mut self,
11801 decoder: &mut fidl::encoding::Decoder<'_, D>,
11802 offset: usize,
11803 _depth: fidl::encoding::Depth,
11804 ) -> fidl::Result<()> {
11805 decoder.debug_check_bounds::<Self>(offset);
11806 fidl::decode!(
11808 fidl_fuchsia_wlan_common::SpectrumManagementSupport,
11809 D,
11810 &mut self.resp,
11811 decoder,
11812 offset + 0,
11813 _depth
11814 )?;
11815 Ok(())
11816 }
11817 }
11818
11819 impl fidl::encoding::ValueTypeMarker for WlanSoftmacBridgeSetEthernetStatusRequest {
11820 type Borrowed<'a> = &'a Self;
11821 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11822 value
11823 }
11824 }
11825
11826 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBridgeSetEthernetStatusRequest {
11827 type Owned = Self;
11828
11829 #[inline(always)]
11830 fn inline_align(_context: fidl::encoding::Context) -> usize {
11831 4
11832 }
11833
11834 #[inline(always)]
11835 fn inline_size(_context: fidl::encoding::Context) -> usize {
11836 4
11837 }
11838 #[inline(always)]
11839 fn encode_is_copy() -> bool {
11840 true
11841 }
11842
11843 #[inline(always)]
11844 fn decode_is_copy() -> bool {
11845 true
11846 }
11847 }
11848
11849 unsafe impl<D: fidl::encoding::ResourceDialect>
11850 fidl::encoding::Encode<WlanSoftmacBridgeSetEthernetStatusRequest, D>
11851 for &WlanSoftmacBridgeSetEthernetStatusRequest
11852 {
11853 #[inline]
11854 unsafe fn encode(
11855 self,
11856 encoder: &mut fidl::encoding::Encoder<'_, D>,
11857 offset: usize,
11858 _depth: fidl::encoding::Depth,
11859 ) -> fidl::Result<()> {
11860 encoder.debug_check_bounds::<WlanSoftmacBridgeSetEthernetStatusRequest>(offset);
11861 unsafe {
11862 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11864 (buf_ptr as *mut WlanSoftmacBridgeSetEthernetStatusRequest).write_unaligned(
11865 (self as *const WlanSoftmacBridgeSetEthernetStatusRequest).read(),
11866 );
11867 }
11870 Ok(())
11871 }
11872 }
11873 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
11874 fidl::encoding::Encode<WlanSoftmacBridgeSetEthernetStatusRequest, D> for (T0,)
11875 {
11876 #[inline]
11877 unsafe fn encode(
11878 self,
11879 encoder: &mut fidl::encoding::Encoder<'_, D>,
11880 offset: usize,
11881 depth: fidl::encoding::Depth,
11882 ) -> fidl::Result<()> {
11883 encoder.debug_check_bounds::<WlanSoftmacBridgeSetEthernetStatusRequest>(offset);
11884 self.0.encode(encoder, offset + 0, depth)?;
11888 Ok(())
11889 }
11890 }
11891
11892 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11893 for WlanSoftmacBridgeSetEthernetStatusRequest
11894 {
11895 #[inline(always)]
11896 fn new_empty() -> Self {
11897 Self { status: fidl::new_empty!(u32, D) }
11898 }
11899
11900 #[inline]
11901 unsafe fn decode(
11902 &mut self,
11903 decoder: &mut fidl::encoding::Decoder<'_, D>,
11904 offset: usize,
11905 _depth: fidl::encoding::Depth,
11906 ) -> fidl::Result<()> {
11907 decoder.debug_check_bounds::<Self>(offset);
11908 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11909 unsafe {
11912 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
11913 }
11914 Ok(())
11915 }
11916 }
11917
11918 impl fidl::encoding::ResourceTypeMarker for WlanSoftmacBridgeStartRequest {
11919 type Borrowed<'a> = &'a mut Self;
11920 fn take_or_borrow<'a>(
11921 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11922 ) -> Self::Borrowed<'a> {
11923 value
11924 }
11925 }
11926
11927 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBridgeStartRequest {
11928 type Owned = Self;
11929
11930 #[inline(always)]
11931 fn inline_align(_context: fidl::encoding::Context) -> usize {
11932 8
11933 }
11934
11935 #[inline(always)]
11936 fn inline_size(_context: fidl::encoding::Context) -> usize {
11937 24
11938 }
11939 }
11940
11941 unsafe impl
11942 fidl::encoding::Encode<
11943 WlanSoftmacBridgeStartRequest,
11944 fidl::encoding::DefaultFuchsiaResourceDialect,
11945 > for &mut WlanSoftmacBridgeStartRequest
11946 {
11947 #[inline]
11948 unsafe fn encode(
11949 self,
11950 encoder: &mut fidl::encoding::Encoder<
11951 '_,
11952 fidl::encoding::DefaultFuchsiaResourceDialect,
11953 >,
11954 offset: usize,
11955 _depth: fidl::encoding::Depth,
11956 ) -> fidl::Result<()> {
11957 encoder.debug_check_bounds::<WlanSoftmacBridgeStartRequest>(offset);
11958 fidl::encoding::Encode::<
11960 WlanSoftmacBridgeStartRequest,
11961 fidl::encoding::DefaultFuchsiaResourceDialect,
11962 >::encode(
11963 (
11964 <fidl::encoding::Endpoint<
11965 fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
11966 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11967 &mut self.ifc_bridge
11968 ),
11969 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.ethernet_tx),
11970 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.wlan_rx),
11971 ),
11972 encoder,
11973 offset,
11974 _depth,
11975 )
11976 }
11977 }
11978 unsafe impl<
11979 T0: fidl::encoding::Encode<
11980 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>>,
11981 fidl::encoding::DefaultFuchsiaResourceDialect,
11982 >,
11983 T1: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
11984 T2: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
11985 >
11986 fidl::encoding::Encode<
11987 WlanSoftmacBridgeStartRequest,
11988 fidl::encoding::DefaultFuchsiaResourceDialect,
11989 > for (T0, T1, T2)
11990 {
11991 #[inline]
11992 unsafe fn encode(
11993 self,
11994 encoder: &mut fidl::encoding::Encoder<
11995 '_,
11996 fidl::encoding::DefaultFuchsiaResourceDialect,
11997 >,
11998 offset: usize,
11999 depth: fidl::encoding::Depth,
12000 ) -> fidl::Result<()> {
12001 encoder.debug_check_bounds::<WlanSoftmacBridgeStartRequest>(offset);
12002 unsafe {
12005 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
12006 (ptr as *mut u64).write_unaligned(0);
12007 }
12008 self.0.encode(encoder, offset + 0, depth)?;
12010 self.1.encode(encoder, offset + 8, depth)?;
12011 self.2.encode(encoder, offset + 16, depth)?;
12012 Ok(())
12013 }
12014 }
12015
12016 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12017 for WlanSoftmacBridgeStartRequest
12018 {
12019 #[inline(always)]
12020 fn new_empty() -> Self {
12021 Self {
12022 ifc_bridge: fidl::new_empty!(
12023 fidl::encoding::Endpoint<
12024 fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
12025 >,
12026 fidl::encoding::DefaultFuchsiaResourceDialect
12027 ),
12028 ethernet_tx: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
12029 wlan_rx: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
12030 }
12031 }
12032
12033 #[inline]
12034 unsafe fn decode(
12035 &mut self,
12036 decoder: &mut fidl::encoding::Decoder<
12037 '_,
12038 fidl::encoding::DefaultFuchsiaResourceDialect,
12039 >,
12040 offset: usize,
12041 _depth: fidl::encoding::Depth,
12042 ) -> fidl::Result<()> {
12043 decoder.debug_check_bounds::<Self>(offset);
12044 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
12046 let padval = unsafe { (ptr as *const u64).read_unaligned() };
12047 let mask = 0xffffffff00000000u64;
12048 let maskedval = padval & mask;
12049 if maskedval != 0 {
12050 return Err(fidl::Error::NonZeroPadding {
12051 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
12052 });
12053 }
12054 fidl::decode!(
12055 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>>,
12056 fidl::encoding::DefaultFuchsiaResourceDialect,
12057 &mut self.ifc_bridge,
12058 decoder,
12059 offset + 0,
12060 _depth
12061 )?;
12062 fidl::decode!(
12063 u64,
12064 fidl::encoding::DefaultFuchsiaResourceDialect,
12065 &mut self.ethernet_tx,
12066 decoder,
12067 offset + 8,
12068 _depth
12069 )?;
12070 fidl::decode!(
12071 u64,
12072 fidl::encoding::DefaultFuchsiaResourceDialect,
12073 &mut self.wlan_rx,
12074 decoder,
12075 offset + 16,
12076 _depth
12077 )?;
12078 Ok(())
12079 }
12080 }
12081
12082 impl fidl::encoding::ResourceTypeMarker for WlanSoftmacBridgeStartResponse {
12083 type Borrowed<'a> = &'a mut Self;
12084 fn take_or_borrow<'a>(
12085 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12086 ) -> Self::Borrowed<'a> {
12087 value
12088 }
12089 }
12090
12091 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBridgeStartResponse {
12092 type Owned = Self;
12093
12094 #[inline(always)]
12095 fn inline_align(_context: fidl::encoding::Context) -> usize {
12096 4
12097 }
12098
12099 #[inline(always)]
12100 fn inline_size(_context: fidl::encoding::Context) -> usize {
12101 4
12102 }
12103 }
12104
12105 unsafe impl
12106 fidl::encoding::Encode<
12107 WlanSoftmacBridgeStartResponse,
12108 fidl::encoding::DefaultFuchsiaResourceDialect,
12109 > for &mut WlanSoftmacBridgeStartResponse
12110 {
12111 #[inline]
12112 unsafe fn encode(
12113 self,
12114 encoder: &mut fidl::encoding::Encoder<
12115 '_,
12116 fidl::encoding::DefaultFuchsiaResourceDialect,
12117 >,
12118 offset: usize,
12119 _depth: fidl::encoding::Depth,
12120 ) -> fidl::Result<()> {
12121 encoder.debug_check_bounds::<WlanSoftmacBridgeStartResponse>(offset);
12122 fidl::encoding::Encode::<
12124 WlanSoftmacBridgeStartResponse,
12125 fidl::encoding::DefaultFuchsiaResourceDialect,
12126 >::encode(
12127 (<fidl::encoding::HandleType<
12128 fidl::Channel,
12129 { fidl::ObjectType::CHANNEL.into_raw() },
12130 2147483648,
12131 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
12132 &mut self.sme_channel
12133 ),),
12134 encoder,
12135 offset,
12136 _depth,
12137 )
12138 }
12139 }
12140 unsafe impl<
12141 T0: fidl::encoding::Encode<
12142 fidl::encoding::HandleType<
12143 fidl::Channel,
12144 { fidl::ObjectType::CHANNEL.into_raw() },
12145 2147483648,
12146 >,
12147 fidl::encoding::DefaultFuchsiaResourceDialect,
12148 >,
12149 >
12150 fidl::encoding::Encode<
12151 WlanSoftmacBridgeStartResponse,
12152 fidl::encoding::DefaultFuchsiaResourceDialect,
12153 > for (T0,)
12154 {
12155 #[inline]
12156 unsafe fn encode(
12157 self,
12158 encoder: &mut fidl::encoding::Encoder<
12159 '_,
12160 fidl::encoding::DefaultFuchsiaResourceDialect,
12161 >,
12162 offset: usize,
12163 depth: fidl::encoding::Depth,
12164 ) -> fidl::Result<()> {
12165 encoder.debug_check_bounds::<WlanSoftmacBridgeStartResponse>(offset);
12166 self.0.encode(encoder, offset + 0, depth)?;
12170 Ok(())
12171 }
12172 }
12173
12174 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12175 for WlanSoftmacBridgeStartResponse
12176 {
12177 #[inline(always)]
12178 fn new_empty() -> Self {
12179 Self {
12180 sme_channel: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
12181 }
12182 }
12183
12184 #[inline]
12185 unsafe fn decode(
12186 &mut self,
12187 decoder: &mut fidl::encoding::Decoder<
12188 '_,
12189 fidl::encoding::DefaultFuchsiaResourceDialect,
12190 >,
12191 offset: usize,
12192 _depth: fidl::encoding::Depth,
12193 ) -> fidl::Result<()> {
12194 decoder.debug_check_bounds::<Self>(offset);
12195 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.sme_channel, decoder, offset + 0, _depth)?;
12197 Ok(())
12198 }
12199 }
12200
12201 impl fidl::encoding::ValueTypeMarker for WlanSoftmacIfcBaseReportTxResultRequest {
12202 type Borrowed<'a> = &'a Self;
12203 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12204 value
12205 }
12206 }
12207
12208 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacIfcBaseReportTxResultRequest {
12209 type Owned = Self;
12210
12211 #[inline(always)]
12212 fn inline_align(_context: fidl::encoding::Context) -> usize {
12213 2
12214 }
12215
12216 #[inline(always)]
12217 fn inline_size(_context: fidl::encoding::Context) -> usize {
12218 40
12219 }
12220 }
12221
12222 unsafe impl<D: fidl::encoding::ResourceDialect>
12223 fidl::encoding::Encode<WlanSoftmacIfcBaseReportTxResultRequest, D>
12224 for &WlanSoftmacIfcBaseReportTxResultRequest
12225 {
12226 #[inline]
12227 unsafe fn encode(
12228 self,
12229 encoder: &mut fidl::encoding::Encoder<'_, D>,
12230 offset: usize,
12231 _depth: fidl::encoding::Depth,
12232 ) -> fidl::Result<()> {
12233 encoder.debug_check_bounds::<WlanSoftmacIfcBaseReportTxResultRequest>(offset);
12234 fidl::encoding::Encode::<WlanSoftmacIfcBaseReportTxResultRequest, D>::encode(
12236 (
12237 <fidl_fuchsia_wlan_common::WlanTxResult as fidl::encoding::ValueTypeMarker>::borrow(&self.tx_result),
12238 ),
12239 encoder, offset, _depth
12240 )
12241 }
12242 }
12243 unsafe impl<
12244 D: fidl::encoding::ResourceDialect,
12245 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanTxResult, D>,
12246 > fidl::encoding::Encode<WlanSoftmacIfcBaseReportTxResultRequest, D> for (T0,)
12247 {
12248 #[inline]
12249 unsafe fn encode(
12250 self,
12251 encoder: &mut fidl::encoding::Encoder<'_, D>,
12252 offset: usize,
12253 depth: fidl::encoding::Depth,
12254 ) -> fidl::Result<()> {
12255 encoder.debug_check_bounds::<WlanSoftmacIfcBaseReportTxResultRequest>(offset);
12256 self.0.encode(encoder, offset + 0, depth)?;
12260 Ok(())
12261 }
12262 }
12263
12264 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12265 for WlanSoftmacIfcBaseReportTxResultRequest
12266 {
12267 #[inline(always)]
12268 fn new_empty() -> Self {
12269 Self { tx_result: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanTxResult, D) }
12270 }
12271
12272 #[inline]
12273 unsafe fn decode(
12274 &mut self,
12275 decoder: &mut fidl::encoding::Decoder<'_, D>,
12276 offset: usize,
12277 _depth: fidl::encoding::Depth,
12278 ) -> fidl::Result<()> {
12279 decoder.debug_check_bounds::<Self>(offset);
12280 fidl::decode!(
12282 fidl_fuchsia_wlan_common::WlanTxResult,
12283 D,
12284 &mut self.tx_result,
12285 decoder,
12286 offset + 0,
12287 _depth
12288 )?;
12289 Ok(())
12290 }
12291 }
12292
12293 impl fidl::encoding::ValueTypeMarker for WlanTxInfo {
12294 type Borrowed<'a> = &'a Self;
12295 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12296 value
12297 }
12298 }
12299
12300 unsafe impl fidl::encoding::TypeMarker for WlanTxInfo {
12301 type Owned = Self;
12302
12303 #[inline(always)]
12304 fn inline_align(_context: fidl::encoding::Context) -> usize {
12305 4
12306 }
12307
12308 #[inline(always)]
12309 fn inline_size(_context: fidl::encoding::Context) -> usize {
12310 24
12311 }
12312 }
12313
12314 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<WlanTxInfo, D>
12315 for &WlanTxInfo
12316 {
12317 #[inline]
12318 unsafe fn encode(
12319 self,
12320 encoder: &mut fidl::encoding::Encoder<'_, D>,
12321 offset: usize,
12322 _depth: fidl::encoding::Depth,
12323 ) -> fidl::Result<()> {
12324 encoder.debug_check_bounds::<WlanTxInfo>(offset);
12325 fidl::encoding::Encode::<WlanTxInfo, D>::encode(
12327 (
12328 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.tx_flags),
12329 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.valid_fields),
12330 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.tx_vector_idx),
12331 <fidl_fuchsia_wlan_common::WlanPhyType as fidl::encoding::ValueTypeMarker>::borrow(&self.phy),
12332 <fidl_fuchsia_wlan_common::ChannelBandwidth as fidl::encoding::ValueTypeMarker>::borrow(&self.channel_bandwidth),
12333 <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.mcs),
12334 ),
12335 encoder, offset, _depth
12336 )
12337 }
12338 }
12339 unsafe impl<
12340 D: fidl::encoding::ResourceDialect,
12341 T0: fidl::encoding::Encode<u32, D>,
12342 T1: fidl::encoding::Encode<u32, D>,
12343 T2: fidl::encoding::Encode<u16, D>,
12344 T3: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanPhyType, D>,
12345 T4: fidl::encoding::Encode<fidl_fuchsia_wlan_common::ChannelBandwidth, D>,
12346 T5: fidl::encoding::Encode<u8, D>,
12347 > fidl::encoding::Encode<WlanTxInfo, D> for (T0, T1, T2, T3, T4, T5)
12348 {
12349 #[inline]
12350 unsafe fn encode(
12351 self,
12352 encoder: &mut fidl::encoding::Encoder<'_, D>,
12353 offset: usize,
12354 depth: fidl::encoding::Depth,
12355 ) -> fidl::Result<()> {
12356 encoder.debug_check_bounds::<WlanTxInfo>(offset);
12357 unsafe {
12360 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
12361 (ptr as *mut u32).write_unaligned(0);
12362 }
12363 unsafe {
12364 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(20);
12365 (ptr as *mut u32).write_unaligned(0);
12366 }
12367 self.0.encode(encoder, offset + 0, depth)?;
12369 self.1.encode(encoder, offset + 4, depth)?;
12370 self.2.encode(encoder, offset + 8, depth)?;
12371 self.3.encode(encoder, offset + 12, depth)?;
12372 self.4.encode(encoder, offset + 16, depth)?;
12373 self.5.encode(encoder, offset + 20, depth)?;
12374 Ok(())
12375 }
12376 }
12377
12378 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WlanTxInfo {
12379 #[inline(always)]
12380 fn new_empty() -> Self {
12381 Self {
12382 tx_flags: fidl::new_empty!(u32, D),
12383 valid_fields: fidl::new_empty!(u32, D),
12384 tx_vector_idx: fidl::new_empty!(u16, D),
12385 phy: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanPhyType, D),
12386 channel_bandwidth: fidl::new_empty!(fidl_fuchsia_wlan_common::ChannelBandwidth, D),
12387 mcs: fidl::new_empty!(u8, D),
12388 }
12389 }
12390
12391 #[inline]
12392 unsafe fn decode(
12393 &mut self,
12394 decoder: &mut fidl::encoding::Decoder<'_, D>,
12395 offset: usize,
12396 _depth: fidl::encoding::Depth,
12397 ) -> fidl::Result<()> {
12398 decoder.debug_check_bounds::<Self>(offset);
12399 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
12401 let padval = unsafe { (ptr as *const u32).read_unaligned() };
12402 let mask = 0xffff0000u32;
12403 let maskedval = padval & mask;
12404 if maskedval != 0 {
12405 return Err(fidl::Error::NonZeroPadding {
12406 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
12407 });
12408 }
12409 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(20) };
12410 let padval = unsafe { (ptr as *const u32).read_unaligned() };
12411 let mask = 0xffffff00u32;
12412 let maskedval = padval & mask;
12413 if maskedval != 0 {
12414 return Err(fidl::Error::NonZeroPadding {
12415 padding_start: offset + 20 + ((mask as u64).trailing_zeros() / 8) as usize,
12416 });
12417 }
12418 fidl::decode!(u32, D, &mut self.tx_flags, decoder, offset + 0, _depth)?;
12419 fidl::decode!(u32, D, &mut self.valid_fields, decoder, offset + 4, _depth)?;
12420 fidl::decode!(u16, D, &mut self.tx_vector_idx, decoder, offset + 8, _depth)?;
12421 fidl::decode!(
12422 fidl_fuchsia_wlan_common::WlanPhyType,
12423 D,
12424 &mut self.phy,
12425 decoder,
12426 offset + 12,
12427 _depth
12428 )?;
12429 fidl::decode!(
12430 fidl_fuchsia_wlan_common::ChannelBandwidth,
12431 D,
12432 &mut self.channel_bandwidth,
12433 decoder,
12434 offset + 16,
12435 _depth
12436 )?;
12437 fidl::decode!(u8, D, &mut self.mcs, decoder, offset + 20, _depth)?;
12438 Ok(())
12439 }
12440 }
12441
12442 impl fidl::encoding::ValueTypeMarker for WlanTxPacket {
12443 type Borrowed<'a> = &'a Self;
12444 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12445 value
12446 }
12447 }
12448
12449 unsafe impl fidl::encoding::TypeMarker for WlanTxPacket {
12450 type Owned = Self;
12451
12452 #[inline(always)]
12453 fn inline_align(_context: fidl::encoding::Context) -> usize {
12454 8
12455 }
12456
12457 #[inline(always)]
12458 fn inline_size(_context: fidl::encoding::Context) -> usize {
12459 40
12460 }
12461 }
12462
12463 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<WlanTxPacket, D>
12464 for &WlanTxPacket
12465 {
12466 #[inline]
12467 unsafe fn encode(
12468 self,
12469 encoder: &mut fidl::encoding::Encoder<'_, D>,
12470 offset: usize,
12471 _depth: fidl::encoding::Depth,
12472 ) -> fidl::Result<()> {
12473 encoder.debug_check_bounds::<WlanTxPacket>(offset);
12474 fidl::encoding::Encode::<WlanTxPacket, D>::encode(
12476 (
12477 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.mac_frame),
12478 <WlanTxInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),
12479 ),
12480 encoder, offset, _depth
12481 )
12482 }
12483 }
12484 unsafe impl<
12485 D: fidl::encoding::ResourceDialect,
12486 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
12487 T1: fidl::encoding::Encode<WlanTxInfo, D>,
12488 > fidl::encoding::Encode<WlanTxPacket, D> for (T0, T1)
12489 {
12490 #[inline]
12491 unsafe fn encode(
12492 self,
12493 encoder: &mut fidl::encoding::Encoder<'_, D>,
12494 offset: usize,
12495 depth: fidl::encoding::Depth,
12496 ) -> fidl::Result<()> {
12497 encoder.debug_check_bounds::<WlanTxPacket>(offset);
12498 self.0.encode(encoder, offset + 0, depth)?;
12502 self.1.encode(encoder, offset + 16, depth)?;
12503 Ok(())
12504 }
12505 }
12506
12507 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WlanTxPacket {
12508 #[inline(always)]
12509 fn new_empty() -> Self {
12510 Self {
12511 mac_frame: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
12512 info: fidl::new_empty!(WlanTxInfo, D),
12513 }
12514 }
12515
12516 #[inline]
12517 unsafe fn decode(
12518 &mut self,
12519 decoder: &mut fidl::encoding::Decoder<'_, D>,
12520 offset: usize,
12521 _depth: fidl::encoding::Depth,
12522 ) -> fidl::Result<()> {
12523 decoder.debug_check_bounds::<Self>(offset);
12524 fidl::decode!(
12526 fidl::encoding::UnboundedVector<u8>,
12527 D,
12528 &mut self.mac_frame,
12529 decoder,
12530 offset + 0,
12531 _depth
12532 )?;
12533 fidl::decode!(WlanTxInfo, D, &mut self.info, decoder, offset + 16, _depth)?;
12534 Ok(())
12535 }
12536 }
12537
12538 impl EthernetRxTransferRequest {
12539 #[inline(always)]
12540 fn max_ordinal_present(&self) -> u64 {
12541 if let Some(_) = self.packet_size {
12542 return 2;
12543 }
12544 if let Some(_) = self.packet_address {
12545 return 1;
12546 }
12547 0
12548 }
12549 }
12550
12551 impl fidl::encoding::ValueTypeMarker for EthernetRxTransferRequest {
12552 type Borrowed<'a> = &'a Self;
12553 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12554 value
12555 }
12556 }
12557
12558 unsafe impl fidl::encoding::TypeMarker for EthernetRxTransferRequest {
12559 type Owned = Self;
12560
12561 #[inline(always)]
12562 fn inline_align(_context: fidl::encoding::Context) -> usize {
12563 8
12564 }
12565
12566 #[inline(always)]
12567 fn inline_size(_context: fidl::encoding::Context) -> usize {
12568 16
12569 }
12570 }
12571
12572 unsafe impl<D: fidl::encoding::ResourceDialect>
12573 fidl::encoding::Encode<EthernetRxTransferRequest, D> for &EthernetRxTransferRequest
12574 {
12575 unsafe fn encode(
12576 self,
12577 encoder: &mut fidl::encoding::Encoder<'_, D>,
12578 offset: usize,
12579 mut depth: fidl::encoding::Depth,
12580 ) -> fidl::Result<()> {
12581 encoder.debug_check_bounds::<EthernetRxTransferRequest>(offset);
12582 let max_ordinal: u64 = self.max_ordinal_present();
12584 encoder.write_num(max_ordinal, offset);
12585 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12586 if max_ordinal == 0 {
12588 return Ok(());
12589 }
12590 depth.increment()?;
12591 let envelope_size = 8;
12592 let bytes_len = max_ordinal as usize * envelope_size;
12593 #[allow(unused_variables)]
12594 let offset = encoder.out_of_line_offset(bytes_len);
12595 let mut _prev_end_offset: usize = 0;
12596 if 1 > max_ordinal {
12597 return Ok(());
12598 }
12599
12600 let cur_offset: usize = (1 - 1) * envelope_size;
12603
12604 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12606
12607 fidl::encoding::encode_in_envelope_optional::<u64, D>(
12612 self.packet_address.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
12613 encoder,
12614 offset + cur_offset,
12615 depth,
12616 )?;
12617
12618 _prev_end_offset = cur_offset + envelope_size;
12619 if 2 > max_ordinal {
12620 return Ok(());
12621 }
12622
12623 let cur_offset: usize = (2 - 1) * envelope_size;
12626
12627 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12629
12630 fidl::encoding::encode_in_envelope_optional::<u64, D>(
12635 self.packet_size.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
12636 encoder,
12637 offset + cur_offset,
12638 depth,
12639 )?;
12640
12641 _prev_end_offset = cur_offset + envelope_size;
12642
12643 Ok(())
12644 }
12645 }
12646
12647 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12648 for EthernetRxTransferRequest
12649 {
12650 #[inline(always)]
12651 fn new_empty() -> Self {
12652 Self::default()
12653 }
12654
12655 unsafe fn decode(
12656 &mut self,
12657 decoder: &mut fidl::encoding::Decoder<'_, D>,
12658 offset: usize,
12659 mut depth: fidl::encoding::Depth,
12660 ) -> fidl::Result<()> {
12661 decoder.debug_check_bounds::<Self>(offset);
12662 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12663 None => return Err(fidl::Error::NotNullable),
12664 Some(len) => len,
12665 };
12666 if len == 0 {
12668 return Ok(());
12669 };
12670 depth.increment()?;
12671 let envelope_size = 8;
12672 let bytes_len = len * envelope_size;
12673 let offset = decoder.out_of_line_offset(bytes_len)?;
12674 let mut _next_ordinal_to_read = 0;
12676 let mut next_offset = offset;
12677 let end_offset = offset + bytes_len;
12678 _next_ordinal_to_read += 1;
12679 if next_offset >= end_offset {
12680 return Ok(());
12681 }
12682
12683 while _next_ordinal_to_read < 1 {
12685 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12686 _next_ordinal_to_read += 1;
12687 next_offset += envelope_size;
12688 }
12689
12690 let next_out_of_line = decoder.next_out_of_line();
12691 let handles_before = decoder.remaining_handles();
12692 if let Some((inlined, num_bytes, num_handles)) =
12693 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12694 {
12695 let member_inline_size =
12696 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12697 if inlined != (member_inline_size <= 4) {
12698 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12699 }
12700 let inner_offset;
12701 let mut inner_depth = depth.clone();
12702 if inlined {
12703 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12704 inner_offset = next_offset;
12705 } else {
12706 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12707 inner_depth.increment()?;
12708 }
12709 let val_ref = self.packet_address.get_or_insert_with(|| fidl::new_empty!(u64, D));
12710 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
12711 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12712 {
12713 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12714 }
12715 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12716 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12717 }
12718 }
12719
12720 next_offset += envelope_size;
12721 _next_ordinal_to_read += 1;
12722 if next_offset >= end_offset {
12723 return Ok(());
12724 }
12725
12726 while _next_ordinal_to_read < 2 {
12728 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12729 _next_ordinal_to_read += 1;
12730 next_offset += envelope_size;
12731 }
12732
12733 let next_out_of_line = decoder.next_out_of_line();
12734 let handles_before = decoder.remaining_handles();
12735 if let Some((inlined, num_bytes, num_handles)) =
12736 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12737 {
12738 let member_inline_size =
12739 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12740 if inlined != (member_inline_size <= 4) {
12741 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12742 }
12743 let inner_offset;
12744 let mut inner_depth = depth.clone();
12745 if inlined {
12746 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12747 inner_offset = next_offset;
12748 } else {
12749 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12750 inner_depth.increment()?;
12751 }
12752 let val_ref = self.packet_size.get_or_insert_with(|| fidl::new_empty!(u64, D));
12753 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
12754 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12755 {
12756 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12757 }
12758 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12759 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12760 }
12761 }
12762
12763 next_offset += envelope_size;
12764
12765 while next_offset < end_offset {
12767 _next_ordinal_to_read += 1;
12768 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12769 next_offset += envelope_size;
12770 }
12771
12772 Ok(())
12773 }
12774 }
12775
12776 impl EthernetTxTransferRequest {
12777 #[inline(always)]
12778 fn max_ordinal_present(&self) -> u64 {
12779 if let Some(_) = self.complete_borrowed_operation {
12780 return 5;
12781 }
12782 if let Some(_) = self.borrowed_operation {
12783 return 4;
12784 }
12785 if let Some(_) = self.async_id {
12786 return 3;
12787 }
12788 if let Some(_) = self.packet_size {
12789 return 2;
12790 }
12791 if let Some(_) = self.packet_address {
12792 return 1;
12793 }
12794 0
12795 }
12796 }
12797
12798 impl fidl::encoding::ValueTypeMarker for EthernetTxTransferRequest {
12799 type Borrowed<'a> = &'a Self;
12800 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12801 value
12802 }
12803 }
12804
12805 unsafe impl fidl::encoding::TypeMarker for EthernetTxTransferRequest {
12806 type Owned = Self;
12807
12808 #[inline(always)]
12809 fn inline_align(_context: fidl::encoding::Context) -> usize {
12810 8
12811 }
12812
12813 #[inline(always)]
12814 fn inline_size(_context: fidl::encoding::Context) -> usize {
12815 16
12816 }
12817 }
12818
12819 unsafe impl<D: fidl::encoding::ResourceDialect>
12820 fidl::encoding::Encode<EthernetTxTransferRequest, D> for &EthernetTxTransferRequest
12821 {
12822 unsafe fn encode(
12823 self,
12824 encoder: &mut fidl::encoding::Encoder<'_, D>,
12825 offset: usize,
12826 mut depth: fidl::encoding::Depth,
12827 ) -> fidl::Result<()> {
12828 encoder.debug_check_bounds::<EthernetTxTransferRequest>(offset);
12829 let max_ordinal: u64 = self.max_ordinal_present();
12831 encoder.write_num(max_ordinal, offset);
12832 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12833 if max_ordinal == 0 {
12835 return Ok(());
12836 }
12837 depth.increment()?;
12838 let envelope_size = 8;
12839 let bytes_len = max_ordinal as usize * envelope_size;
12840 #[allow(unused_variables)]
12841 let offset = encoder.out_of_line_offset(bytes_len);
12842 let mut _prev_end_offset: usize = 0;
12843 if 1 > max_ordinal {
12844 return Ok(());
12845 }
12846
12847 let cur_offset: usize = (1 - 1) * envelope_size;
12850
12851 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12853
12854 fidl::encoding::encode_in_envelope_optional::<u64, D>(
12859 self.packet_address.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
12860 encoder,
12861 offset + cur_offset,
12862 depth,
12863 )?;
12864
12865 _prev_end_offset = cur_offset + envelope_size;
12866 if 2 > max_ordinal {
12867 return Ok(());
12868 }
12869
12870 let cur_offset: usize = (2 - 1) * envelope_size;
12873
12874 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12876
12877 fidl::encoding::encode_in_envelope_optional::<u64, D>(
12882 self.packet_size.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
12883 encoder,
12884 offset + cur_offset,
12885 depth,
12886 )?;
12887
12888 _prev_end_offset = cur_offset + envelope_size;
12889 if 3 > max_ordinal {
12890 return Ok(());
12891 }
12892
12893 let cur_offset: usize = (3 - 1) * envelope_size;
12896
12897 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12899
12900 fidl::encoding::encode_in_envelope_optional::<u64, D>(
12905 self.async_id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
12906 encoder,
12907 offset + cur_offset,
12908 depth,
12909 )?;
12910
12911 _prev_end_offset = cur_offset + envelope_size;
12912 if 4 > max_ordinal {
12913 return Ok(());
12914 }
12915
12916 let cur_offset: usize = (4 - 1) * envelope_size;
12919
12920 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12922
12923 fidl::encoding::encode_in_envelope_optional::<u64, D>(
12928 self.borrowed_operation
12929 .as_ref()
12930 .map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
12931 encoder,
12932 offset + cur_offset,
12933 depth,
12934 )?;
12935
12936 _prev_end_offset = cur_offset + envelope_size;
12937 if 5 > max_ordinal {
12938 return Ok(());
12939 }
12940
12941 let cur_offset: usize = (5 - 1) * envelope_size;
12944
12945 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12947
12948 fidl::encoding::encode_in_envelope_optional::<u64, D>(
12953 self.complete_borrowed_operation
12954 .as_ref()
12955 .map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
12956 encoder,
12957 offset + cur_offset,
12958 depth,
12959 )?;
12960
12961 _prev_end_offset = cur_offset + envelope_size;
12962
12963 Ok(())
12964 }
12965 }
12966
12967 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12968 for EthernetTxTransferRequest
12969 {
12970 #[inline(always)]
12971 fn new_empty() -> Self {
12972 Self::default()
12973 }
12974
12975 unsafe fn decode(
12976 &mut self,
12977 decoder: &mut fidl::encoding::Decoder<'_, D>,
12978 offset: usize,
12979 mut depth: fidl::encoding::Depth,
12980 ) -> fidl::Result<()> {
12981 decoder.debug_check_bounds::<Self>(offset);
12982 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12983 None => return Err(fidl::Error::NotNullable),
12984 Some(len) => len,
12985 };
12986 if len == 0 {
12988 return Ok(());
12989 };
12990 depth.increment()?;
12991 let envelope_size = 8;
12992 let bytes_len = len * envelope_size;
12993 let offset = decoder.out_of_line_offset(bytes_len)?;
12994 let mut _next_ordinal_to_read = 0;
12996 let mut next_offset = offset;
12997 let end_offset = offset + bytes_len;
12998 _next_ordinal_to_read += 1;
12999 if next_offset >= end_offset {
13000 return Ok(());
13001 }
13002
13003 while _next_ordinal_to_read < 1 {
13005 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13006 _next_ordinal_to_read += 1;
13007 next_offset += envelope_size;
13008 }
13009
13010 let next_out_of_line = decoder.next_out_of_line();
13011 let handles_before = decoder.remaining_handles();
13012 if let Some((inlined, num_bytes, num_handles)) =
13013 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13014 {
13015 let member_inline_size =
13016 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13017 if inlined != (member_inline_size <= 4) {
13018 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13019 }
13020 let inner_offset;
13021 let mut inner_depth = depth.clone();
13022 if inlined {
13023 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13024 inner_offset = next_offset;
13025 } else {
13026 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13027 inner_depth.increment()?;
13028 }
13029 let val_ref = self.packet_address.get_or_insert_with(|| fidl::new_empty!(u64, D));
13030 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
13031 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13032 {
13033 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13034 }
13035 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13036 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13037 }
13038 }
13039
13040 next_offset += envelope_size;
13041 _next_ordinal_to_read += 1;
13042 if next_offset >= end_offset {
13043 return Ok(());
13044 }
13045
13046 while _next_ordinal_to_read < 2 {
13048 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13049 _next_ordinal_to_read += 1;
13050 next_offset += envelope_size;
13051 }
13052
13053 let next_out_of_line = decoder.next_out_of_line();
13054 let handles_before = decoder.remaining_handles();
13055 if let Some((inlined, num_bytes, num_handles)) =
13056 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13057 {
13058 let member_inline_size =
13059 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13060 if inlined != (member_inline_size <= 4) {
13061 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13062 }
13063 let inner_offset;
13064 let mut inner_depth = depth.clone();
13065 if inlined {
13066 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13067 inner_offset = next_offset;
13068 } else {
13069 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13070 inner_depth.increment()?;
13071 }
13072 let val_ref = self.packet_size.get_or_insert_with(|| fidl::new_empty!(u64, D));
13073 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
13074 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13075 {
13076 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13077 }
13078 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13079 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13080 }
13081 }
13082
13083 next_offset += envelope_size;
13084 _next_ordinal_to_read += 1;
13085 if next_offset >= end_offset {
13086 return Ok(());
13087 }
13088
13089 while _next_ordinal_to_read < 3 {
13091 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13092 _next_ordinal_to_read += 1;
13093 next_offset += envelope_size;
13094 }
13095
13096 let next_out_of_line = decoder.next_out_of_line();
13097 let handles_before = decoder.remaining_handles();
13098 if let Some((inlined, num_bytes, num_handles)) =
13099 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13100 {
13101 let member_inline_size =
13102 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13103 if inlined != (member_inline_size <= 4) {
13104 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13105 }
13106 let inner_offset;
13107 let mut inner_depth = depth.clone();
13108 if inlined {
13109 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13110 inner_offset = next_offset;
13111 } else {
13112 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13113 inner_depth.increment()?;
13114 }
13115 let val_ref = self.async_id.get_or_insert_with(|| fidl::new_empty!(u64, D));
13116 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
13117 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13118 {
13119 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13120 }
13121 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13122 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13123 }
13124 }
13125
13126 next_offset += envelope_size;
13127 _next_ordinal_to_read += 1;
13128 if next_offset >= end_offset {
13129 return Ok(());
13130 }
13131
13132 while _next_ordinal_to_read < 4 {
13134 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13135 _next_ordinal_to_read += 1;
13136 next_offset += envelope_size;
13137 }
13138
13139 let next_out_of_line = decoder.next_out_of_line();
13140 let handles_before = decoder.remaining_handles();
13141 if let Some((inlined, num_bytes, num_handles)) =
13142 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13143 {
13144 let member_inline_size =
13145 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13146 if inlined != (member_inline_size <= 4) {
13147 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13148 }
13149 let inner_offset;
13150 let mut inner_depth = depth.clone();
13151 if inlined {
13152 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13153 inner_offset = next_offset;
13154 } else {
13155 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13156 inner_depth.increment()?;
13157 }
13158 let val_ref =
13159 self.borrowed_operation.get_or_insert_with(|| fidl::new_empty!(u64, D));
13160 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
13161 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13162 {
13163 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13164 }
13165 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13166 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13167 }
13168 }
13169
13170 next_offset += envelope_size;
13171 _next_ordinal_to_read += 1;
13172 if next_offset >= end_offset {
13173 return Ok(());
13174 }
13175
13176 while _next_ordinal_to_read < 5 {
13178 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13179 _next_ordinal_to_read += 1;
13180 next_offset += envelope_size;
13181 }
13182
13183 let next_out_of_line = decoder.next_out_of_line();
13184 let handles_before = decoder.remaining_handles();
13185 if let Some((inlined, num_bytes, num_handles)) =
13186 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13187 {
13188 let member_inline_size =
13189 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13190 if inlined != (member_inline_size <= 4) {
13191 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13192 }
13193 let inner_offset;
13194 let mut inner_depth = depth.clone();
13195 if inlined {
13196 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13197 inner_offset = next_offset;
13198 } else {
13199 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13200 inner_depth.increment()?;
13201 }
13202 let val_ref = self
13203 .complete_borrowed_operation
13204 .get_or_insert_with(|| fidl::new_empty!(u64, D));
13205 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
13206 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13207 {
13208 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13209 }
13210 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13211 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13212 }
13213 }
13214
13215 next_offset += envelope_size;
13216
13217 while next_offset < end_offset {
13219 _next_ordinal_to_read += 1;
13220 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13221 next_offset += envelope_size;
13222 }
13223
13224 Ok(())
13225 }
13226 }
13227
13228 impl WlanAssociationConfig {
13229 #[inline(always)]
13230 fn max_ordinal_present(&self) -> u64 {
13231 if let Some(_) = self.vht_op {
13232 return 12;
13233 }
13234 if let Some(_) = self.vht_cap {
13235 return 11;
13236 }
13237 if let Some(_) = self.ht_op {
13238 return 10;
13239 }
13240 if let Some(_) = self.ht_cap {
13241 return 9;
13242 }
13243 if let Some(_) = self.capability_info {
13244 return 8;
13245 }
13246 if let Some(_) = self.rates {
13247 return 7;
13248 }
13249 if let Some(_) = self.wmm_params {
13250 return 6;
13251 }
13252 if let Some(_) = self.qos {
13253 return 5;
13254 }
13255 if let Some(_) = self.channel {
13256 return 4;
13257 }
13258 if let Some(_) = self.listen_interval {
13259 return 3;
13260 }
13261 if let Some(_) = self.aid {
13262 return 2;
13263 }
13264 if let Some(_) = self.bssid {
13265 return 1;
13266 }
13267 0
13268 }
13269 }
13270
13271 impl fidl::encoding::ValueTypeMarker for WlanAssociationConfig {
13272 type Borrowed<'a> = &'a Self;
13273 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13274 value
13275 }
13276 }
13277
13278 unsafe impl fidl::encoding::TypeMarker for WlanAssociationConfig {
13279 type Owned = Self;
13280
13281 #[inline(always)]
13282 fn inline_align(_context: fidl::encoding::Context) -> usize {
13283 8
13284 }
13285
13286 #[inline(always)]
13287 fn inline_size(_context: fidl::encoding::Context) -> usize {
13288 16
13289 }
13290 }
13291
13292 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<WlanAssociationConfig, D>
13293 for &WlanAssociationConfig
13294 {
13295 unsafe fn encode(
13296 self,
13297 encoder: &mut fidl::encoding::Encoder<'_, D>,
13298 offset: usize,
13299 mut depth: fidl::encoding::Depth,
13300 ) -> fidl::Result<()> {
13301 encoder.debug_check_bounds::<WlanAssociationConfig>(offset);
13302 let max_ordinal: u64 = self.max_ordinal_present();
13304 encoder.write_num(max_ordinal, offset);
13305 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
13306 if max_ordinal == 0 {
13308 return Ok(());
13309 }
13310 depth.increment()?;
13311 let envelope_size = 8;
13312 let bytes_len = max_ordinal as usize * envelope_size;
13313 #[allow(unused_variables)]
13314 let offset = encoder.out_of_line_offset(bytes_len);
13315 let mut _prev_end_offset: usize = 0;
13316 if 1 > max_ordinal {
13317 return Ok(());
13318 }
13319
13320 let cur_offset: usize = (1 - 1) * envelope_size;
13323
13324 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13326
13327 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
13332 self.bssid
13333 .as_ref()
13334 .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
13335 encoder,
13336 offset + cur_offset,
13337 depth,
13338 )?;
13339
13340 _prev_end_offset = cur_offset + envelope_size;
13341 if 2 > max_ordinal {
13342 return Ok(());
13343 }
13344
13345 let cur_offset: usize = (2 - 1) * envelope_size;
13348
13349 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13351
13352 fidl::encoding::encode_in_envelope_optional::<u16, D>(
13357 self.aid.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
13358 encoder,
13359 offset + cur_offset,
13360 depth,
13361 )?;
13362
13363 _prev_end_offset = cur_offset + envelope_size;
13364 if 3 > max_ordinal {
13365 return Ok(());
13366 }
13367
13368 let cur_offset: usize = (3 - 1) * envelope_size;
13371
13372 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13374
13375 fidl::encoding::encode_in_envelope_optional::<u16, D>(
13380 self.listen_interval.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
13381 encoder,
13382 offset + cur_offset,
13383 depth,
13384 )?;
13385
13386 _prev_end_offset = cur_offset + envelope_size;
13387 if 4 > max_ordinal {
13388 return Ok(());
13389 }
13390
13391 let cur_offset: usize = (4 - 1) * envelope_size;
13394
13395 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13397
13398 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_common::WlanChannel, D>(
13403 self.channel.as_ref().map(<fidl_fuchsia_wlan_common::WlanChannel as fidl::encoding::ValueTypeMarker>::borrow),
13404 encoder, offset + cur_offset, depth
13405 )?;
13406
13407 _prev_end_offset = cur_offset + envelope_size;
13408 if 5 > max_ordinal {
13409 return Ok(());
13410 }
13411
13412 let cur_offset: usize = (5 - 1) * envelope_size;
13415
13416 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13418
13419 fidl::encoding::encode_in_envelope_optional::<bool, D>(
13424 self.qos.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
13425 encoder,
13426 offset + cur_offset,
13427 depth,
13428 )?;
13429
13430 _prev_end_offset = cur_offset + envelope_size;
13431 if 6 > max_ordinal {
13432 return Ok(());
13433 }
13434
13435 let cur_offset: usize = (6 - 1) * envelope_size;
13438
13439 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13441
13442 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_common::WlanWmmParameters, D>(
13447 self.wmm_params.as_ref().map(<fidl_fuchsia_wlan_common::WlanWmmParameters as fidl::encoding::ValueTypeMarker>::borrow),
13448 encoder, offset + cur_offset, depth
13449 )?;
13450
13451 _prev_end_offset = cur_offset + envelope_size;
13452 if 7 > max_ordinal {
13453 return Ok(());
13454 }
13455
13456 let cur_offset: usize = (7 - 1) * envelope_size;
13459
13460 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13462
13463 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 263>, D>(
13468 self.rates.as_ref().map(
13469 <fidl::encoding::Vector<u8, 263> as fidl::encoding::ValueTypeMarker>::borrow,
13470 ),
13471 encoder,
13472 offset + cur_offset,
13473 depth,
13474 )?;
13475
13476 _prev_end_offset = cur_offset + envelope_size;
13477 if 8 > max_ordinal {
13478 return Ok(());
13479 }
13480
13481 let cur_offset: usize = (8 - 1) * envelope_size;
13484
13485 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13487
13488 fidl::encoding::encode_in_envelope_optional::<u16, D>(
13493 self.capability_info.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
13494 encoder,
13495 offset + cur_offset,
13496 depth,
13497 )?;
13498
13499 _prev_end_offset = cur_offset + envelope_size;
13500 if 9 > max_ordinal {
13501 return Ok(());
13502 }
13503
13504 let cur_offset: usize = (9 - 1) * envelope_size;
13507
13508 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13510
13511 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_ieee80211::HtCapabilities, D>(
13516 self.ht_cap.as_ref().map(<fidl_fuchsia_wlan_ieee80211::HtCapabilities as fidl::encoding::ValueTypeMarker>::borrow),
13517 encoder, offset + cur_offset, depth
13518 )?;
13519
13520 _prev_end_offset = cur_offset + envelope_size;
13521 if 10 > max_ordinal {
13522 return Ok(());
13523 }
13524
13525 let cur_offset: usize = (10 - 1) * envelope_size;
13528
13529 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13531
13532 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_ieee80211::HtOperation, D>(
13537 self.ht_op.as_ref().map(<fidl_fuchsia_wlan_ieee80211::HtOperation as fidl::encoding::ValueTypeMarker>::borrow),
13538 encoder, offset + cur_offset, depth
13539 )?;
13540
13541 _prev_end_offset = cur_offset + envelope_size;
13542 if 11 > max_ordinal {
13543 return Ok(());
13544 }
13545
13546 let cur_offset: usize = (11 - 1) * envelope_size;
13549
13550 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13552
13553 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_ieee80211::VhtCapabilities, D>(
13558 self.vht_cap.as_ref().map(<fidl_fuchsia_wlan_ieee80211::VhtCapabilities as fidl::encoding::ValueTypeMarker>::borrow),
13559 encoder, offset + cur_offset, depth
13560 )?;
13561
13562 _prev_end_offset = cur_offset + envelope_size;
13563 if 12 > max_ordinal {
13564 return Ok(());
13565 }
13566
13567 let cur_offset: usize = (12 - 1) * envelope_size;
13570
13571 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13573
13574 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_ieee80211::VhtOperation, D>(
13579 self.vht_op.as_ref().map(<fidl_fuchsia_wlan_ieee80211::VhtOperation as fidl::encoding::ValueTypeMarker>::borrow),
13580 encoder, offset + cur_offset, depth
13581 )?;
13582
13583 _prev_end_offset = cur_offset + envelope_size;
13584
13585 Ok(())
13586 }
13587 }
13588
13589 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WlanAssociationConfig {
13590 #[inline(always)]
13591 fn new_empty() -> Self {
13592 Self::default()
13593 }
13594
13595 unsafe fn decode(
13596 &mut self,
13597 decoder: &mut fidl::encoding::Decoder<'_, D>,
13598 offset: usize,
13599 mut depth: fidl::encoding::Depth,
13600 ) -> fidl::Result<()> {
13601 decoder.debug_check_bounds::<Self>(offset);
13602 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
13603 None => return Err(fidl::Error::NotNullable),
13604 Some(len) => len,
13605 };
13606 if len == 0 {
13608 return Ok(());
13609 };
13610 depth.increment()?;
13611 let envelope_size = 8;
13612 let bytes_len = len * envelope_size;
13613 let offset = decoder.out_of_line_offset(bytes_len)?;
13614 let mut _next_ordinal_to_read = 0;
13616 let mut next_offset = offset;
13617 let end_offset = offset + bytes_len;
13618 _next_ordinal_to_read += 1;
13619 if next_offset >= end_offset {
13620 return Ok(());
13621 }
13622
13623 while _next_ordinal_to_read < 1 {
13625 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13626 _next_ordinal_to_read += 1;
13627 next_offset += envelope_size;
13628 }
13629
13630 let next_out_of_line = decoder.next_out_of_line();
13631 let handles_before = decoder.remaining_handles();
13632 if let Some((inlined, num_bytes, num_handles)) =
13633 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13634 {
13635 let member_inline_size =
13636 <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
13637 decoder.context,
13638 );
13639 if inlined != (member_inline_size <= 4) {
13640 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13641 }
13642 let inner_offset;
13643 let mut inner_depth = depth.clone();
13644 if inlined {
13645 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13646 inner_offset = next_offset;
13647 } else {
13648 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13649 inner_depth.increment()?;
13650 }
13651 let val_ref = self
13652 .bssid
13653 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
13654 fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
13655 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13656 {
13657 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13658 }
13659 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13660 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13661 }
13662 }
13663
13664 next_offset += envelope_size;
13665 _next_ordinal_to_read += 1;
13666 if next_offset >= end_offset {
13667 return Ok(());
13668 }
13669
13670 while _next_ordinal_to_read < 2 {
13672 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13673 _next_ordinal_to_read += 1;
13674 next_offset += envelope_size;
13675 }
13676
13677 let next_out_of_line = decoder.next_out_of_line();
13678 let handles_before = decoder.remaining_handles();
13679 if let Some((inlined, num_bytes, num_handles)) =
13680 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13681 {
13682 let member_inline_size =
13683 <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13684 if inlined != (member_inline_size <= 4) {
13685 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13686 }
13687 let inner_offset;
13688 let mut inner_depth = depth.clone();
13689 if inlined {
13690 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13691 inner_offset = next_offset;
13692 } else {
13693 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13694 inner_depth.increment()?;
13695 }
13696 let val_ref = self.aid.get_or_insert_with(|| fidl::new_empty!(u16, D));
13697 fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
13698 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13699 {
13700 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13701 }
13702 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13703 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13704 }
13705 }
13706
13707 next_offset += envelope_size;
13708 _next_ordinal_to_read += 1;
13709 if next_offset >= end_offset {
13710 return Ok(());
13711 }
13712
13713 while _next_ordinal_to_read < 3 {
13715 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13716 _next_ordinal_to_read += 1;
13717 next_offset += envelope_size;
13718 }
13719
13720 let next_out_of_line = decoder.next_out_of_line();
13721 let handles_before = decoder.remaining_handles();
13722 if let Some((inlined, num_bytes, num_handles)) =
13723 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13724 {
13725 let member_inline_size =
13726 <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13727 if inlined != (member_inline_size <= 4) {
13728 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13729 }
13730 let inner_offset;
13731 let mut inner_depth = depth.clone();
13732 if inlined {
13733 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13734 inner_offset = next_offset;
13735 } else {
13736 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13737 inner_depth.increment()?;
13738 }
13739 let val_ref = self.listen_interval.get_or_insert_with(|| fidl::new_empty!(u16, D));
13740 fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
13741 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13742 {
13743 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13744 }
13745 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13746 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13747 }
13748 }
13749
13750 next_offset += envelope_size;
13751 _next_ordinal_to_read += 1;
13752 if next_offset >= end_offset {
13753 return Ok(());
13754 }
13755
13756 while _next_ordinal_to_read < 4 {
13758 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13759 _next_ordinal_to_read += 1;
13760 next_offset += envelope_size;
13761 }
13762
13763 let next_out_of_line = decoder.next_out_of_line();
13764 let handles_before = decoder.remaining_handles();
13765 if let Some((inlined, num_bytes, num_handles)) =
13766 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13767 {
13768 let member_inline_size = <fidl_fuchsia_wlan_common::WlanChannel as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13769 if inlined != (member_inline_size <= 4) {
13770 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13771 }
13772 let inner_offset;
13773 let mut inner_depth = depth.clone();
13774 if inlined {
13775 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13776 inner_offset = next_offset;
13777 } else {
13778 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13779 inner_depth.increment()?;
13780 }
13781 let val_ref = self.channel.get_or_insert_with(|| {
13782 fidl::new_empty!(fidl_fuchsia_wlan_common::WlanChannel, D)
13783 });
13784 fidl::decode!(
13785 fidl_fuchsia_wlan_common::WlanChannel,
13786 D,
13787 val_ref,
13788 decoder,
13789 inner_offset,
13790 inner_depth
13791 )?;
13792 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13793 {
13794 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13795 }
13796 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13797 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13798 }
13799 }
13800
13801 next_offset += envelope_size;
13802 _next_ordinal_to_read += 1;
13803 if next_offset >= end_offset {
13804 return Ok(());
13805 }
13806
13807 while _next_ordinal_to_read < 5 {
13809 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13810 _next_ordinal_to_read += 1;
13811 next_offset += envelope_size;
13812 }
13813
13814 let next_out_of_line = decoder.next_out_of_line();
13815 let handles_before = decoder.remaining_handles();
13816 if let Some((inlined, num_bytes, num_handles)) =
13817 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13818 {
13819 let member_inline_size =
13820 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13821 if inlined != (member_inline_size <= 4) {
13822 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13823 }
13824 let inner_offset;
13825 let mut inner_depth = depth.clone();
13826 if inlined {
13827 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13828 inner_offset = next_offset;
13829 } else {
13830 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13831 inner_depth.increment()?;
13832 }
13833 let val_ref = self.qos.get_or_insert_with(|| fidl::new_empty!(bool, D));
13834 fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
13835 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13836 {
13837 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13838 }
13839 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13840 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13841 }
13842 }
13843
13844 next_offset += envelope_size;
13845 _next_ordinal_to_read += 1;
13846 if next_offset >= end_offset {
13847 return Ok(());
13848 }
13849
13850 while _next_ordinal_to_read < 6 {
13852 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13853 _next_ordinal_to_read += 1;
13854 next_offset += envelope_size;
13855 }
13856
13857 let next_out_of_line = decoder.next_out_of_line();
13858 let handles_before = decoder.remaining_handles();
13859 if let Some((inlined, num_bytes, num_handles)) =
13860 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13861 {
13862 let member_inline_size = <fidl_fuchsia_wlan_common::WlanWmmParameters as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13863 if inlined != (member_inline_size <= 4) {
13864 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13865 }
13866 let inner_offset;
13867 let mut inner_depth = depth.clone();
13868 if inlined {
13869 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13870 inner_offset = next_offset;
13871 } else {
13872 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13873 inner_depth.increment()?;
13874 }
13875 let val_ref = self.wmm_params.get_or_insert_with(|| {
13876 fidl::new_empty!(fidl_fuchsia_wlan_common::WlanWmmParameters, D)
13877 });
13878 fidl::decode!(
13879 fidl_fuchsia_wlan_common::WlanWmmParameters,
13880 D,
13881 val_ref,
13882 decoder,
13883 inner_offset,
13884 inner_depth
13885 )?;
13886 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13887 {
13888 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13889 }
13890 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13891 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13892 }
13893 }
13894
13895 next_offset += envelope_size;
13896 _next_ordinal_to_read += 1;
13897 if next_offset >= end_offset {
13898 return Ok(());
13899 }
13900
13901 while _next_ordinal_to_read < 7 {
13903 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13904 _next_ordinal_to_read += 1;
13905 next_offset += envelope_size;
13906 }
13907
13908 let next_out_of_line = decoder.next_out_of_line();
13909 let handles_before = decoder.remaining_handles();
13910 if let Some((inlined, num_bytes, num_handles)) =
13911 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13912 {
13913 let member_inline_size =
13914 <fidl::encoding::Vector<u8, 263> as fidl::encoding::TypeMarker>::inline_size(
13915 decoder.context,
13916 );
13917 if inlined != (member_inline_size <= 4) {
13918 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13919 }
13920 let inner_offset;
13921 let mut inner_depth = depth.clone();
13922 if inlined {
13923 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13924 inner_offset = next_offset;
13925 } else {
13926 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13927 inner_depth.increment()?;
13928 }
13929 let val_ref = self
13930 .rates
13931 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 263>, D));
13932 fidl::decode!(fidl::encoding::Vector<u8, 263>, D, val_ref, decoder, inner_offset, inner_depth)?;
13933 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13934 {
13935 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13936 }
13937 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13938 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13939 }
13940 }
13941
13942 next_offset += envelope_size;
13943 _next_ordinal_to_read += 1;
13944 if next_offset >= end_offset {
13945 return Ok(());
13946 }
13947
13948 while _next_ordinal_to_read < 8 {
13950 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13951 _next_ordinal_to_read += 1;
13952 next_offset += envelope_size;
13953 }
13954
13955 let next_out_of_line = decoder.next_out_of_line();
13956 let handles_before = decoder.remaining_handles();
13957 if let Some((inlined, num_bytes, num_handles)) =
13958 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13959 {
13960 let member_inline_size =
13961 <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13962 if inlined != (member_inline_size <= 4) {
13963 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13964 }
13965 let inner_offset;
13966 let mut inner_depth = depth.clone();
13967 if inlined {
13968 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13969 inner_offset = next_offset;
13970 } else {
13971 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13972 inner_depth.increment()?;
13973 }
13974 let val_ref = self.capability_info.get_or_insert_with(|| fidl::new_empty!(u16, D));
13975 fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
13976 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13977 {
13978 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13979 }
13980 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13981 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13982 }
13983 }
13984
13985 next_offset += envelope_size;
13986 _next_ordinal_to_read += 1;
13987 if next_offset >= end_offset {
13988 return Ok(());
13989 }
13990
13991 while _next_ordinal_to_read < 9 {
13993 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13994 _next_ordinal_to_read += 1;
13995 next_offset += envelope_size;
13996 }
13997
13998 let next_out_of_line = decoder.next_out_of_line();
13999 let handles_before = decoder.remaining_handles();
14000 if let Some((inlined, num_bytes, num_handles)) =
14001 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14002 {
14003 let member_inline_size = <fidl_fuchsia_wlan_ieee80211::HtCapabilities as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14004 if inlined != (member_inline_size <= 4) {
14005 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14006 }
14007 let inner_offset;
14008 let mut inner_depth = depth.clone();
14009 if inlined {
14010 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14011 inner_offset = next_offset;
14012 } else {
14013 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14014 inner_depth.increment()?;
14015 }
14016 let val_ref = self.ht_cap.get_or_insert_with(|| {
14017 fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::HtCapabilities, D)
14018 });
14019 fidl::decode!(
14020 fidl_fuchsia_wlan_ieee80211::HtCapabilities,
14021 D,
14022 val_ref,
14023 decoder,
14024 inner_offset,
14025 inner_depth
14026 )?;
14027 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14028 {
14029 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14030 }
14031 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14032 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14033 }
14034 }
14035
14036 next_offset += envelope_size;
14037 _next_ordinal_to_read += 1;
14038 if next_offset >= end_offset {
14039 return Ok(());
14040 }
14041
14042 while _next_ordinal_to_read < 10 {
14044 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14045 _next_ordinal_to_read += 1;
14046 next_offset += envelope_size;
14047 }
14048
14049 let next_out_of_line = decoder.next_out_of_line();
14050 let handles_before = decoder.remaining_handles();
14051 if let Some((inlined, num_bytes, num_handles)) =
14052 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14053 {
14054 let member_inline_size = <fidl_fuchsia_wlan_ieee80211::HtOperation as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14055 if inlined != (member_inline_size <= 4) {
14056 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14057 }
14058 let inner_offset;
14059 let mut inner_depth = depth.clone();
14060 if inlined {
14061 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14062 inner_offset = next_offset;
14063 } else {
14064 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14065 inner_depth.increment()?;
14066 }
14067 let val_ref = self.ht_op.get_or_insert_with(|| {
14068 fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::HtOperation, D)
14069 });
14070 fidl::decode!(
14071 fidl_fuchsia_wlan_ieee80211::HtOperation,
14072 D,
14073 val_ref,
14074 decoder,
14075 inner_offset,
14076 inner_depth
14077 )?;
14078 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14079 {
14080 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14081 }
14082 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14083 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14084 }
14085 }
14086
14087 next_offset += envelope_size;
14088 _next_ordinal_to_read += 1;
14089 if next_offset >= end_offset {
14090 return Ok(());
14091 }
14092
14093 while _next_ordinal_to_read < 11 {
14095 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14096 _next_ordinal_to_read += 1;
14097 next_offset += envelope_size;
14098 }
14099
14100 let next_out_of_line = decoder.next_out_of_line();
14101 let handles_before = decoder.remaining_handles();
14102 if let Some((inlined, num_bytes, num_handles)) =
14103 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14104 {
14105 let member_inline_size = <fidl_fuchsia_wlan_ieee80211::VhtCapabilities as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14106 if inlined != (member_inline_size <= 4) {
14107 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14108 }
14109 let inner_offset;
14110 let mut inner_depth = depth.clone();
14111 if inlined {
14112 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14113 inner_offset = next_offset;
14114 } else {
14115 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14116 inner_depth.increment()?;
14117 }
14118 let val_ref = self.vht_cap.get_or_insert_with(|| {
14119 fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::VhtCapabilities, D)
14120 });
14121 fidl::decode!(
14122 fidl_fuchsia_wlan_ieee80211::VhtCapabilities,
14123 D,
14124 val_ref,
14125 decoder,
14126 inner_offset,
14127 inner_depth
14128 )?;
14129 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14130 {
14131 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14132 }
14133 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14134 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14135 }
14136 }
14137
14138 next_offset += envelope_size;
14139 _next_ordinal_to_read += 1;
14140 if next_offset >= end_offset {
14141 return Ok(());
14142 }
14143
14144 while _next_ordinal_to_read < 12 {
14146 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14147 _next_ordinal_to_read += 1;
14148 next_offset += envelope_size;
14149 }
14150
14151 let next_out_of_line = decoder.next_out_of_line();
14152 let handles_before = decoder.remaining_handles();
14153 if let Some((inlined, num_bytes, num_handles)) =
14154 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14155 {
14156 let member_inline_size = <fidl_fuchsia_wlan_ieee80211::VhtOperation as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14157 if inlined != (member_inline_size <= 4) {
14158 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14159 }
14160 let inner_offset;
14161 let mut inner_depth = depth.clone();
14162 if inlined {
14163 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14164 inner_offset = next_offset;
14165 } else {
14166 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14167 inner_depth.increment()?;
14168 }
14169 let val_ref = self.vht_op.get_or_insert_with(|| {
14170 fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::VhtOperation, D)
14171 });
14172 fidl::decode!(
14173 fidl_fuchsia_wlan_ieee80211::VhtOperation,
14174 D,
14175 val_ref,
14176 decoder,
14177 inner_offset,
14178 inner_depth
14179 )?;
14180 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14181 {
14182 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14183 }
14184 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14185 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14186 }
14187 }
14188
14189 next_offset += envelope_size;
14190
14191 while next_offset < end_offset {
14193 _next_ordinal_to_read += 1;
14194 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14195 next_offset += envelope_size;
14196 }
14197
14198 Ok(())
14199 }
14200 }
14201
14202 impl WlanKeyConfiguration {
14203 #[inline(always)]
14204 fn max_ordinal_present(&self) -> u64 {
14205 if let Some(_) = self.rsc {
14206 return 8;
14207 }
14208 if let Some(_) = self.key {
14209 return 7;
14210 }
14211 if let Some(_) = self.key_idx {
14212 return 6;
14213 }
14214 if let Some(_) = self.peer_addr {
14215 return 5;
14216 }
14217 if let Some(_) = self.key_type {
14218 return 4;
14219 }
14220 if let Some(_) = self.cipher_type {
14221 return 3;
14222 }
14223 if let Some(_) = self.cipher_oui {
14224 return 2;
14225 }
14226 if let Some(_) = self.protection {
14227 return 1;
14228 }
14229 0
14230 }
14231 }
14232
14233 impl fidl::encoding::ValueTypeMarker for WlanKeyConfiguration {
14234 type Borrowed<'a> = &'a Self;
14235 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14236 value
14237 }
14238 }
14239
14240 unsafe impl fidl::encoding::TypeMarker for WlanKeyConfiguration {
14241 type Owned = Self;
14242
14243 #[inline(always)]
14244 fn inline_align(_context: fidl::encoding::Context) -> usize {
14245 8
14246 }
14247
14248 #[inline(always)]
14249 fn inline_size(_context: fidl::encoding::Context) -> usize {
14250 16
14251 }
14252 }
14253
14254 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<WlanKeyConfiguration, D>
14255 for &WlanKeyConfiguration
14256 {
14257 unsafe fn encode(
14258 self,
14259 encoder: &mut fidl::encoding::Encoder<'_, D>,
14260 offset: usize,
14261 mut depth: fidl::encoding::Depth,
14262 ) -> fidl::Result<()> {
14263 encoder.debug_check_bounds::<WlanKeyConfiguration>(offset);
14264 let max_ordinal: u64 = self.max_ordinal_present();
14266 encoder.write_num(max_ordinal, offset);
14267 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
14268 if max_ordinal == 0 {
14270 return Ok(());
14271 }
14272 depth.increment()?;
14273 let envelope_size = 8;
14274 let bytes_len = max_ordinal as usize * envelope_size;
14275 #[allow(unused_variables)]
14276 let offset = encoder.out_of_line_offset(bytes_len);
14277 let mut _prev_end_offset: usize = 0;
14278 if 1 > max_ordinal {
14279 return Ok(());
14280 }
14281
14282 let cur_offset: usize = (1 - 1) * envelope_size;
14285
14286 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14288
14289 fidl::encoding::encode_in_envelope_optional::<WlanProtection, D>(
14294 self.protection
14295 .as_ref()
14296 .map(<WlanProtection as fidl::encoding::ValueTypeMarker>::borrow),
14297 encoder,
14298 offset + cur_offset,
14299 depth,
14300 )?;
14301
14302 _prev_end_offset = cur_offset + envelope_size;
14303 if 2 > max_ordinal {
14304 return Ok(());
14305 }
14306
14307 let cur_offset: usize = (2 - 1) * envelope_size;
14310
14311 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14313
14314 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 3>, D>(
14319 self.cipher_oui
14320 .as_ref()
14321 .map(<fidl::encoding::Array<u8, 3> as fidl::encoding::ValueTypeMarker>::borrow),
14322 encoder,
14323 offset + cur_offset,
14324 depth,
14325 )?;
14326
14327 _prev_end_offset = cur_offset + envelope_size;
14328 if 3 > max_ordinal {
14329 return Ok(());
14330 }
14331
14332 let cur_offset: usize = (3 - 1) * envelope_size;
14335
14336 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14338
14339 fidl::encoding::encode_in_envelope_optional::<u8, D>(
14344 self.cipher_type.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
14345 encoder,
14346 offset + cur_offset,
14347 depth,
14348 )?;
14349
14350 _prev_end_offset = cur_offset + envelope_size;
14351 if 4 > max_ordinal {
14352 return Ok(());
14353 }
14354
14355 let cur_offset: usize = (4 - 1) * envelope_size;
14358
14359 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14361
14362 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_common::WlanKeyType, D>(
14367 self.key_type.as_ref().map(<fidl_fuchsia_wlan_common::WlanKeyType as fidl::encoding::ValueTypeMarker>::borrow),
14368 encoder, offset + cur_offset, depth
14369 )?;
14370
14371 _prev_end_offset = cur_offset + envelope_size;
14372 if 5 > max_ordinal {
14373 return Ok(());
14374 }
14375
14376 let cur_offset: usize = (5 - 1) * envelope_size;
14379
14380 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14382
14383 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
14388 self.peer_addr
14389 .as_ref()
14390 .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
14391 encoder,
14392 offset + cur_offset,
14393 depth,
14394 )?;
14395
14396 _prev_end_offset = cur_offset + envelope_size;
14397 if 6 > max_ordinal {
14398 return Ok(());
14399 }
14400
14401 let cur_offset: usize = (6 - 1) * envelope_size;
14404
14405 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14407
14408 fidl::encoding::encode_in_envelope_optional::<u8, D>(
14413 self.key_idx.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
14414 encoder,
14415 offset + cur_offset,
14416 depth,
14417 )?;
14418
14419 _prev_end_offset = cur_offset + envelope_size;
14420 if 7 > max_ordinal {
14421 return Ok(());
14422 }
14423
14424 let cur_offset: usize = (7 - 1) * envelope_size;
14427
14428 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14430
14431 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 32>, D>(
14436 self.key.as_ref().map(
14437 <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow,
14438 ),
14439 encoder,
14440 offset + cur_offset,
14441 depth,
14442 )?;
14443
14444 _prev_end_offset = cur_offset + envelope_size;
14445 if 8 > max_ordinal {
14446 return Ok(());
14447 }
14448
14449 let cur_offset: usize = (8 - 1) * envelope_size;
14452
14453 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14455
14456 fidl::encoding::encode_in_envelope_optional::<u64, D>(
14461 self.rsc.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
14462 encoder,
14463 offset + cur_offset,
14464 depth,
14465 )?;
14466
14467 _prev_end_offset = cur_offset + envelope_size;
14468
14469 Ok(())
14470 }
14471 }
14472
14473 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WlanKeyConfiguration {
14474 #[inline(always)]
14475 fn new_empty() -> Self {
14476 Self::default()
14477 }
14478
14479 unsafe fn decode(
14480 &mut self,
14481 decoder: &mut fidl::encoding::Decoder<'_, D>,
14482 offset: usize,
14483 mut depth: fidl::encoding::Depth,
14484 ) -> fidl::Result<()> {
14485 decoder.debug_check_bounds::<Self>(offset);
14486 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
14487 None => return Err(fidl::Error::NotNullable),
14488 Some(len) => len,
14489 };
14490 if len == 0 {
14492 return Ok(());
14493 };
14494 depth.increment()?;
14495 let envelope_size = 8;
14496 let bytes_len = len * envelope_size;
14497 let offset = decoder.out_of_line_offset(bytes_len)?;
14498 let mut _next_ordinal_to_read = 0;
14500 let mut next_offset = offset;
14501 let end_offset = offset + bytes_len;
14502 _next_ordinal_to_read += 1;
14503 if next_offset >= end_offset {
14504 return Ok(());
14505 }
14506
14507 while _next_ordinal_to_read < 1 {
14509 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14510 _next_ordinal_to_read += 1;
14511 next_offset += envelope_size;
14512 }
14513
14514 let next_out_of_line = decoder.next_out_of_line();
14515 let handles_before = decoder.remaining_handles();
14516 if let Some((inlined, num_bytes, num_handles)) =
14517 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14518 {
14519 let member_inline_size =
14520 <WlanProtection as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14521 if inlined != (member_inline_size <= 4) {
14522 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14523 }
14524 let inner_offset;
14525 let mut inner_depth = depth.clone();
14526 if inlined {
14527 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14528 inner_offset = next_offset;
14529 } else {
14530 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14531 inner_depth.increment()?;
14532 }
14533 let val_ref =
14534 self.protection.get_or_insert_with(|| fidl::new_empty!(WlanProtection, D));
14535 fidl::decode!(WlanProtection, D, val_ref, decoder, inner_offset, inner_depth)?;
14536 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14537 {
14538 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14539 }
14540 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14541 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14542 }
14543 }
14544
14545 next_offset += envelope_size;
14546 _next_ordinal_to_read += 1;
14547 if next_offset >= end_offset {
14548 return Ok(());
14549 }
14550
14551 while _next_ordinal_to_read < 2 {
14553 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14554 _next_ordinal_to_read += 1;
14555 next_offset += envelope_size;
14556 }
14557
14558 let next_out_of_line = decoder.next_out_of_line();
14559 let handles_before = decoder.remaining_handles();
14560 if let Some((inlined, num_bytes, num_handles)) =
14561 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14562 {
14563 let member_inline_size =
14564 <fidl::encoding::Array<u8, 3> as fidl::encoding::TypeMarker>::inline_size(
14565 decoder.context,
14566 );
14567 if inlined != (member_inline_size <= 4) {
14568 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14569 }
14570 let inner_offset;
14571 let mut inner_depth = depth.clone();
14572 if inlined {
14573 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14574 inner_offset = next_offset;
14575 } else {
14576 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14577 inner_depth.increment()?;
14578 }
14579 let val_ref = self
14580 .cipher_oui
14581 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 3>, D));
14582 fidl::decode!(fidl::encoding::Array<u8, 3>, D, val_ref, decoder, inner_offset, inner_depth)?;
14583 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14584 {
14585 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14586 }
14587 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14588 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14589 }
14590 }
14591
14592 next_offset += envelope_size;
14593 _next_ordinal_to_read += 1;
14594 if next_offset >= end_offset {
14595 return Ok(());
14596 }
14597
14598 while _next_ordinal_to_read < 3 {
14600 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14601 _next_ordinal_to_read += 1;
14602 next_offset += envelope_size;
14603 }
14604
14605 let next_out_of_line = decoder.next_out_of_line();
14606 let handles_before = decoder.remaining_handles();
14607 if let Some((inlined, num_bytes, num_handles)) =
14608 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14609 {
14610 let member_inline_size =
14611 <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14612 if inlined != (member_inline_size <= 4) {
14613 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14614 }
14615 let inner_offset;
14616 let mut inner_depth = depth.clone();
14617 if inlined {
14618 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14619 inner_offset = next_offset;
14620 } else {
14621 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14622 inner_depth.increment()?;
14623 }
14624 let val_ref = self.cipher_type.get_or_insert_with(|| fidl::new_empty!(u8, D));
14625 fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
14626 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14627 {
14628 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14629 }
14630 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14631 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14632 }
14633 }
14634
14635 next_offset += envelope_size;
14636 _next_ordinal_to_read += 1;
14637 if next_offset >= end_offset {
14638 return Ok(());
14639 }
14640
14641 while _next_ordinal_to_read < 4 {
14643 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14644 _next_ordinal_to_read += 1;
14645 next_offset += envelope_size;
14646 }
14647
14648 let next_out_of_line = decoder.next_out_of_line();
14649 let handles_before = decoder.remaining_handles();
14650 if let Some((inlined, num_bytes, num_handles)) =
14651 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14652 {
14653 let member_inline_size = <fidl_fuchsia_wlan_common::WlanKeyType as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14654 if inlined != (member_inline_size <= 4) {
14655 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14656 }
14657 let inner_offset;
14658 let mut inner_depth = depth.clone();
14659 if inlined {
14660 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14661 inner_offset = next_offset;
14662 } else {
14663 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14664 inner_depth.increment()?;
14665 }
14666 let val_ref = self.key_type.get_or_insert_with(|| {
14667 fidl::new_empty!(fidl_fuchsia_wlan_common::WlanKeyType, D)
14668 });
14669 fidl::decode!(
14670 fidl_fuchsia_wlan_common::WlanKeyType,
14671 D,
14672 val_ref,
14673 decoder,
14674 inner_offset,
14675 inner_depth
14676 )?;
14677 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14678 {
14679 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14680 }
14681 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14682 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14683 }
14684 }
14685
14686 next_offset += envelope_size;
14687 _next_ordinal_to_read += 1;
14688 if next_offset >= end_offset {
14689 return Ok(());
14690 }
14691
14692 while _next_ordinal_to_read < 5 {
14694 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14695 _next_ordinal_to_read += 1;
14696 next_offset += envelope_size;
14697 }
14698
14699 let next_out_of_line = decoder.next_out_of_line();
14700 let handles_before = decoder.remaining_handles();
14701 if let Some((inlined, num_bytes, num_handles)) =
14702 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14703 {
14704 let member_inline_size =
14705 <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
14706 decoder.context,
14707 );
14708 if inlined != (member_inline_size <= 4) {
14709 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14710 }
14711 let inner_offset;
14712 let mut inner_depth = depth.clone();
14713 if inlined {
14714 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14715 inner_offset = next_offset;
14716 } else {
14717 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14718 inner_depth.increment()?;
14719 }
14720 let val_ref = self
14721 .peer_addr
14722 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
14723 fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
14724 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14725 {
14726 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14727 }
14728 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14729 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14730 }
14731 }
14732
14733 next_offset += envelope_size;
14734 _next_ordinal_to_read += 1;
14735 if next_offset >= end_offset {
14736 return Ok(());
14737 }
14738
14739 while _next_ordinal_to_read < 6 {
14741 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14742 _next_ordinal_to_read += 1;
14743 next_offset += envelope_size;
14744 }
14745
14746 let next_out_of_line = decoder.next_out_of_line();
14747 let handles_before = decoder.remaining_handles();
14748 if let Some((inlined, num_bytes, num_handles)) =
14749 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14750 {
14751 let member_inline_size =
14752 <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14753 if inlined != (member_inline_size <= 4) {
14754 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14755 }
14756 let inner_offset;
14757 let mut inner_depth = depth.clone();
14758 if inlined {
14759 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14760 inner_offset = next_offset;
14761 } else {
14762 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14763 inner_depth.increment()?;
14764 }
14765 let val_ref = self.key_idx.get_or_insert_with(|| fidl::new_empty!(u8, D));
14766 fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
14767 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14768 {
14769 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14770 }
14771 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14772 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14773 }
14774 }
14775
14776 next_offset += envelope_size;
14777 _next_ordinal_to_read += 1;
14778 if next_offset >= end_offset {
14779 return Ok(());
14780 }
14781
14782 while _next_ordinal_to_read < 7 {
14784 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14785 _next_ordinal_to_read += 1;
14786 next_offset += envelope_size;
14787 }
14788
14789 let next_out_of_line = decoder.next_out_of_line();
14790 let handles_before = decoder.remaining_handles();
14791 if let Some((inlined, num_bytes, num_handles)) =
14792 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14793 {
14794 let member_inline_size =
14795 <fidl::encoding::Vector<u8, 32> as fidl::encoding::TypeMarker>::inline_size(
14796 decoder.context,
14797 );
14798 if inlined != (member_inline_size <= 4) {
14799 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14800 }
14801 let inner_offset;
14802 let mut inner_depth = depth.clone();
14803 if inlined {
14804 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14805 inner_offset = next_offset;
14806 } else {
14807 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14808 inner_depth.increment()?;
14809 }
14810 let val_ref = self
14811 .key
14812 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D));
14813 fidl::decode!(fidl::encoding::Vector<u8, 32>, D, val_ref, decoder, inner_offset, inner_depth)?;
14814 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14815 {
14816 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14817 }
14818 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14819 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14820 }
14821 }
14822
14823 next_offset += envelope_size;
14824 _next_ordinal_to_read += 1;
14825 if next_offset >= end_offset {
14826 return Ok(());
14827 }
14828
14829 while _next_ordinal_to_read < 8 {
14831 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14832 _next_ordinal_to_read += 1;
14833 next_offset += envelope_size;
14834 }
14835
14836 let next_out_of_line = decoder.next_out_of_line();
14837 let handles_before = decoder.remaining_handles();
14838 if let Some((inlined, num_bytes, num_handles)) =
14839 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14840 {
14841 let member_inline_size =
14842 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14843 if inlined != (member_inline_size <= 4) {
14844 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14845 }
14846 let inner_offset;
14847 let mut inner_depth = depth.clone();
14848 if inlined {
14849 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14850 inner_offset = next_offset;
14851 } else {
14852 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14853 inner_depth.increment()?;
14854 }
14855 let val_ref = self.rsc.get_or_insert_with(|| fidl::new_empty!(u64, D));
14856 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
14857 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14858 {
14859 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14860 }
14861 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14862 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14863 }
14864 }
14865
14866 next_offset += envelope_size;
14867
14868 while next_offset < end_offset {
14870 _next_ordinal_to_read += 1;
14871 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14872 next_offset += envelope_size;
14873 }
14874
14875 Ok(())
14876 }
14877 }
14878
14879 impl WlanRxTransferRequest {
14880 #[inline(always)]
14881 fn max_ordinal_present(&self) -> u64 {
14882 if let Some(_) = self.arena {
14883 return 5;
14884 }
14885 if let Some(_) = self.async_id {
14886 return 4;
14887 }
14888 if let Some(_) = self.packet_info {
14889 return 3;
14890 }
14891 if let Some(_) = self.packet_size {
14892 return 2;
14893 }
14894 if let Some(_) = self.packet_address {
14895 return 1;
14896 }
14897 0
14898 }
14899 }
14900
14901 impl fidl::encoding::ValueTypeMarker for WlanRxTransferRequest {
14902 type Borrowed<'a> = &'a Self;
14903 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14904 value
14905 }
14906 }
14907
14908 unsafe impl fidl::encoding::TypeMarker for WlanRxTransferRequest {
14909 type Owned = Self;
14910
14911 #[inline(always)]
14912 fn inline_align(_context: fidl::encoding::Context) -> usize {
14913 8
14914 }
14915
14916 #[inline(always)]
14917 fn inline_size(_context: fidl::encoding::Context) -> usize {
14918 16
14919 }
14920 }
14921
14922 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<WlanRxTransferRequest, D>
14923 for &WlanRxTransferRequest
14924 {
14925 unsafe fn encode(
14926 self,
14927 encoder: &mut fidl::encoding::Encoder<'_, D>,
14928 offset: usize,
14929 mut depth: fidl::encoding::Depth,
14930 ) -> fidl::Result<()> {
14931 encoder.debug_check_bounds::<WlanRxTransferRequest>(offset);
14932 let max_ordinal: u64 = self.max_ordinal_present();
14934 encoder.write_num(max_ordinal, offset);
14935 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
14936 if max_ordinal == 0 {
14938 return Ok(());
14939 }
14940 depth.increment()?;
14941 let envelope_size = 8;
14942 let bytes_len = max_ordinal as usize * envelope_size;
14943 #[allow(unused_variables)]
14944 let offset = encoder.out_of_line_offset(bytes_len);
14945 let mut _prev_end_offset: usize = 0;
14946 if 1 > max_ordinal {
14947 return Ok(());
14948 }
14949
14950 let cur_offset: usize = (1 - 1) * envelope_size;
14953
14954 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14956
14957 fidl::encoding::encode_in_envelope_optional::<u64, D>(
14962 self.packet_address.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
14963 encoder,
14964 offset + cur_offset,
14965 depth,
14966 )?;
14967
14968 _prev_end_offset = cur_offset + envelope_size;
14969 if 2 > max_ordinal {
14970 return Ok(());
14971 }
14972
14973 let cur_offset: usize = (2 - 1) * envelope_size;
14976
14977 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14979
14980 fidl::encoding::encode_in_envelope_optional::<u64, D>(
14985 self.packet_size.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
14986 encoder,
14987 offset + cur_offset,
14988 depth,
14989 )?;
14990
14991 _prev_end_offset = cur_offset + envelope_size;
14992 if 3 > max_ordinal {
14993 return Ok(());
14994 }
14995
14996 let cur_offset: usize = (3 - 1) * envelope_size;
14999
15000 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15002
15003 fidl::encoding::encode_in_envelope_optional::<WlanRxInfo, D>(
15008 self.packet_info
15009 .as_ref()
15010 .map(<WlanRxInfo as fidl::encoding::ValueTypeMarker>::borrow),
15011 encoder,
15012 offset + cur_offset,
15013 depth,
15014 )?;
15015
15016 _prev_end_offset = cur_offset + envelope_size;
15017 if 4 > max_ordinal {
15018 return Ok(());
15019 }
15020
15021 let cur_offset: usize = (4 - 1) * envelope_size;
15024
15025 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15027
15028 fidl::encoding::encode_in_envelope_optional::<u64, D>(
15033 self.async_id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
15034 encoder,
15035 offset + cur_offset,
15036 depth,
15037 )?;
15038
15039 _prev_end_offset = cur_offset + envelope_size;
15040 if 5 > max_ordinal {
15041 return Ok(());
15042 }
15043
15044 let cur_offset: usize = (5 - 1) * envelope_size;
15047
15048 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15050
15051 fidl::encoding::encode_in_envelope_optional::<u64, D>(
15056 self.arena.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
15057 encoder,
15058 offset + cur_offset,
15059 depth,
15060 )?;
15061
15062 _prev_end_offset = cur_offset + envelope_size;
15063
15064 Ok(())
15065 }
15066 }
15067
15068 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WlanRxTransferRequest {
15069 #[inline(always)]
15070 fn new_empty() -> Self {
15071 Self::default()
15072 }
15073
15074 unsafe fn decode(
15075 &mut self,
15076 decoder: &mut fidl::encoding::Decoder<'_, D>,
15077 offset: usize,
15078 mut depth: fidl::encoding::Depth,
15079 ) -> fidl::Result<()> {
15080 decoder.debug_check_bounds::<Self>(offset);
15081 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15082 None => return Err(fidl::Error::NotNullable),
15083 Some(len) => len,
15084 };
15085 if len == 0 {
15087 return Ok(());
15088 };
15089 depth.increment()?;
15090 let envelope_size = 8;
15091 let bytes_len = len * envelope_size;
15092 let offset = decoder.out_of_line_offset(bytes_len)?;
15093 let mut _next_ordinal_to_read = 0;
15095 let mut next_offset = offset;
15096 let end_offset = offset + bytes_len;
15097 _next_ordinal_to_read += 1;
15098 if next_offset >= end_offset {
15099 return Ok(());
15100 }
15101
15102 while _next_ordinal_to_read < 1 {
15104 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15105 _next_ordinal_to_read += 1;
15106 next_offset += envelope_size;
15107 }
15108
15109 let next_out_of_line = decoder.next_out_of_line();
15110 let handles_before = decoder.remaining_handles();
15111 if let Some((inlined, num_bytes, num_handles)) =
15112 fidl::encoding::decode_envelope_header(decoder, next_offset)?
15113 {
15114 let member_inline_size =
15115 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15116 if inlined != (member_inline_size <= 4) {
15117 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15118 }
15119 let inner_offset;
15120 let mut inner_depth = depth.clone();
15121 if inlined {
15122 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15123 inner_offset = next_offset;
15124 } else {
15125 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15126 inner_depth.increment()?;
15127 }
15128 let val_ref = self.packet_address.get_or_insert_with(|| fidl::new_empty!(u64, D));
15129 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
15130 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15131 {
15132 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15133 }
15134 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15135 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15136 }
15137 }
15138
15139 next_offset += envelope_size;
15140 _next_ordinal_to_read += 1;
15141 if next_offset >= end_offset {
15142 return Ok(());
15143 }
15144
15145 while _next_ordinal_to_read < 2 {
15147 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15148 _next_ordinal_to_read += 1;
15149 next_offset += envelope_size;
15150 }
15151
15152 let next_out_of_line = decoder.next_out_of_line();
15153 let handles_before = decoder.remaining_handles();
15154 if let Some((inlined, num_bytes, num_handles)) =
15155 fidl::encoding::decode_envelope_header(decoder, next_offset)?
15156 {
15157 let member_inline_size =
15158 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15159 if inlined != (member_inline_size <= 4) {
15160 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15161 }
15162 let inner_offset;
15163 let mut inner_depth = depth.clone();
15164 if inlined {
15165 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15166 inner_offset = next_offset;
15167 } else {
15168 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15169 inner_depth.increment()?;
15170 }
15171 let val_ref = self.packet_size.get_or_insert_with(|| fidl::new_empty!(u64, D));
15172 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
15173 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15174 {
15175 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15176 }
15177 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15178 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15179 }
15180 }
15181
15182 next_offset += envelope_size;
15183 _next_ordinal_to_read += 1;
15184 if next_offset >= end_offset {
15185 return Ok(());
15186 }
15187
15188 while _next_ordinal_to_read < 3 {
15190 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15191 _next_ordinal_to_read += 1;
15192 next_offset += envelope_size;
15193 }
15194
15195 let next_out_of_line = decoder.next_out_of_line();
15196 let handles_before = decoder.remaining_handles();
15197 if let Some((inlined, num_bytes, num_handles)) =
15198 fidl::encoding::decode_envelope_header(decoder, next_offset)?
15199 {
15200 let member_inline_size =
15201 <WlanRxInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15202 if inlined != (member_inline_size <= 4) {
15203 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15204 }
15205 let inner_offset;
15206 let mut inner_depth = depth.clone();
15207 if inlined {
15208 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15209 inner_offset = next_offset;
15210 } else {
15211 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15212 inner_depth.increment()?;
15213 }
15214 let val_ref =
15215 self.packet_info.get_or_insert_with(|| fidl::new_empty!(WlanRxInfo, D));
15216 fidl::decode!(WlanRxInfo, D, val_ref, decoder, inner_offset, inner_depth)?;
15217 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15218 {
15219 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15220 }
15221 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15222 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15223 }
15224 }
15225
15226 next_offset += envelope_size;
15227 _next_ordinal_to_read += 1;
15228 if next_offset >= end_offset {
15229 return Ok(());
15230 }
15231
15232 while _next_ordinal_to_read < 4 {
15234 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15235 _next_ordinal_to_read += 1;
15236 next_offset += envelope_size;
15237 }
15238
15239 let next_out_of_line = decoder.next_out_of_line();
15240 let handles_before = decoder.remaining_handles();
15241 if let Some((inlined, num_bytes, num_handles)) =
15242 fidl::encoding::decode_envelope_header(decoder, next_offset)?
15243 {
15244 let member_inline_size =
15245 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15246 if inlined != (member_inline_size <= 4) {
15247 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15248 }
15249 let inner_offset;
15250 let mut inner_depth = depth.clone();
15251 if inlined {
15252 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15253 inner_offset = next_offset;
15254 } else {
15255 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15256 inner_depth.increment()?;
15257 }
15258 let val_ref = self.async_id.get_or_insert_with(|| fidl::new_empty!(u64, D));
15259 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
15260 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15261 {
15262 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15263 }
15264 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15265 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15266 }
15267 }
15268
15269 next_offset += envelope_size;
15270 _next_ordinal_to_read += 1;
15271 if next_offset >= end_offset {
15272 return Ok(());
15273 }
15274
15275 while _next_ordinal_to_read < 5 {
15277 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15278 _next_ordinal_to_read += 1;
15279 next_offset += envelope_size;
15280 }
15281
15282 let next_out_of_line = decoder.next_out_of_line();
15283 let handles_before = decoder.remaining_handles();
15284 if let Some((inlined, num_bytes, num_handles)) =
15285 fidl::encoding::decode_envelope_header(decoder, next_offset)?
15286 {
15287 let member_inline_size =
15288 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15289 if inlined != (member_inline_size <= 4) {
15290 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15291 }
15292 let inner_offset;
15293 let mut inner_depth = depth.clone();
15294 if inlined {
15295 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15296 inner_offset = next_offset;
15297 } else {
15298 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15299 inner_depth.increment()?;
15300 }
15301 let val_ref = self.arena.get_or_insert_with(|| fidl::new_empty!(u64, D));
15302 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
15303 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15304 {
15305 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15306 }
15307 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15308 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15309 }
15310 }
15311
15312 next_offset += envelope_size;
15313
15314 while next_offset < end_offset {
15316 _next_ordinal_to_read += 1;
15317 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15318 next_offset += envelope_size;
15319 }
15320
15321 Ok(())
15322 }
15323 }
15324
15325 impl WlanSoftmacBandCapability {
15326 #[inline(always)]
15327 fn max_ordinal_present(&self) -> u64 {
15328 if let Some(_) = self.operating_channels {
15329 return 11;
15330 }
15331 if let Some(_) = self.basic_rates {
15332 return 10;
15333 }
15334 if let Some(_) = self.operating_channel_list {
15335 return 9;
15336 }
15337 if let Some(_) = self.operating_channel_count {
15338 return 8;
15339 }
15340 if let Some(_) = self.vht_caps {
15341 return 7;
15342 }
15343 if let Some(_) = self.vht_supported {
15344 return 6;
15345 }
15346 if let Some(_) = self.ht_caps {
15347 return 5;
15348 }
15349 if let Some(_) = self.ht_supported {
15350 return 4;
15351 }
15352 if let Some(_) = self.basic_rate_list {
15353 return 3;
15354 }
15355 if let Some(_) = self.basic_rate_count {
15356 return 2;
15357 }
15358 if let Some(_) = self.band {
15359 return 1;
15360 }
15361 0
15362 }
15363 }
15364
15365 impl fidl::encoding::ValueTypeMarker for WlanSoftmacBandCapability {
15366 type Borrowed<'a> = &'a Self;
15367 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15368 value
15369 }
15370 }
15371
15372 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBandCapability {
15373 type Owned = Self;
15374
15375 #[inline(always)]
15376 fn inline_align(_context: fidl::encoding::Context) -> usize {
15377 8
15378 }
15379
15380 #[inline(always)]
15381 fn inline_size(_context: fidl::encoding::Context) -> usize {
15382 16
15383 }
15384 }
15385
15386 unsafe impl<D: fidl::encoding::ResourceDialect>
15387 fidl::encoding::Encode<WlanSoftmacBandCapability, D> for &WlanSoftmacBandCapability
15388 {
15389 unsafe fn encode(
15390 self,
15391 encoder: &mut fidl::encoding::Encoder<'_, D>,
15392 offset: usize,
15393 mut depth: fidl::encoding::Depth,
15394 ) -> fidl::Result<()> {
15395 encoder.debug_check_bounds::<WlanSoftmacBandCapability>(offset);
15396 let max_ordinal: u64 = self.max_ordinal_present();
15398 encoder.write_num(max_ordinal, offset);
15399 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
15400 if max_ordinal == 0 {
15402 return Ok(());
15403 }
15404 depth.increment()?;
15405 let envelope_size = 8;
15406 let bytes_len = max_ordinal as usize * envelope_size;
15407 #[allow(unused_variables)]
15408 let offset = encoder.out_of_line_offset(bytes_len);
15409 let mut _prev_end_offset: usize = 0;
15410 if 1 > max_ordinal {
15411 return Ok(());
15412 }
15413
15414 let cur_offset: usize = (1 - 1) * envelope_size;
15417
15418 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15420
15421 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_ieee80211::WlanBand, D>(
15426 self.band.as_ref().map(<fidl_fuchsia_wlan_ieee80211::WlanBand as fidl::encoding::ValueTypeMarker>::borrow),
15427 encoder, offset + cur_offset, depth
15428 )?;
15429
15430 _prev_end_offset = cur_offset + envelope_size;
15431 if 2 > max_ordinal {
15432 return Ok(());
15433 }
15434
15435 let cur_offset: usize = (2 - 1) * envelope_size;
15438
15439 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15441
15442 fidl::encoding::encode_in_envelope_optional::<u8, D>(
15447 self.basic_rate_count.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
15448 encoder,
15449 offset + cur_offset,
15450 depth,
15451 )?;
15452
15453 _prev_end_offset = cur_offset + envelope_size;
15454 if 3 > max_ordinal {
15455 return Ok(());
15456 }
15457
15458 let cur_offset: usize = (3 - 1) * envelope_size;
15461
15462 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15464
15465 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 12>, D>(
15470 self.basic_rate_list.as_ref().map(
15471 <fidl::encoding::Array<u8, 12> as fidl::encoding::ValueTypeMarker>::borrow,
15472 ),
15473 encoder,
15474 offset + cur_offset,
15475 depth,
15476 )?;
15477
15478 _prev_end_offset = cur_offset + envelope_size;
15479 if 4 > max_ordinal {
15480 return Ok(());
15481 }
15482
15483 let cur_offset: usize = (4 - 1) * envelope_size;
15486
15487 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15489
15490 fidl::encoding::encode_in_envelope_optional::<bool, D>(
15495 self.ht_supported.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
15496 encoder,
15497 offset + cur_offset,
15498 depth,
15499 )?;
15500
15501 _prev_end_offset = cur_offset + envelope_size;
15502 if 5 > max_ordinal {
15503 return Ok(());
15504 }
15505
15506 let cur_offset: usize = (5 - 1) * envelope_size;
15509
15510 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15512
15513 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_ieee80211::HtCapabilities, D>(
15518 self.ht_caps.as_ref().map(<fidl_fuchsia_wlan_ieee80211::HtCapabilities as fidl::encoding::ValueTypeMarker>::borrow),
15519 encoder, offset + cur_offset, depth
15520 )?;
15521
15522 _prev_end_offset = cur_offset + envelope_size;
15523 if 6 > max_ordinal {
15524 return Ok(());
15525 }
15526
15527 let cur_offset: usize = (6 - 1) * envelope_size;
15530
15531 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15533
15534 fidl::encoding::encode_in_envelope_optional::<bool, D>(
15539 self.vht_supported.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
15540 encoder,
15541 offset + cur_offset,
15542 depth,
15543 )?;
15544
15545 _prev_end_offset = cur_offset + envelope_size;
15546 if 7 > max_ordinal {
15547 return Ok(());
15548 }
15549
15550 let cur_offset: usize = (7 - 1) * envelope_size;
15553
15554 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15556
15557 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_ieee80211::VhtCapabilities, D>(
15562 self.vht_caps.as_ref().map(<fidl_fuchsia_wlan_ieee80211::VhtCapabilities as fidl::encoding::ValueTypeMarker>::borrow),
15563 encoder, offset + cur_offset, depth
15564 )?;
15565
15566 _prev_end_offset = cur_offset + envelope_size;
15567 if 8 > max_ordinal {
15568 return Ok(());
15569 }
15570
15571 let cur_offset: usize = (8 - 1) * envelope_size;
15574
15575 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15577
15578 fidl::encoding::encode_in_envelope_optional::<u16, D>(
15583 self.operating_channel_count
15584 .as_ref()
15585 .map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
15586 encoder,
15587 offset + cur_offset,
15588 depth,
15589 )?;
15590
15591 _prev_end_offset = cur_offset + envelope_size;
15592 if 9 > max_ordinal {
15593 return Ok(());
15594 }
15595
15596 let cur_offset: usize = (9 - 1) * envelope_size;
15599
15600 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15602
15603 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 256>, D>(
15608 self.operating_channel_list.as_ref().map(
15609 <fidl::encoding::Array<u8, 256> as fidl::encoding::ValueTypeMarker>::borrow,
15610 ),
15611 encoder,
15612 offset + cur_offset,
15613 depth,
15614 )?;
15615
15616 _prev_end_offset = cur_offset + envelope_size;
15617 if 10 > max_ordinal {
15618 return Ok(());
15619 }
15620
15621 let cur_offset: usize = (10 - 1) * envelope_size;
15624
15625 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15627
15628 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 12>, D>(
15633 self.basic_rates.as_ref().map(
15634 <fidl::encoding::Vector<u8, 12> as fidl::encoding::ValueTypeMarker>::borrow,
15635 ),
15636 encoder,
15637 offset + cur_offset,
15638 depth,
15639 )?;
15640
15641 _prev_end_offset = cur_offset + envelope_size;
15642 if 11 > max_ordinal {
15643 return Ok(());
15644 }
15645
15646 let cur_offset: usize = (11 - 1) * envelope_size;
15649
15650 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15652
15653 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 256>, D>(
15658 self.operating_channels.as_ref().map(
15659 <fidl::encoding::Vector<u8, 256> as fidl::encoding::ValueTypeMarker>::borrow,
15660 ),
15661 encoder,
15662 offset + cur_offset,
15663 depth,
15664 )?;
15665
15666 _prev_end_offset = cur_offset + envelope_size;
15667
15668 Ok(())
15669 }
15670 }
15671
15672 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15673 for WlanSoftmacBandCapability
15674 {
15675 #[inline(always)]
15676 fn new_empty() -> Self {
15677 Self::default()
15678 }
15679
15680 unsafe fn decode(
15681 &mut self,
15682 decoder: &mut fidl::encoding::Decoder<'_, D>,
15683 offset: usize,
15684 mut depth: fidl::encoding::Depth,
15685 ) -> fidl::Result<()> {
15686 decoder.debug_check_bounds::<Self>(offset);
15687 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15688 None => return Err(fidl::Error::NotNullable),
15689 Some(len) => len,
15690 };
15691 if len == 0 {
15693 return Ok(());
15694 };
15695 depth.increment()?;
15696 let envelope_size = 8;
15697 let bytes_len = len * envelope_size;
15698 let offset = decoder.out_of_line_offset(bytes_len)?;
15699 let mut _next_ordinal_to_read = 0;
15701 let mut next_offset = offset;
15702 let end_offset = offset + bytes_len;
15703 _next_ordinal_to_read += 1;
15704 if next_offset >= end_offset {
15705 return Ok(());
15706 }
15707
15708 while _next_ordinal_to_read < 1 {
15710 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15711 _next_ordinal_to_read += 1;
15712 next_offset += envelope_size;
15713 }
15714
15715 let next_out_of_line = decoder.next_out_of_line();
15716 let handles_before = decoder.remaining_handles();
15717 if let Some((inlined, num_bytes, num_handles)) =
15718 fidl::encoding::decode_envelope_header(decoder, next_offset)?
15719 {
15720 let member_inline_size = <fidl_fuchsia_wlan_ieee80211::WlanBand as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15721 if inlined != (member_inline_size <= 4) {
15722 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15723 }
15724 let inner_offset;
15725 let mut inner_depth = depth.clone();
15726 if inlined {
15727 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15728 inner_offset = next_offset;
15729 } else {
15730 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15731 inner_depth.increment()?;
15732 }
15733 let val_ref = self.band.get_or_insert_with(|| {
15734 fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::WlanBand, D)
15735 });
15736 fidl::decode!(
15737 fidl_fuchsia_wlan_ieee80211::WlanBand,
15738 D,
15739 val_ref,
15740 decoder,
15741 inner_offset,
15742 inner_depth
15743 )?;
15744 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15745 {
15746 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15747 }
15748 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15749 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15750 }
15751 }
15752
15753 next_offset += envelope_size;
15754 _next_ordinal_to_read += 1;
15755 if next_offset >= end_offset {
15756 return Ok(());
15757 }
15758
15759 while _next_ordinal_to_read < 2 {
15761 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15762 _next_ordinal_to_read += 1;
15763 next_offset += envelope_size;
15764 }
15765
15766 let next_out_of_line = decoder.next_out_of_line();
15767 let handles_before = decoder.remaining_handles();
15768 if let Some((inlined, num_bytes, num_handles)) =
15769 fidl::encoding::decode_envelope_header(decoder, next_offset)?
15770 {
15771 let member_inline_size =
15772 <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15773 if inlined != (member_inline_size <= 4) {
15774 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15775 }
15776 let inner_offset;
15777 let mut inner_depth = depth.clone();
15778 if inlined {
15779 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15780 inner_offset = next_offset;
15781 } else {
15782 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15783 inner_depth.increment()?;
15784 }
15785 let val_ref = self.basic_rate_count.get_or_insert_with(|| fidl::new_empty!(u8, D));
15786 fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
15787 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15788 {
15789 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15790 }
15791 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15792 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15793 }
15794 }
15795
15796 next_offset += envelope_size;
15797 _next_ordinal_to_read += 1;
15798 if next_offset >= end_offset {
15799 return Ok(());
15800 }
15801
15802 while _next_ordinal_to_read < 3 {
15804 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15805 _next_ordinal_to_read += 1;
15806 next_offset += envelope_size;
15807 }
15808
15809 let next_out_of_line = decoder.next_out_of_line();
15810 let handles_before = decoder.remaining_handles();
15811 if let Some((inlined, num_bytes, num_handles)) =
15812 fidl::encoding::decode_envelope_header(decoder, next_offset)?
15813 {
15814 let member_inline_size =
15815 <fidl::encoding::Array<u8, 12> as fidl::encoding::TypeMarker>::inline_size(
15816 decoder.context,
15817 );
15818 if inlined != (member_inline_size <= 4) {
15819 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15820 }
15821 let inner_offset;
15822 let mut inner_depth = depth.clone();
15823 if inlined {
15824 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15825 inner_offset = next_offset;
15826 } else {
15827 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15828 inner_depth.increment()?;
15829 }
15830 let val_ref = self
15831 .basic_rate_list
15832 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 12>, D));
15833 fidl::decode!(fidl::encoding::Array<u8, 12>, D, val_ref, decoder, inner_offset, inner_depth)?;
15834 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15835 {
15836 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15837 }
15838 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15839 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15840 }
15841 }
15842
15843 next_offset += envelope_size;
15844 _next_ordinal_to_read += 1;
15845 if next_offset >= end_offset {
15846 return Ok(());
15847 }
15848
15849 while _next_ordinal_to_read < 4 {
15851 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15852 _next_ordinal_to_read += 1;
15853 next_offset += envelope_size;
15854 }
15855
15856 let next_out_of_line = decoder.next_out_of_line();
15857 let handles_before = decoder.remaining_handles();
15858 if let Some((inlined, num_bytes, num_handles)) =
15859 fidl::encoding::decode_envelope_header(decoder, next_offset)?
15860 {
15861 let member_inline_size =
15862 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15863 if inlined != (member_inline_size <= 4) {
15864 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15865 }
15866 let inner_offset;
15867 let mut inner_depth = depth.clone();
15868 if inlined {
15869 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15870 inner_offset = next_offset;
15871 } else {
15872 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15873 inner_depth.increment()?;
15874 }
15875 let val_ref = self.ht_supported.get_or_insert_with(|| fidl::new_empty!(bool, D));
15876 fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
15877 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15878 {
15879 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15880 }
15881 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15882 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15883 }
15884 }
15885
15886 next_offset += envelope_size;
15887 _next_ordinal_to_read += 1;
15888 if next_offset >= end_offset {
15889 return Ok(());
15890 }
15891
15892 while _next_ordinal_to_read < 5 {
15894 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15895 _next_ordinal_to_read += 1;
15896 next_offset += envelope_size;
15897 }
15898
15899 let next_out_of_line = decoder.next_out_of_line();
15900 let handles_before = decoder.remaining_handles();
15901 if let Some((inlined, num_bytes, num_handles)) =
15902 fidl::encoding::decode_envelope_header(decoder, next_offset)?
15903 {
15904 let member_inline_size = <fidl_fuchsia_wlan_ieee80211::HtCapabilities as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15905 if inlined != (member_inline_size <= 4) {
15906 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15907 }
15908 let inner_offset;
15909 let mut inner_depth = depth.clone();
15910 if inlined {
15911 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15912 inner_offset = next_offset;
15913 } else {
15914 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15915 inner_depth.increment()?;
15916 }
15917 let val_ref = self.ht_caps.get_or_insert_with(|| {
15918 fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::HtCapabilities, D)
15919 });
15920 fidl::decode!(
15921 fidl_fuchsia_wlan_ieee80211::HtCapabilities,
15922 D,
15923 val_ref,
15924 decoder,
15925 inner_offset,
15926 inner_depth
15927 )?;
15928 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15929 {
15930 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15931 }
15932 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15933 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15934 }
15935 }
15936
15937 next_offset += envelope_size;
15938 _next_ordinal_to_read += 1;
15939 if next_offset >= end_offset {
15940 return Ok(());
15941 }
15942
15943 while _next_ordinal_to_read < 6 {
15945 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15946 _next_ordinal_to_read += 1;
15947 next_offset += envelope_size;
15948 }
15949
15950 let next_out_of_line = decoder.next_out_of_line();
15951 let handles_before = decoder.remaining_handles();
15952 if let Some((inlined, num_bytes, num_handles)) =
15953 fidl::encoding::decode_envelope_header(decoder, next_offset)?
15954 {
15955 let member_inline_size =
15956 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15957 if inlined != (member_inline_size <= 4) {
15958 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15959 }
15960 let inner_offset;
15961 let mut inner_depth = depth.clone();
15962 if inlined {
15963 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15964 inner_offset = next_offset;
15965 } else {
15966 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15967 inner_depth.increment()?;
15968 }
15969 let val_ref = self.vht_supported.get_or_insert_with(|| fidl::new_empty!(bool, D));
15970 fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
15971 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15972 {
15973 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15974 }
15975 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15976 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15977 }
15978 }
15979
15980 next_offset += envelope_size;
15981 _next_ordinal_to_read += 1;
15982 if next_offset >= end_offset {
15983 return Ok(());
15984 }
15985
15986 while _next_ordinal_to_read < 7 {
15988 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15989 _next_ordinal_to_read += 1;
15990 next_offset += envelope_size;
15991 }
15992
15993 let next_out_of_line = decoder.next_out_of_line();
15994 let handles_before = decoder.remaining_handles();
15995 if let Some((inlined, num_bytes, num_handles)) =
15996 fidl::encoding::decode_envelope_header(decoder, next_offset)?
15997 {
15998 let member_inline_size = <fidl_fuchsia_wlan_ieee80211::VhtCapabilities as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15999 if inlined != (member_inline_size <= 4) {
16000 return Err(fidl::Error::InvalidInlineBitInEnvelope);
16001 }
16002 let inner_offset;
16003 let mut inner_depth = depth.clone();
16004 if inlined {
16005 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16006 inner_offset = next_offset;
16007 } else {
16008 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16009 inner_depth.increment()?;
16010 }
16011 let val_ref = self.vht_caps.get_or_insert_with(|| {
16012 fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::VhtCapabilities, D)
16013 });
16014 fidl::decode!(
16015 fidl_fuchsia_wlan_ieee80211::VhtCapabilities,
16016 D,
16017 val_ref,
16018 decoder,
16019 inner_offset,
16020 inner_depth
16021 )?;
16022 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16023 {
16024 return Err(fidl::Error::InvalidNumBytesInEnvelope);
16025 }
16026 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16027 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16028 }
16029 }
16030
16031 next_offset += envelope_size;
16032 _next_ordinal_to_read += 1;
16033 if next_offset >= end_offset {
16034 return Ok(());
16035 }
16036
16037 while _next_ordinal_to_read < 8 {
16039 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16040 _next_ordinal_to_read += 1;
16041 next_offset += envelope_size;
16042 }
16043
16044 let next_out_of_line = decoder.next_out_of_line();
16045 let handles_before = decoder.remaining_handles();
16046 if let Some((inlined, num_bytes, num_handles)) =
16047 fidl::encoding::decode_envelope_header(decoder, next_offset)?
16048 {
16049 let member_inline_size =
16050 <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16051 if inlined != (member_inline_size <= 4) {
16052 return Err(fidl::Error::InvalidInlineBitInEnvelope);
16053 }
16054 let inner_offset;
16055 let mut inner_depth = depth.clone();
16056 if inlined {
16057 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16058 inner_offset = next_offset;
16059 } else {
16060 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16061 inner_depth.increment()?;
16062 }
16063 let val_ref =
16064 self.operating_channel_count.get_or_insert_with(|| fidl::new_empty!(u16, D));
16065 fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
16066 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16067 {
16068 return Err(fidl::Error::InvalidNumBytesInEnvelope);
16069 }
16070 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16071 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16072 }
16073 }
16074
16075 next_offset += envelope_size;
16076 _next_ordinal_to_read += 1;
16077 if next_offset >= end_offset {
16078 return Ok(());
16079 }
16080
16081 while _next_ordinal_to_read < 9 {
16083 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16084 _next_ordinal_to_read += 1;
16085 next_offset += envelope_size;
16086 }
16087
16088 let next_out_of_line = decoder.next_out_of_line();
16089 let handles_before = decoder.remaining_handles();
16090 if let Some((inlined, num_bytes, num_handles)) =
16091 fidl::encoding::decode_envelope_header(decoder, next_offset)?
16092 {
16093 let member_inline_size =
16094 <fidl::encoding::Array<u8, 256> as fidl::encoding::TypeMarker>::inline_size(
16095 decoder.context,
16096 );
16097 if inlined != (member_inline_size <= 4) {
16098 return Err(fidl::Error::InvalidInlineBitInEnvelope);
16099 }
16100 let inner_offset;
16101 let mut inner_depth = depth.clone();
16102 if inlined {
16103 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16104 inner_offset = next_offset;
16105 } else {
16106 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16107 inner_depth.increment()?;
16108 }
16109 let val_ref = self
16110 .operating_channel_list
16111 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 256>, D));
16112 fidl::decode!(fidl::encoding::Array<u8, 256>, D, val_ref, decoder, inner_offset, inner_depth)?;
16113 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16114 {
16115 return Err(fidl::Error::InvalidNumBytesInEnvelope);
16116 }
16117 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16118 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16119 }
16120 }
16121
16122 next_offset += envelope_size;
16123 _next_ordinal_to_read += 1;
16124 if next_offset >= end_offset {
16125 return Ok(());
16126 }
16127
16128 while _next_ordinal_to_read < 10 {
16130 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16131 _next_ordinal_to_read += 1;
16132 next_offset += envelope_size;
16133 }
16134
16135 let next_out_of_line = decoder.next_out_of_line();
16136 let handles_before = decoder.remaining_handles();
16137 if let Some((inlined, num_bytes, num_handles)) =
16138 fidl::encoding::decode_envelope_header(decoder, next_offset)?
16139 {
16140 let member_inline_size =
16141 <fidl::encoding::Vector<u8, 12> as fidl::encoding::TypeMarker>::inline_size(
16142 decoder.context,
16143 );
16144 if inlined != (member_inline_size <= 4) {
16145 return Err(fidl::Error::InvalidInlineBitInEnvelope);
16146 }
16147 let inner_offset;
16148 let mut inner_depth = depth.clone();
16149 if inlined {
16150 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16151 inner_offset = next_offset;
16152 } else {
16153 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16154 inner_depth.increment()?;
16155 }
16156 let val_ref = self
16157 .basic_rates
16158 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 12>, D));
16159 fidl::decode!(fidl::encoding::Vector<u8, 12>, D, val_ref, decoder, inner_offset, inner_depth)?;
16160 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16161 {
16162 return Err(fidl::Error::InvalidNumBytesInEnvelope);
16163 }
16164 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16165 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16166 }
16167 }
16168
16169 next_offset += envelope_size;
16170 _next_ordinal_to_read += 1;
16171 if next_offset >= end_offset {
16172 return Ok(());
16173 }
16174
16175 while _next_ordinal_to_read < 11 {
16177 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16178 _next_ordinal_to_read += 1;
16179 next_offset += envelope_size;
16180 }
16181
16182 let next_out_of_line = decoder.next_out_of_line();
16183 let handles_before = decoder.remaining_handles();
16184 if let Some((inlined, num_bytes, num_handles)) =
16185 fidl::encoding::decode_envelope_header(decoder, next_offset)?
16186 {
16187 let member_inline_size =
16188 <fidl::encoding::Vector<u8, 256> as fidl::encoding::TypeMarker>::inline_size(
16189 decoder.context,
16190 );
16191 if inlined != (member_inline_size <= 4) {
16192 return Err(fidl::Error::InvalidInlineBitInEnvelope);
16193 }
16194 let inner_offset;
16195 let mut inner_depth = depth.clone();
16196 if inlined {
16197 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16198 inner_offset = next_offset;
16199 } else {
16200 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16201 inner_depth.increment()?;
16202 }
16203 let val_ref = self
16204 .operating_channels
16205 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 256>, D));
16206 fidl::decode!(fidl::encoding::Vector<u8, 256>, D, val_ref, decoder, inner_offset, inner_depth)?;
16207 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16208 {
16209 return Err(fidl::Error::InvalidNumBytesInEnvelope);
16210 }
16211 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16212 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16213 }
16214 }
16215
16216 next_offset += envelope_size;
16217
16218 while next_offset < end_offset {
16220 _next_ordinal_to_read += 1;
16221 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16222 next_offset += envelope_size;
16223 }
16224
16225 Ok(())
16226 }
16227 }
16228
16229 impl WlanSoftmacBaseCancelScanRequest {
16230 #[inline(always)]
16231 fn max_ordinal_present(&self) -> u64 {
16232 if let Some(_) = self.scan_id {
16233 return 1;
16234 }
16235 0
16236 }
16237 }
16238
16239 impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseCancelScanRequest {
16240 type Borrowed<'a> = &'a Self;
16241 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16242 value
16243 }
16244 }
16245
16246 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseCancelScanRequest {
16247 type Owned = Self;
16248
16249 #[inline(always)]
16250 fn inline_align(_context: fidl::encoding::Context) -> usize {
16251 8
16252 }
16253
16254 #[inline(always)]
16255 fn inline_size(_context: fidl::encoding::Context) -> usize {
16256 16
16257 }
16258 }
16259
16260 unsafe impl<D: fidl::encoding::ResourceDialect>
16261 fidl::encoding::Encode<WlanSoftmacBaseCancelScanRequest, D>
16262 for &WlanSoftmacBaseCancelScanRequest
16263 {
16264 unsafe fn encode(
16265 self,
16266 encoder: &mut fidl::encoding::Encoder<'_, D>,
16267 offset: usize,
16268 mut depth: fidl::encoding::Depth,
16269 ) -> fidl::Result<()> {
16270 encoder.debug_check_bounds::<WlanSoftmacBaseCancelScanRequest>(offset);
16271 let max_ordinal: u64 = self.max_ordinal_present();
16273 encoder.write_num(max_ordinal, offset);
16274 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16275 if max_ordinal == 0 {
16277 return Ok(());
16278 }
16279 depth.increment()?;
16280 let envelope_size = 8;
16281 let bytes_len = max_ordinal as usize * envelope_size;
16282 #[allow(unused_variables)]
16283 let offset = encoder.out_of_line_offset(bytes_len);
16284 let mut _prev_end_offset: usize = 0;
16285 if 1 > max_ordinal {
16286 return Ok(());
16287 }
16288
16289 let cur_offset: usize = (1 - 1) * envelope_size;
16292
16293 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16295
16296 fidl::encoding::encode_in_envelope_optional::<u64, D>(
16301 self.scan_id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
16302 encoder,
16303 offset + cur_offset,
16304 depth,
16305 )?;
16306
16307 _prev_end_offset = cur_offset + envelope_size;
16308
16309 Ok(())
16310 }
16311 }
16312
16313 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16314 for WlanSoftmacBaseCancelScanRequest
16315 {
16316 #[inline(always)]
16317 fn new_empty() -> Self {
16318 Self::default()
16319 }
16320
16321 unsafe fn decode(
16322 &mut self,
16323 decoder: &mut fidl::encoding::Decoder<'_, D>,
16324 offset: usize,
16325 mut depth: fidl::encoding::Depth,
16326 ) -> fidl::Result<()> {
16327 decoder.debug_check_bounds::<Self>(offset);
16328 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16329 None => return Err(fidl::Error::NotNullable),
16330 Some(len) => len,
16331 };
16332 if len == 0 {
16334 return Ok(());
16335 };
16336 depth.increment()?;
16337 let envelope_size = 8;
16338 let bytes_len = len * envelope_size;
16339 let offset = decoder.out_of_line_offset(bytes_len)?;
16340 let mut _next_ordinal_to_read = 0;
16342 let mut next_offset = offset;
16343 let end_offset = offset + bytes_len;
16344 _next_ordinal_to_read += 1;
16345 if next_offset >= end_offset {
16346 return Ok(());
16347 }
16348
16349 while _next_ordinal_to_read < 1 {
16351 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16352 _next_ordinal_to_read += 1;
16353 next_offset += envelope_size;
16354 }
16355
16356 let next_out_of_line = decoder.next_out_of_line();
16357 let handles_before = decoder.remaining_handles();
16358 if let Some((inlined, num_bytes, num_handles)) =
16359 fidl::encoding::decode_envelope_header(decoder, next_offset)?
16360 {
16361 let member_inline_size =
16362 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16363 if inlined != (member_inline_size <= 4) {
16364 return Err(fidl::Error::InvalidInlineBitInEnvelope);
16365 }
16366 let inner_offset;
16367 let mut inner_depth = depth.clone();
16368 if inlined {
16369 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16370 inner_offset = next_offset;
16371 } else {
16372 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16373 inner_depth.increment()?;
16374 }
16375 let val_ref = self.scan_id.get_or_insert_with(|| fidl::new_empty!(u64, D));
16376 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
16377 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16378 {
16379 return Err(fidl::Error::InvalidNumBytesInEnvelope);
16380 }
16381 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16382 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16383 }
16384 }
16385
16386 next_offset += envelope_size;
16387
16388 while next_offset < end_offset {
16390 _next_ordinal_to_read += 1;
16391 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16392 next_offset += envelope_size;
16393 }
16394
16395 Ok(())
16396 }
16397 }
16398
16399 impl WlanSoftmacBaseClearAssociationRequest {
16400 #[inline(always)]
16401 fn max_ordinal_present(&self) -> u64 {
16402 if let Some(_) = self.peer_addr {
16403 return 1;
16404 }
16405 0
16406 }
16407 }
16408
16409 impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseClearAssociationRequest {
16410 type Borrowed<'a> = &'a Self;
16411 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16412 value
16413 }
16414 }
16415
16416 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseClearAssociationRequest {
16417 type Owned = Self;
16418
16419 #[inline(always)]
16420 fn inline_align(_context: fidl::encoding::Context) -> usize {
16421 8
16422 }
16423
16424 #[inline(always)]
16425 fn inline_size(_context: fidl::encoding::Context) -> usize {
16426 16
16427 }
16428 }
16429
16430 unsafe impl<D: fidl::encoding::ResourceDialect>
16431 fidl::encoding::Encode<WlanSoftmacBaseClearAssociationRequest, D>
16432 for &WlanSoftmacBaseClearAssociationRequest
16433 {
16434 unsafe fn encode(
16435 self,
16436 encoder: &mut fidl::encoding::Encoder<'_, D>,
16437 offset: usize,
16438 mut depth: fidl::encoding::Depth,
16439 ) -> fidl::Result<()> {
16440 encoder.debug_check_bounds::<WlanSoftmacBaseClearAssociationRequest>(offset);
16441 let max_ordinal: u64 = self.max_ordinal_present();
16443 encoder.write_num(max_ordinal, offset);
16444 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16445 if max_ordinal == 0 {
16447 return Ok(());
16448 }
16449 depth.increment()?;
16450 let envelope_size = 8;
16451 let bytes_len = max_ordinal as usize * envelope_size;
16452 #[allow(unused_variables)]
16453 let offset = encoder.out_of_line_offset(bytes_len);
16454 let mut _prev_end_offset: usize = 0;
16455 if 1 > max_ordinal {
16456 return Ok(());
16457 }
16458
16459 let cur_offset: usize = (1 - 1) * envelope_size;
16462
16463 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16465
16466 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
16471 self.peer_addr
16472 .as_ref()
16473 .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
16474 encoder,
16475 offset + cur_offset,
16476 depth,
16477 )?;
16478
16479 _prev_end_offset = cur_offset + envelope_size;
16480
16481 Ok(())
16482 }
16483 }
16484
16485 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16486 for WlanSoftmacBaseClearAssociationRequest
16487 {
16488 #[inline(always)]
16489 fn new_empty() -> Self {
16490 Self::default()
16491 }
16492
16493 unsafe fn decode(
16494 &mut self,
16495 decoder: &mut fidl::encoding::Decoder<'_, D>,
16496 offset: usize,
16497 mut depth: fidl::encoding::Depth,
16498 ) -> fidl::Result<()> {
16499 decoder.debug_check_bounds::<Self>(offset);
16500 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16501 None => return Err(fidl::Error::NotNullable),
16502 Some(len) => len,
16503 };
16504 if len == 0 {
16506 return Ok(());
16507 };
16508 depth.increment()?;
16509 let envelope_size = 8;
16510 let bytes_len = len * envelope_size;
16511 let offset = decoder.out_of_line_offset(bytes_len)?;
16512 let mut _next_ordinal_to_read = 0;
16514 let mut next_offset = offset;
16515 let end_offset = offset + bytes_len;
16516 _next_ordinal_to_read += 1;
16517 if next_offset >= end_offset {
16518 return Ok(());
16519 }
16520
16521 while _next_ordinal_to_read < 1 {
16523 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16524 _next_ordinal_to_read += 1;
16525 next_offset += envelope_size;
16526 }
16527
16528 let next_out_of_line = decoder.next_out_of_line();
16529 let handles_before = decoder.remaining_handles();
16530 if let Some((inlined, num_bytes, num_handles)) =
16531 fidl::encoding::decode_envelope_header(decoder, next_offset)?
16532 {
16533 let member_inline_size =
16534 <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
16535 decoder.context,
16536 );
16537 if inlined != (member_inline_size <= 4) {
16538 return Err(fidl::Error::InvalidInlineBitInEnvelope);
16539 }
16540 let inner_offset;
16541 let mut inner_depth = depth.clone();
16542 if inlined {
16543 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16544 inner_offset = next_offset;
16545 } else {
16546 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16547 inner_depth.increment()?;
16548 }
16549 let val_ref = self
16550 .peer_addr
16551 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
16552 fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
16553 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16554 {
16555 return Err(fidl::Error::InvalidNumBytesInEnvelope);
16556 }
16557 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16558 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16559 }
16560 }
16561
16562 next_offset += envelope_size;
16563
16564 while next_offset < end_offset {
16566 _next_ordinal_to_read += 1;
16567 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16568 next_offset += envelope_size;
16569 }
16570
16571 Ok(())
16572 }
16573 }
16574
16575 impl WlanSoftmacBaseEnableBeaconingRequest {
16576 #[inline(always)]
16577 fn max_ordinal_present(&self) -> u64 {
16578 if let Some(_) = self.beacon_interval {
16579 return 3;
16580 }
16581 if let Some(_) = self.tim_ele_offset {
16582 return 2;
16583 }
16584 if let Some(_) = self.packet_template {
16585 return 1;
16586 }
16587 0
16588 }
16589 }
16590
16591 impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseEnableBeaconingRequest {
16592 type Borrowed<'a> = &'a Self;
16593 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16594 value
16595 }
16596 }
16597
16598 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseEnableBeaconingRequest {
16599 type Owned = Self;
16600
16601 #[inline(always)]
16602 fn inline_align(_context: fidl::encoding::Context) -> usize {
16603 8
16604 }
16605
16606 #[inline(always)]
16607 fn inline_size(_context: fidl::encoding::Context) -> usize {
16608 16
16609 }
16610 }
16611
16612 unsafe impl<D: fidl::encoding::ResourceDialect>
16613 fidl::encoding::Encode<WlanSoftmacBaseEnableBeaconingRequest, D>
16614 for &WlanSoftmacBaseEnableBeaconingRequest
16615 {
16616 unsafe fn encode(
16617 self,
16618 encoder: &mut fidl::encoding::Encoder<'_, D>,
16619 offset: usize,
16620 mut depth: fidl::encoding::Depth,
16621 ) -> fidl::Result<()> {
16622 encoder.debug_check_bounds::<WlanSoftmacBaseEnableBeaconingRequest>(offset);
16623 let max_ordinal: u64 = self.max_ordinal_present();
16625 encoder.write_num(max_ordinal, offset);
16626 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16627 if max_ordinal == 0 {
16629 return Ok(());
16630 }
16631 depth.increment()?;
16632 let envelope_size = 8;
16633 let bytes_len = max_ordinal as usize * envelope_size;
16634 #[allow(unused_variables)]
16635 let offset = encoder.out_of_line_offset(bytes_len);
16636 let mut _prev_end_offset: usize = 0;
16637 if 1 > max_ordinal {
16638 return Ok(());
16639 }
16640
16641 let cur_offset: usize = (1 - 1) * envelope_size;
16644
16645 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16647
16648 fidl::encoding::encode_in_envelope_optional::<WlanTxPacket, D>(
16653 self.packet_template
16654 .as_ref()
16655 .map(<WlanTxPacket as fidl::encoding::ValueTypeMarker>::borrow),
16656 encoder,
16657 offset + cur_offset,
16658 depth,
16659 )?;
16660
16661 _prev_end_offset = cur_offset + envelope_size;
16662 if 2 > max_ordinal {
16663 return Ok(());
16664 }
16665
16666 let cur_offset: usize = (2 - 1) * envelope_size;
16669
16670 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16672
16673 fidl::encoding::encode_in_envelope_optional::<u64, D>(
16678 self.tim_ele_offset.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
16679 encoder,
16680 offset + cur_offset,
16681 depth,
16682 )?;
16683
16684 _prev_end_offset = cur_offset + envelope_size;
16685 if 3 > max_ordinal {
16686 return Ok(());
16687 }
16688
16689 let cur_offset: usize = (3 - 1) * envelope_size;
16692
16693 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16695
16696 fidl::encoding::encode_in_envelope_optional::<u16, D>(
16701 self.beacon_interval.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
16702 encoder,
16703 offset + cur_offset,
16704 depth,
16705 )?;
16706
16707 _prev_end_offset = cur_offset + envelope_size;
16708
16709 Ok(())
16710 }
16711 }
16712
16713 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16714 for WlanSoftmacBaseEnableBeaconingRequest
16715 {
16716 #[inline(always)]
16717 fn new_empty() -> Self {
16718 Self::default()
16719 }
16720
16721 unsafe fn decode(
16722 &mut self,
16723 decoder: &mut fidl::encoding::Decoder<'_, D>,
16724 offset: usize,
16725 mut depth: fidl::encoding::Depth,
16726 ) -> fidl::Result<()> {
16727 decoder.debug_check_bounds::<Self>(offset);
16728 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16729 None => return Err(fidl::Error::NotNullable),
16730 Some(len) => len,
16731 };
16732 if len == 0 {
16734 return Ok(());
16735 };
16736 depth.increment()?;
16737 let envelope_size = 8;
16738 let bytes_len = len * envelope_size;
16739 let offset = decoder.out_of_line_offset(bytes_len)?;
16740 let mut _next_ordinal_to_read = 0;
16742 let mut next_offset = offset;
16743 let end_offset = offset + bytes_len;
16744 _next_ordinal_to_read += 1;
16745 if next_offset >= end_offset {
16746 return Ok(());
16747 }
16748
16749 while _next_ordinal_to_read < 1 {
16751 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16752 _next_ordinal_to_read += 1;
16753 next_offset += envelope_size;
16754 }
16755
16756 let next_out_of_line = decoder.next_out_of_line();
16757 let handles_before = decoder.remaining_handles();
16758 if let Some((inlined, num_bytes, num_handles)) =
16759 fidl::encoding::decode_envelope_header(decoder, next_offset)?
16760 {
16761 let member_inline_size =
16762 <WlanTxPacket as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16763 if inlined != (member_inline_size <= 4) {
16764 return Err(fidl::Error::InvalidInlineBitInEnvelope);
16765 }
16766 let inner_offset;
16767 let mut inner_depth = depth.clone();
16768 if inlined {
16769 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16770 inner_offset = next_offset;
16771 } else {
16772 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16773 inner_depth.increment()?;
16774 }
16775 let val_ref =
16776 self.packet_template.get_or_insert_with(|| fidl::new_empty!(WlanTxPacket, D));
16777 fidl::decode!(WlanTxPacket, D, val_ref, decoder, inner_offset, inner_depth)?;
16778 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16779 {
16780 return Err(fidl::Error::InvalidNumBytesInEnvelope);
16781 }
16782 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16783 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16784 }
16785 }
16786
16787 next_offset += envelope_size;
16788 _next_ordinal_to_read += 1;
16789 if next_offset >= end_offset {
16790 return Ok(());
16791 }
16792
16793 while _next_ordinal_to_read < 2 {
16795 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16796 _next_ordinal_to_read += 1;
16797 next_offset += envelope_size;
16798 }
16799
16800 let next_out_of_line = decoder.next_out_of_line();
16801 let handles_before = decoder.remaining_handles();
16802 if let Some((inlined, num_bytes, num_handles)) =
16803 fidl::encoding::decode_envelope_header(decoder, next_offset)?
16804 {
16805 let member_inline_size =
16806 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16807 if inlined != (member_inline_size <= 4) {
16808 return Err(fidl::Error::InvalidInlineBitInEnvelope);
16809 }
16810 let inner_offset;
16811 let mut inner_depth = depth.clone();
16812 if inlined {
16813 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16814 inner_offset = next_offset;
16815 } else {
16816 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16817 inner_depth.increment()?;
16818 }
16819 let val_ref = self.tim_ele_offset.get_or_insert_with(|| fidl::new_empty!(u64, D));
16820 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
16821 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16822 {
16823 return Err(fidl::Error::InvalidNumBytesInEnvelope);
16824 }
16825 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16826 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16827 }
16828 }
16829
16830 next_offset += envelope_size;
16831 _next_ordinal_to_read += 1;
16832 if next_offset >= end_offset {
16833 return Ok(());
16834 }
16835
16836 while _next_ordinal_to_read < 3 {
16838 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16839 _next_ordinal_to_read += 1;
16840 next_offset += envelope_size;
16841 }
16842
16843 let next_out_of_line = decoder.next_out_of_line();
16844 let handles_before = decoder.remaining_handles();
16845 if let Some((inlined, num_bytes, num_handles)) =
16846 fidl::encoding::decode_envelope_header(decoder, next_offset)?
16847 {
16848 let member_inline_size =
16849 <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16850 if inlined != (member_inline_size <= 4) {
16851 return Err(fidl::Error::InvalidInlineBitInEnvelope);
16852 }
16853 let inner_offset;
16854 let mut inner_depth = depth.clone();
16855 if inlined {
16856 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16857 inner_offset = next_offset;
16858 } else {
16859 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16860 inner_depth.increment()?;
16861 }
16862 let val_ref = self.beacon_interval.get_or_insert_with(|| fidl::new_empty!(u16, D));
16863 fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
16864 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16865 {
16866 return Err(fidl::Error::InvalidNumBytesInEnvelope);
16867 }
16868 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16869 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16870 }
16871 }
16872
16873 next_offset += envelope_size;
16874
16875 while next_offset < end_offset {
16877 _next_ordinal_to_read += 1;
16878 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16879 next_offset += envelope_size;
16880 }
16881
16882 Ok(())
16883 }
16884 }
16885
16886 impl WlanSoftmacBaseSetChannelRequest {
16887 #[inline(always)]
16888 fn max_ordinal_present(&self) -> u64 {
16889 if let Some(_) = self.channel {
16890 return 1;
16891 }
16892 0
16893 }
16894 }
16895
16896 impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseSetChannelRequest {
16897 type Borrowed<'a> = &'a Self;
16898 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16899 value
16900 }
16901 }
16902
16903 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseSetChannelRequest {
16904 type Owned = Self;
16905
16906 #[inline(always)]
16907 fn inline_align(_context: fidl::encoding::Context) -> usize {
16908 8
16909 }
16910
16911 #[inline(always)]
16912 fn inline_size(_context: fidl::encoding::Context) -> usize {
16913 16
16914 }
16915 }
16916
16917 unsafe impl<D: fidl::encoding::ResourceDialect>
16918 fidl::encoding::Encode<WlanSoftmacBaseSetChannelRequest, D>
16919 for &WlanSoftmacBaseSetChannelRequest
16920 {
16921 unsafe fn encode(
16922 self,
16923 encoder: &mut fidl::encoding::Encoder<'_, D>,
16924 offset: usize,
16925 mut depth: fidl::encoding::Depth,
16926 ) -> fidl::Result<()> {
16927 encoder.debug_check_bounds::<WlanSoftmacBaseSetChannelRequest>(offset);
16928 let max_ordinal: u64 = self.max_ordinal_present();
16930 encoder.write_num(max_ordinal, offset);
16931 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16932 if max_ordinal == 0 {
16934 return Ok(());
16935 }
16936 depth.increment()?;
16937 let envelope_size = 8;
16938 let bytes_len = max_ordinal as usize * envelope_size;
16939 #[allow(unused_variables)]
16940 let offset = encoder.out_of_line_offset(bytes_len);
16941 let mut _prev_end_offset: usize = 0;
16942 if 1 > max_ordinal {
16943 return Ok(());
16944 }
16945
16946 let cur_offset: usize = (1 - 1) * envelope_size;
16949
16950 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16952
16953 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_common::WlanChannel, D>(
16958 self.channel.as_ref().map(<fidl_fuchsia_wlan_common::WlanChannel as fidl::encoding::ValueTypeMarker>::borrow),
16959 encoder, offset + cur_offset, depth
16960 )?;
16961
16962 _prev_end_offset = cur_offset + envelope_size;
16963
16964 Ok(())
16965 }
16966 }
16967
16968 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16969 for WlanSoftmacBaseSetChannelRequest
16970 {
16971 #[inline(always)]
16972 fn new_empty() -> Self {
16973 Self::default()
16974 }
16975
16976 unsafe fn decode(
16977 &mut self,
16978 decoder: &mut fidl::encoding::Decoder<'_, D>,
16979 offset: usize,
16980 mut depth: fidl::encoding::Depth,
16981 ) -> fidl::Result<()> {
16982 decoder.debug_check_bounds::<Self>(offset);
16983 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16984 None => return Err(fidl::Error::NotNullable),
16985 Some(len) => len,
16986 };
16987 if len == 0 {
16989 return Ok(());
16990 };
16991 depth.increment()?;
16992 let envelope_size = 8;
16993 let bytes_len = len * envelope_size;
16994 let offset = decoder.out_of_line_offset(bytes_len)?;
16995 let mut _next_ordinal_to_read = 0;
16997 let mut next_offset = offset;
16998 let end_offset = offset + bytes_len;
16999 _next_ordinal_to_read += 1;
17000 if next_offset >= end_offset {
17001 return Ok(());
17002 }
17003
17004 while _next_ordinal_to_read < 1 {
17006 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17007 _next_ordinal_to_read += 1;
17008 next_offset += envelope_size;
17009 }
17010
17011 let next_out_of_line = decoder.next_out_of_line();
17012 let handles_before = decoder.remaining_handles();
17013 if let Some((inlined, num_bytes, num_handles)) =
17014 fidl::encoding::decode_envelope_header(decoder, next_offset)?
17015 {
17016 let member_inline_size = <fidl_fuchsia_wlan_common::WlanChannel as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17017 if inlined != (member_inline_size <= 4) {
17018 return Err(fidl::Error::InvalidInlineBitInEnvelope);
17019 }
17020 let inner_offset;
17021 let mut inner_depth = depth.clone();
17022 if inlined {
17023 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17024 inner_offset = next_offset;
17025 } else {
17026 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17027 inner_depth.increment()?;
17028 }
17029 let val_ref = self.channel.get_or_insert_with(|| {
17030 fidl::new_empty!(fidl_fuchsia_wlan_common::WlanChannel, D)
17031 });
17032 fidl::decode!(
17033 fidl_fuchsia_wlan_common::WlanChannel,
17034 D,
17035 val_ref,
17036 decoder,
17037 inner_offset,
17038 inner_depth
17039 )?;
17040 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17041 {
17042 return Err(fidl::Error::InvalidNumBytesInEnvelope);
17043 }
17044 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17045 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17046 }
17047 }
17048
17049 next_offset += envelope_size;
17050
17051 while next_offset < end_offset {
17053 _next_ordinal_to_read += 1;
17054 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17055 next_offset += envelope_size;
17056 }
17057
17058 Ok(())
17059 }
17060 }
17061
17062 impl WlanSoftmacBaseStartPassiveScanRequest {
17063 #[inline(always)]
17064 fn max_ordinal_present(&self) -> u64 {
17065 if let Some(_) = self.min_home_time {
17066 return 4;
17067 }
17068 if let Some(_) = self.max_channel_time {
17069 return 3;
17070 }
17071 if let Some(_) = self.min_channel_time {
17072 return 2;
17073 }
17074 if let Some(_) = self.channels {
17075 return 1;
17076 }
17077 0
17078 }
17079 }
17080
17081 impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseStartPassiveScanRequest {
17082 type Borrowed<'a> = &'a Self;
17083 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17084 value
17085 }
17086 }
17087
17088 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseStartPassiveScanRequest {
17089 type Owned = Self;
17090
17091 #[inline(always)]
17092 fn inline_align(_context: fidl::encoding::Context) -> usize {
17093 8
17094 }
17095
17096 #[inline(always)]
17097 fn inline_size(_context: fidl::encoding::Context) -> usize {
17098 16
17099 }
17100 }
17101
17102 unsafe impl<D: fidl::encoding::ResourceDialect>
17103 fidl::encoding::Encode<WlanSoftmacBaseStartPassiveScanRequest, D>
17104 for &WlanSoftmacBaseStartPassiveScanRequest
17105 {
17106 unsafe fn encode(
17107 self,
17108 encoder: &mut fidl::encoding::Encoder<'_, D>,
17109 offset: usize,
17110 mut depth: fidl::encoding::Depth,
17111 ) -> fidl::Result<()> {
17112 encoder.debug_check_bounds::<WlanSoftmacBaseStartPassiveScanRequest>(offset);
17113 let max_ordinal: u64 = self.max_ordinal_present();
17115 encoder.write_num(max_ordinal, offset);
17116 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
17117 if max_ordinal == 0 {
17119 return Ok(());
17120 }
17121 depth.increment()?;
17122 let envelope_size = 8;
17123 let bytes_len = max_ordinal as usize * envelope_size;
17124 #[allow(unused_variables)]
17125 let offset = encoder.out_of_line_offset(bytes_len);
17126 let mut _prev_end_offset: usize = 0;
17127 if 1 > max_ordinal {
17128 return Ok(());
17129 }
17130
17131 let cur_offset: usize = (1 - 1) * envelope_size;
17134
17135 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17137
17138 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 256>, D>(
17143 self.channels.as_ref().map(
17144 <fidl::encoding::Vector<u8, 256> as fidl::encoding::ValueTypeMarker>::borrow,
17145 ),
17146 encoder,
17147 offset + cur_offset,
17148 depth,
17149 )?;
17150
17151 _prev_end_offset = cur_offset + envelope_size;
17152 if 2 > max_ordinal {
17153 return Ok(());
17154 }
17155
17156 let cur_offset: usize = (2 - 1) * envelope_size;
17159
17160 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17162
17163 fidl::encoding::encode_in_envelope_optional::<i64, D>(
17168 self.min_channel_time
17169 .as_ref()
17170 .map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
17171 encoder,
17172 offset + cur_offset,
17173 depth,
17174 )?;
17175
17176 _prev_end_offset = cur_offset + envelope_size;
17177 if 3 > max_ordinal {
17178 return Ok(());
17179 }
17180
17181 let cur_offset: usize = (3 - 1) * envelope_size;
17184
17185 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17187
17188 fidl::encoding::encode_in_envelope_optional::<i64, D>(
17193 self.max_channel_time
17194 .as_ref()
17195 .map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
17196 encoder,
17197 offset + cur_offset,
17198 depth,
17199 )?;
17200
17201 _prev_end_offset = cur_offset + envelope_size;
17202 if 4 > max_ordinal {
17203 return Ok(());
17204 }
17205
17206 let cur_offset: usize = (4 - 1) * envelope_size;
17209
17210 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17212
17213 fidl::encoding::encode_in_envelope_optional::<i64, D>(
17218 self.min_home_time.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
17219 encoder,
17220 offset + cur_offset,
17221 depth,
17222 )?;
17223
17224 _prev_end_offset = cur_offset + envelope_size;
17225
17226 Ok(())
17227 }
17228 }
17229
17230 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17231 for WlanSoftmacBaseStartPassiveScanRequest
17232 {
17233 #[inline(always)]
17234 fn new_empty() -> Self {
17235 Self::default()
17236 }
17237
17238 unsafe fn decode(
17239 &mut self,
17240 decoder: &mut fidl::encoding::Decoder<'_, D>,
17241 offset: usize,
17242 mut depth: fidl::encoding::Depth,
17243 ) -> fidl::Result<()> {
17244 decoder.debug_check_bounds::<Self>(offset);
17245 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
17246 None => return Err(fidl::Error::NotNullable),
17247 Some(len) => len,
17248 };
17249 if len == 0 {
17251 return Ok(());
17252 };
17253 depth.increment()?;
17254 let envelope_size = 8;
17255 let bytes_len = len * envelope_size;
17256 let offset = decoder.out_of_line_offset(bytes_len)?;
17257 let mut _next_ordinal_to_read = 0;
17259 let mut next_offset = offset;
17260 let end_offset = offset + bytes_len;
17261 _next_ordinal_to_read += 1;
17262 if next_offset >= end_offset {
17263 return Ok(());
17264 }
17265
17266 while _next_ordinal_to_read < 1 {
17268 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17269 _next_ordinal_to_read += 1;
17270 next_offset += envelope_size;
17271 }
17272
17273 let next_out_of_line = decoder.next_out_of_line();
17274 let handles_before = decoder.remaining_handles();
17275 if let Some((inlined, num_bytes, num_handles)) =
17276 fidl::encoding::decode_envelope_header(decoder, next_offset)?
17277 {
17278 let member_inline_size =
17279 <fidl::encoding::Vector<u8, 256> as fidl::encoding::TypeMarker>::inline_size(
17280 decoder.context,
17281 );
17282 if inlined != (member_inline_size <= 4) {
17283 return Err(fidl::Error::InvalidInlineBitInEnvelope);
17284 }
17285 let inner_offset;
17286 let mut inner_depth = depth.clone();
17287 if inlined {
17288 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17289 inner_offset = next_offset;
17290 } else {
17291 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17292 inner_depth.increment()?;
17293 }
17294 let val_ref = self
17295 .channels
17296 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 256>, D));
17297 fidl::decode!(fidl::encoding::Vector<u8, 256>, D, val_ref, decoder, inner_offset, inner_depth)?;
17298 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17299 {
17300 return Err(fidl::Error::InvalidNumBytesInEnvelope);
17301 }
17302 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17303 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17304 }
17305 }
17306
17307 next_offset += envelope_size;
17308 _next_ordinal_to_read += 1;
17309 if next_offset >= end_offset {
17310 return Ok(());
17311 }
17312
17313 while _next_ordinal_to_read < 2 {
17315 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17316 _next_ordinal_to_read += 1;
17317 next_offset += envelope_size;
17318 }
17319
17320 let next_out_of_line = decoder.next_out_of_line();
17321 let handles_before = decoder.remaining_handles();
17322 if let Some((inlined, num_bytes, num_handles)) =
17323 fidl::encoding::decode_envelope_header(decoder, next_offset)?
17324 {
17325 let member_inline_size =
17326 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17327 if inlined != (member_inline_size <= 4) {
17328 return Err(fidl::Error::InvalidInlineBitInEnvelope);
17329 }
17330 let inner_offset;
17331 let mut inner_depth = depth.clone();
17332 if inlined {
17333 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17334 inner_offset = next_offset;
17335 } else {
17336 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17337 inner_depth.increment()?;
17338 }
17339 let val_ref = self.min_channel_time.get_or_insert_with(|| fidl::new_empty!(i64, D));
17340 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
17341 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17342 {
17343 return Err(fidl::Error::InvalidNumBytesInEnvelope);
17344 }
17345 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17346 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17347 }
17348 }
17349
17350 next_offset += envelope_size;
17351 _next_ordinal_to_read += 1;
17352 if next_offset >= end_offset {
17353 return Ok(());
17354 }
17355
17356 while _next_ordinal_to_read < 3 {
17358 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17359 _next_ordinal_to_read += 1;
17360 next_offset += envelope_size;
17361 }
17362
17363 let next_out_of_line = decoder.next_out_of_line();
17364 let handles_before = decoder.remaining_handles();
17365 if let Some((inlined, num_bytes, num_handles)) =
17366 fidl::encoding::decode_envelope_header(decoder, next_offset)?
17367 {
17368 let member_inline_size =
17369 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17370 if inlined != (member_inline_size <= 4) {
17371 return Err(fidl::Error::InvalidInlineBitInEnvelope);
17372 }
17373 let inner_offset;
17374 let mut inner_depth = depth.clone();
17375 if inlined {
17376 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17377 inner_offset = next_offset;
17378 } else {
17379 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17380 inner_depth.increment()?;
17381 }
17382 let val_ref = self.max_channel_time.get_or_insert_with(|| fidl::new_empty!(i64, D));
17383 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
17384 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17385 {
17386 return Err(fidl::Error::InvalidNumBytesInEnvelope);
17387 }
17388 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17389 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17390 }
17391 }
17392
17393 next_offset += envelope_size;
17394 _next_ordinal_to_read += 1;
17395 if next_offset >= end_offset {
17396 return Ok(());
17397 }
17398
17399 while _next_ordinal_to_read < 4 {
17401 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17402 _next_ordinal_to_read += 1;
17403 next_offset += envelope_size;
17404 }
17405
17406 let next_out_of_line = decoder.next_out_of_line();
17407 let handles_before = decoder.remaining_handles();
17408 if let Some((inlined, num_bytes, num_handles)) =
17409 fidl::encoding::decode_envelope_header(decoder, next_offset)?
17410 {
17411 let member_inline_size =
17412 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17413 if inlined != (member_inline_size <= 4) {
17414 return Err(fidl::Error::InvalidInlineBitInEnvelope);
17415 }
17416 let inner_offset;
17417 let mut inner_depth = depth.clone();
17418 if inlined {
17419 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17420 inner_offset = next_offset;
17421 } else {
17422 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17423 inner_depth.increment()?;
17424 }
17425 let val_ref = self.min_home_time.get_or_insert_with(|| fidl::new_empty!(i64, D));
17426 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
17427 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17428 {
17429 return Err(fidl::Error::InvalidNumBytesInEnvelope);
17430 }
17431 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17432 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17433 }
17434 }
17435
17436 next_offset += envelope_size;
17437
17438 while next_offset < end_offset {
17440 _next_ordinal_to_read += 1;
17441 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17442 next_offset += envelope_size;
17443 }
17444
17445 Ok(())
17446 }
17447 }
17448
17449 impl WlanSoftmacBaseUpdateWmmParametersRequest {
17450 #[inline(always)]
17451 fn max_ordinal_present(&self) -> u64 {
17452 if let Some(_) = self.params {
17453 return 2;
17454 }
17455 if let Some(_) = self.ac {
17456 return 1;
17457 }
17458 0
17459 }
17460 }
17461
17462 impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseUpdateWmmParametersRequest {
17463 type Borrowed<'a> = &'a Self;
17464 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17465 value
17466 }
17467 }
17468
17469 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseUpdateWmmParametersRequest {
17470 type Owned = Self;
17471
17472 #[inline(always)]
17473 fn inline_align(_context: fidl::encoding::Context) -> usize {
17474 8
17475 }
17476
17477 #[inline(always)]
17478 fn inline_size(_context: fidl::encoding::Context) -> usize {
17479 16
17480 }
17481 }
17482
17483 unsafe impl<D: fidl::encoding::ResourceDialect>
17484 fidl::encoding::Encode<WlanSoftmacBaseUpdateWmmParametersRequest, D>
17485 for &WlanSoftmacBaseUpdateWmmParametersRequest
17486 {
17487 unsafe fn encode(
17488 self,
17489 encoder: &mut fidl::encoding::Encoder<'_, D>,
17490 offset: usize,
17491 mut depth: fidl::encoding::Depth,
17492 ) -> fidl::Result<()> {
17493 encoder.debug_check_bounds::<WlanSoftmacBaseUpdateWmmParametersRequest>(offset);
17494 let max_ordinal: u64 = self.max_ordinal_present();
17496 encoder.write_num(max_ordinal, offset);
17497 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
17498 if max_ordinal == 0 {
17500 return Ok(());
17501 }
17502 depth.increment()?;
17503 let envelope_size = 8;
17504 let bytes_len = max_ordinal as usize * envelope_size;
17505 #[allow(unused_variables)]
17506 let offset = encoder.out_of_line_offset(bytes_len);
17507 let mut _prev_end_offset: usize = 0;
17508 if 1 > max_ordinal {
17509 return Ok(());
17510 }
17511
17512 let cur_offset: usize = (1 - 1) * envelope_size;
17515
17516 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17518
17519 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_ieee80211::WlanAccessCategory, D>(
17524 self.ac.as_ref().map(<fidl_fuchsia_wlan_ieee80211::WlanAccessCategory as fidl::encoding::ValueTypeMarker>::borrow),
17525 encoder, offset + cur_offset, depth
17526 )?;
17527
17528 _prev_end_offset = cur_offset + envelope_size;
17529 if 2 > max_ordinal {
17530 return Ok(());
17531 }
17532
17533 let cur_offset: usize = (2 - 1) * envelope_size;
17536
17537 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17539
17540 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_common::WlanWmmParameters, D>(
17545 self.params.as_ref().map(<fidl_fuchsia_wlan_common::WlanWmmParameters as fidl::encoding::ValueTypeMarker>::borrow),
17546 encoder, offset + cur_offset, depth
17547 )?;
17548
17549 _prev_end_offset = cur_offset + envelope_size;
17550
17551 Ok(())
17552 }
17553 }
17554
17555 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17556 for WlanSoftmacBaseUpdateWmmParametersRequest
17557 {
17558 #[inline(always)]
17559 fn new_empty() -> Self {
17560 Self::default()
17561 }
17562
17563 unsafe fn decode(
17564 &mut self,
17565 decoder: &mut fidl::encoding::Decoder<'_, D>,
17566 offset: usize,
17567 mut depth: fidl::encoding::Depth,
17568 ) -> fidl::Result<()> {
17569 decoder.debug_check_bounds::<Self>(offset);
17570 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
17571 None => return Err(fidl::Error::NotNullable),
17572 Some(len) => len,
17573 };
17574 if len == 0 {
17576 return Ok(());
17577 };
17578 depth.increment()?;
17579 let envelope_size = 8;
17580 let bytes_len = len * envelope_size;
17581 let offset = decoder.out_of_line_offset(bytes_len)?;
17582 let mut _next_ordinal_to_read = 0;
17584 let mut next_offset = offset;
17585 let end_offset = offset + bytes_len;
17586 _next_ordinal_to_read += 1;
17587 if next_offset >= end_offset {
17588 return Ok(());
17589 }
17590
17591 while _next_ordinal_to_read < 1 {
17593 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17594 _next_ordinal_to_read += 1;
17595 next_offset += envelope_size;
17596 }
17597
17598 let next_out_of_line = decoder.next_out_of_line();
17599 let handles_before = decoder.remaining_handles();
17600 if let Some((inlined, num_bytes, num_handles)) =
17601 fidl::encoding::decode_envelope_header(decoder, next_offset)?
17602 {
17603 let member_inline_size = <fidl_fuchsia_wlan_ieee80211::WlanAccessCategory as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17604 if inlined != (member_inline_size <= 4) {
17605 return Err(fidl::Error::InvalidInlineBitInEnvelope);
17606 }
17607 let inner_offset;
17608 let mut inner_depth = depth.clone();
17609 if inlined {
17610 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17611 inner_offset = next_offset;
17612 } else {
17613 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17614 inner_depth.increment()?;
17615 }
17616 let val_ref = self.ac.get_or_insert_with(|| {
17617 fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::WlanAccessCategory, D)
17618 });
17619 fidl::decode!(
17620 fidl_fuchsia_wlan_ieee80211::WlanAccessCategory,
17621 D,
17622 val_ref,
17623 decoder,
17624 inner_offset,
17625 inner_depth
17626 )?;
17627 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17628 {
17629 return Err(fidl::Error::InvalidNumBytesInEnvelope);
17630 }
17631 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17632 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17633 }
17634 }
17635
17636 next_offset += envelope_size;
17637 _next_ordinal_to_read += 1;
17638 if next_offset >= end_offset {
17639 return Ok(());
17640 }
17641
17642 while _next_ordinal_to_read < 2 {
17644 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17645 _next_ordinal_to_read += 1;
17646 next_offset += envelope_size;
17647 }
17648
17649 let next_out_of_line = decoder.next_out_of_line();
17650 let handles_before = decoder.remaining_handles();
17651 if let Some((inlined, num_bytes, num_handles)) =
17652 fidl::encoding::decode_envelope_header(decoder, next_offset)?
17653 {
17654 let member_inline_size = <fidl_fuchsia_wlan_common::WlanWmmParameters as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17655 if inlined != (member_inline_size <= 4) {
17656 return Err(fidl::Error::InvalidInlineBitInEnvelope);
17657 }
17658 let inner_offset;
17659 let mut inner_depth = depth.clone();
17660 if inlined {
17661 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17662 inner_offset = next_offset;
17663 } else {
17664 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17665 inner_depth.increment()?;
17666 }
17667 let val_ref = self.params.get_or_insert_with(|| {
17668 fidl::new_empty!(fidl_fuchsia_wlan_common::WlanWmmParameters, D)
17669 });
17670 fidl::decode!(
17671 fidl_fuchsia_wlan_common::WlanWmmParameters,
17672 D,
17673 val_ref,
17674 decoder,
17675 inner_offset,
17676 inner_depth
17677 )?;
17678 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17679 {
17680 return Err(fidl::Error::InvalidNumBytesInEnvelope);
17681 }
17682 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17683 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17684 }
17685 }
17686
17687 next_offset += envelope_size;
17688
17689 while next_offset < end_offset {
17691 _next_ordinal_to_read += 1;
17692 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17693 next_offset += envelope_size;
17694 }
17695
17696 Ok(())
17697 }
17698 }
17699
17700 impl WlanSoftmacBaseStartActiveScanResponse {
17701 #[inline(always)]
17702 fn max_ordinal_present(&self) -> u64 {
17703 if let Some(_) = self.scan_id {
17704 return 1;
17705 }
17706 0
17707 }
17708 }
17709
17710 impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseStartActiveScanResponse {
17711 type Borrowed<'a> = &'a Self;
17712 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17713 value
17714 }
17715 }
17716
17717 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseStartActiveScanResponse {
17718 type Owned = Self;
17719
17720 #[inline(always)]
17721 fn inline_align(_context: fidl::encoding::Context) -> usize {
17722 8
17723 }
17724
17725 #[inline(always)]
17726 fn inline_size(_context: fidl::encoding::Context) -> usize {
17727 16
17728 }
17729 }
17730
17731 unsafe impl<D: fidl::encoding::ResourceDialect>
17732 fidl::encoding::Encode<WlanSoftmacBaseStartActiveScanResponse, D>
17733 for &WlanSoftmacBaseStartActiveScanResponse
17734 {
17735 unsafe fn encode(
17736 self,
17737 encoder: &mut fidl::encoding::Encoder<'_, D>,
17738 offset: usize,
17739 mut depth: fidl::encoding::Depth,
17740 ) -> fidl::Result<()> {
17741 encoder.debug_check_bounds::<WlanSoftmacBaseStartActiveScanResponse>(offset);
17742 let max_ordinal: u64 = self.max_ordinal_present();
17744 encoder.write_num(max_ordinal, offset);
17745 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
17746 if max_ordinal == 0 {
17748 return Ok(());
17749 }
17750 depth.increment()?;
17751 let envelope_size = 8;
17752 let bytes_len = max_ordinal as usize * envelope_size;
17753 #[allow(unused_variables)]
17754 let offset = encoder.out_of_line_offset(bytes_len);
17755 let mut _prev_end_offset: usize = 0;
17756 if 1 > max_ordinal {
17757 return Ok(());
17758 }
17759
17760 let cur_offset: usize = (1 - 1) * envelope_size;
17763
17764 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17766
17767 fidl::encoding::encode_in_envelope_optional::<u64, D>(
17772 self.scan_id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
17773 encoder,
17774 offset + cur_offset,
17775 depth,
17776 )?;
17777
17778 _prev_end_offset = cur_offset + envelope_size;
17779
17780 Ok(())
17781 }
17782 }
17783
17784 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17785 for WlanSoftmacBaseStartActiveScanResponse
17786 {
17787 #[inline(always)]
17788 fn new_empty() -> Self {
17789 Self::default()
17790 }
17791
17792 unsafe fn decode(
17793 &mut self,
17794 decoder: &mut fidl::encoding::Decoder<'_, D>,
17795 offset: usize,
17796 mut depth: fidl::encoding::Depth,
17797 ) -> fidl::Result<()> {
17798 decoder.debug_check_bounds::<Self>(offset);
17799 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
17800 None => return Err(fidl::Error::NotNullable),
17801 Some(len) => len,
17802 };
17803 if len == 0 {
17805 return Ok(());
17806 };
17807 depth.increment()?;
17808 let envelope_size = 8;
17809 let bytes_len = len * envelope_size;
17810 let offset = decoder.out_of_line_offset(bytes_len)?;
17811 let mut _next_ordinal_to_read = 0;
17813 let mut next_offset = offset;
17814 let end_offset = offset + bytes_len;
17815 _next_ordinal_to_read += 1;
17816 if next_offset >= end_offset {
17817 return Ok(());
17818 }
17819
17820 while _next_ordinal_to_read < 1 {
17822 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17823 _next_ordinal_to_read += 1;
17824 next_offset += envelope_size;
17825 }
17826
17827 let next_out_of_line = decoder.next_out_of_line();
17828 let handles_before = decoder.remaining_handles();
17829 if let Some((inlined, num_bytes, num_handles)) =
17830 fidl::encoding::decode_envelope_header(decoder, next_offset)?
17831 {
17832 let member_inline_size =
17833 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
17834 if inlined != (member_inline_size <= 4) {
17835 return Err(fidl::Error::InvalidInlineBitInEnvelope);
17836 }
17837 let inner_offset;
17838 let mut inner_depth = depth.clone();
17839 if inlined {
17840 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
17841 inner_offset = next_offset;
17842 } else {
17843 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17844 inner_depth.increment()?;
17845 }
17846 let val_ref = self.scan_id.get_or_insert_with(|| fidl::new_empty!(u64, D));
17847 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
17848 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
17849 {
17850 return Err(fidl::Error::InvalidNumBytesInEnvelope);
17851 }
17852 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17853 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17854 }
17855 }
17856
17857 next_offset += envelope_size;
17858
17859 while next_offset < end_offset {
17861 _next_ordinal_to_read += 1;
17862 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17863 next_offset += envelope_size;
17864 }
17865
17866 Ok(())
17867 }
17868 }
17869
17870 impl WlanSoftmacBaseStartPassiveScanResponse {
17871 #[inline(always)]
17872 fn max_ordinal_present(&self) -> u64 {
17873 if let Some(_) = self.scan_id {
17874 return 1;
17875 }
17876 0
17877 }
17878 }
17879
17880 impl fidl::encoding::ValueTypeMarker for WlanSoftmacBaseStartPassiveScanResponse {
17881 type Borrowed<'a> = &'a Self;
17882 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17883 value
17884 }
17885 }
17886
17887 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBaseStartPassiveScanResponse {
17888 type Owned = Self;
17889
17890 #[inline(always)]
17891 fn inline_align(_context: fidl::encoding::Context) -> usize {
17892 8
17893 }
17894
17895 #[inline(always)]
17896 fn inline_size(_context: fidl::encoding::Context) -> usize {
17897 16
17898 }
17899 }
17900
17901 unsafe impl<D: fidl::encoding::ResourceDialect>
17902 fidl::encoding::Encode<WlanSoftmacBaseStartPassiveScanResponse, D>
17903 for &WlanSoftmacBaseStartPassiveScanResponse
17904 {
17905 unsafe fn encode(
17906 self,
17907 encoder: &mut fidl::encoding::Encoder<'_, D>,
17908 offset: usize,
17909 mut depth: fidl::encoding::Depth,
17910 ) -> fidl::Result<()> {
17911 encoder.debug_check_bounds::<WlanSoftmacBaseStartPassiveScanResponse>(offset);
17912 let max_ordinal: u64 = self.max_ordinal_present();
17914 encoder.write_num(max_ordinal, offset);
17915 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
17916 if max_ordinal == 0 {
17918 return Ok(());
17919 }
17920 depth.increment()?;
17921 let envelope_size = 8;
17922 let bytes_len = max_ordinal as usize * envelope_size;
17923 #[allow(unused_variables)]
17924 let offset = encoder.out_of_line_offset(bytes_len);
17925 let mut _prev_end_offset: usize = 0;
17926 if 1 > max_ordinal {
17927 return Ok(());
17928 }
17929
17930 let cur_offset: usize = (1 - 1) * envelope_size;
17933
17934 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
17936
17937 fidl::encoding::encode_in_envelope_optional::<u64, D>(
17942 self.scan_id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
17943 encoder,
17944 offset + cur_offset,
17945 depth,
17946 )?;
17947
17948 _prev_end_offset = cur_offset + envelope_size;
17949
17950 Ok(())
17951 }
17952 }
17953
17954 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17955 for WlanSoftmacBaseStartPassiveScanResponse
17956 {
17957 #[inline(always)]
17958 fn new_empty() -> Self {
17959 Self::default()
17960 }
17961
17962 unsafe fn decode(
17963 &mut self,
17964 decoder: &mut fidl::encoding::Decoder<'_, D>,
17965 offset: usize,
17966 mut depth: fidl::encoding::Depth,
17967 ) -> fidl::Result<()> {
17968 decoder.debug_check_bounds::<Self>(offset);
17969 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
17970 None => return Err(fidl::Error::NotNullable),
17971 Some(len) => len,
17972 };
17973 if len == 0 {
17975 return Ok(());
17976 };
17977 depth.increment()?;
17978 let envelope_size = 8;
17979 let bytes_len = len * envelope_size;
17980 let offset = decoder.out_of_line_offset(bytes_len)?;
17981 let mut _next_ordinal_to_read = 0;
17983 let mut next_offset = offset;
17984 let end_offset = offset + bytes_len;
17985 _next_ordinal_to_read += 1;
17986 if next_offset >= end_offset {
17987 return Ok(());
17988 }
17989
17990 while _next_ordinal_to_read < 1 {
17992 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
17993 _next_ordinal_to_read += 1;
17994 next_offset += envelope_size;
17995 }
17996
17997 let next_out_of_line = decoder.next_out_of_line();
17998 let handles_before = decoder.remaining_handles();
17999 if let Some((inlined, num_bytes, num_handles)) =
18000 fidl::encoding::decode_envelope_header(decoder, next_offset)?
18001 {
18002 let member_inline_size =
18003 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18004 if inlined != (member_inline_size <= 4) {
18005 return Err(fidl::Error::InvalidInlineBitInEnvelope);
18006 }
18007 let inner_offset;
18008 let mut inner_depth = depth.clone();
18009 if inlined {
18010 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18011 inner_offset = next_offset;
18012 } else {
18013 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18014 inner_depth.increment()?;
18015 }
18016 let val_ref = self.scan_id.get_or_insert_with(|| fidl::new_empty!(u64, D));
18017 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
18018 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18019 {
18020 return Err(fidl::Error::InvalidNumBytesInEnvelope);
18021 }
18022 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18023 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18024 }
18025 }
18026
18027 next_offset += envelope_size;
18028
18029 while next_offset < end_offset {
18031 _next_ordinal_to_read += 1;
18032 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18033 next_offset += envelope_size;
18034 }
18035
18036 Ok(())
18037 }
18038 }
18039
18040 impl WlanSoftmacIfcBaseNotifyScanCompleteRequest {
18041 #[inline(always)]
18042 fn max_ordinal_present(&self) -> u64 {
18043 if let Some(_) = self.scan_id {
18044 return 2;
18045 }
18046 if let Some(_) = self.status {
18047 return 1;
18048 }
18049 0
18050 }
18051 }
18052
18053 impl fidl::encoding::ValueTypeMarker for WlanSoftmacIfcBaseNotifyScanCompleteRequest {
18054 type Borrowed<'a> = &'a Self;
18055 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18056 value
18057 }
18058 }
18059
18060 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacIfcBaseNotifyScanCompleteRequest {
18061 type Owned = Self;
18062
18063 #[inline(always)]
18064 fn inline_align(_context: fidl::encoding::Context) -> usize {
18065 8
18066 }
18067
18068 #[inline(always)]
18069 fn inline_size(_context: fidl::encoding::Context) -> usize {
18070 16
18071 }
18072 }
18073
18074 unsafe impl<D: fidl::encoding::ResourceDialect>
18075 fidl::encoding::Encode<WlanSoftmacIfcBaseNotifyScanCompleteRequest, D>
18076 for &WlanSoftmacIfcBaseNotifyScanCompleteRequest
18077 {
18078 unsafe fn encode(
18079 self,
18080 encoder: &mut fidl::encoding::Encoder<'_, D>,
18081 offset: usize,
18082 mut depth: fidl::encoding::Depth,
18083 ) -> fidl::Result<()> {
18084 encoder.debug_check_bounds::<WlanSoftmacIfcBaseNotifyScanCompleteRequest>(offset);
18085 let max_ordinal: u64 = self.max_ordinal_present();
18087 encoder.write_num(max_ordinal, offset);
18088 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
18089 if max_ordinal == 0 {
18091 return Ok(());
18092 }
18093 depth.increment()?;
18094 let envelope_size = 8;
18095 let bytes_len = max_ordinal as usize * envelope_size;
18096 #[allow(unused_variables)]
18097 let offset = encoder.out_of_line_offset(bytes_len);
18098 let mut _prev_end_offset: usize = 0;
18099 if 1 > max_ordinal {
18100 return Ok(());
18101 }
18102
18103 let cur_offset: usize = (1 - 1) * envelope_size;
18106
18107 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18109
18110 fidl::encoding::encode_in_envelope_optional::<i32, D>(
18115 self.status.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
18116 encoder,
18117 offset + cur_offset,
18118 depth,
18119 )?;
18120
18121 _prev_end_offset = cur_offset + envelope_size;
18122 if 2 > max_ordinal {
18123 return Ok(());
18124 }
18125
18126 let cur_offset: usize = (2 - 1) * envelope_size;
18129
18130 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18132
18133 fidl::encoding::encode_in_envelope_optional::<u64, D>(
18138 self.scan_id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
18139 encoder,
18140 offset + cur_offset,
18141 depth,
18142 )?;
18143
18144 _prev_end_offset = cur_offset + envelope_size;
18145
18146 Ok(())
18147 }
18148 }
18149
18150 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18151 for WlanSoftmacIfcBaseNotifyScanCompleteRequest
18152 {
18153 #[inline(always)]
18154 fn new_empty() -> Self {
18155 Self::default()
18156 }
18157
18158 unsafe fn decode(
18159 &mut self,
18160 decoder: &mut fidl::encoding::Decoder<'_, D>,
18161 offset: usize,
18162 mut depth: fidl::encoding::Depth,
18163 ) -> fidl::Result<()> {
18164 decoder.debug_check_bounds::<Self>(offset);
18165 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
18166 None => return Err(fidl::Error::NotNullable),
18167 Some(len) => len,
18168 };
18169 if len == 0 {
18171 return Ok(());
18172 };
18173 depth.increment()?;
18174 let envelope_size = 8;
18175 let bytes_len = len * envelope_size;
18176 let offset = decoder.out_of_line_offset(bytes_len)?;
18177 let mut _next_ordinal_to_read = 0;
18179 let mut next_offset = offset;
18180 let end_offset = offset + bytes_len;
18181 _next_ordinal_to_read += 1;
18182 if next_offset >= end_offset {
18183 return Ok(());
18184 }
18185
18186 while _next_ordinal_to_read < 1 {
18188 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18189 _next_ordinal_to_read += 1;
18190 next_offset += envelope_size;
18191 }
18192
18193 let next_out_of_line = decoder.next_out_of_line();
18194 let handles_before = decoder.remaining_handles();
18195 if let Some((inlined, num_bytes, num_handles)) =
18196 fidl::encoding::decode_envelope_header(decoder, next_offset)?
18197 {
18198 let member_inline_size =
18199 <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18200 if inlined != (member_inline_size <= 4) {
18201 return Err(fidl::Error::InvalidInlineBitInEnvelope);
18202 }
18203 let inner_offset;
18204 let mut inner_depth = depth.clone();
18205 if inlined {
18206 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18207 inner_offset = next_offset;
18208 } else {
18209 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18210 inner_depth.increment()?;
18211 }
18212 let val_ref = self.status.get_or_insert_with(|| fidl::new_empty!(i32, D));
18213 fidl::decode!(i32, D, val_ref, decoder, inner_offset, inner_depth)?;
18214 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18215 {
18216 return Err(fidl::Error::InvalidNumBytesInEnvelope);
18217 }
18218 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18219 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18220 }
18221 }
18222
18223 next_offset += envelope_size;
18224 _next_ordinal_to_read += 1;
18225 if next_offset >= end_offset {
18226 return Ok(());
18227 }
18228
18229 while _next_ordinal_to_read < 2 {
18231 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18232 _next_ordinal_to_read += 1;
18233 next_offset += envelope_size;
18234 }
18235
18236 let next_out_of_line = decoder.next_out_of_line();
18237 let handles_before = decoder.remaining_handles();
18238 if let Some((inlined, num_bytes, num_handles)) =
18239 fidl::encoding::decode_envelope_header(decoder, next_offset)?
18240 {
18241 let member_inline_size =
18242 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18243 if inlined != (member_inline_size <= 4) {
18244 return Err(fidl::Error::InvalidInlineBitInEnvelope);
18245 }
18246 let inner_offset;
18247 let mut inner_depth = depth.clone();
18248 if inlined {
18249 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18250 inner_offset = next_offset;
18251 } else {
18252 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18253 inner_depth.increment()?;
18254 }
18255 let val_ref = self.scan_id.get_or_insert_with(|| fidl::new_empty!(u64, D));
18256 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
18257 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18258 {
18259 return Err(fidl::Error::InvalidNumBytesInEnvelope);
18260 }
18261 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18262 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18263 }
18264 }
18265
18266 next_offset += envelope_size;
18267
18268 while next_offset < end_offset {
18270 _next_ordinal_to_read += 1;
18271 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18272 next_offset += envelope_size;
18273 }
18274
18275 Ok(())
18276 }
18277 }
18278
18279 impl WlanSoftmacQueryResponse {
18280 #[inline(always)]
18281 fn max_ordinal_present(&self) -> u64 {
18282 if let Some(_) = self.band_caps {
18283 return 5;
18284 }
18285 if let Some(_) = self.hardware_capability {
18286 return 4;
18287 }
18288 if let Some(_) = self.supported_phys {
18289 return 3;
18290 }
18291 if let Some(_) = self.mac_role {
18292 return 2;
18293 }
18294 if let Some(_) = self.sta_addr {
18295 return 1;
18296 }
18297 0
18298 }
18299 }
18300
18301 impl fidl::encoding::ValueTypeMarker for WlanSoftmacQueryResponse {
18302 type Borrowed<'a> = &'a Self;
18303 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18304 value
18305 }
18306 }
18307
18308 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacQueryResponse {
18309 type Owned = Self;
18310
18311 #[inline(always)]
18312 fn inline_align(_context: fidl::encoding::Context) -> usize {
18313 8
18314 }
18315
18316 #[inline(always)]
18317 fn inline_size(_context: fidl::encoding::Context) -> usize {
18318 16
18319 }
18320 }
18321
18322 unsafe impl<D: fidl::encoding::ResourceDialect>
18323 fidl::encoding::Encode<WlanSoftmacQueryResponse, D> for &WlanSoftmacQueryResponse
18324 {
18325 unsafe fn encode(
18326 self,
18327 encoder: &mut fidl::encoding::Encoder<'_, D>,
18328 offset: usize,
18329 mut depth: fidl::encoding::Depth,
18330 ) -> fidl::Result<()> {
18331 encoder.debug_check_bounds::<WlanSoftmacQueryResponse>(offset);
18332 let max_ordinal: u64 = self.max_ordinal_present();
18334 encoder.write_num(max_ordinal, offset);
18335 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
18336 if max_ordinal == 0 {
18338 return Ok(());
18339 }
18340 depth.increment()?;
18341 let envelope_size = 8;
18342 let bytes_len = max_ordinal as usize * envelope_size;
18343 #[allow(unused_variables)]
18344 let offset = encoder.out_of_line_offset(bytes_len);
18345 let mut _prev_end_offset: usize = 0;
18346 if 1 > max_ordinal {
18347 return Ok(());
18348 }
18349
18350 let cur_offset: usize = (1 - 1) * envelope_size;
18353
18354 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18356
18357 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
18362 self.sta_addr
18363 .as_ref()
18364 .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
18365 encoder,
18366 offset + cur_offset,
18367 depth,
18368 )?;
18369
18370 _prev_end_offset = cur_offset + envelope_size;
18371 if 2 > max_ordinal {
18372 return Ok(());
18373 }
18374
18375 let cur_offset: usize = (2 - 1) * envelope_size;
18378
18379 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18381
18382 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_common::WlanMacRole, D>(
18387 self.mac_role.as_ref().map(<fidl_fuchsia_wlan_common::WlanMacRole as fidl::encoding::ValueTypeMarker>::borrow),
18388 encoder, offset + cur_offset, depth
18389 )?;
18390
18391 _prev_end_offset = cur_offset + envelope_size;
18392 if 3 > max_ordinal {
18393 return Ok(());
18394 }
18395
18396 let cur_offset: usize = (3 - 1) * envelope_size;
18399
18400 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18402
18403 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<fidl_fuchsia_wlan_common::WlanPhyType, 64>, D>(
18408 self.supported_phys.as_ref().map(<fidl::encoding::Vector<fidl_fuchsia_wlan_common::WlanPhyType, 64> as fidl::encoding::ValueTypeMarker>::borrow),
18409 encoder, offset + cur_offset, depth
18410 )?;
18411
18412 _prev_end_offset = cur_offset + envelope_size;
18413 if 4 > max_ordinal {
18414 return Ok(());
18415 }
18416
18417 let cur_offset: usize = (4 - 1) * envelope_size;
18420
18421 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18423
18424 fidl::encoding::encode_in_envelope_optional::<u32, D>(
18429 self.hardware_capability
18430 .as_ref()
18431 .map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
18432 encoder,
18433 offset + cur_offset,
18434 depth,
18435 )?;
18436
18437 _prev_end_offset = cur_offset + envelope_size;
18438 if 5 > max_ordinal {
18439 return Ok(());
18440 }
18441
18442 let cur_offset: usize = (5 - 1) * envelope_size;
18445
18446 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18448
18449 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<WlanSoftmacBandCapability, 16>, D>(
18454 self.band_caps.as_ref().map(<fidl::encoding::Vector<WlanSoftmacBandCapability, 16> as fidl::encoding::ValueTypeMarker>::borrow),
18455 encoder, offset + cur_offset, depth
18456 )?;
18457
18458 _prev_end_offset = cur_offset + envelope_size;
18459
18460 Ok(())
18461 }
18462 }
18463
18464 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18465 for WlanSoftmacQueryResponse
18466 {
18467 #[inline(always)]
18468 fn new_empty() -> Self {
18469 Self::default()
18470 }
18471
18472 unsafe fn decode(
18473 &mut self,
18474 decoder: &mut fidl::encoding::Decoder<'_, D>,
18475 offset: usize,
18476 mut depth: fidl::encoding::Depth,
18477 ) -> fidl::Result<()> {
18478 decoder.debug_check_bounds::<Self>(offset);
18479 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
18480 None => return Err(fidl::Error::NotNullable),
18481 Some(len) => len,
18482 };
18483 if len == 0 {
18485 return Ok(());
18486 };
18487 depth.increment()?;
18488 let envelope_size = 8;
18489 let bytes_len = len * envelope_size;
18490 let offset = decoder.out_of_line_offset(bytes_len)?;
18491 let mut _next_ordinal_to_read = 0;
18493 let mut next_offset = offset;
18494 let end_offset = offset + bytes_len;
18495 _next_ordinal_to_read += 1;
18496 if next_offset >= end_offset {
18497 return Ok(());
18498 }
18499
18500 while _next_ordinal_to_read < 1 {
18502 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18503 _next_ordinal_to_read += 1;
18504 next_offset += envelope_size;
18505 }
18506
18507 let next_out_of_line = decoder.next_out_of_line();
18508 let handles_before = decoder.remaining_handles();
18509 if let Some((inlined, num_bytes, num_handles)) =
18510 fidl::encoding::decode_envelope_header(decoder, next_offset)?
18511 {
18512 let member_inline_size =
18513 <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
18514 decoder.context,
18515 );
18516 if inlined != (member_inline_size <= 4) {
18517 return Err(fidl::Error::InvalidInlineBitInEnvelope);
18518 }
18519 let inner_offset;
18520 let mut inner_depth = depth.clone();
18521 if inlined {
18522 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18523 inner_offset = next_offset;
18524 } else {
18525 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18526 inner_depth.increment()?;
18527 }
18528 let val_ref = self
18529 .sta_addr
18530 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
18531 fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
18532 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18533 {
18534 return Err(fidl::Error::InvalidNumBytesInEnvelope);
18535 }
18536 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18537 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18538 }
18539 }
18540
18541 next_offset += envelope_size;
18542 _next_ordinal_to_read += 1;
18543 if next_offset >= end_offset {
18544 return Ok(());
18545 }
18546
18547 while _next_ordinal_to_read < 2 {
18549 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18550 _next_ordinal_to_read += 1;
18551 next_offset += envelope_size;
18552 }
18553
18554 let next_out_of_line = decoder.next_out_of_line();
18555 let handles_before = decoder.remaining_handles();
18556 if let Some((inlined, num_bytes, num_handles)) =
18557 fidl::encoding::decode_envelope_header(decoder, next_offset)?
18558 {
18559 let member_inline_size = <fidl_fuchsia_wlan_common::WlanMacRole as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18560 if inlined != (member_inline_size <= 4) {
18561 return Err(fidl::Error::InvalidInlineBitInEnvelope);
18562 }
18563 let inner_offset;
18564 let mut inner_depth = depth.clone();
18565 if inlined {
18566 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18567 inner_offset = next_offset;
18568 } else {
18569 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18570 inner_depth.increment()?;
18571 }
18572 let val_ref = self.mac_role.get_or_insert_with(|| {
18573 fidl::new_empty!(fidl_fuchsia_wlan_common::WlanMacRole, D)
18574 });
18575 fidl::decode!(
18576 fidl_fuchsia_wlan_common::WlanMacRole,
18577 D,
18578 val_ref,
18579 decoder,
18580 inner_offset,
18581 inner_depth
18582 )?;
18583 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18584 {
18585 return Err(fidl::Error::InvalidNumBytesInEnvelope);
18586 }
18587 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18588 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18589 }
18590 }
18591
18592 next_offset += envelope_size;
18593 _next_ordinal_to_read += 1;
18594 if next_offset >= end_offset {
18595 return Ok(());
18596 }
18597
18598 while _next_ordinal_to_read < 3 {
18600 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18601 _next_ordinal_to_read += 1;
18602 next_offset += envelope_size;
18603 }
18604
18605 let next_out_of_line = decoder.next_out_of_line();
18606 let handles_before = decoder.remaining_handles();
18607 if let Some((inlined, num_bytes, num_handles)) =
18608 fidl::encoding::decode_envelope_header(decoder, next_offset)?
18609 {
18610 let member_inline_size = <fidl::encoding::Vector<
18611 fidl_fuchsia_wlan_common::WlanPhyType,
18612 64,
18613 > as fidl::encoding::TypeMarker>::inline_size(
18614 decoder.context
18615 );
18616 if inlined != (member_inline_size <= 4) {
18617 return Err(fidl::Error::InvalidInlineBitInEnvelope);
18618 }
18619 let inner_offset;
18620 let mut inner_depth = depth.clone();
18621 if inlined {
18622 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18623 inner_offset = next_offset;
18624 } else {
18625 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18626 inner_depth.increment()?;
18627 }
18628 let val_ref =
18629 self.supported_phys.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_wlan_common::WlanPhyType, 64>, D));
18630 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_wlan_common::WlanPhyType, 64>, D, val_ref, decoder, inner_offset, inner_depth)?;
18631 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18632 {
18633 return Err(fidl::Error::InvalidNumBytesInEnvelope);
18634 }
18635 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18636 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18637 }
18638 }
18639
18640 next_offset += envelope_size;
18641 _next_ordinal_to_read += 1;
18642 if next_offset >= end_offset {
18643 return Ok(());
18644 }
18645
18646 while _next_ordinal_to_read < 4 {
18648 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18649 _next_ordinal_to_read += 1;
18650 next_offset += envelope_size;
18651 }
18652
18653 let next_out_of_line = decoder.next_out_of_line();
18654 let handles_before = decoder.remaining_handles();
18655 if let Some((inlined, num_bytes, num_handles)) =
18656 fidl::encoding::decode_envelope_header(decoder, next_offset)?
18657 {
18658 let member_inline_size =
18659 <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18660 if inlined != (member_inline_size <= 4) {
18661 return Err(fidl::Error::InvalidInlineBitInEnvelope);
18662 }
18663 let inner_offset;
18664 let mut inner_depth = depth.clone();
18665 if inlined {
18666 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18667 inner_offset = next_offset;
18668 } else {
18669 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18670 inner_depth.increment()?;
18671 }
18672 let val_ref =
18673 self.hardware_capability.get_or_insert_with(|| fidl::new_empty!(u32, D));
18674 fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
18675 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18676 {
18677 return Err(fidl::Error::InvalidNumBytesInEnvelope);
18678 }
18679 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18680 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18681 }
18682 }
18683
18684 next_offset += envelope_size;
18685 _next_ordinal_to_read += 1;
18686 if next_offset >= end_offset {
18687 return Ok(());
18688 }
18689
18690 while _next_ordinal_to_read < 5 {
18692 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18693 _next_ordinal_to_read += 1;
18694 next_offset += envelope_size;
18695 }
18696
18697 let next_out_of_line = decoder.next_out_of_line();
18698 let handles_before = decoder.remaining_handles();
18699 if let Some((inlined, num_bytes, num_handles)) =
18700 fidl::encoding::decode_envelope_header(decoder, next_offset)?
18701 {
18702 let member_inline_size = <fidl::encoding::Vector<WlanSoftmacBandCapability, 16> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
18703 if inlined != (member_inline_size <= 4) {
18704 return Err(fidl::Error::InvalidInlineBitInEnvelope);
18705 }
18706 let inner_offset;
18707 let mut inner_depth = depth.clone();
18708 if inlined {
18709 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
18710 inner_offset = next_offset;
18711 } else {
18712 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18713 inner_depth.increment()?;
18714 }
18715 let val_ref = self.band_caps.get_or_insert_with(
18716 || fidl::new_empty!(fidl::encoding::Vector<WlanSoftmacBandCapability, 16>, D),
18717 );
18718 fidl::decode!(fidl::encoding::Vector<WlanSoftmacBandCapability, 16>, D, val_ref, decoder, inner_offset, inner_depth)?;
18719 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
18720 {
18721 return Err(fidl::Error::InvalidNumBytesInEnvelope);
18722 }
18723 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18724 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18725 }
18726 }
18727
18728 next_offset += envelope_size;
18729
18730 while next_offset < end_offset {
18732 _next_ordinal_to_read += 1;
18733 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
18734 next_offset += envelope_size;
18735 }
18736
18737 Ok(())
18738 }
18739 }
18740
18741 impl WlanSoftmacStartActiveScanRequest {
18742 #[inline(always)]
18743 fn max_ordinal_present(&self) -> u64 {
18744 if let Some(_) = self.max_probes_per_channel {
18745 return 9;
18746 }
18747 if let Some(_) = self.min_probes_per_channel {
18748 return 8;
18749 }
18750 if let Some(_) = self.min_home_time {
18751 return 7;
18752 }
18753 if let Some(_) = self.max_channel_time {
18754 return 6;
18755 }
18756 if let Some(_) = self.min_channel_time {
18757 return 5;
18758 }
18759 if let Some(_) = self.ies {
18760 return 4;
18761 }
18762 if let Some(_) = self.mac_header {
18763 return 3;
18764 }
18765 if let Some(_) = self.ssids {
18766 return 2;
18767 }
18768 if let Some(_) = self.channels {
18769 return 1;
18770 }
18771 0
18772 }
18773 }
18774
18775 impl fidl::encoding::ValueTypeMarker for WlanSoftmacStartActiveScanRequest {
18776 type Borrowed<'a> = &'a Self;
18777 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18778 value
18779 }
18780 }
18781
18782 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacStartActiveScanRequest {
18783 type Owned = Self;
18784
18785 #[inline(always)]
18786 fn inline_align(_context: fidl::encoding::Context) -> usize {
18787 8
18788 }
18789
18790 #[inline(always)]
18791 fn inline_size(_context: fidl::encoding::Context) -> usize {
18792 16
18793 }
18794 }
18795
18796 unsafe impl<D: fidl::encoding::ResourceDialect>
18797 fidl::encoding::Encode<WlanSoftmacStartActiveScanRequest, D>
18798 for &WlanSoftmacStartActiveScanRequest
18799 {
18800 unsafe fn encode(
18801 self,
18802 encoder: &mut fidl::encoding::Encoder<'_, D>,
18803 offset: usize,
18804 mut depth: fidl::encoding::Depth,
18805 ) -> fidl::Result<()> {
18806 encoder.debug_check_bounds::<WlanSoftmacStartActiveScanRequest>(offset);
18807 let max_ordinal: u64 = self.max_ordinal_present();
18809 encoder.write_num(max_ordinal, offset);
18810 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
18811 if max_ordinal == 0 {
18813 return Ok(());
18814 }
18815 depth.increment()?;
18816 let envelope_size = 8;
18817 let bytes_len = max_ordinal as usize * envelope_size;
18818 #[allow(unused_variables)]
18819 let offset = encoder.out_of_line_offset(bytes_len);
18820 let mut _prev_end_offset: usize = 0;
18821 if 1 > max_ordinal {
18822 return Ok(());
18823 }
18824
18825 let cur_offset: usize = (1 - 1) * envelope_size;
18828
18829 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18831
18832 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 256>, D>(
18837 self.channels.as_ref().map(
18838 <fidl::encoding::Vector<u8, 256> as fidl::encoding::ValueTypeMarker>::borrow,
18839 ),
18840 encoder,
18841 offset + cur_offset,
18842 depth,
18843 )?;
18844
18845 _prev_end_offset = cur_offset + envelope_size;
18846 if 2 > max_ordinal {
18847 return Ok(());
18848 }
18849
18850 let cur_offset: usize = (2 - 1) * envelope_size;
18853
18854 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18856
18857 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<fidl_fuchsia_wlan_ieee80211::CSsid, 84>, D>(
18862 self.ssids.as_ref().map(<fidl::encoding::Vector<fidl_fuchsia_wlan_ieee80211::CSsid, 84> as fidl::encoding::ValueTypeMarker>::borrow),
18863 encoder, offset + cur_offset, depth
18864 )?;
18865
18866 _prev_end_offset = cur_offset + envelope_size;
18867 if 3 > max_ordinal {
18868 return Ok(());
18869 }
18870
18871 let cur_offset: usize = (3 - 1) * envelope_size;
18874
18875 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18877
18878 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 28>, D>(
18883 self.mac_header.as_ref().map(
18884 <fidl::encoding::Vector<u8, 28> as fidl::encoding::ValueTypeMarker>::borrow,
18885 ),
18886 encoder,
18887 offset + cur_offset,
18888 depth,
18889 )?;
18890
18891 _prev_end_offset = cur_offset + envelope_size;
18892 if 4 > max_ordinal {
18893 return Ok(());
18894 }
18895
18896 let cur_offset: usize = (4 - 1) * envelope_size;
18899
18900 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18902
18903 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 11454>, D>(
18908 self.ies.as_ref().map(
18909 <fidl::encoding::Vector<u8, 11454> as fidl::encoding::ValueTypeMarker>::borrow,
18910 ),
18911 encoder,
18912 offset + cur_offset,
18913 depth,
18914 )?;
18915
18916 _prev_end_offset = cur_offset + envelope_size;
18917 if 5 > max_ordinal {
18918 return Ok(());
18919 }
18920
18921 let cur_offset: usize = (5 - 1) * envelope_size;
18924
18925 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18927
18928 fidl::encoding::encode_in_envelope_optional::<i64, D>(
18933 self.min_channel_time
18934 .as_ref()
18935 .map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
18936 encoder,
18937 offset + cur_offset,
18938 depth,
18939 )?;
18940
18941 _prev_end_offset = cur_offset + envelope_size;
18942 if 6 > max_ordinal {
18943 return Ok(());
18944 }
18945
18946 let cur_offset: usize = (6 - 1) * envelope_size;
18949
18950 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18952
18953 fidl::encoding::encode_in_envelope_optional::<i64, D>(
18958 self.max_channel_time
18959 .as_ref()
18960 .map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
18961 encoder,
18962 offset + cur_offset,
18963 depth,
18964 )?;
18965
18966 _prev_end_offset = cur_offset + envelope_size;
18967 if 7 > max_ordinal {
18968 return Ok(());
18969 }
18970
18971 let cur_offset: usize = (7 - 1) * envelope_size;
18974
18975 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
18977
18978 fidl::encoding::encode_in_envelope_optional::<i64, D>(
18983 self.min_home_time.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
18984 encoder,
18985 offset + cur_offset,
18986 depth,
18987 )?;
18988
18989 _prev_end_offset = cur_offset + envelope_size;
18990 if 8 > max_ordinal {
18991 return Ok(());
18992 }
18993
18994 let cur_offset: usize = (8 - 1) * envelope_size;
18997
18998 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19000
19001 fidl::encoding::encode_in_envelope_optional::<u8, D>(
19006 self.min_probes_per_channel
19007 .as_ref()
19008 .map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
19009 encoder,
19010 offset + cur_offset,
19011 depth,
19012 )?;
19013
19014 _prev_end_offset = cur_offset + envelope_size;
19015 if 9 > max_ordinal {
19016 return Ok(());
19017 }
19018
19019 let cur_offset: usize = (9 - 1) * envelope_size;
19022
19023 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19025
19026 fidl::encoding::encode_in_envelope_optional::<u8, D>(
19031 self.max_probes_per_channel
19032 .as_ref()
19033 .map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
19034 encoder,
19035 offset + cur_offset,
19036 depth,
19037 )?;
19038
19039 _prev_end_offset = cur_offset + envelope_size;
19040
19041 Ok(())
19042 }
19043 }
19044
19045 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19046 for WlanSoftmacStartActiveScanRequest
19047 {
19048 #[inline(always)]
19049 fn new_empty() -> Self {
19050 Self::default()
19051 }
19052
19053 unsafe fn decode(
19054 &mut self,
19055 decoder: &mut fidl::encoding::Decoder<'_, D>,
19056 offset: usize,
19057 mut depth: fidl::encoding::Depth,
19058 ) -> fidl::Result<()> {
19059 decoder.debug_check_bounds::<Self>(offset);
19060 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
19061 None => return Err(fidl::Error::NotNullable),
19062 Some(len) => len,
19063 };
19064 if len == 0 {
19066 return Ok(());
19067 };
19068 depth.increment()?;
19069 let envelope_size = 8;
19070 let bytes_len = len * envelope_size;
19071 let offset = decoder.out_of_line_offset(bytes_len)?;
19072 let mut _next_ordinal_to_read = 0;
19074 let mut next_offset = offset;
19075 let end_offset = offset + bytes_len;
19076 _next_ordinal_to_read += 1;
19077 if next_offset >= end_offset {
19078 return Ok(());
19079 }
19080
19081 while _next_ordinal_to_read < 1 {
19083 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19084 _next_ordinal_to_read += 1;
19085 next_offset += envelope_size;
19086 }
19087
19088 let next_out_of_line = decoder.next_out_of_line();
19089 let handles_before = decoder.remaining_handles();
19090 if let Some((inlined, num_bytes, num_handles)) =
19091 fidl::encoding::decode_envelope_header(decoder, next_offset)?
19092 {
19093 let member_inline_size =
19094 <fidl::encoding::Vector<u8, 256> as fidl::encoding::TypeMarker>::inline_size(
19095 decoder.context,
19096 );
19097 if inlined != (member_inline_size <= 4) {
19098 return Err(fidl::Error::InvalidInlineBitInEnvelope);
19099 }
19100 let inner_offset;
19101 let mut inner_depth = depth.clone();
19102 if inlined {
19103 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19104 inner_offset = next_offset;
19105 } else {
19106 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19107 inner_depth.increment()?;
19108 }
19109 let val_ref = self
19110 .channels
19111 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 256>, D));
19112 fidl::decode!(fidl::encoding::Vector<u8, 256>, D, val_ref, decoder, inner_offset, inner_depth)?;
19113 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19114 {
19115 return Err(fidl::Error::InvalidNumBytesInEnvelope);
19116 }
19117 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19118 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19119 }
19120 }
19121
19122 next_offset += envelope_size;
19123 _next_ordinal_to_read += 1;
19124 if next_offset >= end_offset {
19125 return Ok(());
19126 }
19127
19128 while _next_ordinal_to_read < 2 {
19130 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19131 _next_ordinal_to_read += 1;
19132 next_offset += envelope_size;
19133 }
19134
19135 let next_out_of_line = decoder.next_out_of_line();
19136 let handles_before = decoder.remaining_handles();
19137 if let Some((inlined, num_bytes, num_handles)) =
19138 fidl::encoding::decode_envelope_header(decoder, next_offset)?
19139 {
19140 let member_inline_size = <fidl::encoding::Vector<
19141 fidl_fuchsia_wlan_ieee80211::CSsid,
19142 84,
19143 > as fidl::encoding::TypeMarker>::inline_size(
19144 decoder.context
19145 );
19146 if inlined != (member_inline_size <= 4) {
19147 return Err(fidl::Error::InvalidInlineBitInEnvelope);
19148 }
19149 let inner_offset;
19150 let mut inner_depth = depth.clone();
19151 if inlined {
19152 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19153 inner_offset = next_offset;
19154 } else {
19155 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19156 inner_depth.increment()?;
19157 }
19158 let val_ref =
19159 self.ssids.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_wlan_ieee80211::CSsid, 84>, D));
19160 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_wlan_ieee80211::CSsid, 84>, D, val_ref, decoder, inner_offset, inner_depth)?;
19161 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19162 {
19163 return Err(fidl::Error::InvalidNumBytesInEnvelope);
19164 }
19165 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19166 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19167 }
19168 }
19169
19170 next_offset += envelope_size;
19171 _next_ordinal_to_read += 1;
19172 if next_offset >= end_offset {
19173 return Ok(());
19174 }
19175
19176 while _next_ordinal_to_read < 3 {
19178 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19179 _next_ordinal_to_read += 1;
19180 next_offset += envelope_size;
19181 }
19182
19183 let next_out_of_line = decoder.next_out_of_line();
19184 let handles_before = decoder.remaining_handles();
19185 if let Some((inlined, num_bytes, num_handles)) =
19186 fidl::encoding::decode_envelope_header(decoder, next_offset)?
19187 {
19188 let member_inline_size =
19189 <fidl::encoding::Vector<u8, 28> as fidl::encoding::TypeMarker>::inline_size(
19190 decoder.context,
19191 );
19192 if inlined != (member_inline_size <= 4) {
19193 return Err(fidl::Error::InvalidInlineBitInEnvelope);
19194 }
19195 let inner_offset;
19196 let mut inner_depth = depth.clone();
19197 if inlined {
19198 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19199 inner_offset = next_offset;
19200 } else {
19201 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19202 inner_depth.increment()?;
19203 }
19204 let val_ref = self
19205 .mac_header
19206 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 28>, D));
19207 fidl::decode!(fidl::encoding::Vector<u8, 28>, D, val_ref, decoder, inner_offset, inner_depth)?;
19208 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19209 {
19210 return Err(fidl::Error::InvalidNumBytesInEnvelope);
19211 }
19212 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19213 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19214 }
19215 }
19216
19217 next_offset += envelope_size;
19218 _next_ordinal_to_read += 1;
19219 if next_offset >= end_offset {
19220 return Ok(());
19221 }
19222
19223 while _next_ordinal_to_read < 4 {
19225 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19226 _next_ordinal_to_read += 1;
19227 next_offset += envelope_size;
19228 }
19229
19230 let next_out_of_line = decoder.next_out_of_line();
19231 let handles_before = decoder.remaining_handles();
19232 if let Some((inlined, num_bytes, num_handles)) =
19233 fidl::encoding::decode_envelope_header(decoder, next_offset)?
19234 {
19235 let member_inline_size =
19236 <fidl::encoding::Vector<u8, 11454> as fidl::encoding::TypeMarker>::inline_size(
19237 decoder.context,
19238 );
19239 if inlined != (member_inline_size <= 4) {
19240 return Err(fidl::Error::InvalidInlineBitInEnvelope);
19241 }
19242 let inner_offset;
19243 let mut inner_depth = depth.clone();
19244 if inlined {
19245 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19246 inner_offset = next_offset;
19247 } else {
19248 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19249 inner_depth.increment()?;
19250 }
19251 let val_ref = self
19252 .ies
19253 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 11454>, D));
19254 fidl::decode!(fidl::encoding::Vector<u8, 11454>, D, val_ref, decoder, inner_offset, inner_depth)?;
19255 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19256 {
19257 return Err(fidl::Error::InvalidNumBytesInEnvelope);
19258 }
19259 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19260 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19261 }
19262 }
19263
19264 next_offset += envelope_size;
19265 _next_ordinal_to_read += 1;
19266 if next_offset >= end_offset {
19267 return Ok(());
19268 }
19269
19270 while _next_ordinal_to_read < 5 {
19272 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19273 _next_ordinal_to_read += 1;
19274 next_offset += envelope_size;
19275 }
19276
19277 let next_out_of_line = decoder.next_out_of_line();
19278 let handles_before = decoder.remaining_handles();
19279 if let Some((inlined, num_bytes, num_handles)) =
19280 fidl::encoding::decode_envelope_header(decoder, next_offset)?
19281 {
19282 let member_inline_size =
19283 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19284 if inlined != (member_inline_size <= 4) {
19285 return Err(fidl::Error::InvalidInlineBitInEnvelope);
19286 }
19287 let inner_offset;
19288 let mut inner_depth = depth.clone();
19289 if inlined {
19290 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19291 inner_offset = next_offset;
19292 } else {
19293 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19294 inner_depth.increment()?;
19295 }
19296 let val_ref = self.min_channel_time.get_or_insert_with(|| fidl::new_empty!(i64, D));
19297 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
19298 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19299 {
19300 return Err(fidl::Error::InvalidNumBytesInEnvelope);
19301 }
19302 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19303 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19304 }
19305 }
19306
19307 next_offset += envelope_size;
19308 _next_ordinal_to_read += 1;
19309 if next_offset >= end_offset {
19310 return Ok(());
19311 }
19312
19313 while _next_ordinal_to_read < 6 {
19315 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19316 _next_ordinal_to_read += 1;
19317 next_offset += envelope_size;
19318 }
19319
19320 let next_out_of_line = decoder.next_out_of_line();
19321 let handles_before = decoder.remaining_handles();
19322 if let Some((inlined, num_bytes, num_handles)) =
19323 fidl::encoding::decode_envelope_header(decoder, next_offset)?
19324 {
19325 let member_inline_size =
19326 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19327 if inlined != (member_inline_size <= 4) {
19328 return Err(fidl::Error::InvalidInlineBitInEnvelope);
19329 }
19330 let inner_offset;
19331 let mut inner_depth = depth.clone();
19332 if inlined {
19333 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19334 inner_offset = next_offset;
19335 } else {
19336 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19337 inner_depth.increment()?;
19338 }
19339 let val_ref = self.max_channel_time.get_or_insert_with(|| fidl::new_empty!(i64, D));
19340 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
19341 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19342 {
19343 return Err(fidl::Error::InvalidNumBytesInEnvelope);
19344 }
19345 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19346 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19347 }
19348 }
19349
19350 next_offset += envelope_size;
19351 _next_ordinal_to_read += 1;
19352 if next_offset >= end_offset {
19353 return Ok(());
19354 }
19355
19356 while _next_ordinal_to_read < 7 {
19358 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19359 _next_ordinal_to_read += 1;
19360 next_offset += envelope_size;
19361 }
19362
19363 let next_out_of_line = decoder.next_out_of_line();
19364 let handles_before = decoder.remaining_handles();
19365 if let Some((inlined, num_bytes, num_handles)) =
19366 fidl::encoding::decode_envelope_header(decoder, next_offset)?
19367 {
19368 let member_inline_size =
19369 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19370 if inlined != (member_inline_size <= 4) {
19371 return Err(fidl::Error::InvalidInlineBitInEnvelope);
19372 }
19373 let inner_offset;
19374 let mut inner_depth = depth.clone();
19375 if inlined {
19376 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19377 inner_offset = next_offset;
19378 } else {
19379 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19380 inner_depth.increment()?;
19381 }
19382 let val_ref = self.min_home_time.get_or_insert_with(|| fidl::new_empty!(i64, D));
19383 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
19384 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19385 {
19386 return Err(fidl::Error::InvalidNumBytesInEnvelope);
19387 }
19388 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19389 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19390 }
19391 }
19392
19393 next_offset += envelope_size;
19394 _next_ordinal_to_read += 1;
19395 if next_offset >= end_offset {
19396 return Ok(());
19397 }
19398
19399 while _next_ordinal_to_read < 8 {
19401 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19402 _next_ordinal_to_read += 1;
19403 next_offset += envelope_size;
19404 }
19405
19406 let next_out_of_line = decoder.next_out_of_line();
19407 let handles_before = decoder.remaining_handles();
19408 if let Some((inlined, num_bytes, num_handles)) =
19409 fidl::encoding::decode_envelope_header(decoder, next_offset)?
19410 {
19411 let member_inline_size =
19412 <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19413 if inlined != (member_inline_size <= 4) {
19414 return Err(fidl::Error::InvalidInlineBitInEnvelope);
19415 }
19416 let inner_offset;
19417 let mut inner_depth = depth.clone();
19418 if inlined {
19419 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19420 inner_offset = next_offset;
19421 } else {
19422 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19423 inner_depth.increment()?;
19424 }
19425 let val_ref =
19426 self.min_probes_per_channel.get_or_insert_with(|| fidl::new_empty!(u8, D));
19427 fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
19428 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19429 {
19430 return Err(fidl::Error::InvalidNumBytesInEnvelope);
19431 }
19432 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19433 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19434 }
19435 }
19436
19437 next_offset += envelope_size;
19438 _next_ordinal_to_read += 1;
19439 if next_offset >= end_offset {
19440 return Ok(());
19441 }
19442
19443 while _next_ordinal_to_read < 9 {
19445 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19446 _next_ordinal_to_read += 1;
19447 next_offset += envelope_size;
19448 }
19449
19450 let next_out_of_line = decoder.next_out_of_line();
19451 let handles_before = decoder.remaining_handles();
19452 if let Some((inlined, num_bytes, num_handles)) =
19453 fidl::encoding::decode_envelope_header(decoder, next_offset)?
19454 {
19455 let member_inline_size =
19456 <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19457 if inlined != (member_inline_size <= 4) {
19458 return Err(fidl::Error::InvalidInlineBitInEnvelope);
19459 }
19460 let inner_offset;
19461 let mut inner_depth = depth.clone();
19462 if inlined {
19463 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19464 inner_offset = next_offset;
19465 } else {
19466 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19467 inner_depth.increment()?;
19468 }
19469 let val_ref =
19470 self.max_probes_per_channel.get_or_insert_with(|| fidl::new_empty!(u8, D));
19471 fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
19472 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19473 {
19474 return Err(fidl::Error::InvalidNumBytesInEnvelope);
19475 }
19476 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19477 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19478 }
19479 }
19480
19481 next_offset += envelope_size;
19482
19483 while next_offset < end_offset {
19485 _next_ordinal_to_read += 1;
19486 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19487 next_offset += envelope_size;
19488 }
19489
19490 Ok(())
19491 }
19492 }
19493
19494 impl WlanTxTransferRequest {
19495 #[inline(always)]
19496 fn max_ordinal_present(&self) -> u64 {
19497 if let Some(_) = self.arena {
19498 return 5;
19499 }
19500 if let Some(_) = self.async_id {
19501 return 4;
19502 }
19503 if let Some(_) = self.packet_info {
19504 return 3;
19505 }
19506 if let Some(_) = self.packet_size {
19507 return 2;
19508 }
19509 if let Some(_) = self.packet_address {
19510 return 1;
19511 }
19512 0
19513 }
19514 }
19515
19516 impl fidl::encoding::ValueTypeMarker for WlanTxTransferRequest {
19517 type Borrowed<'a> = &'a Self;
19518 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19519 value
19520 }
19521 }
19522
19523 unsafe impl fidl::encoding::TypeMarker for WlanTxTransferRequest {
19524 type Owned = Self;
19525
19526 #[inline(always)]
19527 fn inline_align(_context: fidl::encoding::Context) -> usize {
19528 8
19529 }
19530
19531 #[inline(always)]
19532 fn inline_size(_context: fidl::encoding::Context) -> usize {
19533 16
19534 }
19535 }
19536
19537 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<WlanTxTransferRequest, D>
19538 for &WlanTxTransferRequest
19539 {
19540 unsafe fn encode(
19541 self,
19542 encoder: &mut fidl::encoding::Encoder<'_, D>,
19543 offset: usize,
19544 mut depth: fidl::encoding::Depth,
19545 ) -> fidl::Result<()> {
19546 encoder.debug_check_bounds::<WlanTxTransferRequest>(offset);
19547 let max_ordinal: u64 = self.max_ordinal_present();
19549 encoder.write_num(max_ordinal, offset);
19550 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
19551 if max_ordinal == 0 {
19553 return Ok(());
19554 }
19555 depth.increment()?;
19556 let envelope_size = 8;
19557 let bytes_len = max_ordinal as usize * envelope_size;
19558 #[allow(unused_variables)]
19559 let offset = encoder.out_of_line_offset(bytes_len);
19560 let mut _prev_end_offset: usize = 0;
19561 if 1 > max_ordinal {
19562 return Ok(());
19563 }
19564
19565 let cur_offset: usize = (1 - 1) * envelope_size;
19568
19569 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19571
19572 fidl::encoding::encode_in_envelope_optional::<u64, D>(
19577 self.packet_address.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
19578 encoder,
19579 offset + cur_offset,
19580 depth,
19581 )?;
19582
19583 _prev_end_offset = cur_offset + envelope_size;
19584 if 2 > max_ordinal {
19585 return Ok(());
19586 }
19587
19588 let cur_offset: usize = (2 - 1) * envelope_size;
19591
19592 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19594
19595 fidl::encoding::encode_in_envelope_optional::<u64, D>(
19600 self.packet_size.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
19601 encoder,
19602 offset + cur_offset,
19603 depth,
19604 )?;
19605
19606 _prev_end_offset = cur_offset + envelope_size;
19607 if 3 > max_ordinal {
19608 return Ok(());
19609 }
19610
19611 let cur_offset: usize = (3 - 1) * envelope_size;
19614
19615 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19617
19618 fidl::encoding::encode_in_envelope_optional::<WlanTxInfo, D>(
19623 self.packet_info
19624 .as_ref()
19625 .map(<WlanTxInfo as fidl::encoding::ValueTypeMarker>::borrow),
19626 encoder,
19627 offset + cur_offset,
19628 depth,
19629 )?;
19630
19631 _prev_end_offset = cur_offset + envelope_size;
19632 if 4 > max_ordinal {
19633 return Ok(());
19634 }
19635
19636 let cur_offset: usize = (4 - 1) * envelope_size;
19639
19640 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19642
19643 fidl::encoding::encode_in_envelope_optional::<u64, D>(
19648 self.async_id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
19649 encoder,
19650 offset + cur_offset,
19651 depth,
19652 )?;
19653
19654 _prev_end_offset = cur_offset + envelope_size;
19655 if 5 > max_ordinal {
19656 return Ok(());
19657 }
19658
19659 let cur_offset: usize = (5 - 1) * envelope_size;
19662
19663 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19665
19666 fidl::encoding::encode_in_envelope_optional::<u64, D>(
19671 self.arena.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
19672 encoder,
19673 offset + cur_offset,
19674 depth,
19675 )?;
19676
19677 _prev_end_offset = cur_offset + envelope_size;
19678
19679 Ok(())
19680 }
19681 }
19682
19683 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WlanTxTransferRequest {
19684 #[inline(always)]
19685 fn new_empty() -> Self {
19686 Self::default()
19687 }
19688
19689 unsafe fn decode(
19690 &mut self,
19691 decoder: &mut fidl::encoding::Decoder<'_, D>,
19692 offset: usize,
19693 mut depth: fidl::encoding::Depth,
19694 ) -> fidl::Result<()> {
19695 decoder.debug_check_bounds::<Self>(offset);
19696 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
19697 None => return Err(fidl::Error::NotNullable),
19698 Some(len) => len,
19699 };
19700 if len == 0 {
19702 return Ok(());
19703 };
19704 depth.increment()?;
19705 let envelope_size = 8;
19706 let bytes_len = len * envelope_size;
19707 let offset = decoder.out_of_line_offset(bytes_len)?;
19708 let mut _next_ordinal_to_read = 0;
19710 let mut next_offset = offset;
19711 let end_offset = offset + bytes_len;
19712 _next_ordinal_to_read += 1;
19713 if next_offset >= end_offset {
19714 return Ok(());
19715 }
19716
19717 while _next_ordinal_to_read < 1 {
19719 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19720 _next_ordinal_to_read += 1;
19721 next_offset += envelope_size;
19722 }
19723
19724 let next_out_of_line = decoder.next_out_of_line();
19725 let handles_before = decoder.remaining_handles();
19726 if let Some((inlined, num_bytes, num_handles)) =
19727 fidl::encoding::decode_envelope_header(decoder, next_offset)?
19728 {
19729 let member_inline_size =
19730 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19731 if inlined != (member_inline_size <= 4) {
19732 return Err(fidl::Error::InvalidInlineBitInEnvelope);
19733 }
19734 let inner_offset;
19735 let mut inner_depth = depth.clone();
19736 if inlined {
19737 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19738 inner_offset = next_offset;
19739 } else {
19740 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19741 inner_depth.increment()?;
19742 }
19743 let val_ref = self.packet_address.get_or_insert_with(|| fidl::new_empty!(u64, D));
19744 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
19745 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19746 {
19747 return Err(fidl::Error::InvalidNumBytesInEnvelope);
19748 }
19749 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19750 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19751 }
19752 }
19753
19754 next_offset += envelope_size;
19755 _next_ordinal_to_read += 1;
19756 if next_offset >= end_offset {
19757 return Ok(());
19758 }
19759
19760 while _next_ordinal_to_read < 2 {
19762 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19763 _next_ordinal_to_read += 1;
19764 next_offset += envelope_size;
19765 }
19766
19767 let next_out_of_line = decoder.next_out_of_line();
19768 let handles_before = decoder.remaining_handles();
19769 if let Some((inlined, num_bytes, num_handles)) =
19770 fidl::encoding::decode_envelope_header(decoder, next_offset)?
19771 {
19772 let member_inline_size =
19773 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19774 if inlined != (member_inline_size <= 4) {
19775 return Err(fidl::Error::InvalidInlineBitInEnvelope);
19776 }
19777 let inner_offset;
19778 let mut inner_depth = depth.clone();
19779 if inlined {
19780 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19781 inner_offset = next_offset;
19782 } else {
19783 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19784 inner_depth.increment()?;
19785 }
19786 let val_ref = self.packet_size.get_or_insert_with(|| fidl::new_empty!(u64, D));
19787 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
19788 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19789 {
19790 return Err(fidl::Error::InvalidNumBytesInEnvelope);
19791 }
19792 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19793 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19794 }
19795 }
19796
19797 next_offset += envelope_size;
19798 _next_ordinal_to_read += 1;
19799 if next_offset >= end_offset {
19800 return Ok(());
19801 }
19802
19803 while _next_ordinal_to_read < 3 {
19805 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19806 _next_ordinal_to_read += 1;
19807 next_offset += envelope_size;
19808 }
19809
19810 let next_out_of_line = decoder.next_out_of_line();
19811 let handles_before = decoder.remaining_handles();
19812 if let Some((inlined, num_bytes, num_handles)) =
19813 fidl::encoding::decode_envelope_header(decoder, next_offset)?
19814 {
19815 let member_inline_size =
19816 <WlanTxInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19817 if inlined != (member_inline_size <= 4) {
19818 return Err(fidl::Error::InvalidInlineBitInEnvelope);
19819 }
19820 let inner_offset;
19821 let mut inner_depth = depth.clone();
19822 if inlined {
19823 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19824 inner_offset = next_offset;
19825 } else {
19826 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19827 inner_depth.increment()?;
19828 }
19829 let val_ref =
19830 self.packet_info.get_or_insert_with(|| fidl::new_empty!(WlanTxInfo, D));
19831 fidl::decode!(WlanTxInfo, D, val_ref, decoder, inner_offset, inner_depth)?;
19832 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19833 {
19834 return Err(fidl::Error::InvalidNumBytesInEnvelope);
19835 }
19836 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19837 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19838 }
19839 }
19840
19841 next_offset += envelope_size;
19842 _next_ordinal_to_read += 1;
19843 if next_offset >= end_offset {
19844 return Ok(());
19845 }
19846
19847 while _next_ordinal_to_read < 4 {
19849 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19850 _next_ordinal_to_read += 1;
19851 next_offset += envelope_size;
19852 }
19853
19854 let next_out_of_line = decoder.next_out_of_line();
19855 let handles_before = decoder.remaining_handles();
19856 if let Some((inlined, num_bytes, num_handles)) =
19857 fidl::encoding::decode_envelope_header(decoder, next_offset)?
19858 {
19859 let member_inline_size =
19860 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19861 if inlined != (member_inline_size <= 4) {
19862 return Err(fidl::Error::InvalidInlineBitInEnvelope);
19863 }
19864 let inner_offset;
19865 let mut inner_depth = depth.clone();
19866 if inlined {
19867 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19868 inner_offset = next_offset;
19869 } else {
19870 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19871 inner_depth.increment()?;
19872 }
19873 let val_ref = self.async_id.get_or_insert_with(|| fidl::new_empty!(u64, D));
19874 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
19875 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19876 {
19877 return Err(fidl::Error::InvalidNumBytesInEnvelope);
19878 }
19879 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19880 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19881 }
19882 }
19883
19884 next_offset += envelope_size;
19885 _next_ordinal_to_read += 1;
19886 if next_offset >= end_offset {
19887 return Ok(());
19888 }
19889
19890 while _next_ordinal_to_read < 5 {
19892 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19893 _next_ordinal_to_read += 1;
19894 next_offset += envelope_size;
19895 }
19896
19897 let next_out_of_line = decoder.next_out_of_line();
19898 let handles_before = decoder.remaining_handles();
19899 if let Some((inlined, num_bytes, num_handles)) =
19900 fidl::encoding::decode_envelope_header(decoder, next_offset)?
19901 {
19902 let member_inline_size =
19903 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19904 if inlined != (member_inline_size <= 4) {
19905 return Err(fidl::Error::InvalidInlineBitInEnvelope);
19906 }
19907 let inner_offset;
19908 let mut inner_depth = depth.clone();
19909 if inlined {
19910 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19911 inner_offset = next_offset;
19912 } else {
19913 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19914 inner_depth.increment()?;
19915 }
19916 let val_ref = self.arena.get_or_insert_with(|| fidl::new_empty!(u64, D));
19917 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
19918 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19919 {
19920 return Err(fidl::Error::InvalidNumBytesInEnvelope);
19921 }
19922 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19923 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19924 }
19925 }
19926
19927 next_offset += envelope_size;
19928
19929 while next_offset < end_offset {
19931 _next_ordinal_to_read += 1;
19932 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19933 next_offset += envelope_size;
19934 }
19935
19936 Ok(())
19937 }
19938 }
19939}