1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
8use futures::future::{self, MaybeDone, TryFutureExt};
9use zx_status;
10
11#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
12#[repr(u32)]
13pub enum DisconnectMlmeEventName {
14 DeauthenticateIndication = 1,
15 DisassociateIndication = 2,
16 RoamStartIndication = 3,
17 RoamResultIndication = 4,
18 SaeHandshakeResponse = 5,
19 RoamRequest = 6,
20 RoamConfirmation = 7,
21}
22
23impl DisconnectMlmeEventName {
24 #[inline]
25 pub fn from_primitive(prim: u32) -> Option<Self> {
26 match prim {
27 1 => Some(Self::DeauthenticateIndication),
28 2 => Some(Self::DisassociateIndication),
29 3 => Some(Self::RoamStartIndication),
30 4 => Some(Self::RoamResultIndication),
31 5 => Some(Self::SaeHandshakeResponse),
32 6 => Some(Self::RoamRequest),
33 7 => Some(Self::RoamConfirmation),
34 _ => None,
35 }
36 }
37
38 #[inline]
39 pub const fn into_primitive(self) -> u32 {
40 self as u32
41 }
42}
43
44#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
46#[repr(u32)]
47pub enum Protection {
48 Unknown = 0,
49 Open = 1,
50 Wep = 2,
51 Wpa1 = 3,
52 Wpa1Wpa2PersonalTkipOnly = 4,
53 Wpa2PersonalTkipOnly = 5,
54 Wpa1Wpa2Personal = 6,
55 Wpa2Personal = 7,
56 Wpa2Wpa3Personal = 8,
57 Wpa3Personal = 9,
58 Wpa2Enterprise = 10,
59 Wpa3Enterprise = 11,
60 Owe = 12,
61 OpenOweTransition = 13,
63}
64
65impl Protection {
66 #[inline]
67 pub fn from_primitive(prim: u32) -> Option<Self> {
68 match prim {
69 0 => Some(Self::Unknown),
70 1 => Some(Self::Open),
71 2 => Some(Self::Wep),
72 3 => Some(Self::Wpa1),
73 4 => Some(Self::Wpa1Wpa2PersonalTkipOnly),
74 5 => Some(Self::Wpa2PersonalTkipOnly),
75 6 => Some(Self::Wpa1Wpa2Personal),
76 7 => Some(Self::Wpa2Personal),
77 8 => Some(Self::Wpa2Wpa3Personal),
78 9 => Some(Self::Wpa3Personal),
79 10 => Some(Self::Wpa2Enterprise),
80 11 => Some(Self::Wpa3Enterprise),
81 12 => Some(Self::Owe),
82 13 => Some(Self::OpenOweTransition),
83 _ => None,
84 }
85 }
86
87 #[inline]
88 pub const fn into_primitive(self) -> u32 {
89 self as u32
90 }
91}
92
93#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
94#[repr(u32)]
95pub enum ScanErrorCode {
96 NotSupported = 1,
97 InternalError = 2,
98 InternalMlmeError = 3,
99 ShouldWait = 4,
100 CanceledByDriverOrFirmware = 5,
101}
102
103impl ScanErrorCode {
104 #[inline]
105 pub fn from_primitive(prim: u32) -> Option<Self> {
106 match prim {
107 1 => Some(Self::NotSupported),
108 2 => Some(Self::InternalError),
109 3 => Some(Self::InternalMlmeError),
110 4 => Some(Self::ShouldWait),
111 5 => Some(Self::CanceledByDriverOrFirmware),
112 _ => None,
113 }
114 }
115
116 #[inline]
117 pub const fn into_primitive(self) -> u32 {
118 self as u32
119 }
120}
121
122#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
123#[repr(u32)]
124pub enum StartApResultCode {
125 Success = 0,
126 AlreadyStarted = 1,
127 InternalError = 2,
128 Canceled = 3,
129 TimedOut = 4,
130 PreviousStartInProgress = 5,
131 InvalidArguments = 6,
132}
133
134impl StartApResultCode {
135 #[inline]
136 pub fn from_primitive(prim: u32) -> Option<Self> {
137 match prim {
138 0 => Some(Self::Success),
139 1 => Some(Self::AlreadyStarted),
140 2 => Some(Self::InternalError),
141 3 => Some(Self::Canceled),
142 4 => Some(Self::TimedOut),
143 5 => Some(Self::PreviousStartInProgress),
144 6 => Some(Self::InvalidArguments),
145 _ => None,
146 }
147 }
148
149 #[inline]
150 pub const fn into_primitive(self) -> u32 {
151 self as u32
152 }
153}
154
155#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
156#[repr(u32)]
157pub enum StopApResultCode {
158 Success = 0,
159 InternalError = 1,
160 TimedOut = 2,
161}
162
163impl StopApResultCode {
164 #[inline]
165 pub fn from_primitive(prim: u32) -> Option<Self> {
166 match prim {
167 0 => Some(Self::Success),
168 1 => Some(Self::InternalError),
169 2 => Some(Self::TimedOut),
170 _ => None,
171 }
172 }
173
174 #[inline]
175 pub const fn into_primitive(self) -> u32 {
176 self as u32
177 }
178}
179
180#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
181#[repr(u32)]
182pub enum UserDisconnectReason {
183 Unknown = 0,
184 FailedToConnect = 1,
185 FidlConnectRequest = 2,
186 FidlStopClientConnectionsRequest = 3,
187 ProactiveNetworkSwitch = 4,
188 DisconnectDetectedFromSme = 5,
189 RegulatoryRegionChange = 6,
190 Startup = 7,
191 NetworkUnsaved = 8,
192 NetworkConfigUpdated = 9,
193 Recovery = 10,
194 WlanstackUnitTesting = 124,
195 WlanSmeUnitTesting = 125,
196 WlanServiceUtilTesting = 126,
197 WlanDevTool = 127,
198}
199
200impl UserDisconnectReason {
201 #[inline]
202 pub fn from_primitive(prim: u32) -> Option<Self> {
203 match prim {
204 0 => Some(Self::Unknown),
205 1 => Some(Self::FailedToConnect),
206 2 => Some(Self::FidlConnectRequest),
207 3 => Some(Self::FidlStopClientConnectionsRequest),
208 4 => Some(Self::ProactiveNetworkSwitch),
209 5 => Some(Self::DisconnectDetectedFromSme),
210 6 => Some(Self::RegulatoryRegionChange),
211 7 => Some(Self::Startup),
212 8 => Some(Self::NetworkUnsaved),
213 9 => Some(Self::NetworkConfigUpdated),
214 10 => Some(Self::Recovery),
215 124 => Some(Self::WlanstackUnitTesting),
216 125 => Some(Self::WlanSmeUnitTesting),
217 126 => Some(Self::WlanServiceUtilTesting),
218 127 => Some(Self::WlanDevTool),
219 _ => None,
220 }
221 }
222
223 #[inline]
224 pub const fn into_primitive(self) -> u32 {
225 self as u32
226 }
227}
228
229#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
230pub struct ActiveScanRequest {
231 pub ssids: Vec<Vec<u8>>,
238 pub channels: Vec<u8>,
240}
241
242impl fidl::Persistable for ActiveScanRequest {}
243
244#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
245pub struct Ap {
246 pub ssid: Vec<u8>,
247 pub channel: u8,
248 pub num_clients: u16,
249}
250
251impl fidl::Persistable for Ap {}
252
253#[derive(Clone, Debug, PartialEq)]
254pub struct ApConfig {
255 pub ssid: Vec<u8>,
256 pub password: Vec<u8>,
257 pub radio_cfg: RadioConfig,
258}
259
260impl fidl::Persistable for ApConfig {}
261
262#[derive(Clone, Debug, PartialEq)]
263pub struct ApSmeStartRequest {
264 pub config: ApConfig,
265}
266
267impl fidl::Persistable for ApSmeStartRequest {}
268
269#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
270pub struct ApSmeStartResponse {
271 pub code: StartApResultCode,
272}
273
274impl fidl::Persistable for ApSmeStartResponse {}
275
276#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
277pub struct ApSmeStatusResponse {
278 pub resp: ApStatusResponse,
279}
280
281impl fidl::Persistable for ApSmeStatusResponse {}
282
283#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
284pub struct ApSmeStopResponse {
285 pub code: StopApResultCode,
286}
287
288impl fidl::Persistable for ApSmeStopResponse {}
289
290#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
291pub struct ApStatusResponse {
292 pub running_ap: Option<Box<Ap>>,
293}
294
295impl fidl::Persistable for ApStatusResponse {}
296
297#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
298pub struct ClientSmeDisconnectRequest {
299 pub reason: UserDisconnectReason,
300}
301
302impl fidl::Persistable for ClientSmeDisconnectRequest {}
303
304#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
305pub struct ClientSmeInstallApfPacketFilterRequest {
306 pub program: Vec<u8>,
307}
308
309impl fidl::Persistable for ClientSmeInstallApfPacketFilterRequest {}
310
311#[derive(Clone, Debug, PartialEq)]
312pub struct ClientSmeRoamRequest {
313 pub req: RoamRequest,
314}
315
316impl fidl::Persistable for ClientSmeRoamRequest {}
317
318#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
319pub struct ClientSmeSetApfPacketFilterEnabledRequest {
320 pub enabled: bool,
321}
322
323impl fidl::Persistable for ClientSmeSetApfPacketFilterEnabledRequest {}
324
325#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
326#[repr(C)]
327pub struct ClientSmeSetMacAddressRequest {
328 pub mac_addr: [u8; 6],
329}
330
331impl fidl::Persistable for ClientSmeSetMacAddressRequest {}
332
333#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
334#[repr(C)]
335pub struct ClientSmeStartRssiMonitorRequest {
336 pub min_rssi_dbm: i8,
337 pub max_rssi_dbm: i8,
338}
339
340impl fidl::Persistable for ClientSmeStartRssiMonitorRequest {}
341
342#[derive(Clone, Debug, PartialEq)]
343pub struct ClientSmeStatusResponse {
344 pub resp: ClientStatusResponse,
345}
346
347impl fidl::Persistable for ClientSmeStatusResponse {}
348
349#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
350pub struct ClientSmeGetApfPacketFilterEnabledResponse {
351 pub enabled: bool,
352}
353
354impl fidl::Persistable for ClientSmeGetApfPacketFilterEnabledResponse {}
355
356#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
357pub struct ClientSmeGetScheduledScanEnabledResponse {
358 pub enabled: bool,
359}
360
361impl fidl::Persistable for ClientSmeGetScheduledScanEnabledResponse {}
362
363#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
364pub struct ClientSmeReadApfPacketFilterDataResponse {
365 pub memory: Vec<u8>,
366}
367
368impl fidl::Persistable for ClientSmeReadApfPacketFilterDataResponse {}
369
370#[derive(Clone, Debug, PartialEq)]
371pub struct ClientSmeWmmStatusResponse {
372 pub resp: fidl_fuchsia_wlan_internal_common::WmmStatusResponse,
373}
374
375impl fidl::Persistable for ClientSmeWmmStatusResponse {}
376
377#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
378pub struct Compatible {
379 pub mutual_security_protocols: Vec<fidl_fuchsia_wlan_internal_common::Protocol>,
380}
381
382impl fidl::Persistable for Compatible {}
383
384#[derive(Clone, Debug, PartialEq)]
385pub struct ConnectRequest {
386 pub ssid: Vec<u8>,
387 pub bss_description: fidl_fuchsia_wlan_ieee80211_common::BssDescription,
388 pub multiple_bss_candidates: bool,
390 pub authentication: fidl_fuchsia_wlan_internal_common::Authentication,
394 pub deprecated_scan_type: fidl_fuchsia_wlan_common_common::ScanType,
398}
399
400impl fidl::Persistable for ConnectRequest {}
401
402#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
403pub struct ConnectResult {
404 pub code: fidl_fuchsia_wlan_ieee80211_common::StatusCode,
405 pub is_credential_rejected: bool,
408 pub is_reconnect: bool,
411}
412
413impl fidl::Persistable for ConnectResult {}
414
415#[derive(Clone, Debug, PartialEq)]
416pub struct ConnectTransactionOnChannelSwitchedRequest {
417 pub info: fidl_fuchsia_wlan_internal_common::ChannelSwitchInfo,
418}
419
420impl fidl::Persistable for ConnectTransactionOnChannelSwitchedRequest {}
421
422#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
423pub struct ConnectTransactionOnConnectResultRequest {
424 pub result: ConnectResult,
425}
426
427impl fidl::Persistable for ConnectTransactionOnConnectResultRequest {}
428
429#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
430pub struct ConnectTransactionOnDisconnectRequest {
431 pub info: DisconnectInfo,
432}
433
434impl fidl::Persistable for ConnectTransactionOnDisconnectRequest {}
435
436#[derive(Clone, Debug, PartialEq)]
437pub struct ConnectTransactionOnRoamResultRequest {
438 pub result: RoamResult,
439}
440
441impl fidl::Persistable for ConnectTransactionOnRoamResultRequest {}
442
443#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
444#[repr(C)]
445pub struct ConnectTransactionOnRssiThresholdBreachedRequest {
446 pub cur_rssi_dbm: i8,
447}
448
449impl fidl::Persistable for ConnectTransactionOnRssiThresholdBreachedRequest {}
450
451#[derive(Clone, Debug, PartialEq)]
452pub struct ConnectTransactionOnSignalReportRequest {
453 pub ind: fidl_fuchsia_wlan_internal_common::SignalReportIndication,
454}
455
456impl fidl::Persistable for ConnectTransactionOnSignalReportRequest {}
457
458#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
459pub struct DisconnectCause {
460 pub mlme_event_name: DisconnectMlmeEventName,
461 pub reason_code: fidl_fuchsia_wlan_ieee80211_common::ReasonCode,
462}
463
464impl fidl::Persistable for DisconnectCause {}
465
466#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
467pub struct DisconnectInfo {
468 pub is_sme_reconnecting: bool,
470 pub disconnect_source: DisconnectSource,
472}
473
474impl fidl::Persistable for DisconnectInfo {}
475
476#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
477pub struct DisjointSecurityProtocol {
478 pub protocol: fidl_fuchsia_wlan_internal_common::Protocol,
479 pub role: fidl_fuchsia_wlan_common_common::WlanMacRole,
480}
481
482impl fidl::Persistable for DisjointSecurityProtocol {}
483
484#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
486pub struct Empty;
487
488impl fidl::Persistable for Empty {}
489
490#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
491pub struct GenericSmeQuery {
492 pub role: fidl_fuchsia_wlan_common_common::WlanMacRole,
493 pub sta_addr: [u8; 6],
494 pub factory_addr: [u8; 6],
495}
496
497impl fidl::Persistable for GenericSmeQuery {}
498
499#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
500pub struct Incompatible {
501 pub description: String,
502 pub disjoint_security_protocols: Option<Vec<DisjointSecurityProtocol>>,
503}
504
505impl fidl::Persistable for Incompatible {}
506
507#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
508pub struct LegacyPrivacySupport {
509 pub wep_supported: bool,
510 pub wpa1_supported: bool,
511}
512
513impl fidl::Persistable for LegacyPrivacySupport {}
514
515#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
516pub struct PassiveScanRequest {
517 pub channels: Vec<u8>,
519}
520
521impl fidl::Persistable for PassiveScanRequest {}
522
523#[derive(Clone, Debug, PartialEq)]
524pub struct RadioConfig {
525 pub phy: fidl_fuchsia_wlan_ieee80211_common::WlanPhyType,
526 pub primary: fidl_fuchsia_wlan_ieee80211_common::ChannelNumber,
527 pub bandwidth: fidl_fuchsia_wlan_ieee80211_common::ChannelBandwidth,
528}
529
530impl fidl::Persistable for RadioConfig {}
531
532#[derive(Clone, Debug, PartialEq)]
533pub struct RoamRequest {
534 pub bss_description: fidl_fuchsia_wlan_ieee80211_common::BssDescription,
535}
536
537impl fidl::Persistable for RoamRequest {}
538
539#[derive(Clone, Debug, PartialEq)]
541pub struct RoamResult {
542 pub bssid: [u8; 6],
544 pub status_code: fidl_fuchsia_wlan_ieee80211_common::StatusCode,
545 pub original_association_maintained: bool,
550 pub bss_description: Option<Box<fidl_fuchsia_wlan_ieee80211_common::BssDescription>>,
551 pub disconnect_info: Option<Box<DisconnectInfo>>,
554 pub is_credential_rejected: bool,
557}
558
559impl fidl::Persistable for RoamResult {}
560
561#[derive(Clone, Debug, PartialEq)]
562pub struct ScanResult {
563 pub compatibility: Compatibility,
564 pub timestamp_nanos: i64,
565 pub bss_description: fidl_fuchsia_wlan_ieee80211_common::BssDescription,
566}
567
568impl fidl::Persistable for ScanResult {}
569
570#[derive(Clone, Debug, PartialEq)]
571pub struct ScanResultVector {
572 pub results: Vec<ScanResult>,
573}
574
575impl fidl::Persistable for ScanResultVector {}
576
577#[derive(Clone, Debug, PartialEq)]
578pub struct ServingApInfo {
579 pub bssid: [u8; 6],
580 pub ssid: Vec<u8>,
581 pub rssi_dbm: i8,
582 pub snr_db: i8,
583 pub primary: fidl_fuchsia_wlan_ieee80211_common::ChannelNumber,
584 pub protection: Protection,
585 pub bandwidth: fidl_fuchsia_wlan_ieee80211_common::ChannelBandwidth,
586 pub vht_secondary_80_channel: fidl_fuchsia_wlan_ieee80211_common::ChannelNumber,
587}
588
589impl fidl::Persistable for ServingApInfo {}
590
591#[derive(Clone, Debug, PartialEq)]
592pub struct TelemetryGetHistogramStatsResponse {
593 pub stats: fidl_fuchsia_wlan_stats_common::IfaceHistogramStats,
594}
595
596impl fidl::Persistable for TelemetryGetHistogramStatsResponse {}
597
598#[derive(Clone, Debug, PartialEq)]
599pub struct TelemetryGetIfaceStatsResponse {
600 pub stats: fidl_fuchsia_wlan_stats_common::IfaceStats,
601}
602
603impl fidl::Persistable for TelemetryGetIfaceStatsResponse {}
604
605#[derive(Clone, Debug, PartialEq)]
606pub struct TelemetryGetSignalReportResponse {
607 pub stats: fidl_fuchsia_wlan_stats_common::SignalReport,
608}
609
610impl fidl::Persistable for TelemetryGetSignalReportResponse {}
611
612#[derive(Clone, Debug, PartialEq)]
613pub struct TelemetryQueryTelemetrySupportResponse {
614 pub resp: fidl_fuchsia_wlan_stats_common::TelemetrySupport,
615}
616
617impl fidl::Persistable for TelemetryQueryTelemetrySupportResponse {}
618
619#[derive(Clone, Debug, Default, PartialEq)]
620pub struct GenericSmeQueryIfaceCapabilitiesResponse {
621 pub apf_support: Option<fidl_fuchsia_wlan_common_common::ApfPacketFilterSupport>,
623 pub rssi_monitor_support: Option<fidl_fuchsia_wlan_common_common::RssiMonitorSupport>,
625 #[doc(hidden)]
626 pub __source_breaking: fidl::marker::SourceBreaking,
627}
628
629impl fidl::Persistable for GenericSmeQueryIfaceCapabilitiesResponse {}
630
631#[derive(Clone, Debug, PartialEq)]
632pub enum ClientStatusResponse {
633 Connected(ServingApInfo),
634 Connecting(Vec<u8>),
635 Idle(Empty),
636 Roaming([u8; 6]),
637}
638
639impl ClientStatusResponse {
640 #[inline]
641 pub fn ordinal(&self) -> u64 {
642 match *self {
643 Self::Connected(_) => 1,
644 Self::Connecting(_) => 2,
645 Self::Idle(_) => 3,
646 Self::Roaming(_) => 4,
647 }
648 }
649}
650
651impl fidl::Persistable for ClientStatusResponse {}
652
653#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
654pub enum Compatibility {
655 Compatible(Compatible),
656 Incompatible(Incompatible),
657}
658
659impl Compatibility {
660 #[inline]
661 pub fn ordinal(&self) -> u64 {
662 match *self {
663 Self::Compatible(_) => 1,
664 Self::Incompatible(_) => 2,
665 }
666 }
667}
668
669impl fidl::Persistable for Compatibility {}
670
671#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
672pub enum DisconnectSource {
673 Ap(DisconnectCause),
674 User(UserDisconnectReason),
675 Mlme(DisconnectCause),
676}
677
678impl DisconnectSource {
679 #[inline]
680 pub fn ordinal(&self) -> u64 {
681 match *self {
682 Self::Ap(_) => 1,
683 Self::User(_) => 2,
684 Self::Mlme(_) => 3,
685 }
686 }
687}
688
689impl fidl::Persistable for DisconnectSource {}
690
691#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
692pub enum ScanRequest {
693 Active(ActiveScanRequest),
694 Passive(PassiveScanRequest),
695}
696
697impl ScanRequest {
698 #[inline]
699 pub fn ordinal(&self) -> u64 {
700 match *self {
701 Self::Active(_) => 1,
702 Self::Passive(_) => 2,
703 }
704 }
705}
706
707impl fidl::Persistable for ScanRequest {}
708
709pub mod ap_sme_ordinals {
710 pub const START: u64 = 0x33fa134ceda8624d;
711 pub const STOP: u64 = 0x56423f5b49a2e851;
712 pub const STATUS: u64 = 0x51c688ac7a101606;
713}
714
715pub mod client_sme_ordinals {
716 pub const SCAN: u64 = 0xded0ce3b1685822;
717 pub const START_SCHEDULED_SCAN: u64 = 0x97eedb559e6bdb8;
718 pub const GET_SCHEDULED_SCAN_ENABLED: u64 = 0x777e3c8854ff2710;
719 pub const CONNECT: u64 = 0x250a0f6fe9f85351;
720 pub const ROAM: u64 = 0x107ead7d84723921;
721 pub const DISCONNECT: u64 = 0x39a578de9a107304;
722 pub const STATUS: u64 = 0xda00b607470faf2;
723 pub const WMM_STATUS: u64 = 0x3d0ccc75f6baa9e3;
724 pub const SCAN_FOR_CONTROLLER: u64 = 0x21f00ab22ff79a12;
725 pub const SET_MAC_ADDRESS: u64 = 0x13e0a0bee8962f58;
726 pub const INSTALL_APF_PACKET_FILTER: u64 = 0x77435965e7bfaf83;
727 pub const READ_APF_PACKET_FILTER_DATA: u64 = 0x66fc6616b9963023;
728 pub const SET_APF_PACKET_FILTER_ENABLED: u64 = 0x5070d2ed31580b81;
729 pub const GET_APF_PACKET_FILTER_ENABLED: u64 = 0xdda5c1533526869;
730 pub const START_RSSI_MONITOR: u64 = 0x7d9b4356b07bd699;
731 pub const STOP_RSSI_MONITOR: u64 = 0x1f39005f89565adf;
732}
733
734pub mod connect_transaction_ordinals {
735 pub const ON_CONNECT_RESULT: u64 = 0x48d2cf407da489a7;
736 pub const ON_DISCONNECT: u64 = 0x40dea7b1449cc733;
737 pub const ON_ROAM_RESULT: u64 = 0x656267da4ccf2a41;
738 pub const ON_SIGNAL_REPORT: u64 = 0x5e968bd5e267e262;
739 pub const ON_RSSI_THRESHOLD_BREACHED: u64 = 0xbd0581b057e7f8c;
740 pub const ON_CHANNEL_SWITCHED: u64 = 0x5f5153778cd70512;
741}
742
743pub mod generic_sme_ordinals {
744 pub const QUERY: u64 = 0x6ef4a820c153e249;
745 pub const QUERY_IFACE_CAPABILITIES: u64 = 0x2f483964e794fbba;
746 pub const GET_CLIENT_SME: u64 = 0x2439ad714c642f15;
747 pub const GET_AP_SME: u64 = 0x4d2a40be2b44ad6c;
748 pub const GET_SME_TELEMETRY: u64 = 0x7ea015b3060fa;
749}
750
751pub mod scheduled_scan_transaction_ordinals {
752 pub const ON_SCHEDULED_SCAN_MATCHES_AVAILABLE: u64 = 0x49ff004527d01bd8;
753}
754
755pub mod telemetry_ordinals {
756 pub const QUERY_TELEMETRY_SUPPORT: u64 = 0x69443ad35b204686;
757 pub const GET_IFACE_STATS: u64 = 0x6af057f3a017f572;
758 pub const GET_HISTOGRAM_STATS: u64 = 0x46d2b6a23f764564;
759 pub const GET_SIGNAL_REPORT: u64 = 0x24133aeac3225e28;
760 pub const CLONE_INSPECT_VMO: u64 = 0x47153917e84c5a21;
761}
762
763pub mod usme_bootstrap_ordinals {
764 pub const START: u64 = 0x58850dfb76c29a0e;
765}
766
767mod internal {
768 use super::*;
769 unsafe impl fidl::encoding::TypeMarker for DisconnectMlmeEventName {
770 type Owned = Self;
771
772 #[inline(always)]
773 fn inline_align(_context: fidl::encoding::Context) -> usize {
774 std::mem::align_of::<u32>()
775 }
776
777 #[inline(always)]
778 fn inline_size(_context: fidl::encoding::Context) -> usize {
779 std::mem::size_of::<u32>()
780 }
781
782 #[inline(always)]
783 fn encode_is_copy() -> bool {
784 true
785 }
786
787 #[inline(always)]
788 fn decode_is_copy() -> bool {
789 false
790 }
791 }
792
793 impl fidl::encoding::ValueTypeMarker for DisconnectMlmeEventName {
794 type Borrowed<'a> = Self;
795 #[inline(always)]
796 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
797 *value
798 }
799 }
800
801 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
802 for DisconnectMlmeEventName
803 {
804 #[inline]
805 unsafe fn encode(
806 self,
807 encoder: &mut fidl::encoding::Encoder<'_, D>,
808 offset: usize,
809 _depth: fidl::encoding::Depth,
810 ) -> fidl::Result<()> {
811 encoder.debug_check_bounds::<Self>(offset);
812 encoder.write_num(self.into_primitive(), offset);
813 Ok(())
814 }
815 }
816
817 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
818 for DisconnectMlmeEventName
819 {
820 #[inline(always)]
821 fn new_empty() -> Self {
822 Self::DeauthenticateIndication
823 }
824
825 #[inline]
826 unsafe fn decode(
827 &mut self,
828 decoder: &mut fidl::encoding::Decoder<'_, D>,
829 offset: usize,
830 _depth: fidl::encoding::Depth,
831 ) -> fidl::Result<()> {
832 decoder.debug_check_bounds::<Self>(offset);
833 let prim = decoder.read_num::<u32>(offset);
834
835 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
836 Ok(())
837 }
838 }
839 unsafe impl fidl::encoding::TypeMarker for Protection {
840 type Owned = Self;
841
842 #[inline(always)]
843 fn inline_align(_context: fidl::encoding::Context) -> usize {
844 std::mem::align_of::<u32>()
845 }
846
847 #[inline(always)]
848 fn inline_size(_context: fidl::encoding::Context) -> usize {
849 std::mem::size_of::<u32>()
850 }
851
852 #[inline(always)]
853 fn encode_is_copy() -> bool {
854 true
855 }
856
857 #[inline(always)]
858 fn decode_is_copy() -> bool {
859 false
860 }
861 }
862
863 impl fidl::encoding::ValueTypeMarker for Protection {
864 type Borrowed<'a> = Self;
865 #[inline(always)]
866 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
867 *value
868 }
869 }
870
871 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for Protection {
872 #[inline]
873 unsafe fn encode(
874 self,
875 encoder: &mut fidl::encoding::Encoder<'_, D>,
876 offset: usize,
877 _depth: fidl::encoding::Depth,
878 ) -> fidl::Result<()> {
879 encoder.debug_check_bounds::<Self>(offset);
880 encoder.write_num(self.into_primitive(), offset);
881 Ok(())
882 }
883 }
884
885 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Protection {
886 #[inline(always)]
887 fn new_empty() -> Self {
888 Self::Unknown
889 }
890
891 #[inline]
892 unsafe fn decode(
893 &mut self,
894 decoder: &mut fidl::encoding::Decoder<'_, D>,
895 offset: usize,
896 _depth: fidl::encoding::Depth,
897 ) -> fidl::Result<()> {
898 decoder.debug_check_bounds::<Self>(offset);
899 let prim = decoder.read_num::<u32>(offset);
900
901 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
902 Ok(())
903 }
904 }
905 unsafe impl fidl::encoding::TypeMarker for ScanErrorCode {
906 type Owned = Self;
907
908 #[inline(always)]
909 fn inline_align(_context: fidl::encoding::Context) -> usize {
910 std::mem::align_of::<u32>()
911 }
912
913 #[inline(always)]
914 fn inline_size(_context: fidl::encoding::Context) -> usize {
915 std::mem::size_of::<u32>()
916 }
917
918 #[inline(always)]
919 fn encode_is_copy() -> bool {
920 true
921 }
922
923 #[inline(always)]
924 fn decode_is_copy() -> bool {
925 false
926 }
927 }
928
929 impl fidl::encoding::ValueTypeMarker for ScanErrorCode {
930 type Borrowed<'a> = Self;
931 #[inline(always)]
932 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
933 *value
934 }
935 }
936
937 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ScanErrorCode {
938 #[inline]
939 unsafe fn encode(
940 self,
941 encoder: &mut fidl::encoding::Encoder<'_, D>,
942 offset: usize,
943 _depth: fidl::encoding::Depth,
944 ) -> fidl::Result<()> {
945 encoder.debug_check_bounds::<Self>(offset);
946 encoder.write_num(self.into_primitive(), offset);
947 Ok(())
948 }
949 }
950
951 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanErrorCode {
952 #[inline(always)]
953 fn new_empty() -> Self {
954 Self::NotSupported
955 }
956
957 #[inline]
958 unsafe fn decode(
959 &mut self,
960 decoder: &mut fidl::encoding::Decoder<'_, D>,
961 offset: usize,
962 _depth: fidl::encoding::Depth,
963 ) -> fidl::Result<()> {
964 decoder.debug_check_bounds::<Self>(offset);
965 let prim = decoder.read_num::<u32>(offset);
966
967 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
968 Ok(())
969 }
970 }
971 unsafe impl fidl::encoding::TypeMarker for StartApResultCode {
972 type Owned = Self;
973
974 #[inline(always)]
975 fn inline_align(_context: fidl::encoding::Context) -> usize {
976 std::mem::align_of::<u32>()
977 }
978
979 #[inline(always)]
980 fn inline_size(_context: fidl::encoding::Context) -> usize {
981 std::mem::size_of::<u32>()
982 }
983
984 #[inline(always)]
985 fn encode_is_copy() -> bool {
986 true
987 }
988
989 #[inline(always)]
990 fn decode_is_copy() -> bool {
991 false
992 }
993 }
994
995 impl fidl::encoding::ValueTypeMarker for StartApResultCode {
996 type Borrowed<'a> = Self;
997 #[inline(always)]
998 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
999 *value
1000 }
1001 }
1002
1003 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1004 for StartApResultCode
1005 {
1006 #[inline]
1007 unsafe fn encode(
1008 self,
1009 encoder: &mut fidl::encoding::Encoder<'_, D>,
1010 offset: usize,
1011 _depth: fidl::encoding::Depth,
1012 ) -> fidl::Result<()> {
1013 encoder.debug_check_bounds::<Self>(offset);
1014 encoder.write_num(self.into_primitive(), offset);
1015 Ok(())
1016 }
1017 }
1018
1019 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StartApResultCode {
1020 #[inline(always)]
1021 fn new_empty() -> Self {
1022 Self::Success
1023 }
1024
1025 #[inline]
1026 unsafe fn decode(
1027 &mut self,
1028 decoder: &mut fidl::encoding::Decoder<'_, D>,
1029 offset: usize,
1030 _depth: fidl::encoding::Depth,
1031 ) -> fidl::Result<()> {
1032 decoder.debug_check_bounds::<Self>(offset);
1033 let prim = decoder.read_num::<u32>(offset);
1034
1035 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1036 Ok(())
1037 }
1038 }
1039 unsafe impl fidl::encoding::TypeMarker for StopApResultCode {
1040 type Owned = Self;
1041
1042 #[inline(always)]
1043 fn inline_align(_context: fidl::encoding::Context) -> usize {
1044 std::mem::align_of::<u32>()
1045 }
1046
1047 #[inline(always)]
1048 fn inline_size(_context: fidl::encoding::Context) -> usize {
1049 std::mem::size_of::<u32>()
1050 }
1051
1052 #[inline(always)]
1053 fn encode_is_copy() -> bool {
1054 true
1055 }
1056
1057 #[inline(always)]
1058 fn decode_is_copy() -> bool {
1059 false
1060 }
1061 }
1062
1063 impl fidl::encoding::ValueTypeMarker for StopApResultCode {
1064 type Borrowed<'a> = Self;
1065 #[inline(always)]
1066 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1067 *value
1068 }
1069 }
1070
1071 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1072 for StopApResultCode
1073 {
1074 #[inline]
1075 unsafe fn encode(
1076 self,
1077 encoder: &mut fidl::encoding::Encoder<'_, D>,
1078 offset: usize,
1079 _depth: fidl::encoding::Depth,
1080 ) -> fidl::Result<()> {
1081 encoder.debug_check_bounds::<Self>(offset);
1082 encoder.write_num(self.into_primitive(), offset);
1083 Ok(())
1084 }
1085 }
1086
1087 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StopApResultCode {
1088 #[inline(always)]
1089 fn new_empty() -> Self {
1090 Self::Success
1091 }
1092
1093 #[inline]
1094 unsafe fn decode(
1095 &mut self,
1096 decoder: &mut fidl::encoding::Decoder<'_, D>,
1097 offset: usize,
1098 _depth: fidl::encoding::Depth,
1099 ) -> fidl::Result<()> {
1100 decoder.debug_check_bounds::<Self>(offset);
1101 let prim = decoder.read_num::<u32>(offset);
1102
1103 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1104 Ok(())
1105 }
1106 }
1107 unsafe impl fidl::encoding::TypeMarker for UserDisconnectReason {
1108 type Owned = Self;
1109
1110 #[inline(always)]
1111 fn inline_align(_context: fidl::encoding::Context) -> usize {
1112 std::mem::align_of::<u32>()
1113 }
1114
1115 #[inline(always)]
1116 fn inline_size(_context: fidl::encoding::Context) -> usize {
1117 std::mem::size_of::<u32>()
1118 }
1119
1120 #[inline(always)]
1121 fn encode_is_copy() -> bool {
1122 true
1123 }
1124
1125 #[inline(always)]
1126 fn decode_is_copy() -> bool {
1127 false
1128 }
1129 }
1130
1131 impl fidl::encoding::ValueTypeMarker for UserDisconnectReason {
1132 type Borrowed<'a> = Self;
1133 #[inline(always)]
1134 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1135 *value
1136 }
1137 }
1138
1139 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1140 for UserDisconnectReason
1141 {
1142 #[inline]
1143 unsafe fn encode(
1144 self,
1145 encoder: &mut fidl::encoding::Encoder<'_, D>,
1146 offset: usize,
1147 _depth: fidl::encoding::Depth,
1148 ) -> fidl::Result<()> {
1149 encoder.debug_check_bounds::<Self>(offset);
1150 encoder.write_num(self.into_primitive(), offset);
1151 Ok(())
1152 }
1153 }
1154
1155 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UserDisconnectReason {
1156 #[inline(always)]
1157 fn new_empty() -> Self {
1158 Self::Unknown
1159 }
1160
1161 #[inline]
1162 unsafe fn decode(
1163 &mut self,
1164 decoder: &mut fidl::encoding::Decoder<'_, D>,
1165 offset: usize,
1166 _depth: fidl::encoding::Depth,
1167 ) -> fidl::Result<()> {
1168 decoder.debug_check_bounds::<Self>(offset);
1169 let prim = decoder.read_num::<u32>(offset);
1170
1171 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1172 Ok(())
1173 }
1174 }
1175
1176 impl fidl::encoding::ValueTypeMarker for ActiveScanRequest {
1177 type Borrowed<'a> = &'a Self;
1178 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1179 value
1180 }
1181 }
1182
1183 unsafe impl fidl::encoding::TypeMarker for ActiveScanRequest {
1184 type Owned = Self;
1185
1186 #[inline(always)]
1187 fn inline_align(_context: fidl::encoding::Context) -> usize {
1188 8
1189 }
1190
1191 #[inline(always)]
1192 fn inline_size(_context: fidl::encoding::Context) -> usize {
1193 32
1194 }
1195 }
1196
1197 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ActiveScanRequest, D>
1198 for &ActiveScanRequest
1199 {
1200 #[inline]
1201 unsafe fn encode(
1202 self,
1203 encoder: &mut fidl::encoding::Encoder<'_, D>,
1204 offset: usize,
1205 _depth: fidl::encoding::Depth,
1206 ) -> fidl::Result<()> {
1207 encoder.debug_check_bounds::<ActiveScanRequest>(offset);
1208 fidl::encoding::Encode::<ActiveScanRequest, D>::encode(
1210 (
1211 <fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssids),
1212 <fidl::encoding::Vector<u8, 500> as fidl::encoding::ValueTypeMarker>::borrow(&self.channels),
1213 ),
1214 encoder, offset, _depth
1215 )
1216 }
1217 }
1218 unsafe impl<
1219 D: fidl::encoding::ResourceDialect,
1220 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>, D>,
1221 T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 500>, D>,
1222 > fidl::encoding::Encode<ActiveScanRequest, D> for (T0, T1)
1223 {
1224 #[inline]
1225 unsafe fn encode(
1226 self,
1227 encoder: &mut fidl::encoding::Encoder<'_, D>,
1228 offset: usize,
1229 depth: fidl::encoding::Depth,
1230 ) -> fidl::Result<()> {
1231 encoder.debug_check_bounds::<ActiveScanRequest>(offset);
1232 self.0.encode(encoder, offset + 0, depth)?;
1236 self.1.encode(encoder, offset + 16, depth)?;
1237 Ok(())
1238 }
1239 }
1240
1241 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ActiveScanRequest {
1242 #[inline(always)]
1243 fn new_empty() -> Self {
1244 Self {
1245 ssids: fidl::new_empty!(
1246 fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>,
1247 D
1248 ),
1249 channels: fidl::new_empty!(fidl::encoding::Vector<u8, 500>, D),
1250 }
1251 }
1252
1253 #[inline]
1254 unsafe fn decode(
1255 &mut self,
1256 decoder: &mut fidl::encoding::Decoder<'_, D>,
1257 offset: usize,
1258 _depth: fidl::encoding::Depth,
1259 ) -> fidl::Result<()> {
1260 decoder.debug_check_bounds::<Self>(offset);
1261 fidl::decode!(
1263 fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>,
1264 D,
1265 &mut self.ssids,
1266 decoder,
1267 offset + 0,
1268 _depth
1269 )?;
1270 fidl::decode!(fidl::encoding::Vector<u8, 500>, D, &mut self.channels, decoder, offset + 16, _depth)?;
1271 Ok(())
1272 }
1273 }
1274
1275 impl fidl::encoding::ValueTypeMarker for Ap {
1276 type Borrowed<'a> = &'a Self;
1277 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1278 value
1279 }
1280 }
1281
1282 unsafe impl fidl::encoding::TypeMarker for Ap {
1283 type Owned = Self;
1284
1285 #[inline(always)]
1286 fn inline_align(_context: fidl::encoding::Context) -> usize {
1287 8
1288 }
1289
1290 #[inline(always)]
1291 fn inline_size(_context: fidl::encoding::Context) -> usize {
1292 24
1293 }
1294 }
1295
1296 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Ap, D> for &Ap {
1297 #[inline]
1298 unsafe fn encode(
1299 self,
1300 encoder: &mut fidl::encoding::Encoder<'_, D>,
1301 offset: usize,
1302 _depth: fidl::encoding::Depth,
1303 ) -> fidl::Result<()> {
1304 encoder.debug_check_bounds::<Ap>(offset);
1305 fidl::encoding::Encode::<Ap, D>::encode(
1307 (
1308 <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
1309 &self.ssid,
1310 ),
1311 <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.channel),
1312 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.num_clients),
1313 ),
1314 encoder,
1315 offset,
1316 _depth,
1317 )
1318 }
1319 }
1320 unsafe impl<
1321 D: fidl::encoding::ResourceDialect,
1322 T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
1323 T1: fidl::encoding::Encode<u8, D>,
1324 T2: fidl::encoding::Encode<u16, D>,
1325 > fidl::encoding::Encode<Ap, D> for (T0, T1, T2)
1326 {
1327 #[inline]
1328 unsafe fn encode(
1329 self,
1330 encoder: &mut fidl::encoding::Encoder<'_, D>,
1331 offset: usize,
1332 depth: fidl::encoding::Depth,
1333 ) -> fidl::Result<()> {
1334 encoder.debug_check_bounds::<Ap>(offset);
1335 unsafe {
1338 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
1339 (ptr as *mut u64).write_unaligned(0);
1340 }
1341 self.0.encode(encoder, offset + 0, depth)?;
1343 self.1.encode(encoder, offset + 16, depth)?;
1344 self.2.encode(encoder, offset + 18, depth)?;
1345 Ok(())
1346 }
1347 }
1348
1349 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Ap {
1350 #[inline(always)]
1351 fn new_empty() -> Self {
1352 Self {
1353 ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
1354 channel: fidl::new_empty!(u8, D),
1355 num_clients: fidl::new_empty!(u16, D),
1356 }
1357 }
1358
1359 #[inline]
1360 unsafe fn decode(
1361 &mut self,
1362 decoder: &mut fidl::encoding::Decoder<'_, D>,
1363 offset: usize,
1364 _depth: fidl::encoding::Depth,
1365 ) -> fidl::Result<()> {
1366 decoder.debug_check_bounds::<Self>(offset);
1367 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
1369 let padval = unsafe { (ptr as *const u64).read_unaligned() };
1370 let mask = 0xffffffff0000ff00u64;
1371 let maskedval = padval & mask;
1372 if maskedval != 0 {
1373 return Err(fidl::Error::NonZeroPadding {
1374 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
1375 });
1376 }
1377 fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 0, _depth)?;
1378 fidl::decode!(u8, D, &mut self.channel, decoder, offset + 16, _depth)?;
1379 fidl::decode!(u16, D, &mut self.num_clients, decoder, offset + 18, _depth)?;
1380 Ok(())
1381 }
1382 }
1383
1384 impl fidl::encoding::ValueTypeMarker for ApConfig {
1385 type Borrowed<'a> = &'a Self;
1386 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1387 value
1388 }
1389 }
1390
1391 unsafe impl fidl::encoding::TypeMarker for ApConfig {
1392 type Owned = Self;
1393
1394 #[inline(always)]
1395 fn inline_align(_context: fidl::encoding::Context) -> usize {
1396 8
1397 }
1398
1399 #[inline(always)]
1400 fn inline_size(_context: fidl::encoding::Context) -> usize {
1401 48
1402 }
1403 }
1404
1405 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApConfig, D> for &ApConfig {
1406 #[inline]
1407 unsafe fn encode(
1408 self,
1409 encoder: &mut fidl::encoding::Encoder<'_, D>,
1410 offset: usize,
1411 _depth: fidl::encoding::Depth,
1412 ) -> fidl::Result<()> {
1413 encoder.debug_check_bounds::<ApConfig>(offset);
1414 fidl::encoding::Encode::<ApConfig, D>::encode(
1416 (
1417 <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
1418 &self.ssid,
1419 ),
1420 <fidl::encoding::Vector<u8, 64> as fidl::encoding::ValueTypeMarker>::borrow(
1421 &self.password,
1422 ),
1423 <RadioConfig as fidl::encoding::ValueTypeMarker>::borrow(&self.radio_cfg),
1424 ),
1425 encoder,
1426 offset,
1427 _depth,
1428 )
1429 }
1430 }
1431 unsafe impl<
1432 D: fidl::encoding::ResourceDialect,
1433 T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
1434 T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 64>, D>,
1435 T2: fidl::encoding::Encode<RadioConfig, D>,
1436 > fidl::encoding::Encode<ApConfig, D> for (T0, T1, T2)
1437 {
1438 #[inline]
1439 unsafe fn encode(
1440 self,
1441 encoder: &mut fidl::encoding::Encoder<'_, D>,
1442 offset: usize,
1443 depth: fidl::encoding::Depth,
1444 ) -> fidl::Result<()> {
1445 encoder.debug_check_bounds::<ApConfig>(offset);
1446 unsafe {
1449 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
1450 (ptr as *mut u64).write_unaligned(0);
1451 }
1452 self.0.encode(encoder, offset + 0, depth)?;
1454 self.1.encode(encoder, offset + 16, depth)?;
1455 self.2.encode(encoder, offset + 32, depth)?;
1456 Ok(())
1457 }
1458 }
1459
1460 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApConfig {
1461 #[inline(always)]
1462 fn new_empty() -> Self {
1463 Self {
1464 ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
1465 password: fidl::new_empty!(fidl::encoding::Vector<u8, 64>, D),
1466 radio_cfg: fidl::new_empty!(RadioConfig, D),
1467 }
1468 }
1469
1470 #[inline]
1471 unsafe fn decode(
1472 &mut self,
1473 decoder: &mut fidl::encoding::Decoder<'_, D>,
1474 offset: usize,
1475 _depth: fidl::encoding::Depth,
1476 ) -> fidl::Result<()> {
1477 decoder.debug_check_bounds::<Self>(offset);
1478 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
1480 let padval = unsafe { (ptr as *const u64).read_unaligned() };
1481 let mask = 0xffffffff00000000u64;
1482 let maskedval = padval & mask;
1483 if maskedval != 0 {
1484 return Err(fidl::Error::NonZeroPadding {
1485 padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
1486 });
1487 }
1488 fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 0, _depth)?;
1489 fidl::decode!(fidl::encoding::Vector<u8, 64>, D, &mut self.password, decoder, offset + 16, _depth)?;
1490 fidl::decode!(RadioConfig, D, &mut self.radio_cfg, decoder, offset + 32, _depth)?;
1491 Ok(())
1492 }
1493 }
1494
1495 impl fidl::encoding::ValueTypeMarker for ApSmeStartRequest {
1496 type Borrowed<'a> = &'a Self;
1497 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1498 value
1499 }
1500 }
1501
1502 unsafe impl fidl::encoding::TypeMarker for ApSmeStartRequest {
1503 type Owned = Self;
1504
1505 #[inline(always)]
1506 fn inline_align(_context: fidl::encoding::Context) -> usize {
1507 8
1508 }
1509
1510 #[inline(always)]
1511 fn inline_size(_context: fidl::encoding::Context) -> usize {
1512 48
1513 }
1514 }
1515
1516 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApSmeStartRequest, D>
1517 for &ApSmeStartRequest
1518 {
1519 #[inline]
1520 unsafe fn encode(
1521 self,
1522 encoder: &mut fidl::encoding::Encoder<'_, D>,
1523 offset: usize,
1524 _depth: fidl::encoding::Depth,
1525 ) -> fidl::Result<()> {
1526 encoder.debug_check_bounds::<ApSmeStartRequest>(offset);
1527 fidl::encoding::Encode::<ApSmeStartRequest, D>::encode(
1529 (<ApConfig as fidl::encoding::ValueTypeMarker>::borrow(&self.config),),
1530 encoder,
1531 offset,
1532 _depth,
1533 )
1534 }
1535 }
1536 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ApConfig, D>>
1537 fidl::encoding::Encode<ApSmeStartRequest, D> for (T0,)
1538 {
1539 #[inline]
1540 unsafe fn encode(
1541 self,
1542 encoder: &mut fidl::encoding::Encoder<'_, D>,
1543 offset: usize,
1544 depth: fidl::encoding::Depth,
1545 ) -> fidl::Result<()> {
1546 encoder.debug_check_bounds::<ApSmeStartRequest>(offset);
1547 self.0.encode(encoder, offset + 0, depth)?;
1551 Ok(())
1552 }
1553 }
1554
1555 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApSmeStartRequest {
1556 #[inline(always)]
1557 fn new_empty() -> Self {
1558 Self { config: fidl::new_empty!(ApConfig, D) }
1559 }
1560
1561 #[inline]
1562 unsafe fn decode(
1563 &mut self,
1564 decoder: &mut fidl::encoding::Decoder<'_, D>,
1565 offset: usize,
1566 _depth: fidl::encoding::Depth,
1567 ) -> fidl::Result<()> {
1568 decoder.debug_check_bounds::<Self>(offset);
1569 fidl::decode!(ApConfig, D, &mut self.config, decoder, offset + 0, _depth)?;
1571 Ok(())
1572 }
1573 }
1574
1575 impl fidl::encoding::ValueTypeMarker for ApSmeStartResponse {
1576 type Borrowed<'a> = &'a Self;
1577 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1578 value
1579 }
1580 }
1581
1582 unsafe impl fidl::encoding::TypeMarker for ApSmeStartResponse {
1583 type Owned = Self;
1584
1585 #[inline(always)]
1586 fn inline_align(_context: fidl::encoding::Context) -> usize {
1587 4
1588 }
1589
1590 #[inline(always)]
1591 fn inline_size(_context: fidl::encoding::Context) -> usize {
1592 4
1593 }
1594 }
1595
1596 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApSmeStartResponse, D>
1597 for &ApSmeStartResponse
1598 {
1599 #[inline]
1600 unsafe fn encode(
1601 self,
1602 encoder: &mut fidl::encoding::Encoder<'_, D>,
1603 offset: usize,
1604 _depth: fidl::encoding::Depth,
1605 ) -> fidl::Result<()> {
1606 encoder.debug_check_bounds::<ApSmeStartResponse>(offset);
1607 fidl::encoding::Encode::<ApSmeStartResponse, D>::encode(
1609 (<StartApResultCode as fidl::encoding::ValueTypeMarker>::borrow(&self.code),),
1610 encoder,
1611 offset,
1612 _depth,
1613 )
1614 }
1615 }
1616 unsafe impl<
1617 D: fidl::encoding::ResourceDialect,
1618 T0: fidl::encoding::Encode<StartApResultCode, D>,
1619 > fidl::encoding::Encode<ApSmeStartResponse, D> for (T0,)
1620 {
1621 #[inline]
1622 unsafe fn encode(
1623 self,
1624 encoder: &mut fidl::encoding::Encoder<'_, D>,
1625 offset: usize,
1626 depth: fidl::encoding::Depth,
1627 ) -> fidl::Result<()> {
1628 encoder.debug_check_bounds::<ApSmeStartResponse>(offset);
1629 self.0.encode(encoder, offset + 0, depth)?;
1633 Ok(())
1634 }
1635 }
1636
1637 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApSmeStartResponse {
1638 #[inline(always)]
1639 fn new_empty() -> Self {
1640 Self { code: fidl::new_empty!(StartApResultCode, D) }
1641 }
1642
1643 #[inline]
1644 unsafe fn decode(
1645 &mut self,
1646 decoder: &mut fidl::encoding::Decoder<'_, D>,
1647 offset: usize,
1648 _depth: fidl::encoding::Depth,
1649 ) -> fidl::Result<()> {
1650 decoder.debug_check_bounds::<Self>(offset);
1651 fidl::decode!(StartApResultCode, D, &mut self.code, decoder, offset + 0, _depth)?;
1653 Ok(())
1654 }
1655 }
1656
1657 impl fidl::encoding::ValueTypeMarker for ApSmeStatusResponse {
1658 type Borrowed<'a> = &'a Self;
1659 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1660 value
1661 }
1662 }
1663
1664 unsafe impl fidl::encoding::TypeMarker for ApSmeStatusResponse {
1665 type Owned = Self;
1666
1667 #[inline(always)]
1668 fn inline_align(_context: fidl::encoding::Context) -> usize {
1669 8
1670 }
1671
1672 #[inline(always)]
1673 fn inline_size(_context: fidl::encoding::Context) -> usize {
1674 8
1675 }
1676 }
1677
1678 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApSmeStatusResponse, D>
1679 for &ApSmeStatusResponse
1680 {
1681 #[inline]
1682 unsafe fn encode(
1683 self,
1684 encoder: &mut fidl::encoding::Encoder<'_, D>,
1685 offset: usize,
1686 _depth: fidl::encoding::Depth,
1687 ) -> fidl::Result<()> {
1688 encoder.debug_check_bounds::<ApSmeStatusResponse>(offset);
1689 fidl::encoding::Encode::<ApSmeStatusResponse, D>::encode(
1691 (<ApStatusResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
1692 encoder,
1693 offset,
1694 _depth,
1695 )
1696 }
1697 }
1698 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ApStatusResponse, D>>
1699 fidl::encoding::Encode<ApSmeStatusResponse, D> for (T0,)
1700 {
1701 #[inline]
1702 unsafe fn encode(
1703 self,
1704 encoder: &mut fidl::encoding::Encoder<'_, D>,
1705 offset: usize,
1706 depth: fidl::encoding::Depth,
1707 ) -> fidl::Result<()> {
1708 encoder.debug_check_bounds::<ApSmeStatusResponse>(offset);
1709 self.0.encode(encoder, offset + 0, depth)?;
1713 Ok(())
1714 }
1715 }
1716
1717 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApSmeStatusResponse {
1718 #[inline(always)]
1719 fn new_empty() -> Self {
1720 Self { resp: fidl::new_empty!(ApStatusResponse, D) }
1721 }
1722
1723 #[inline]
1724 unsafe fn decode(
1725 &mut self,
1726 decoder: &mut fidl::encoding::Decoder<'_, D>,
1727 offset: usize,
1728 _depth: fidl::encoding::Depth,
1729 ) -> fidl::Result<()> {
1730 decoder.debug_check_bounds::<Self>(offset);
1731 fidl::decode!(ApStatusResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
1733 Ok(())
1734 }
1735 }
1736
1737 impl fidl::encoding::ValueTypeMarker for ApSmeStopResponse {
1738 type Borrowed<'a> = &'a Self;
1739 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1740 value
1741 }
1742 }
1743
1744 unsafe impl fidl::encoding::TypeMarker for ApSmeStopResponse {
1745 type Owned = Self;
1746
1747 #[inline(always)]
1748 fn inline_align(_context: fidl::encoding::Context) -> usize {
1749 4
1750 }
1751
1752 #[inline(always)]
1753 fn inline_size(_context: fidl::encoding::Context) -> usize {
1754 4
1755 }
1756 }
1757
1758 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApSmeStopResponse, D>
1759 for &ApSmeStopResponse
1760 {
1761 #[inline]
1762 unsafe fn encode(
1763 self,
1764 encoder: &mut fidl::encoding::Encoder<'_, D>,
1765 offset: usize,
1766 _depth: fidl::encoding::Depth,
1767 ) -> fidl::Result<()> {
1768 encoder.debug_check_bounds::<ApSmeStopResponse>(offset);
1769 fidl::encoding::Encode::<ApSmeStopResponse, D>::encode(
1771 (<StopApResultCode as fidl::encoding::ValueTypeMarker>::borrow(&self.code),),
1772 encoder,
1773 offset,
1774 _depth,
1775 )
1776 }
1777 }
1778 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StopApResultCode, D>>
1779 fidl::encoding::Encode<ApSmeStopResponse, D> for (T0,)
1780 {
1781 #[inline]
1782 unsafe fn encode(
1783 self,
1784 encoder: &mut fidl::encoding::Encoder<'_, D>,
1785 offset: usize,
1786 depth: fidl::encoding::Depth,
1787 ) -> fidl::Result<()> {
1788 encoder.debug_check_bounds::<ApSmeStopResponse>(offset);
1789 self.0.encode(encoder, offset + 0, depth)?;
1793 Ok(())
1794 }
1795 }
1796
1797 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApSmeStopResponse {
1798 #[inline(always)]
1799 fn new_empty() -> Self {
1800 Self { code: fidl::new_empty!(StopApResultCode, D) }
1801 }
1802
1803 #[inline]
1804 unsafe fn decode(
1805 &mut self,
1806 decoder: &mut fidl::encoding::Decoder<'_, D>,
1807 offset: usize,
1808 _depth: fidl::encoding::Depth,
1809 ) -> fidl::Result<()> {
1810 decoder.debug_check_bounds::<Self>(offset);
1811 fidl::decode!(StopApResultCode, D, &mut self.code, decoder, offset + 0, _depth)?;
1813 Ok(())
1814 }
1815 }
1816
1817 impl fidl::encoding::ValueTypeMarker for ApStatusResponse {
1818 type Borrowed<'a> = &'a Self;
1819 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1820 value
1821 }
1822 }
1823
1824 unsafe impl fidl::encoding::TypeMarker for ApStatusResponse {
1825 type Owned = Self;
1826
1827 #[inline(always)]
1828 fn inline_align(_context: fidl::encoding::Context) -> usize {
1829 8
1830 }
1831
1832 #[inline(always)]
1833 fn inline_size(_context: fidl::encoding::Context) -> usize {
1834 8
1835 }
1836 }
1837
1838 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApStatusResponse, D>
1839 for &ApStatusResponse
1840 {
1841 #[inline]
1842 unsafe fn encode(
1843 self,
1844 encoder: &mut fidl::encoding::Encoder<'_, D>,
1845 offset: usize,
1846 _depth: fidl::encoding::Depth,
1847 ) -> fidl::Result<()> {
1848 encoder.debug_check_bounds::<ApStatusResponse>(offset);
1849 fidl::encoding::Encode::<ApStatusResponse, D>::encode(
1851 (<fidl::encoding::Boxed<Ap> as fidl::encoding::ValueTypeMarker>::borrow(
1852 &self.running_ap,
1853 ),),
1854 encoder,
1855 offset,
1856 _depth,
1857 )
1858 }
1859 }
1860 unsafe impl<
1861 D: fidl::encoding::ResourceDialect,
1862 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Ap>, D>,
1863 > fidl::encoding::Encode<ApStatusResponse, D> for (T0,)
1864 {
1865 #[inline]
1866 unsafe fn encode(
1867 self,
1868 encoder: &mut fidl::encoding::Encoder<'_, D>,
1869 offset: usize,
1870 depth: fidl::encoding::Depth,
1871 ) -> fidl::Result<()> {
1872 encoder.debug_check_bounds::<ApStatusResponse>(offset);
1873 self.0.encode(encoder, offset + 0, depth)?;
1877 Ok(())
1878 }
1879 }
1880
1881 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApStatusResponse {
1882 #[inline(always)]
1883 fn new_empty() -> Self {
1884 Self { running_ap: fidl::new_empty!(fidl::encoding::Boxed<Ap>, D) }
1885 }
1886
1887 #[inline]
1888 unsafe fn decode(
1889 &mut self,
1890 decoder: &mut fidl::encoding::Decoder<'_, D>,
1891 offset: usize,
1892 _depth: fidl::encoding::Depth,
1893 ) -> fidl::Result<()> {
1894 decoder.debug_check_bounds::<Self>(offset);
1895 fidl::decode!(
1897 fidl::encoding::Boxed<Ap>,
1898 D,
1899 &mut self.running_ap,
1900 decoder,
1901 offset + 0,
1902 _depth
1903 )?;
1904 Ok(())
1905 }
1906 }
1907
1908 impl fidl::encoding::ValueTypeMarker for ClientSmeDisconnectRequest {
1909 type Borrowed<'a> = &'a Self;
1910 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1911 value
1912 }
1913 }
1914
1915 unsafe impl fidl::encoding::TypeMarker for ClientSmeDisconnectRequest {
1916 type Owned = Self;
1917
1918 #[inline(always)]
1919 fn inline_align(_context: fidl::encoding::Context) -> usize {
1920 4
1921 }
1922
1923 #[inline(always)]
1924 fn inline_size(_context: fidl::encoding::Context) -> usize {
1925 4
1926 }
1927 }
1928
1929 unsafe impl<D: fidl::encoding::ResourceDialect>
1930 fidl::encoding::Encode<ClientSmeDisconnectRequest, D> for &ClientSmeDisconnectRequest
1931 {
1932 #[inline]
1933 unsafe fn encode(
1934 self,
1935 encoder: &mut fidl::encoding::Encoder<'_, D>,
1936 offset: usize,
1937 _depth: fidl::encoding::Depth,
1938 ) -> fidl::Result<()> {
1939 encoder.debug_check_bounds::<ClientSmeDisconnectRequest>(offset);
1940 fidl::encoding::Encode::<ClientSmeDisconnectRequest, D>::encode(
1942 (<UserDisconnectReason as fidl::encoding::ValueTypeMarker>::borrow(&self.reason),),
1943 encoder,
1944 offset,
1945 _depth,
1946 )
1947 }
1948 }
1949 unsafe impl<
1950 D: fidl::encoding::ResourceDialect,
1951 T0: fidl::encoding::Encode<UserDisconnectReason, D>,
1952 > fidl::encoding::Encode<ClientSmeDisconnectRequest, D> for (T0,)
1953 {
1954 #[inline]
1955 unsafe fn encode(
1956 self,
1957 encoder: &mut fidl::encoding::Encoder<'_, D>,
1958 offset: usize,
1959 depth: fidl::encoding::Depth,
1960 ) -> fidl::Result<()> {
1961 encoder.debug_check_bounds::<ClientSmeDisconnectRequest>(offset);
1962 self.0.encode(encoder, offset + 0, depth)?;
1966 Ok(())
1967 }
1968 }
1969
1970 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1971 for ClientSmeDisconnectRequest
1972 {
1973 #[inline(always)]
1974 fn new_empty() -> Self {
1975 Self { reason: fidl::new_empty!(UserDisconnectReason, D) }
1976 }
1977
1978 #[inline]
1979 unsafe fn decode(
1980 &mut self,
1981 decoder: &mut fidl::encoding::Decoder<'_, D>,
1982 offset: usize,
1983 _depth: fidl::encoding::Depth,
1984 ) -> fidl::Result<()> {
1985 decoder.debug_check_bounds::<Self>(offset);
1986 fidl::decode!(UserDisconnectReason, D, &mut self.reason, decoder, offset + 0, _depth)?;
1988 Ok(())
1989 }
1990 }
1991
1992 impl fidl::encoding::ValueTypeMarker for ClientSmeInstallApfPacketFilterRequest {
1993 type Borrowed<'a> = &'a Self;
1994 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1995 value
1996 }
1997 }
1998
1999 unsafe impl fidl::encoding::TypeMarker for ClientSmeInstallApfPacketFilterRequest {
2000 type Owned = Self;
2001
2002 #[inline(always)]
2003 fn inline_align(_context: fidl::encoding::Context) -> usize {
2004 8
2005 }
2006
2007 #[inline(always)]
2008 fn inline_size(_context: fidl::encoding::Context) -> usize {
2009 16
2010 }
2011 }
2012
2013 unsafe impl<D: fidl::encoding::ResourceDialect>
2014 fidl::encoding::Encode<ClientSmeInstallApfPacketFilterRequest, D>
2015 for &ClientSmeInstallApfPacketFilterRequest
2016 {
2017 #[inline]
2018 unsafe fn encode(
2019 self,
2020 encoder: &mut fidl::encoding::Encoder<'_, D>,
2021 offset: usize,
2022 _depth: fidl::encoding::Depth,
2023 ) -> fidl::Result<()> {
2024 encoder.debug_check_bounds::<ClientSmeInstallApfPacketFilterRequest>(offset);
2025 fidl::encoding::Encode::<ClientSmeInstallApfPacketFilterRequest, D>::encode(
2027 (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
2028 &self.program,
2029 ),),
2030 encoder,
2031 offset,
2032 _depth,
2033 )
2034 }
2035 }
2036 unsafe impl<
2037 D: fidl::encoding::ResourceDialect,
2038 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
2039 > fidl::encoding::Encode<ClientSmeInstallApfPacketFilterRequest, D> for (T0,)
2040 {
2041 #[inline]
2042 unsafe fn encode(
2043 self,
2044 encoder: &mut fidl::encoding::Encoder<'_, D>,
2045 offset: usize,
2046 depth: fidl::encoding::Depth,
2047 ) -> fidl::Result<()> {
2048 encoder.debug_check_bounds::<ClientSmeInstallApfPacketFilterRequest>(offset);
2049 self.0.encode(encoder, offset + 0, depth)?;
2053 Ok(())
2054 }
2055 }
2056
2057 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2058 for ClientSmeInstallApfPacketFilterRequest
2059 {
2060 #[inline(always)]
2061 fn new_empty() -> Self {
2062 Self { program: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
2063 }
2064
2065 #[inline]
2066 unsafe fn decode(
2067 &mut self,
2068 decoder: &mut fidl::encoding::Decoder<'_, D>,
2069 offset: usize,
2070 _depth: fidl::encoding::Depth,
2071 ) -> fidl::Result<()> {
2072 decoder.debug_check_bounds::<Self>(offset);
2073 fidl::decode!(
2075 fidl::encoding::UnboundedVector<u8>,
2076 D,
2077 &mut self.program,
2078 decoder,
2079 offset + 0,
2080 _depth
2081 )?;
2082 Ok(())
2083 }
2084 }
2085
2086 impl fidl::encoding::ValueTypeMarker for ClientSmeRoamRequest {
2087 type Borrowed<'a> = &'a Self;
2088 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2089 value
2090 }
2091 }
2092
2093 unsafe impl fidl::encoding::TypeMarker for ClientSmeRoamRequest {
2094 type Owned = Self;
2095
2096 #[inline(always)]
2097 fn inline_align(_context: fidl::encoding::Context) -> usize {
2098 8
2099 }
2100
2101 #[inline(always)]
2102 fn inline_size(_context: fidl::encoding::Context) -> usize {
2103 48
2104 }
2105 }
2106
2107 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ClientSmeRoamRequest, D>
2108 for &ClientSmeRoamRequest
2109 {
2110 #[inline]
2111 unsafe fn encode(
2112 self,
2113 encoder: &mut fidl::encoding::Encoder<'_, D>,
2114 offset: usize,
2115 _depth: fidl::encoding::Depth,
2116 ) -> fidl::Result<()> {
2117 encoder.debug_check_bounds::<ClientSmeRoamRequest>(offset);
2118 fidl::encoding::Encode::<ClientSmeRoamRequest, D>::encode(
2120 (<RoamRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
2121 encoder,
2122 offset,
2123 _depth,
2124 )
2125 }
2126 }
2127 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<RoamRequest, D>>
2128 fidl::encoding::Encode<ClientSmeRoamRequest, D> for (T0,)
2129 {
2130 #[inline]
2131 unsafe fn encode(
2132 self,
2133 encoder: &mut fidl::encoding::Encoder<'_, D>,
2134 offset: usize,
2135 depth: fidl::encoding::Depth,
2136 ) -> fidl::Result<()> {
2137 encoder.debug_check_bounds::<ClientSmeRoamRequest>(offset);
2138 self.0.encode(encoder, offset + 0, depth)?;
2142 Ok(())
2143 }
2144 }
2145
2146 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ClientSmeRoamRequest {
2147 #[inline(always)]
2148 fn new_empty() -> Self {
2149 Self { req: fidl::new_empty!(RoamRequest, D) }
2150 }
2151
2152 #[inline]
2153 unsafe fn decode(
2154 &mut self,
2155 decoder: &mut fidl::encoding::Decoder<'_, D>,
2156 offset: usize,
2157 _depth: fidl::encoding::Depth,
2158 ) -> fidl::Result<()> {
2159 decoder.debug_check_bounds::<Self>(offset);
2160 fidl::decode!(RoamRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
2162 Ok(())
2163 }
2164 }
2165
2166 impl fidl::encoding::ValueTypeMarker for ClientSmeSetApfPacketFilterEnabledRequest {
2167 type Borrowed<'a> = &'a Self;
2168 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2169 value
2170 }
2171 }
2172
2173 unsafe impl fidl::encoding::TypeMarker for ClientSmeSetApfPacketFilterEnabledRequest {
2174 type Owned = Self;
2175
2176 #[inline(always)]
2177 fn inline_align(_context: fidl::encoding::Context) -> usize {
2178 1
2179 }
2180
2181 #[inline(always)]
2182 fn inline_size(_context: fidl::encoding::Context) -> usize {
2183 1
2184 }
2185 }
2186
2187 unsafe impl<D: fidl::encoding::ResourceDialect>
2188 fidl::encoding::Encode<ClientSmeSetApfPacketFilterEnabledRequest, D>
2189 for &ClientSmeSetApfPacketFilterEnabledRequest
2190 {
2191 #[inline]
2192 unsafe fn encode(
2193 self,
2194 encoder: &mut fidl::encoding::Encoder<'_, D>,
2195 offset: usize,
2196 _depth: fidl::encoding::Depth,
2197 ) -> fidl::Result<()> {
2198 encoder.debug_check_bounds::<ClientSmeSetApfPacketFilterEnabledRequest>(offset);
2199 fidl::encoding::Encode::<ClientSmeSetApfPacketFilterEnabledRequest, D>::encode(
2201 (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.enabled),),
2202 encoder,
2203 offset,
2204 _depth,
2205 )
2206 }
2207 }
2208 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
2209 fidl::encoding::Encode<ClientSmeSetApfPacketFilterEnabledRequest, D> for (T0,)
2210 {
2211 #[inline]
2212 unsafe fn encode(
2213 self,
2214 encoder: &mut fidl::encoding::Encoder<'_, D>,
2215 offset: usize,
2216 depth: fidl::encoding::Depth,
2217 ) -> fidl::Result<()> {
2218 encoder.debug_check_bounds::<ClientSmeSetApfPacketFilterEnabledRequest>(offset);
2219 self.0.encode(encoder, offset + 0, depth)?;
2223 Ok(())
2224 }
2225 }
2226
2227 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2228 for ClientSmeSetApfPacketFilterEnabledRequest
2229 {
2230 #[inline(always)]
2231 fn new_empty() -> Self {
2232 Self { enabled: fidl::new_empty!(bool, D) }
2233 }
2234
2235 #[inline]
2236 unsafe fn decode(
2237 &mut self,
2238 decoder: &mut fidl::encoding::Decoder<'_, D>,
2239 offset: usize,
2240 _depth: fidl::encoding::Depth,
2241 ) -> fidl::Result<()> {
2242 decoder.debug_check_bounds::<Self>(offset);
2243 fidl::decode!(bool, D, &mut self.enabled, decoder, offset + 0, _depth)?;
2245 Ok(())
2246 }
2247 }
2248
2249 impl fidl::encoding::ValueTypeMarker for ClientSmeSetMacAddressRequest {
2250 type Borrowed<'a> = &'a Self;
2251 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2252 value
2253 }
2254 }
2255
2256 unsafe impl fidl::encoding::TypeMarker for ClientSmeSetMacAddressRequest {
2257 type Owned = Self;
2258
2259 #[inline(always)]
2260 fn inline_align(_context: fidl::encoding::Context) -> usize {
2261 1
2262 }
2263
2264 #[inline(always)]
2265 fn inline_size(_context: fidl::encoding::Context) -> usize {
2266 6
2267 }
2268 #[inline(always)]
2269 fn encode_is_copy() -> bool {
2270 true
2271 }
2272
2273 #[inline(always)]
2274 fn decode_is_copy() -> bool {
2275 true
2276 }
2277 }
2278
2279 unsafe impl<D: fidl::encoding::ResourceDialect>
2280 fidl::encoding::Encode<ClientSmeSetMacAddressRequest, D>
2281 for &ClientSmeSetMacAddressRequest
2282 {
2283 #[inline]
2284 unsafe fn encode(
2285 self,
2286 encoder: &mut fidl::encoding::Encoder<'_, D>,
2287 offset: usize,
2288 _depth: fidl::encoding::Depth,
2289 ) -> fidl::Result<()> {
2290 encoder.debug_check_bounds::<ClientSmeSetMacAddressRequest>(offset);
2291 unsafe {
2292 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2294 (buf_ptr as *mut ClientSmeSetMacAddressRequest)
2295 .write_unaligned((self as *const ClientSmeSetMacAddressRequest).read());
2296 }
2299 Ok(())
2300 }
2301 }
2302 unsafe impl<
2303 D: fidl::encoding::ResourceDialect,
2304 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
2305 > fidl::encoding::Encode<ClientSmeSetMacAddressRequest, D> for (T0,)
2306 {
2307 #[inline]
2308 unsafe fn encode(
2309 self,
2310 encoder: &mut fidl::encoding::Encoder<'_, D>,
2311 offset: usize,
2312 depth: fidl::encoding::Depth,
2313 ) -> fidl::Result<()> {
2314 encoder.debug_check_bounds::<ClientSmeSetMacAddressRequest>(offset);
2315 self.0.encode(encoder, offset + 0, depth)?;
2319 Ok(())
2320 }
2321 }
2322
2323 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2324 for ClientSmeSetMacAddressRequest
2325 {
2326 #[inline(always)]
2327 fn new_empty() -> Self {
2328 Self { mac_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D) }
2329 }
2330
2331 #[inline]
2332 unsafe fn decode(
2333 &mut self,
2334 decoder: &mut fidl::encoding::Decoder<'_, D>,
2335 offset: usize,
2336 _depth: fidl::encoding::Depth,
2337 ) -> fidl::Result<()> {
2338 decoder.debug_check_bounds::<Self>(offset);
2339 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2340 unsafe {
2343 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
2344 }
2345 Ok(())
2346 }
2347 }
2348
2349 impl fidl::encoding::ValueTypeMarker for ClientSmeStartRssiMonitorRequest {
2350 type Borrowed<'a> = &'a Self;
2351 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2352 value
2353 }
2354 }
2355
2356 unsafe impl fidl::encoding::TypeMarker for ClientSmeStartRssiMonitorRequest {
2357 type Owned = Self;
2358
2359 #[inline(always)]
2360 fn inline_align(_context: fidl::encoding::Context) -> usize {
2361 1
2362 }
2363
2364 #[inline(always)]
2365 fn inline_size(_context: fidl::encoding::Context) -> usize {
2366 2
2367 }
2368 #[inline(always)]
2369 fn encode_is_copy() -> bool {
2370 true
2371 }
2372
2373 #[inline(always)]
2374 fn decode_is_copy() -> bool {
2375 true
2376 }
2377 }
2378
2379 unsafe impl<D: fidl::encoding::ResourceDialect>
2380 fidl::encoding::Encode<ClientSmeStartRssiMonitorRequest, D>
2381 for &ClientSmeStartRssiMonitorRequest
2382 {
2383 #[inline]
2384 unsafe fn encode(
2385 self,
2386 encoder: &mut fidl::encoding::Encoder<'_, D>,
2387 offset: usize,
2388 _depth: fidl::encoding::Depth,
2389 ) -> fidl::Result<()> {
2390 encoder.debug_check_bounds::<ClientSmeStartRssiMonitorRequest>(offset);
2391 unsafe {
2392 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2394 (buf_ptr as *mut ClientSmeStartRssiMonitorRequest)
2395 .write_unaligned((self as *const ClientSmeStartRssiMonitorRequest).read());
2396 }
2399 Ok(())
2400 }
2401 }
2402 unsafe impl<
2403 D: fidl::encoding::ResourceDialect,
2404 T0: fidl::encoding::Encode<i8, D>,
2405 T1: fidl::encoding::Encode<i8, D>,
2406 > fidl::encoding::Encode<ClientSmeStartRssiMonitorRequest, D> for (T0, T1)
2407 {
2408 #[inline]
2409 unsafe fn encode(
2410 self,
2411 encoder: &mut fidl::encoding::Encoder<'_, D>,
2412 offset: usize,
2413 depth: fidl::encoding::Depth,
2414 ) -> fidl::Result<()> {
2415 encoder.debug_check_bounds::<ClientSmeStartRssiMonitorRequest>(offset);
2416 self.0.encode(encoder, offset + 0, depth)?;
2420 self.1.encode(encoder, offset + 1, depth)?;
2421 Ok(())
2422 }
2423 }
2424
2425 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2426 for ClientSmeStartRssiMonitorRequest
2427 {
2428 #[inline(always)]
2429 fn new_empty() -> Self {
2430 Self { min_rssi_dbm: fidl::new_empty!(i8, D), max_rssi_dbm: fidl::new_empty!(i8, D) }
2431 }
2432
2433 #[inline]
2434 unsafe fn decode(
2435 &mut self,
2436 decoder: &mut fidl::encoding::Decoder<'_, D>,
2437 offset: usize,
2438 _depth: fidl::encoding::Depth,
2439 ) -> fidl::Result<()> {
2440 decoder.debug_check_bounds::<Self>(offset);
2441 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2442 unsafe {
2445 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
2446 }
2447 Ok(())
2448 }
2449 }
2450
2451 impl fidl::encoding::ValueTypeMarker for ClientSmeStatusResponse {
2452 type Borrowed<'a> = &'a Self;
2453 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2454 value
2455 }
2456 }
2457
2458 unsafe impl fidl::encoding::TypeMarker for ClientSmeStatusResponse {
2459 type Owned = Self;
2460
2461 #[inline(always)]
2462 fn inline_align(_context: fidl::encoding::Context) -> usize {
2463 8
2464 }
2465
2466 #[inline(always)]
2467 fn inline_size(_context: fidl::encoding::Context) -> usize {
2468 16
2469 }
2470 }
2471
2472 unsafe impl<D: fidl::encoding::ResourceDialect>
2473 fidl::encoding::Encode<ClientSmeStatusResponse, D> for &ClientSmeStatusResponse
2474 {
2475 #[inline]
2476 unsafe fn encode(
2477 self,
2478 encoder: &mut fidl::encoding::Encoder<'_, D>,
2479 offset: usize,
2480 _depth: fidl::encoding::Depth,
2481 ) -> fidl::Result<()> {
2482 encoder.debug_check_bounds::<ClientSmeStatusResponse>(offset);
2483 fidl::encoding::Encode::<ClientSmeStatusResponse, D>::encode(
2485 (<ClientStatusResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
2486 encoder,
2487 offset,
2488 _depth,
2489 )
2490 }
2491 }
2492 unsafe impl<
2493 D: fidl::encoding::ResourceDialect,
2494 T0: fidl::encoding::Encode<ClientStatusResponse, D>,
2495 > fidl::encoding::Encode<ClientSmeStatusResponse, D> for (T0,)
2496 {
2497 #[inline]
2498 unsafe fn encode(
2499 self,
2500 encoder: &mut fidl::encoding::Encoder<'_, D>,
2501 offset: usize,
2502 depth: fidl::encoding::Depth,
2503 ) -> fidl::Result<()> {
2504 encoder.debug_check_bounds::<ClientSmeStatusResponse>(offset);
2505 self.0.encode(encoder, offset + 0, depth)?;
2509 Ok(())
2510 }
2511 }
2512
2513 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2514 for ClientSmeStatusResponse
2515 {
2516 #[inline(always)]
2517 fn new_empty() -> Self {
2518 Self { resp: fidl::new_empty!(ClientStatusResponse, D) }
2519 }
2520
2521 #[inline]
2522 unsafe fn decode(
2523 &mut self,
2524 decoder: &mut fidl::encoding::Decoder<'_, D>,
2525 offset: usize,
2526 _depth: fidl::encoding::Depth,
2527 ) -> fidl::Result<()> {
2528 decoder.debug_check_bounds::<Self>(offset);
2529 fidl::decode!(ClientStatusResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
2531 Ok(())
2532 }
2533 }
2534
2535 impl fidl::encoding::ValueTypeMarker for ClientSmeGetApfPacketFilterEnabledResponse {
2536 type Borrowed<'a> = &'a Self;
2537 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2538 value
2539 }
2540 }
2541
2542 unsafe impl fidl::encoding::TypeMarker for ClientSmeGetApfPacketFilterEnabledResponse {
2543 type Owned = Self;
2544
2545 #[inline(always)]
2546 fn inline_align(_context: fidl::encoding::Context) -> usize {
2547 1
2548 }
2549
2550 #[inline(always)]
2551 fn inline_size(_context: fidl::encoding::Context) -> usize {
2552 1
2553 }
2554 }
2555
2556 unsafe impl<D: fidl::encoding::ResourceDialect>
2557 fidl::encoding::Encode<ClientSmeGetApfPacketFilterEnabledResponse, D>
2558 for &ClientSmeGetApfPacketFilterEnabledResponse
2559 {
2560 #[inline]
2561 unsafe fn encode(
2562 self,
2563 encoder: &mut fidl::encoding::Encoder<'_, D>,
2564 offset: usize,
2565 _depth: fidl::encoding::Depth,
2566 ) -> fidl::Result<()> {
2567 encoder.debug_check_bounds::<ClientSmeGetApfPacketFilterEnabledResponse>(offset);
2568 fidl::encoding::Encode::<ClientSmeGetApfPacketFilterEnabledResponse, D>::encode(
2570 (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.enabled),),
2571 encoder,
2572 offset,
2573 _depth,
2574 )
2575 }
2576 }
2577 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
2578 fidl::encoding::Encode<ClientSmeGetApfPacketFilterEnabledResponse, D> for (T0,)
2579 {
2580 #[inline]
2581 unsafe fn encode(
2582 self,
2583 encoder: &mut fidl::encoding::Encoder<'_, D>,
2584 offset: usize,
2585 depth: fidl::encoding::Depth,
2586 ) -> fidl::Result<()> {
2587 encoder.debug_check_bounds::<ClientSmeGetApfPacketFilterEnabledResponse>(offset);
2588 self.0.encode(encoder, offset + 0, depth)?;
2592 Ok(())
2593 }
2594 }
2595
2596 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2597 for ClientSmeGetApfPacketFilterEnabledResponse
2598 {
2599 #[inline(always)]
2600 fn new_empty() -> Self {
2601 Self { enabled: fidl::new_empty!(bool, D) }
2602 }
2603
2604 #[inline]
2605 unsafe fn decode(
2606 &mut self,
2607 decoder: &mut fidl::encoding::Decoder<'_, D>,
2608 offset: usize,
2609 _depth: fidl::encoding::Depth,
2610 ) -> fidl::Result<()> {
2611 decoder.debug_check_bounds::<Self>(offset);
2612 fidl::decode!(bool, D, &mut self.enabled, decoder, offset + 0, _depth)?;
2614 Ok(())
2615 }
2616 }
2617
2618 impl fidl::encoding::ValueTypeMarker for ClientSmeGetScheduledScanEnabledResponse {
2619 type Borrowed<'a> = &'a Self;
2620 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2621 value
2622 }
2623 }
2624
2625 unsafe impl fidl::encoding::TypeMarker for ClientSmeGetScheduledScanEnabledResponse {
2626 type Owned = Self;
2627
2628 #[inline(always)]
2629 fn inline_align(_context: fidl::encoding::Context) -> usize {
2630 1
2631 }
2632
2633 #[inline(always)]
2634 fn inline_size(_context: fidl::encoding::Context) -> usize {
2635 1
2636 }
2637 }
2638
2639 unsafe impl<D: fidl::encoding::ResourceDialect>
2640 fidl::encoding::Encode<ClientSmeGetScheduledScanEnabledResponse, D>
2641 for &ClientSmeGetScheduledScanEnabledResponse
2642 {
2643 #[inline]
2644 unsafe fn encode(
2645 self,
2646 encoder: &mut fidl::encoding::Encoder<'_, D>,
2647 offset: usize,
2648 _depth: fidl::encoding::Depth,
2649 ) -> fidl::Result<()> {
2650 encoder.debug_check_bounds::<ClientSmeGetScheduledScanEnabledResponse>(offset);
2651 fidl::encoding::Encode::<ClientSmeGetScheduledScanEnabledResponse, D>::encode(
2653 (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.enabled),),
2654 encoder,
2655 offset,
2656 _depth,
2657 )
2658 }
2659 }
2660 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
2661 fidl::encoding::Encode<ClientSmeGetScheduledScanEnabledResponse, D> for (T0,)
2662 {
2663 #[inline]
2664 unsafe fn encode(
2665 self,
2666 encoder: &mut fidl::encoding::Encoder<'_, D>,
2667 offset: usize,
2668 depth: fidl::encoding::Depth,
2669 ) -> fidl::Result<()> {
2670 encoder.debug_check_bounds::<ClientSmeGetScheduledScanEnabledResponse>(offset);
2671 self.0.encode(encoder, offset + 0, depth)?;
2675 Ok(())
2676 }
2677 }
2678
2679 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2680 for ClientSmeGetScheduledScanEnabledResponse
2681 {
2682 #[inline(always)]
2683 fn new_empty() -> Self {
2684 Self { enabled: fidl::new_empty!(bool, D) }
2685 }
2686
2687 #[inline]
2688 unsafe fn decode(
2689 &mut self,
2690 decoder: &mut fidl::encoding::Decoder<'_, D>,
2691 offset: usize,
2692 _depth: fidl::encoding::Depth,
2693 ) -> fidl::Result<()> {
2694 decoder.debug_check_bounds::<Self>(offset);
2695 fidl::decode!(bool, D, &mut self.enabled, decoder, offset + 0, _depth)?;
2697 Ok(())
2698 }
2699 }
2700
2701 impl fidl::encoding::ValueTypeMarker for ClientSmeReadApfPacketFilterDataResponse {
2702 type Borrowed<'a> = &'a Self;
2703 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2704 value
2705 }
2706 }
2707
2708 unsafe impl fidl::encoding::TypeMarker for ClientSmeReadApfPacketFilterDataResponse {
2709 type Owned = Self;
2710
2711 #[inline(always)]
2712 fn inline_align(_context: fidl::encoding::Context) -> usize {
2713 8
2714 }
2715
2716 #[inline(always)]
2717 fn inline_size(_context: fidl::encoding::Context) -> usize {
2718 16
2719 }
2720 }
2721
2722 unsafe impl<D: fidl::encoding::ResourceDialect>
2723 fidl::encoding::Encode<ClientSmeReadApfPacketFilterDataResponse, D>
2724 for &ClientSmeReadApfPacketFilterDataResponse
2725 {
2726 #[inline]
2727 unsafe fn encode(
2728 self,
2729 encoder: &mut fidl::encoding::Encoder<'_, D>,
2730 offset: usize,
2731 _depth: fidl::encoding::Depth,
2732 ) -> fidl::Result<()> {
2733 encoder.debug_check_bounds::<ClientSmeReadApfPacketFilterDataResponse>(offset);
2734 fidl::encoding::Encode::<ClientSmeReadApfPacketFilterDataResponse, D>::encode(
2736 (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
2737 &self.memory,
2738 ),),
2739 encoder,
2740 offset,
2741 _depth,
2742 )
2743 }
2744 }
2745 unsafe impl<
2746 D: fidl::encoding::ResourceDialect,
2747 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
2748 > fidl::encoding::Encode<ClientSmeReadApfPacketFilterDataResponse, D> for (T0,)
2749 {
2750 #[inline]
2751 unsafe fn encode(
2752 self,
2753 encoder: &mut fidl::encoding::Encoder<'_, D>,
2754 offset: usize,
2755 depth: fidl::encoding::Depth,
2756 ) -> fidl::Result<()> {
2757 encoder.debug_check_bounds::<ClientSmeReadApfPacketFilterDataResponse>(offset);
2758 self.0.encode(encoder, offset + 0, depth)?;
2762 Ok(())
2763 }
2764 }
2765
2766 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2767 for ClientSmeReadApfPacketFilterDataResponse
2768 {
2769 #[inline(always)]
2770 fn new_empty() -> Self {
2771 Self { memory: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
2772 }
2773
2774 #[inline]
2775 unsafe fn decode(
2776 &mut self,
2777 decoder: &mut fidl::encoding::Decoder<'_, D>,
2778 offset: usize,
2779 _depth: fidl::encoding::Depth,
2780 ) -> fidl::Result<()> {
2781 decoder.debug_check_bounds::<Self>(offset);
2782 fidl::decode!(
2784 fidl::encoding::UnboundedVector<u8>,
2785 D,
2786 &mut self.memory,
2787 decoder,
2788 offset + 0,
2789 _depth
2790 )?;
2791 Ok(())
2792 }
2793 }
2794
2795 impl fidl::encoding::ValueTypeMarker for ClientSmeWmmStatusResponse {
2796 type Borrowed<'a> = &'a Self;
2797 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2798 value
2799 }
2800 }
2801
2802 unsafe impl fidl::encoding::TypeMarker for ClientSmeWmmStatusResponse {
2803 type Owned = Self;
2804
2805 #[inline(always)]
2806 fn inline_align(_context: fidl::encoding::Context) -> usize {
2807 2
2808 }
2809
2810 #[inline(always)]
2811 fn inline_size(_context: fidl::encoding::Context) -> usize {
2812 34
2813 }
2814 }
2815
2816 unsafe impl<D: fidl::encoding::ResourceDialect>
2817 fidl::encoding::Encode<ClientSmeWmmStatusResponse, D> for &ClientSmeWmmStatusResponse
2818 {
2819 #[inline]
2820 unsafe fn encode(
2821 self,
2822 encoder: &mut fidl::encoding::Encoder<'_, D>,
2823 offset: usize,
2824 _depth: fidl::encoding::Depth,
2825 ) -> fidl::Result<()> {
2826 encoder.debug_check_bounds::<ClientSmeWmmStatusResponse>(offset);
2827 fidl::encoding::Encode::<ClientSmeWmmStatusResponse, D>::encode(
2829 (
2830 <fidl_fuchsia_wlan_internal_common::WmmStatusResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
2831 ),
2832 encoder, offset, _depth
2833 )
2834 }
2835 }
2836 unsafe impl<
2837 D: fidl::encoding::ResourceDialect,
2838 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal_common::WmmStatusResponse, D>,
2839 > fidl::encoding::Encode<ClientSmeWmmStatusResponse, D> for (T0,)
2840 {
2841 #[inline]
2842 unsafe fn encode(
2843 self,
2844 encoder: &mut fidl::encoding::Encoder<'_, D>,
2845 offset: usize,
2846 depth: fidl::encoding::Depth,
2847 ) -> fidl::Result<()> {
2848 encoder.debug_check_bounds::<ClientSmeWmmStatusResponse>(offset);
2849 self.0.encode(encoder, offset + 0, depth)?;
2853 Ok(())
2854 }
2855 }
2856
2857 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2858 for ClientSmeWmmStatusResponse
2859 {
2860 #[inline(always)]
2861 fn new_empty() -> Self {
2862 Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_internal_common::WmmStatusResponse, D) }
2863 }
2864
2865 #[inline]
2866 unsafe fn decode(
2867 &mut self,
2868 decoder: &mut fidl::encoding::Decoder<'_, D>,
2869 offset: usize,
2870 _depth: fidl::encoding::Depth,
2871 ) -> fidl::Result<()> {
2872 decoder.debug_check_bounds::<Self>(offset);
2873 fidl::decode!(
2875 fidl_fuchsia_wlan_internal_common::WmmStatusResponse,
2876 D,
2877 &mut self.resp,
2878 decoder,
2879 offset + 0,
2880 _depth
2881 )?;
2882 Ok(())
2883 }
2884 }
2885
2886 impl fidl::encoding::ValueTypeMarker for Compatible {
2887 type Borrowed<'a> = &'a Self;
2888 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2889 value
2890 }
2891 }
2892
2893 unsafe impl fidl::encoding::TypeMarker for Compatible {
2894 type Owned = Self;
2895
2896 #[inline(always)]
2897 fn inline_align(_context: fidl::encoding::Context) -> usize {
2898 8
2899 }
2900
2901 #[inline(always)]
2902 fn inline_size(_context: fidl::encoding::Context) -> usize {
2903 16
2904 }
2905 }
2906
2907 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Compatible, D>
2908 for &Compatible
2909 {
2910 #[inline]
2911 unsafe fn encode(
2912 self,
2913 encoder: &mut fidl::encoding::Encoder<'_, D>,
2914 offset: usize,
2915 _depth: fidl::encoding::Depth,
2916 ) -> fidl::Result<()> {
2917 encoder.debug_check_bounds::<Compatible>(offset);
2918 fidl::encoding::Encode::<Compatible, D>::encode(
2920 (
2921 <fidl::encoding::Vector<fidl_fuchsia_wlan_internal_common::Protocol, 16> as fidl::encoding::ValueTypeMarker>::borrow(&self.mutual_security_protocols),
2922 ),
2923 encoder, offset, _depth
2924 )
2925 }
2926 }
2927 unsafe impl<
2928 D: fidl::encoding::ResourceDialect,
2929 T0: fidl::encoding::Encode<
2930 fidl::encoding::Vector<fidl_fuchsia_wlan_internal_common::Protocol, 16>,
2931 D,
2932 >,
2933 > fidl::encoding::Encode<Compatible, D> for (T0,)
2934 {
2935 #[inline]
2936 unsafe fn encode(
2937 self,
2938 encoder: &mut fidl::encoding::Encoder<'_, D>,
2939 offset: usize,
2940 depth: fidl::encoding::Depth,
2941 ) -> fidl::Result<()> {
2942 encoder.debug_check_bounds::<Compatible>(offset);
2943 self.0.encode(encoder, offset + 0, depth)?;
2947 Ok(())
2948 }
2949 }
2950
2951 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Compatible {
2952 #[inline(always)]
2953 fn new_empty() -> Self {
2954 Self {
2955 mutual_security_protocols: fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_wlan_internal_common::Protocol, 16>, D),
2956 }
2957 }
2958
2959 #[inline]
2960 unsafe fn decode(
2961 &mut self,
2962 decoder: &mut fidl::encoding::Decoder<'_, D>,
2963 offset: usize,
2964 _depth: fidl::encoding::Depth,
2965 ) -> fidl::Result<()> {
2966 decoder.debug_check_bounds::<Self>(offset);
2967 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_wlan_internal_common::Protocol, 16>, D, &mut self.mutual_security_protocols, decoder, offset + 0, _depth)?;
2969 Ok(())
2970 }
2971 }
2972
2973 impl fidl::encoding::ValueTypeMarker for ConnectRequest {
2974 type Borrowed<'a> = &'a Self;
2975 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2976 value
2977 }
2978 }
2979
2980 unsafe impl fidl::encoding::TypeMarker for ConnectRequest {
2981 type Owned = Self;
2982
2983 #[inline(always)]
2984 fn inline_align(_context: fidl::encoding::Context) -> usize {
2985 8
2986 }
2987
2988 #[inline(always)]
2989 fn inline_size(_context: fidl::encoding::Context) -> usize {
2990 104
2991 }
2992 }
2993
2994 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ConnectRequest, D>
2995 for &ConnectRequest
2996 {
2997 #[inline]
2998 unsafe fn encode(
2999 self,
3000 encoder: &mut fidl::encoding::Encoder<'_, D>,
3001 offset: usize,
3002 _depth: fidl::encoding::Depth,
3003 ) -> fidl::Result<()> {
3004 encoder.debug_check_bounds::<ConnectRequest>(offset);
3005 fidl::encoding::Encode::<ConnectRequest, D>::encode(
3007 (
3008 <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssid),
3009 <fidl_fuchsia_wlan_ieee80211_common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.bss_description),
3010 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.multiple_bss_candidates),
3011 <fidl_fuchsia_wlan_internal_common::Authentication as fidl::encoding::ValueTypeMarker>::borrow(&self.authentication),
3012 <fidl_fuchsia_wlan_common_common::ScanType as fidl::encoding::ValueTypeMarker>::borrow(&self.deprecated_scan_type),
3013 ),
3014 encoder, offset, _depth
3015 )
3016 }
3017 }
3018 unsafe impl<
3019 D: fidl::encoding::ResourceDialect,
3020 T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
3021 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211_common::BssDescription, D>,
3022 T2: fidl::encoding::Encode<bool, D>,
3023 T3: fidl::encoding::Encode<fidl_fuchsia_wlan_internal_common::Authentication, D>,
3024 T4: fidl::encoding::Encode<fidl_fuchsia_wlan_common_common::ScanType, D>,
3025 > fidl::encoding::Encode<ConnectRequest, D> for (T0, T1, T2, T3, T4)
3026 {
3027 #[inline]
3028 unsafe fn encode(
3029 self,
3030 encoder: &mut fidl::encoding::Encoder<'_, D>,
3031 offset: usize,
3032 depth: fidl::encoding::Depth,
3033 ) -> fidl::Result<()> {
3034 encoder.debug_check_bounds::<ConnectRequest>(offset);
3035 unsafe {
3038 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(64);
3039 (ptr as *mut u64).write_unaligned(0);
3040 }
3041 unsafe {
3042 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(96);
3043 (ptr as *mut u64).write_unaligned(0);
3044 }
3045 self.0.encode(encoder, offset + 0, depth)?;
3047 self.1.encode(encoder, offset + 16, depth)?;
3048 self.2.encode(encoder, offset + 64, depth)?;
3049 self.3.encode(encoder, offset + 72, depth)?;
3050 self.4.encode(encoder, offset + 96, depth)?;
3051 Ok(())
3052 }
3053 }
3054
3055 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ConnectRequest {
3056 #[inline(always)]
3057 fn new_empty() -> Self {
3058 Self {
3059 ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
3060 bss_description: fidl::new_empty!(
3061 fidl_fuchsia_wlan_ieee80211_common::BssDescription,
3062 D
3063 ),
3064 multiple_bss_candidates: fidl::new_empty!(bool, D),
3065 authentication: fidl::new_empty!(
3066 fidl_fuchsia_wlan_internal_common::Authentication,
3067 D
3068 ),
3069 deprecated_scan_type: fidl::new_empty!(
3070 fidl_fuchsia_wlan_common_common::ScanType,
3071 D
3072 ),
3073 }
3074 }
3075
3076 #[inline]
3077 unsafe fn decode(
3078 &mut self,
3079 decoder: &mut fidl::encoding::Decoder<'_, D>,
3080 offset: usize,
3081 _depth: fidl::encoding::Depth,
3082 ) -> fidl::Result<()> {
3083 decoder.debug_check_bounds::<Self>(offset);
3084 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(64) };
3086 let padval = unsafe { (ptr as *const u64).read_unaligned() };
3087 let mask = 0xffffffffffffff00u64;
3088 let maskedval = padval & mask;
3089 if maskedval != 0 {
3090 return Err(fidl::Error::NonZeroPadding {
3091 padding_start: offset + 64 + ((mask as u64).trailing_zeros() / 8) as usize,
3092 });
3093 }
3094 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(96) };
3095 let padval = unsafe { (ptr as *const u64).read_unaligned() };
3096 let mask = 0xffffffff00000000u64;
3097 let maskedval = padval & mask;
3098 if maskedval != 0 {
3099 return Err(fidl::Error::NonZeroPadding {
3100 padding_start: offset + 96 + ((mask as u64).trailing_zeros() / 8) as usize,
3101 });
3102 }
3103 fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 0, _depth)?;
3104 fidl::decode!(
3105 fidl_fuchsia_wlan_ieee80211_common::BssDescription,
3106 D,
3107 &mut self.bss_description,
3108 decoder,
3109 offset + 16,
3110 _depth
3111 )?;
3112 fidl::decode!(
3113 bool,
3114 D,
3115 &mut self.multiple_bss_candidates,
3116 decoder,
3117 offset + 64,
3118 _depth
3119 )?;
3120 fidl::decode!(
3121 fidl_fuchsia_wlan_internal_common::Authentication,
3122 D,
3123 &mut self.authentication,
3124 decoder,
3125 offset + 72,
3126 _depth
3127 )?;
3128 fidl::decode!(
3129 fidl_fuchsia_wlan_common_common::ScanType,
3130 D,
3131 &mut self.deprecated_scan_type,
3132 decoder,
3133 offset + 96,
3134 _depth
3135 )?;
3136 Ok(())
3137 }
3138 }
3139
3140 impl fidl::encoding::ValueTypeMarker for ConnectResult {
3141 type Borrowed<'a> = &'a Self;
3142 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3143 value
3144 }
3145 }
3146
3147 unsafe impl fidl::encoding::TypeMarker for ConnectResult {
3148 type Owned = Self;
3149
3150 #[inline(always)]
3151 fn inline_align(_context: fidl::encoding::Context) -> usize {
3152 2
3153 }
3154
3155 #[inline(always)]
3156 fn inline_size(_context: fidl::encoding::Context) -> usize {
3157 4
3158 }
3159 }
3160
3161 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ConnectResult, D>
3162 for &ConnectResult
3163 {
3164 #[inline]
3165 unsafe fn encode(
3166 self,
3167 encoder: &mut fidl::encoding::Encoder<'_, D>,
3168 offset: usize,
3169 _depth: fidl::encoding::Depth,
3170 ) -> fidl::Result<()> {
3171 encoder.debug_check_bounds::<ConnectResult>(offset);
3172 fidl::encoding::Encode::<ConnectResult, D>::encode(
3174 (
3175 <fidl_fuchsia_wlan_ieee80211_common::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.code),
3176 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.is_credential_rejected),
3177 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.is_reconnect),
3178 ),
3179 encoder, offset, _depth
3180 )
3181 }
3182 }
3183 unsafe impl<
3184 D: fidl::encoding::ResourceDialect,
3185 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211_common::StatusCode, D>,
3186 T1: fidl::encoding::Encode<bool, D>,
3187 T2: fidl::encoding::Encode<bool, D>,
3188 > fidl::encoding::Encode<ConnectResult, D> for (T0, T1, T2)
3189 {
3190 #[inline]
3191 unsafe fn encode(
3192 self,
3193 encoder: &mut fidl::encoding::Encoder<'_, D>,
3194 offset: usize,
3195 depth: fidl::encoding::Depth,
3196 ) -> fidl::Result<()> {
3197 encoder.debug_check_bounds::<ConnectResult>(offset);
3198 self.0.encode(encoder, offset + 0, depth)?;
3202 self.1.encode(encoder, offset + 2, depth)?;
3203 self.2.encode(encoder, offset + 3, depth)?;
3204 Ok(())
3205 }
3206 }
3207
3208 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ConnectResult {
3209 #[inline(always)]
3210 fn new_empty() -> Self {
3211 Self {
3212 code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211_common::StatusCode, D),
3213 is_credential_rejected: fidl::new_empty!(bool, D),
3214 is_reconnect: fidl::new_empty!(bool, D),
3215 }
3216 }
3217
3218 #[inline]
3219 unsafe fn decode(
3220 &mut self,
3221 decoder: &mut fidl::encoding::Decoder<'_, D>,
3222 offset: usize,
3223 _depth: fidl::encoding::Depth,
3224 ) -> fidl::Result<()> {
3225 decoder.debug_check_bounds::<Self>(offset);
3226 fidl::decode!(
3228 fidl_fuchsia_wlan_ieee80211_common::StatusCode,
3229 D,
3230 &mut self.code,
3231 decoder,
3232 offset + 0,
3233 _depth
3234 )?;
3235 fidl::decode!(bool, D, &mut self.is_credential_rejected, decoder, offset + 2, _depth)?;
3236 fidl::decode!(bool, D, &mut self.is_reconnect, decoder, offset + 3, _depth)?;
3237 Ok(())
3238 }
3239 }
3240
3241 impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnChannelSwitchedRequest {
3242 type Borrowed<'a> = &'a Self;
3243 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3244 value
3245 }
3246 }
3247
3248 unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnChannelSwitchedRequest {
3249 type Owned = Self;
3250
3251 #[inline(always)]
3252 fn inline_align(_context: fidl::encoding::Context) -> usize {
3253 4
3254 }
3255
3256 #[inline(always)]
3257 fn inline_size(_context: fidl::encoding::Context) -> usize {
3258 12
3259 }
3260 }
3261
3262 unsafe impl<D: fidl::encoding::ResourceDialect>
3263 fidl::encoding::Encode<ConnectTransactionOnChannelSwitchedRequest, D>
3264 for &ConnectTransactionOnChannelSwitchedRequest
3265 {
3266 #[inline]
3267 unsafe fn encode(
3268 self,
3269 encoder: &mut fidl::encoding::Encoder<'_, D>,
3270 offset: usize,
3271 _depth: fidl::encoding::Depth,
3272 ) -> fidl::Result<()> {
3273 encoder.debug_check_bounds::<ConnectTransactionOnChannelSwitchedRequest>(offset);
3274 fidl::encoding::Encode::<ConnectTransactionOnChannelSwitchedRequest, D>::encode(
3276 (
3277 <fidl_fuchsia_wlan_internal_common::ChannelSwitchInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),
3278 ),
3279 encoder, offset, _depth
3280 )
3281 }
3282 }
3283 unsafe impl<
3284 D: fidl::encoding::ResourceDialect,
3285 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal_common::ChannelSwitchInfo, D>,
3286 > fidl::encoding::Encode<ConnectTransactionOnChannelSwitchedRequest, D> for (T0,)
3287 {
3288 #[inline]
3289 unsafe fn encode(
3290 self,
3291 encoder: &mut fidl::encoding::Encoder<'_, D>,
3292 offset: usize,
3293 depth: fidl::encoding::Depth,
3294 ) -> fidl::Result<()> {
3295 encoder.debug_check_bounds::<ConnectTransactionOnChannelSwitchedRequest>(offset);
3296 self.0.encode(encoder, offset + 0, depth)?;
3300 Ok(())
3301 }
3302 }
3303
3304 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3305 for ConnectTransactionOnChannelSwitchedRequest
3306 {
3307 #[inline(always)]
3308 fn new_empty() -> Self {
3309 Self { info: fidl::new_empty!(fidl_fuchsia_wlan_internal_common::ChannelSwitchInfo, D) }
3310 }
3311
3312 #[inline]
3313 unsafe fn decode(
3314 &mut self,
3315 decoder: &mut fidl::encoding::Decoder<'_, D>,
3316 offset: usize,
3317 _depth: fidl::encoding::Depth,
3318 ) -> fidl::Result<()> {
3319 decoder.debug_check_bounds::<Self>(offset);
3320 fidl::decode!(
3322 fidl_fuchsia_wlan_internal_common::ChannelSwitchInfo,
3323 D,
3324 &mut self.info,
3325 decoder,
3326 offset + 0,
3327 _depth
3328 )?;
3329 Ok(())
3330 }
3331 }
3332
3333 impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnConnectResultRequest {
3334 type Borrowed<'a> = &'a Self;
3335 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3336 value
3337 }
3338 }
3339
3340 unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnConnectResultRequest {
3341 type Owned = Self;
3342
3343 #[inline(always)]
3344 fn inline_align(_context: fidl::encoding::Context) -> usize {
3345 2
3346 }
3347
3348 #[inline(always)]
3349 fn inline_size(_context: fidl::encoding::Context) -> usize {
3350 4
3351 }
3352 }
3353
3354 unsafe impl<D: fidl::encoding::ResourceDialect>
3355 fidl::encoding::Encode<ConnectTransactionOnConnectResultRequest, D>
3356 for &ConnectTransactionOnConnectResultRequest
3357 {
3358 #[inline]
3359 unsafe fn encode(
3360 self,
3361 encoder: &mut fidl::encoding::Encoder<'_, D>,
3362 offset: usize,
3363 _depth: fidl::encoding::Depth,
3364 ) -> fidl::Result<()> {
3365 encoder.debug_check_bounds::<ConnectTransactionOnConnectResultRequest>(offset);
3366 fidl::encoding::Encode::<ConnectTransactionOnConnectResultRequest, D>::encode(
3368 (<ConnectResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
3369 encoder,
3370 offset,
3371 _depth,
3372 )
3373 }
3374 }
3375 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ConnectResult, D>>
3376 fidl::encoding::Encode<ConnectTransactionOnConnectResultRequest, D> for (T0,)
3377 {
3378 #[inline]
3379 unsafe fn encode(
3380 self,
3381 encoder: &mut fidl::encoding::Encoder<'_, D>,
3382 offset: usize,
3383 depth: fidl::encoding::Depth,
3384 ) -> fidl::Result<()> {
3385 encoder.debug_check_bounds::<ConnectTransactionOnConnectResultRequest>(offset);
3386 self.0.encode(encoder, offset + 0, depth)?;
3390 Ok(())
3391 }
3392 }
3393
3394 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3395 for ConnectTransactionOnConnectResultRequest
3396 {
3397 #[inline(always)]
3398 fn new_empty() -> Self {
3399 Self { result: fidl::new_empty!(ConnectResult, D) }
3400 }
3401
3402 #[inline]
3403 unsafe fn decode(
3404 &mut self,
3405 decoder: &mut fidl::encoding::Decoder<'_, D>,
3406 offset: usize,
3407 _depth: fidl::encoding::Depth,
3408 ) -> fidl::Result<()> {
3409 decoder.debug_check_bounds::<Self>(offset);
3410 fidl::decode!(ConnectResult, D, &mut self.result, decoder, offset + 0, _depth)?;
3412 Ok(())
3413 }
3414 }
3415
3416 impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnDisconnectRequest {
3417 type Borrowed<'a> = &'a Self;
3418 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3419 value
3420 }
3421 }
3422
3423 unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnDisconnectRequest {
3424 type Owned = Self;
3425
3426 #[inline(always)]
3427 fn inline_align(_context: fidl::encoding::Context) -> usize {
3428 8
3429 }
3430
3431 #[inline(always)]
3432 fn inline_size(_context: fidl::encoding::Context) -> usize {
3433 24
3434 }
3435 }
3436
3437 unsafe impl<D: fidl::encoding::ResourceDialect>
3438 fidl::encoding::Encode<ConnectTransactionOnDisconnectRequest, D>
3439 for &ConnectTransactionOnDisconnectRequest
3440 {
3441 #[inline]
3442 unsafe fn encode(
3443 self,
3444 encoder: &mut fidl::encoding::Encoder<'_, D>,
3445 offset: usize,
3446 _depth: fidl::encoding::Depth,
3447 ) -> fidl::Result<()> {
3448 encoder.debug_check_bounds::<ConnectTransactionOnDisconnectRequest>(offset);
3449 fidl::encoding::Encode::<ConnectTransactionOnDisconnectRequest, D>::encode(
3451 (<DisconnectInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),),
3452 encoder,
3453 offset,
3454 _depth,
3455 )
3456 }
3457 }
3458 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<DisconnectInfo, D>>
3459 fidl::encoding::Encode<ConnectTransactionOnDisconnectRequest, D> for (T0,)
3460 {
3461 #[inline]
3462 unsafe fn encode(
3463 self,
3464 encoder: &mut fidl::encoding::Encoder<'_, D>,
3465 offset: usize,
3466 depth: fidl::encoding::Depth,
3467 ) -> fidl::Result<()> {
3468 encoder.debug_check_bounds::<ConnectTransactionOnDisconnectRequest>(offset);
3469 self.0.encode(encoder, offset + 0, depth)?;
3473 Ok(())
3474 }
3475 }
3476
3477 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3478 for ConnectTransactionOnDisconnectRequest
3479 {
3480 #[inline(always)]
3481 fn new_empty() -> Self {
3482 Self { info: fidl::new_empty!(DisconnectInfo, D) }
3483 }
3484
3485 #[inline]
3486 unsafe fn decode(
3487 &mut self,
3488 decoder: &mut fidl::encoding::Decoder<'_, D>,
3489 offset: usize,
3490 _depth: fidl::encoding::Depth,
3491 ) -> fidl::Result<()> {
3492 decoder.debug_check_bounds::<Self>(offset);
3493 fidl::decode!(DisconnectInfo, D, &mut self.info, decoder, offset + 0, _depth)?;
3495 Ok(())
3496 }
3497 }
3498
3499 impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnRoamResultRequest {
3500 type Borrowed<'a> = &'a Self;
3501 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3502 value
3503 }
3504 }
3505
3506 unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnRoamResultRequest {
3507 type Owned = Self;
3508
3509 #[inline(always)]
3510 fn inline_align(_context: fidl::encoding::Context) -> usize {
3511 8
3512 }
3513
3514 #[inline(always)]
3515 fn inline_size(_context: fidl::encoding::Context) -> usize {
3516 40
3517 }
3518 }
3519
3520 unsafe impl<D: fidl::encoding::ResourceDialect>
3521 fidl::encoding::Encode<ConnectTransactionOnRoamResultRequest, D>
3522 for &ConnectTransactionOnRoamResultRequest
3523 {
3524 #[inline]
3525 unsafe fn encode(
3526 self,
3527 encoder: &mut fidl::encoding::Encoder<'_, D>,
3528 offset: usize,
3529 _depth: fidl::encoding::Depth,
3530 ) -> fidl::Result<()> {
3531 encoder.debug_check_bounds::<ConnectTransactionOnRoamResultRequest>(offset);
3532 fidl::encoding::Encode::<ConnectTransactionOnRoamResultRequest, D>::encode(
3534 (<RoamResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
3535 encoder,
3536 offset,
3537 _depth,
3538 )
3539 }
3540 }
3541 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<RoamResult, D>>
3542 fidl::encoding::Encode<ConnectTransactionOnRoamResultRequest, D> for (T0,)
3543 {
3544 #[inline]
3545 unsafe fn encode(
3546 self,
3547 encoder: &mut fidl::encoding::Encoder<'_, D>,
3548 offset: usize,
3549 depth: fidl::encoding::Depth,
3550 ) -> fidl::Result<()> {
3551 encoder.debug_check_bounds::<ConnectTransactionOnRoamResultRequest>(offset);
3552 self.0.encode(encoder, offset + 0, depth)?;
3556 Ok(())
3557 }
3558 }
3559
3560 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3561 for ConnectTransactionOnRoamResultRequest
3562 {
3563 #[inline(always)]
3564 fn new_empty() -> Self {
3565 Self { result: fidl::new_empty!(RoamResult, D) }
3566 }
3567
3568 #[inline]
3569 unsafe fn decode(
3570 &mut self,
3571 decoder: &mut fidl::encoding::Decoder<'_, D>,
3572 offset: usize,
3573 _depth: fidl::encoding::Depth,
3574 ) -> fidl::Result<()> {
3575 decoder.debug_check_bounds::<Self>(offset);
3576 fidl::decode!(RoamResult, D, &mut self.result, decoder, offset + 0, _depth)?;
3578 Ok(())
3579 }
3580 }
3581
3582 impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnRssiThresholdBreachedRequest {
3583 type Borrowed<'a> = &'a Self;
3584 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3585 value
3586 }
3587 }
3588
3589 unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnRssiThresholdBreachedRequest {
3590 type Owned = Self;
3591
3592 #[inline(always)]
3593 fn inline_align(_context: fidl::encoding::Context) -> usize {
3594 1
3595 }
3596
3597 #[inline(always)]
3598 fn inline_size(_context: fidl::encoding::Context) -> usize {
3599 1
3600 }
3601 #[inline(always)]
3602 fn encode_is_copy() -> bool {
3603 true
3604 }
3605
3606 #[inline(always)]
3607 fn decode_is_copy() -> bool {
3608 true
3609 }
3610 }
3611
3612 unsafe impl<D: fidl::encoding::ResourceDialect>
3613 fidl::encoding::Encode<ConnectTransactionOnRssiThresholdBreachedRequest, D>
3614 for &ConnectTransactionOnRssiThresholdBreachedRequest
3615 {
3616 #[inline]
3617 unsafe fn encode(
3618 self,
3619 encoder: &mut fidl::encoding::Encoder<'_, D>,
3620 offset: usize,
3621 _depth: fidl::encoding::Depth,
3622 ) -> fidl::Result<()> {
3623 encoder.debug_check_bounds::<ConnectTransactionOnRssiThresholdBreachedRequest>(offset);
3624 unsafe {
3625 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3627 (buf_ptr as *mut ConnectTransactionOnRssiThresholdBreachedRequest).write_unaligned(
3628 (self as *const ConnectTransactionOnRssiThresholdBreachedRequest).read(),
3629 );
3630 }
3633 Ok(())
3634 }
3635 }
3636 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i8, D>>
3637 fidl::encoding::Encode<ConnectTransactionOnRssiThresholdBreachedRequest, D> for (T0,)
3638 {
3639 #[inline]
3640 unsafe fn encode(
3641 self,
3642 encoder: &mut fidl::encoding::Encoder<'_, D>,
3643 offset: usize,
3644 depth: fidl::encoding::Depth,
3645 ) -> fidl::Result<()> {
3646 encoder.debug_check_bounds::<ConnectTransactionOnRssiThresholdBreachedRequest>(offset);
3647 self.0.encode(encoder, offset + 0, depth)?;
3651 Ok(())
3652 }
3653 }
3654
3655 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3656 for ConnectTransactionOnRssiThresholdBreachedRequest
3657 {
3658 #[inline(always)]
3659 fn new_empty() -> Self {
3660 Self { cur_rssi_dbm: fidl::new_empty!(i8, D) }
3661 }
3662
3663 #[inline]
3664 unsafe fn decode(
3665 &mut self,
3666 decoder: &mut fidl::encoding::Decoder<'_, D>,
3667 offset: usize,
3668 _depth: fidl::encoding::Depth,
3669 ) -> fidl::Result<()> {
3670 decoder.debug_check_bounds::<Self>(offset);
3671 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3672 unsafe {
3675 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
3676 }
3677 Ok(())
3678 }
3679 }
3680
3681 impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnSignalReportRequest {
3682 type Borrowed<'a> = &'a Self;
3683 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3684 value
3685 }
3686 }
3687
3688 unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnSignalReportRequest {
3689 type Owned = Self;
3690
3691 #[inline(always)]
3692 fn inline_align(_context: fidl::encoding::Context) -> usize {
3693 8
3694 }
3695
3696 #[inline(always)]
3697 fn inline_size(_context: fidl::encoding::Context) -> usize {
3698 16
3699 }
3700 }
3701
3702 unsafe impl<D: fidl::encoding::ResourceDialect>
3703 fidl::encoding::Encode<ConnectTransactionOnSignalReportRequest, D>
3704 for &ConnectTransactionOnSignalReportRequest
3705 {
3706 #[inline]
3707 unsafe fn encode(
3708 self,
3709 encoder: &mut fidl::encoding::Encoder<'_, D>,
3710 offset: usize,
3711 _depth: fidl::encoding::Depth,
3712 ) -> fidl::Result<()> {
3713 encoder.debug_check_bounds::<ConnectTransactionOnSignalReportRequest>(offset);
3714 fidl::encoding::Encode::<ConnectTransactionOnSignalReportRequest, D>::encode(
3716 (
3717 <fidl_fuchsia_wlan_internal_common::SignalReportIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),
3718 ),
3719 encoder, offset, _depth
3720 )
3721 }
3722 }
3723 unsafe impl<
3724 D: fidl::encoding::ResourceDialect,
3725 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal_common::SignalReportIndication, D>,
3726 > fidl::encoding::Encode<ConnectTransactionOnSignalReportRequest, D> for (T0,)
3727 {
3728 #[inline]
3729 unsafe fn encode(
3730 self,
3731 encoder: &mut fidl::encoding::Encoder<'_, D>,
3732 offset: usize,
3733 depth: fidl::encoding::Depth,
3734 ) -> fidl::Result<()> {
3735 encoder.debug_check_bounds::<ConnectTransactionOnSignalReportRequest>(offset);
3736 self.0.encode(encoder, offset + 0, depth)?;
3740 Ok(())
3741 }
3742 }
3743
3744 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3745 for ConnectTransactionOnSignalReportRequest
3746 {
3747 #[inline(always)]
3748 fn new_empty() -> Self {
3749 Self {
3750 ind: fidl::new_empty!(fidl_fuchsia_wlan_internal_common::SignalReportIndication, D),
3751 }
3752 }
3753
3754 #[inline]
3755 unsafe fn decode(
3756 &mut self,
3757 decoder: &mut fidl::encoding::Decoder<'_, D>,
3758 offset: usize,
3759 _depth: fidl::encoding::Depth,
3760 ) -> fidl::Result<()> {
3761 decoder.debug_check_bounds::<Self>(offset);
3762 fidl::decode!(
3764 fidl_fuchsia_wlan_internal_common::SignalReportIndication,
3765 D,
3766 &mut self.ind,
3767 decoder,
3768 offset + 0,
3769 _depth
3770 )?;
3771 Ok(())
3772 }
3773 }
3774
3775 impl fidl::encoding::ValueTypeMarker for DisconnectCause {
3776 type Borrowed<'a> = &'a Self;
3777 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3778 value
3779 }
3780 }
3781
3782 unsafe impl fidl::encoding::TypeMarker for DisconnectCause {
3783 type Owned = Self;
3784
3785 #[inline(always)]
3786 fn inline_align(_context: fidl::encoding::Context) -> usize {
3787 4
3788 }
3789
3790 #[inline(always)]
3791 fn inline_size(_context: fidl::encoding::Context) -> usize {
3792 8
3793 }
3794 }
3795
3796 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisconnectCause, D>
3797 for &DisconnectCause
3798 {
3799 #[inline]
3800 unsafe fn encode(
3801 self,
3802 encoder: &mut fidl::encoding::Encoder<'_, D>,
3803 offset: usize,
3804 _depth: fidl::encoding::Depth,
3805 ) -> fidl::Result<()> {
3806 encoder.debug_check_bounds::<DisconnectCause>(offset);
3807 fidl::encoding::Encode::<DisconnectCause, D>::encode(
3809 (
3810 <DisconnectMlmeEventName as fidl::encoding::ValueTypeMarker>::borrow(&self.mlme_event_name),
3811 <fidl_fuchsia_wlan_ieee80211_common::ReasonCode as fidl::encoding::ValueTypeMarker>::borrow(&self.reason_code),
3812 ),
3813 encoder, offset, _depth
3814 )
3815 }
3816 }
3817 unsafe impl<
3818 D: fidl::encoding::ResourceDialect,
3819 T0: fidl::encoding::Encode<DisconnectMlmeEventName, D>,
3820 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211_common::ReasonCode, D>,
3821 > fidl::encoding::Encode<DisconnectCause, D> for (T0, T1)
3822 {
3823 #[inline]
3824 unsafe fn encode(
3825 self,
3826 encoder: &mut fidl::encoding::Encoder<'_, D>,
3827 offset: usize,
3828 depth: fidl::encoding::Depth,
3829 ) -> fidl::Result<()> {
3830 encoder.debug_check_bounds::<DisconnectCause>(offset);
3831 unsafe {
3834 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
3835 (ptr as *mut u32).write_unaligned(0);
3836 }
3837 self.0.encode(encoder, offset + 0, depth)?;
3839 self.1.encode(encoder, offset + 4, depth)?;
3840 Ok(())
3841 }
3842 }
3843
3844 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisconnectCause {
3845 #[inline(always)]
3846 fn new_empty() -> Self {
3847 Self {
3848 mlme_event_name: fidl::new_empty!(DisconnectMlmeEventName, D),
3849 reason_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211_common::ReasonCode, D),
3850 }
3851 }
3852
3853 #[inline]
3854 unsafe fn decode(
3855 &mut self,
3856 decoder: &mut fidl::encoding::Decoder<'_, D>,
3857 offset: usize,
3858 _depth: fidl::encoding::Depth,
3859 ) -> fidl::Result<()> {
3860 decoder.debug_check_bounds::<Self>(offset);
3861 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
3863 let padval = unsafe { (ptr as *const u32).read_unaligned() };
3864 let mask = 0xffff0000u32;
3865 let maskedval = padval & mask;
3866 if maskedval != 0 {
3867 return Err(fidl::Error::NonZeroPadding {
3868 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
3869 });
3870 }
3871 fidl::decode!(
3872 DisconnectMlmeEventName,
3873 D,
3874 &mut self.mlme_event_name,
3875 decoder,
3876 offset + 0,
3877 _depth
3878 )?;
3879 fidl::decode!(
3880 fidl_fuchsia_wlan_ieee80211_common::ReasonCode,
3881 D,
3882 &mut self.reason_code,
3883 decoder,
3884 offset + 4,
3885 _depth
3886 )?;
3887 Ok(())
3888 }
3889 }
3890
3891 impl fidl::encoding::ValueTypeMarker for DisconnectInfo {
3892 type Borrowed<'a> = &'a Self;
3893 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3894 value
3895 }
3896 }
3897
3898 unsafe impl fidl::encoding::TypeMarker for DisconnectInfo {
3899 type Owned = Self;
3900
3901 #[inline(always)]
3902 fn inline_align(_context: fidl::encoding::Context) -> usize {
3903 8
3904 }
3905
3906 #[inline(always)]
3907 fn inline_size(_context: fidl::encoding::Context) -> usize {
3908 24
3909 }
3910 }
3911
3912 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisconnectInfo, D>
3913 for &DisconnectInfo
3914 {
3915 #[inline]
3916 unsafe fn encode(
3917 self,
3918 encoder: &mut fidl::encoding::Encoder<'_, D>,
3919 offset: usize,
3920 _depth: fidl::encoding::Depth,
3921 ) -> fidl::Result<()> {
3922 encoder.debug_check_bounds::<DisconnectInfo>(offset);
3923 fidl::encoding::Encode::<DisconnectInfo, D>::encode(
3925 (
3926 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.is_sme_reconnecting),
3927 <DisconnectSource as fidl::encoding::ValueTypeMarker>::borrow(
3928 &self.disconnect_source,
3929 ),
3930 ),
3931 encoder,
3932 offset,
3933 _depth,
3934 )
3935 }
3936 }
3937 unsafe impl<
3938 D: fidl::encoding::ResourceDialect,
3939 T0: fidl::encoding::Encode<bool, D>,
3940 T1: fidl::encoding::Encode<DisconnectSource, D>,
3941 > fidl::encoding::Encode<DisconnectInfo, D> for (T0, T1)
3942 {
3943 #[inline]
3944 unsafe fn encode(
3945 self,
3946 encoder: &mut fidl::encoding::Encoder<'_, D>,
3947 offset: usize,
3948 depth: fidl::encoding::Depth,
3949 ) -> fidl::Result<()> {
3950 encoder.debug_check_bounds::<DisconnectInfo>(offset);
3951 unsafe {
3954 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
3955 (ptr as *mut u64).write_unaligned(0);
3956 }
3957 self.0.encode(encoder, offset + 0, depth)?;
3959 self.1.encode(encoder, offset + 8, depth)?;
3960 Ok(())
3961 }
3962 }
3963
3964 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisconnectInfo {
3965 #[inline(always)]
3966 fn new_empty() -> Self {
3967 Self {
3968 is_sme_reconnecting: fidl::new_empty!(bool, D),
3969 disconnect_source: fidl::new_empty!(DisconnectSource, D),
3970 }
3971 }
3972
3973 #[inline]
3974 unsafe fn decode(
3975 &mut self,
3976 decoder: &mut fidl::encoding::Decoder<'_, D>,
3977 offset: usize,
3978 _depth: fidl::encoding::Depth,
3979 ) -> fidl::Result<()> {
3980 decoder.debug_check_bounds::<Self>(offset);
3981 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
3983 let padval = unsafe { (ptr as *const u64).read_unaligned() };
3984 let mask = 0xffffffffffffff00u64;
3985 let maskedval = padval & mask;
3986 if maskedval != 0 {
3987 return Err(fidl::Error::NonZeroPadding {
3988 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
3989 });
3990 }
3991 fidl::decode!(bool, D, &mut self.is_sme_reconnecting, decoder, offset + 0, _depth)?;
3992 fidl::decode!(
3993 DisconnectSource,
3994 D,
3995 &mut self.disconnect_source,
3996 decoder,
3997 offset + 8,
3998 _depth
3999 )?;
4000 Ok(())
4001 }
4002 }
4003
4004 impl fidl::encoding::ValueTypeMarker for DisjointSecurityProtocol {
4005 type Borrowed<'a> = &'a Self;
4006 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4007 value
4008 }
4009 }
4010
4011 unsafe impl fidl::encoding::TypeMarker for DisjointSecurityProtocol {
4012 type Owned = Self;
4013
4014 #[inline(always)]
4015 fn inline_align(_context: fidl::encoding::Context) -> usize {
4016 4
4017 }
4018
4019 #[inline(always)]
4020 fn inline_size(_context: fidl::encoding::Context) -> usize {
4021 8
4022 }
4023 }
4024
4025 unsafe impl<D: fidl::encoding::ResourceDialect>
4026 fidl::encoding::Encode<DisjointSecurityProtocol, D> for &DisjointSecurityProtocol
4027 {
4028 #[inline]
4029 unsafe fn encode(
4030 self,
4031 encoder: &mut fidl::encoding::Encoder<'_, D>,
4032 offset: usize,
4033 _depth: fidl::encoding::Depth,
4034 ) -> fidl::Result<()> {
4035 encoder.debug_check_bounds::<DisjointSecurityProtocol>(offset);
4036 fidl::encoding::Encode::<DisjointSecurityProtocol, D>::encode(
4038 (
4039 <fidl_fuchsia_wlan_internal_common::Protocol as fidl::encoding::ValueTypeMarker>::borrow(&self.protocol),
4040 <fidl_fuchsia_wlan_common_common::WlanMacRole as fidl::encoding::ValueTypeMarker>::borrow(&self.role),
4041 ),
4042 encoder, offset, _depth
4043 )
4044 }
4045 }
4046 unsafe impl<
4047 D: fidl::encoding::ResourceDialect,
4048 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal_common::Protocol, D>,
4049 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_common_common::WlanMacRole, D>,
4050 > fidl::encoding::Encode<DisjointSecurityProtocol, D> for (T0, T1)
4051 {
4052 #[inline]
4053 unsafe fn encode(
4054 self,
4055 encoder: &mut fidl::encoding::Encoder<'_, D>,
4056 offset: usize,
4057 depth: fidl::encoding::Depth,
4058 ) -> fidl::Result<()> {
4059 encoder.debug_check_bounds::<DisjointSecurityProtocol>(offset);
4060 self.0.encode(encoder, offset + 0, depth)?;
4064 self.1.encode(encoder, offset + 4, depth)?;
4065 Ok(())
4066 }
4067 }
4068
4069 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4070 for DisjointSecurityProtocol
4071 {
4072 #[inline(always)]
4073 fn new_empty() -> Self {
4074 Self {
4075 protocol: fidl::new_empty!(fidl_fuchsia_wlan_internal_common::Protocol, D),
4076 role: fidl::new_empty!(fidl_fuchsia_wlan_common_common::WlanMacRole, D),
4077 }
4078 }
4079
4080 #[inline]
4081 unsafe fn decode(
4082 &mut self,
4083 decoder: &mut fidl::encoding::Decoder<'_, D>,
4084 offset: usize,
4085 _depth: fidl::encoding::Depth,
4086 ) -> fidl::Result<()> {
4087 decoder.debug_check_bounds::<Self>(offset);
4088 fidl::decode!(
4090 fidl_fuchsia_wlan_internal_common::Protocol,
4091 D,
4092 &mut self.protocol,
4093 decoder,
4094 offset + 0,
4095 _depth
4096 )?;
4097 fidl::decode!(
4098 fidl_fuchsia_wlan_common_common::WlanMacRole,
4099 D,
4100 &mut self.role,
4101 decoder,
4102 offset + 4,
4103 _depth
4104 )?;
4105 Ok(())
4106 }
4107 }
4108
4109 impl fidl::encoding::ValueTypeMarker for Empty {
4110 type Borrowed<'a> = &'a Self;
4111 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4112 value
4113 }
4114 }
4115
4116 unsafe impl fidl::encoding::TypeMarker for Empty {
4117 type Owned = Self;
4118
4119 #[inline(always)]
4120 fn inline_align(_context: fidl::encoding::Context) -> usize {
4121 1
4122 }
4123
4124 #[inline(always)]
4125 fn inline_size(_context: fidl::encoding::Context) -> usize {
4126 1
4127 }
4128 }
4129
4130 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Empty, D> for &Empty {
4131 #[inline]
4132 unsafe fn encode(
4133 self,
4134 encoder: &mut fidl::encoding::Encoder<'_, D>,
4135 offset: usize,
4136 _depth: fidl::encoding::Depth,
4137 ) -> fidl::Result<()> {
4138 encoder.debug_check_bounds::<Empty>(offset);
4139 encoder.write_num(0u8, offset);
4140 Ok(())
4141 }
4142 }
4143
4144 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Empty {
4145 #[inline(always)]
4146 fn new_empty() -> Self {
4147 Self
4148 }
4149
4150 #[inline]
4151 unsafe fn decode(
4152 &mut self,
4153 decoder: &mut fidl::encoding::Decoder<'_, D>,
4154 offset: usize,
4155 _depth: fidl::encoding::Depth,
4156 ) -> fidl::Result<()> {
4157 decoder.debug_check_bounds::<Self>(offset);
4158 match decoder.read_num::<u8>(offset) {
4159 0 => Ok(()),
4160 _ => Err(fidl::Error::Invalid),
4161 }
4162 }
4163 }
4164
4165 impl fidl::encoding::ValueTypeMarker for GenericSmeQuery {
4166 type Borrowed<'a> = &'a Self;
4167 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4168 value
4169 }
4170 }
4171
4172 unsafe impl fidl::encoding::TypeMarker for GenericSmeQuery {
4173 type Owned = Self;
4174
4175 #[inline(always)]
4176 fn inline_align(_context: fidl::encoding::Context) -> usize {
4177 4
4178 }
4179
4180 #[inline(always)]
4181 fn inline_size(_context: fidl::encoding::Context) -> usize {
4182 16
4183 }
4184 }
4185
4186 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GenericSmeQuery, D>
4187 for &GenericSmeQuery
4188 {
4189 #[inline]
4190 unsafe fn encode(
4191 self,
4192 encoder: &mut fidl::encoding::Encoder<'_, D>,
4193 offset: usize,
4194 _depth: fidl::encoding::Depth,
4195 ) -> fidl::Result<()> {
4196 encoder.debug_check_bounds::<GenericSmeQuery>(offset);
4197 fidl::encoding::Encode::<GenericSmeQuery, D>::encode(
4199 (
4200 <fidl_fuchsia_wlan_common_common::WlanMacRole as fidl::encoding::ValueTypeMarker>::borrow(&self.role),
4201 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.sta_addr),
4202 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.factory_addr),
4203 ),
4204 encoder, offset, _depth
4205 )
4206 }
4207 }
4208 unsafe impl<
4209 D: fidl::encoding::ResourceDialect,
4210 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common_common::WlanMacRole, D>,
4211 T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
4212 T2: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
4213 > fidl::encoding::Encode<GenericSmeQuery, D> for (T0, T1, T2)
4214 {
4215 #[inline]
4216 unsafe fn encode(
4217 self,
4218 encoder: &mut fidl::encoding::Encoder<'_, D>,
4219 offset: usize,
4220 depth: fidl::encoding::Depth,
4221 ) -> fidl::Result<()> {
4222 encoder.debug_check_bounds::<GenericSmeQuery>(offset);
4223 self.0.encode(encoder, offset + 0, depth)?;
4227 self.1.encode(encoder, offset + 4, depth)?;
4228 self.2.encode(encoder, offset + 10, depth)?;
4229 Ok(())
4230 }
4231 }
4232
4233 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GenericSmeQuery {
4234 #[inline(always)]
4235 fn new_empty() -> Self {
4236 Self {
4237 role: fidl::new_empty!(fidl_fuchsia_wlan_common_common::WlanMacRole, D),
4238 sta_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
4239 factory_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
4240 }
4241 }
4242
4243 #[inline]
4244 unsafe fn decode(
4245 &mut self,
4246 decoder: &mut fidl::encoding::Decoder<'_, D>,
4247 offset: usize,
4248 _depth: fidl::encoding::Depth,
4249 ) -> fidl::Result<()> {
4250 decoder.debug_check_bounds::<Self>(offset);
4251 fidl::decode!(
4253 fidl_fuchsia_wlan_common_common::WlanMacRole,
4254 D,
4255 &mut self.role,
4256 decoder,
4257 offset + 0,
4258 _depth
4259 )?;
4260 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.sta_addr, decoder, offset + 4, _depth)?;
4261 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.factory_addr, decoder, offset + 10, _depth)?;
4262 Ok(())
4263 }
4264 }
4265
4266 impl fidl::encoding::ValueTypeMarker for Incompatible {
4267 type Borrowed<'a> = &'a Self;
4268 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4269 value
4270 }
4271 }
4272
4273 unsafe impl fidl::encoding::TypeMarker for Incompatible {
4274 type Owned = Self;
4275
4276 #[inline(always)]
4277 fn inline_align(_context: fidl::encoding::Context) -> usize {
4278 8
4279 }
4280
4281 #[inline(always)]
4282 fn inline_size(_context: fidl::encoding::Context) -> usize {
4283 32
4284 }
4285 }
4286
4287 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Incompatible, D>
4288 for &Incompatible
4289 {
4290 #[inline]
4291 unsafe fn encode(
4292 self,
4293 encoder: &mut fidl::encoding::Encoder<'_, D>,
4294 offset: usize,
4295 _depth: fidl::encoding::Depth,
4296 ) -> fidl::Result<()> {
4297 encoder.debug_check_bounds::<Incompatible>(offset);
4298 fidl::encoding::Encode::<Incompatible, D>::encode(
4300 (
4301 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.description),
4302 <fidl::encoding::Optional<fidl::encoding::Vector<DisjointSecurityProtocol, 32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.disjoint_security_protocols),
4303 ),
4304 encoder, offset, _depth
4305 )
4306 }
4307 }
4308 unsafe impl<
4309 D: fidl::encoding::ResourceDialect,
4310 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
4311 T1: fidl::encoding::Encode<
4312 fidl::encoding::Optional<fidl::encoding::Vector<DisjointSecurityProtocol, 32>>,
4313 D,
4314 >,
4315 > fidl::encoding::Encode<Incompatible, D> for (T0, T1)
4316 {
4317 #[inline]
4318 unsafe fn encode(
4319 self,
4320 encoder: &mut fidl::encoding::Encoder<'_, D>,
4321 offset: usize,
4322 depth: fidl::encoding::Depth,
4323 ) -> fidl::Result<()> {
4324 encoder.debug_check_bounds::<Incompatible>(offset);
4325 self.0.encode(encoder, offset + 0, depth)?;
4329 self.1.encode(encoder, offset + 16, depth)?;
4330 Ok(())
4331 }
4332 }
4333
4334 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Incompatible {
4335 #[inline(always)]
4336 fn new_empty() -> Self {
4337 Self {
4338 description: fidl::new_empty!(fidl::encoding::UnboundedString, D),
4339 disjoint_security_protocols: fidl::new_empty!(
4340 fidl::encoding::Optional<fidl::encoding::Vector<DisjointSecurityProtocol, 32>>,
4341 D
4342 ),
4343 }
4344 }
4345
4346 #[inline]
4347 unsafe fn decode(
4348 &mut self,
4349 decoder: &mut fidl::encoding::Decoder<'_, D>,
4350 offset: usize,
4351 _depth: fidl::encoding::Depth,
4352 ) -> fidl::Result<()> {
4353 decoder.debug_check_bounds::<Self>(offset);
4354 fidl::decode!(
4356 fidl::encoding::UnboundedString,
4357 D,
4358 &mut self.description,
4359 decoder,
4360 offset + 0,
4361 _depth
4362 )?;
4363 fidl::decode!(
4364 fidl::encoding::Optional<fidl::encoding::Vector<DisjointSecurityProtocol, 32>>,
4365 D,
4366 &mut self.disjoint_security_protocols,
4367 decoder,
4368 offset + 16,
4369 _depth
4370 )?;
4371 Ok(())
4372 }
4373 }
4374
4375 impl fidl::encoding::ValueTypeMarker for LegacyPrivacySupport {
4376 type Borrowed<'a> = &'a Self;
4377 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4378 value
4379 }
4380 }
4381
4382 unsafe impl fidl::encoding::TypeMarker for LegacyPrivacySupport {
4383 type Owned = Self;
4384
4385 #[inline(always)]
4386 fn inline_align(_context: fidl::encoding::Context) -> usize {
4387 1
4388 }
4389
4390 #[inline(always)]
4391 fn inline_size(_context: fidl::encoding::Context) -> usize {
4392 2
4393 }
4394 }
4395
4396 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LegacyPrivacySupport, D>
4397 for &LegacyPrivacySupport
4398 {
4399 #[inline]
4400 unsafe fn encode(
4401 self,
4402 encoder: &mut fidl::encoding::Encoder<'_, D>,
4403 offset: usize,
4404 _depth: fidl::encoding::Depth,
4405 ) -> fidl::Result<()> {
4406 encoder.debug_check_bounds::<LegacyPrivacySupport>(offset);
4407 fidl::encoding::Encode::<LegacyPrivacySupport, D>::encode(
4409 (
4410 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.wep_supported),
4411 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.wpa1_supported),
4412 ),
4413 encoder,
4414 offset,
4415 _depth,
4416 )
4417 }
4418 }
4419 unsafe impl<
4420 D: fidl::encoding::ResourceDialect,
4421 T0: fidl::encoding::Encode<bool, D>,
4422 T1: fidl::encoding::Encode<bool, D>,
4423 > fidl::encoding::Encode<LegacyPrivacySupport, D> for (T0, T1)
4424 {
4425 #[inline]
4426 unsafe fn encode(
4427 self,
4428 encoder: &mut fidl::encoding::Encoder<'_, D>,
4429 offset: usize,
4430 depth: fidl::encoding::Depth,
4431 ) -> fidl::Result<()> {
4432 encoder.debug_check_bounds::<LegacyPrivacySupport>(offset);
4433 self.0.encode(encoder, offset + 0, depth)?;
4437 self.1.encode(encoder, offset + 1, depth)?;
4438 Ok(())
4439 }
4440 }
4441
4442 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LegacyPrivacySupport {
4443 #[inline(always)]
4444 fn new_empty() -> Self {
4445 Self {
4446 wep_supported: fidl::new_empty!(bool, D),
4447 wpa1_supported: fidl::new_empty!(bool, D),
4448 }
4449 }
4450
4451 #[inline]
4452 unsafe fn decode(
4453 &mut self,
4454 decoder: &mut fidl::encoding::Decoder<'_, D>,
4455 offset: usize,
4456 _depth: fidl::encoding::Depth,
4457 ) -> fidl::Result<()> {
4458 decoder.debug_check_bounds::<Self>(offset);
4459 fidl::decode!(bool, D, &mut self.wep_supported, decoder, offset + 0, _depth)?;
4461 fidl::decode!(bool, D, &mut self.wpa1_supported, decoder, offset + 1, _depth)?;
4462 Ok(())
4463 }
4464 }
4465
4466 impl fidl::encoding::ValueTypeMarker for PassiveScanRequest {
4467 type Borrowed<'a> = &'a Self;
4468 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4469 value
4470 }
4471 }
4472
4473 unsafe impl fidl::encoding::TypeMarker for PassiveScanRequest {
4474 type Owned = Self;
4475
4476 #[inline(always)]
4477 fn inline_align(_context: fidl::encoding::Context) -> usize {
4478 8
4479 }
4480
4481 #[inline(always)]
4482 fn inline_size(_context: fidl::encoding::Context) -> usize {
4483 16
4484 }
4485 }
4486
4487 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PassiveScanRequest, D>
4488 for &PassiveScanRequest
4489 {
4490 #[inline]
4491 unsafe fn encode(
4492 self,
4493 encoder: &mut fidl::encoding::Encoder<'_, D>,
4494 offset: usize,
4495 _depth: fidl::encoding::Depth,
4496 ) -> fidl::Result<()> {
4497 encoder.debug_check_bounds::<PassiveScanRequest>(offset);
4498 fidl::encoding::Encode::<PassiveScanRequest, D>::encode(
4500 (<fidl::encoding::Vector<u8, 500> as fidl::encoding::ValueTypeMarker>::borrow(
4501 &self.channels,
4502 ),),
4503 encoder,
4504 offset,
4505 _depth,
4506 )
4507 }
4508 }
4509 unsafe impl<
4510 D: fidl::encoding::ResourceDialect,
4511 T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 500>, D>,
4512 > fidl::encoding::Encode<PassiveScanRequest, D> for (T0,)
4513 {
4514 #[inline]
4515 unsafe fn encode(
4516 self,
4517 encoder: &mut fidl::encoding::Encoder<'_, D>,
4518 offset: usize,
4519 depth: fidl::encoding::Depth,
4520 ) -> fidl::Result<()> {
4521 encoder.debug_check_bounds::<PassiveScanRequest>(offset);
4522 self.0.encode(encoder, offset + 0, depth)?;
4526 Ok(())
4527 }
4528 }
4529
4530 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PassiveScanRequest {
4531 #[inline(always)]
4532 fn new_empty() -> Self {
4533 Self { channels: fidl::new_empty!(fidl::encoding::Vector<u8, 500>, D) }
4534 }
4535
4536 #[inline]
4537 unsafe fn decode(
4538 &mut self,
4539 decoder: &mut fidl::encoding::Decoder<'_, D>,
4540 offset: usize,
4541 _depth: fidl::encoding::Depth,
4542 ) -> fidl::Result<()> {
4543 decoder.debug_check_bounds::<Self>(offset);
4544 fidl::decode!(fidl::encoding::Vector<u8, 500>, D, &mut self.channels, decoder, offset + 0, _depth)?;
4546 Ok(())
4547 }
4548 }
4549
4550 impl fidl::encoding::ValueTypeMarker for RadioConfig {
4551 type Borrowed<'a> = &'a Self;
4552 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4553 value
4554 }
4555 }
4556
4557 unsafe impl fidl::encoding::TypeMarker for RadioConfig {
4558 type Owned = Self;
4559
4560 #[inline(always)]
4561 fn inline_align(_context: fidl::encoding::Context) -> usize {
4562 4
4563 }
4564
4565 #[inline(always)]
4566 fn inline_size(_context: fidl::encoding::Context) -> usize {
4567 12
4568 }
4569 }
4570
4571 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RadioConfig, D>
4572 for &RadioConfig
4573 {
4574 #[inline]
4575 unsafe fn encode(
4576 self,
4577 encoder: &mut fidl::encoding::Encoder<'_, D>,
4578 offset: usize,
4579 _depth: fidl::encoding::Depth,
4580 ) -> fidl::Result<()> {
4581 encoder.debug_check_bounds::<RadioConfig>(offset);
4582 fidl::encoding::Encode::<RadioConfig, D>::encode(
4584 (
4585 <fidl_fuchsia_wlan_ieee80211_common::WlanPhyType as fidl::encoding::ValueTypeMarker>::borrow(&self.phy),
4586 <fidl_fuchsia_wlan_ieee80211_common::ChannelNumber as fidl::encoding::ValueTypeMarker>::borrow(&self.primary),
4587 <fidl_fuchsia_wlan_ieee80211_common::ChannelBandwidth as fidl::encoding::ValueTypeMarker>::borrow(&self.bandwidth),
4588 ),
4589 encoder, offset, _depth
4590 )
4591 }
4592 }
4593 unsafe impl<
4594 D: fidl::encoding::ResourceDialect,
4595 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211_common::WlanPhyType, D>,
4596 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211_common::ChannelNumber, D>,
4597 T2: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211_common::ChannelBandwidth, D>,
4598 > fidl::encoding::Encode<RadioConfig, D> for (T0, T1, T2)
4599 {
4600 #[inline]
4601 unsafe fn encode(
4602 self,
4603 encoder: &mut fidl::encoding::Encoder<'_, D>,
4604 offset: usize,
4605 depth: fidl::encoding::Depth,
4606 ) -> fidl::Result<()> {
4607 encoder.debug_check_bounds::<RadioConfig>(offset);
4608 unsafe {
4611 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
4612 (ptr as *mut u32).write_unaligned(0);
4613 }
4614 self.0.encode(encoder, offset + 0, depth)?;
4616 self.1.encode(encoder, offset + 4, depth)?;
4617 self.2.encode(encoder, offset + 8, depth)?;
4618 Ok(())
4619 }
4620 }
4621
4622 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RadioConfig {
4623 #[inline(always)]
4624 fn new_empty() -> Self {
4625 Self {
4626 phy: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211_common::WlanPhyType, D),
4627 primary: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211_common::ChannelNumber, D),
4628 bandwidth: fidl::new_empty!(
4629 fidl_fuchsia_wlan_ieee80211_common::ChannelBandwidth,
4630 D
4631 ),
4632 }
4633 }
4634
4635 #[inline]
4636 unsafe fn decode(
4637 &mut self,
4638 decoder: &mut fidl::encoding::Decoder<'_, D>,
4639 offset: usize,
4640 _depth: fidl::encoding::Depth,
4641 ) -> fidl::Result<()> {
4642 decoder.debug_check_bounds::<Self>(offset);
4643 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
4645 let padval = unsafe { (ptr as *const u32).read_unaligned() };
4646 let mask = 0xffff0000u32;
4647 let maskedval = padval & mask;
4648 if maskedval != 0 {
4649 return Err(fidl::Error::NonZeroPadding {
4650 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
4651 });
4652 }
4653 fidl::decode!(
4654 fidl_fuchsia_wlan_ieee80211_common::WlanPhyType,
4655 D,
4656 &mut self.phy,
4657 decoder,
4658 offset + 0,
4659 _depth
4660 )?;
4661 fidl::decode!(
4662 fidl_fuchsia_wlan_ieee80211_common::ChannelNumber,
4663 D,
4664 &mut self.primary,
4665 decoder,
4666 offset + 4,
4667 _depth
4668 )?;
4669 fidl::decode!(
4670 fidl_fuchsia_wlan_ieee80211_common::ChannelBandwidth,
4671 D,
4672 &mut self.bandwidth,
4673 decoder,
4674 offset + 8,
4675 _depth
4676 )?;
4677 Ok(())
4678 }
4679 }
4680
4681 impl fidl::encoding::ValueTypeMarker for RoamRequest {
4682 type Borrowed<'a> = &'a Self;
4683 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4684 value
4685 }
4686 }
4687
4688 unsafe impl fidl::encoding::TypeMarker for RoamRequest {
4689 type Owned = Self;
4690
4691 #[inline(always)]
4692 fn inline_align(_context: fidl::encoding::Context) -> usize {
4693 8
4694 }
4695
4696 #[inline(always)]
4697 fn inline_size(_context: fidl::encoding::Context) -> usize {
4698 48
4699 }
4700 }
4701
4702 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RoamRequest, D>
4703 for &RoamRequest
4704 {
4705 #[inline]
4706 unsafe fn encode(
4707 self,
4708 encoder: &mut fidl::encoding::Encoder<'_, D>,
4709 offset: usize,
4710 _depth: fidl::encoding::Depth,
4711 ) -> fidl::Result<()> {
4712 encoder.debug_check_bounds::<RoamRequest>(offset);
4713 fidl::encoding::Encode::<RoamRequest, D>::encode(
4715 (
4716 <fidl_fuchsia_wlan_ieee80211_common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.bss_description),
4717 ),
4718 encoder, offset, _depth
4719 )
4720 }
4721 }
4722 unsafe impl<
4723 D: fidl::encoding::ResourceDialect,
4724 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211_common::BssDescription, D>,
4725 > fidl::encoding::Encode<RoamRequest, D> for (T0,)
4726 {
4727 #[inline]
4728 unsafe fn encode(
4729 self,
4730 encoder: &mut fidl::encoding::Encoder<'_, D>,
4731 offset: usize,
4732 depth: fidl::encoding::Depth,
4733 ) -> fidl::Result<()> {
4734 encoder.debug_check_bounds::<RoamRequest>(offset);
4735 self.0.encode(encoder, offset + 0, depth)?;
4739 Ok(())
4740 }
4741 }
4742
4743 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RoamRequest {
4744 #[inline(always)]
4745 fn new_empty() -> Self {
4746 Self {
4747 bss_description: fidl::new_empty!(
4748 fidl_fuchsia_wlan_ieee80211_common::BssDescription,
4749 D
4750 ),
4751 }
4752 }
4753
4754 #[inline]
4755 unsafe fn decode(
4756 &mut self,
4757 decoder: &mut fidl::encoding::Decoder<'_, D>,
4758 offset: usize,
4759 _depth: fidl::encoding::Depth,
4760 ) -> fidl::Result<()> {
4761 decoder.debug_check_bounds::<Self>(offset);
4762 fidl::decode!(
4764 fidl_fuchsia_wlan_ieee80211_common::BssDescription,
4765 D,
4766 &mut self.bss_description,
4767 decoder,
4768 offset + 0,
4769 _depth
4770 )?;
4771 Ok(())
4772 }
4773 }
4774
4775 impl fidl::encoding::ValueTypeMarker for RoamResult {
4776 type Borrowed<'a> = &'a Self;
4777 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4778 value
4779 }
4780 }
4781
4782 unsafe impl fidl::encoding::TypeMarker for RoamResult {
4783 type Owned = Self;
4784
4785 #[inline(always)]
4786 fn inline_align(_context: fidl::encoding::Context) -> usize {
4787 8
4788 }
4789
4790 #[inline(always)]
4791 fn inline_size(_context: fidl::encoding::Context) -> usize {
4792 40
4793 }
4794 }
4795
4796 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RoamResult, D>
4797 for &RoamResult
4798 {
4799 #[inline]
4800 unsafe fn encode(
4801 self,
4802 encoder: &mut fidl::encoding::Encoder<'_, D>,
4803 offset: usize,
4804 _depth: fidl::encoding::Depth,
4805 ) -> fidl::Result<()> {
4806 encoder.debug_check_bounds::<RoamResult>(offset);
4807 fidl::encoding::Encode::<RoamResult, D>::encode(
4809 (
4810 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.bssid),
4811 <fidl_fuchsia_wlan_ieee80211_common::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.status_code),
4812 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.original_association_maintained),
4813 <fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211_common::BssDescription> as fidl::encoding::ValueTypeMarker>::borrow(&self.bss_description),
4814 <fidl::encoding::Boxed<DisconnectInfo> as fidl::encoding::ValueTypeMarker>::borrow(&self.disconnect_info),
4815 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.is_credential_rejected),
4816 ),
4817 encoder, offset, _depth
4818 )
4819 }
4820 }
4821 unsafe impl<
4822 D: fidl::encoding::ResourceDialect,
4823 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
4824 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211_common::StatusCode, D>,
4825 T2: fidl::encoding::Encode<bool, D>,
4826 T3: fidl::encoding::Encode<
4827 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211_common::BssDescription>,
4828 D,
4829 >,
4830 T4: fidl::encoding::Encode<fidl::encoding::Boxed<DisconnectInfo>, D>,
4831 T5: fidl::encoding::Encode<bool, D>,
4832 > fidl::encoding::Encode<RoamResult, D> for (T0, T1, T2, T3, T4, T5)
4833 {
4834 #[inline]
4835 unsafe fn encode(
4836 self,
4837 encoder: &mut fidl::encoding::Encoder<'_, D>,
4838 offset: usize,
4839 depth: fidl::encoding::Depth,
4840 ) -> fidl::Result<()> {
4841 encoder.debug_check_bounds::<RoamResult>(offset);
4842 unsafe {
4845 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
4846 (ptr as *mut u64).write_unaligned(0);
4847 }
4848 unsafe {
4849 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
4850 (ptr as *mut u64).write_unaligned(0);
4851 }
4852 self.0.encode(encoder, offset + 0, depth)?;
4854 self.1.encode(encoder, offset + 6, depth)?;
4855 self.2.encode(encoder, offset + 8, depth)?;
4856 self.3.encode(encoder, offset + 16, depth)?;
4857 self.4.encode(encoder, offset + 24, depth)?;
4858 self.5.encode(encoder, offset + 32, depth)?;
4859 Ok(())
4860 }
4861 }
4862
4863 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RoamResult {
4864 #[inline(always)]
4865 fn new_empty() -> Self {
4866 Self {
4867 bssid: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
4868 status_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211_common::StatusCode, D),
4869 original_association_maintained: fidl::new_empty!(bool, D),
4870 bss_description: fidl::new_empty!(
4871 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211_common::BssDescription>,
4872 D
4873 ),
4874 disconnect_info: fidl::new_empty!(fidl::encoding::Boxed<DisconnectInfo>, D),
4875 is_credential_rejected: fidl::new_empty!(bool, D),
4876 }
4877 }
4878
4879 #[inline]
4880 unsafe fn decode(
4881 &mut self,
4882 decoder: &mut fidl::encoding::Decoder<'_, D>,
4883 offset: usize,
4884 _depth: fidl::encoding::Depth,
4885 ) -> fidl::Result<()> {
4886 decoder.debug_check_bounds::<Self>(offset);
4887 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
4889 let padval = unsafe { (ptr as *const u64).read_unaligned() };
4890 let mask = 0xffffffffffffff00u64;
4891 let maskedval = padval & mask;
4892 if maskedval != 0 {
4893 return Err(fidl::Error::NonZeroPadding {
4894 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
4895 });
4896 }
4897 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
4898 let padval = unsafe { (ptr as *const u64).read_unaligned() };
4899 let mask = 0xffffffffffffff00u64;
4900 let maskedval = padval & mask;
4901 if maskedval != 0 {
4902 return Err(fidl::Error::NonZeroPadding {
4903 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
4904 });
4905 }
4906 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.bssid, decoder, offset + 0, _depth)?;
4907 fidl::decode!(
4908 fidl_fuchsia_wlan_ieee80211_common::StatusCode,
4909 D,
4910 &mut self.status_code,
4911 decoder,
4912 offset + 6,
4913 _depth
4914 )?;
4915 fidl::decode!(
4916 bool,
4917 D,
4918 &mut self.original_association_maintained,
4919 decoder,
4920 offset + 8,
4921 _depth
4922 )?;
4923 fidl::decode!(
4924 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211_common::BssDescription>,
4925 D,
4926 &mut self.bss_description,
4927 decoder,
4928 offset + 16,
4929 _depth
4930 )?;
4931 fidl::decode!(
4932 fidl::encoding::Boxed<DisconnectInfo>,
4933 D,
4934 &mut self.disconnect_info,
4935 decoder,
4936 offset + 24,
4937 _depth
4938 )?;
4939 fidl::decode!(bool, D, &mut self.is_credential_rejected, decoder, offset + 32, _depth)?;
4940 Ok(())
4941 }
4942 }
4943
4944 impl fidl::encoding::ValueTypeMarker for ScanResult {
4945 type Borrowed<'a> = &'a Self;
4946 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4947 value
4948 }
4949 }
4950
4951 unsafe impl fidl::encoding::TypeMarker for ScanResult {
4952 type Owned = Self;
4953
4954 #[inline(always)]
4955 fn inline_align(_context: fidl::encoding::Context) -> usize {
4956 8
4957 }
4958
4959 #[inline(always)]
4960 fn inline_size(_context: fidl::encoding::Context) -> usize {
4961 72
4962 }
4963 }
4964
4965 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ScanResult, D>
4966 for &ScanResult
4967 {
4968 #[inline]
4969 unsafe fn encode(
4970 self,
4971 encoder: &mut fidl::encoding::Encoder<'_, D>,
4972 offset: usize,
4973 _depth: fidl::encoding::Depth,
4974 ) -> fidl::Result<()> {
4975 encoder.debug_check_bounds::<ScanResult>(offset);
4976 fidl::encoding::Encode::<ScanResult, D>::encode(
4978 (
4979 <Compatibility as fidl::encoding::ValueTypeMarker>::borrow(&self.compatibility),
4980 <i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.timestamp_nanos),
4981 <fidl_fuchsia_wlan_ieee80211_common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.bss_description),
4982 ),
4983 encoder, offset, _depth
4984 )
4985 }
4986 }
4987 unsafe impl<
4988 D: fidl::encoding::ResourceDialect,
4989 T0: fidl::encoding::Encode<Compatibility, D>,
4990 T1: fidl::encoding::Encode<i64, D>,
4991 T2: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211_common::BssDescription, D>,
4992 > fidl::encoding::Encode<ScanResult, D> for (T0, T1, T2)
4993 {
4994 #[inline]
4995 unsafe fn encode(
4996 self,
4997 encoder: &mut fidl::encoding::Encoder<'_, D>,
4998 offset: usize,
4999 depth: fidl::encoding::Depth,
5000 ) -> fidl::Result<()> {
5001 encoder.debug_check_bounds::<ScanResult>(offset);
5002 self.0.encode(encoder, offset + 0, depth)?;
5006 self.1.encode(encoder, offset + 16, depth)?;
5007 self.2.encode(encoder, offset + 24, depth)?;
5008 Ok(())
5009 }
5010 }
5011
5012 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanResult {
5013 #[inline(always)]
5014 fn new_empty() -> Self {
5015 Self {
5016 compatibility: fidl::new_empty!(Compatibility, D),
5017 timestamp_nanos: fidl::new_empty!(i64, D),
5018 bss_description: fidl::new_empty!(
5019 fidl_fuchsia_wlan_ieee80211_common::BssDescription,
5020 D
5021 ),
5022 }
5023 }
5024
5025 #[inline]
5026 unsafe fn decode(
5027 &mut self,
5028 decoder: &mut fidl::encoding::Decoder<'_, D>,
5029 offset: usize,
5030 _depth: fidl::encoding::Depth,
5031 ) -> fidl::Result<()> {
5032 decoder.debug_check_bounds::<Self>(offset);
5033 fidl::decode!(Compatibility, D, &mut self.compatibility, decoder, offset + 0, _depth)?;
5035 fidl::decode!(i64, D, &mut self.timestamp_nanos, decoder, offset + 16, _depth)?;
5036 fidl::decode!(
5037 fidl_fuchsia_wlan_ieee80211_common::BssDescription,
5038 D,
5039 &mut self.bss_description,
5040 decoder,
5041 offset + 24,
5042 _depth
5043 )?;
5044 Ok(())
5045 }
5046 }
5047
5048 impl fidl::encoding::ValueTypeMarker for ScanResultVector {
5049 type Borrowed<'a> = &'a Self;
5050 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5051 value
5052 }
5053 }
5054
5055 unsafe impl fidl::encoding::TypeMarker for ScanResultVector {
5056 type Owned = Self;
5057
5058 #[inline(always)]
5059 fn inline_align(_context: fidl::encoding::Context) -> usize {
5060 8
5061 }
5062
5063 #[inline(always)]
5064 fn inline_size(_context: fidl::encoding::Context) -> usize {
5065 16
5066 }
5067 }
5068
5069 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ScanResultVector, D>
5070 for &ScanResultVector
5071 {
5072 #[inline]
5073 unsafe fn encode(
5074 self,
5075 encoder: &mut fidl::encoding::Encoder<'_, D>,
5076 offset: usize,
5077 _depth: fidl::encoding::Depth,
5078 ) -> fidl::Result<()> {
5079 encoder.debug_check_bounds::<ScanResultVector>(offset);
5080 fidl::encoding::Encode::<ScanResultVector, D>::encode(
5082 (
5083 <fidl::encoding::UnboundedVector<ScanResult> as fidl::encoding::ValueTypeMarker>::borrow(&self.results),
5084 ),
5085 encoder, offset, _depth
5086 )
5087 }
5088 }
5089 unsafe impl<
5090 D: fidl::encoding::ResourceDialect,
5091 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<ScanResult>, D>,
5092 > fidl::encoding::Encode<ScanResultVector, D> for (T0,)
5093 {
5094 #[inline]
5095 unsafe fn encode(
5096 self,
5097 encoder: &mut fidl::encoding::Encoder<'_, D>,
5098 offset: usize,
5099 depth: fidl::encoding::Depth,
5100 ) -> fidl::Result<()> {
5101 encoder.debug_check_bounds::<ScanResultVector>(offset);
5102 self.0.encode(encoder, offset + 0, depth)?;
5106 Ok(())
5107 }
5108 }
5109
5110 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanResultVector {
5111 #[inline(always)]
5112 fn new_empty() -> Self {
5113 Self { results: fidl::new_empty!(fidl::encoding::UnboundedVector<ScanResult>, D) }
5114 }
5115
5116 #[inline]
5117 unsafe fn decode(
5118 &mut self,
5119 decoder: &mut fidl::encoding::Decoder<'_, D>,
5120 offset: usize,
5121 _depth: fidl::encoding::Depth,
5122 ) -> fidl::Result<()> {
5123 decoder.debug_check_bounds::<Self>(offset);
5124 fidl::decode!(
5126 fidl::encoding::UnboundedVector<ScanResult>,
5127 D,
5128 &mut self.results,
5129 decoder,
5130 offset + 0,
5131 _depth
5132 )?;
5133 Ok(())
5134 }
5135 }
5136
5137 impl fidl::encoding::ValueTypeMarker for ServingApInfo {
5138 type Borrowed<'a> = &'a Self;
5139 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5140 value
5141 }
5142 }
5143
5144 unsafe impl fidl::encoding::TypeMarker for ServingApInfo {
5145 type Owned = Self;
5146
5147 #[inline(always)]
5148 fn inline_align(_context: fidl::encoding::Context) -> usize {
5149 8
5150 }
5151
5152 #[inline(always)]
5153 fn inline_size(_context: fidl::encoding::Context) -> usize {
5154 40
5155 }
5156 }
5157
5158 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ServingApInfo, D>
5159 for &ServingApInfo
5160 {
5161 #[inline]
5162 unsafe fn encode(
5163 self,
5164 encoder: &mut fidl::encoding::Encoder<'_, D>,
5165 offset: usize,
5166 _depth: fidl::encoding::Depth,
5167 ) -> fidl::Result<()> {
5168 encoder.debug_check_bounds::<ServingApInfo>(offset);
5169 fidl::encoding::Encode::<ServingApInfo, D>::encode(
5171 (
5172 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.bssid),
5173 <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssid),
5174 <i8 as fidl::encoding::ValueTypeMarker>::borrow(&self.rssi_dbm),
5175 <i8 as fidl::encoding::ValueTypeMarker>::borrow(&self.snr_db),
5176 <fidl_fuchsia_wlan_ieee80211_common::ChannelNumber as fidl::encoding::ValueTypeMarker>::borrow(&self.primary),
5177 <Protection as fidl::encoding::ValueTypeMarker>::borrow(&self.protection),
5178 <fidl_fuchsia_wlan_ieee80211_common::ChannelBandwidth as fidl::encoding::ValueTypeMarker>::borrow(&self.bandwidth),
5179 <fidl_fuchsia_wlan_ieee80211_common::ChannelNumber as fidl::encoding::ValueTypeMarker>::borrow(&self.vht_secondary_80_channel),
5180 ),
5181 encoder, offset, _depth
5182 )
5183 }
5184 }
5185 unsafe impl<
5186 D: fidl::encoding::ResourceDialect,
5187 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
5188 T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
5189 T2: fidl::encoding::Encode<i8, D>,
5190 T3: fidl::encoding::Encode<i8, D>,
5191 T4: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211_common::ChannelNumber, D>,
5192 T5: fidl::encoding::Encode<Protection, D>,
5193 T6: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211_common::ChannelBandwidth, D>,
5194 T7: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211_common::ChannelNumber, D>,
5195 > fidl::encoding::Encode<ServingApInfo, D> for (T0, T1, T2, T3, T4, T5, T6, T7)
5196 {
5197 #[inline]
5198 unsafe fn encode(
5199 self,
5200 encoder: &mut fidl::encoding::Encoder<'_, D>,
5201 offset: usize,
5202 depth: fidl::encoding::Depth,
5203 ) -> fidl::Result<()> {
5204 encoder.debug_check_bounds::<ServingApInfo>(offset);
5205 unsafe {
5208 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
5209 (ptr as *mut u64).write_unaligned(0);
5210 }
5211 unsafe {
5212 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
5213 (ptr as *mut u64).write_unaligned(0);
5214 }
5215 self.0.encode(encoder, offset + 0, depth)?;
5217 self.1.encode(encoder, offset + 8, depth)?;
5218 self.2.encode(encoder, offset + 24, depth)?;
5219 self.3.encode(encoder, offset + 25, depth)?;
5220 self.4.encode(encoder, offset + 26, depth)?;
5221 self.5.encode(encoder, offset + 28, depth)?;
5222 self.6.encode(encoder, offset + 32, depth)?;
5223 self.7.encode(encoder, offset + 36, depth)?;
5224 Ok(())
5225 }
5226 }
5227
5228 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ServingApInfo {
5229 #[inline(always)]
5230 fn new_empty() -> Self {
5231 Self {
5232 bssid: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
5233 ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
5234 rssi_dbm: fidl::new_empty!(i8, D),
5235 snr_db: fidl::new_empty!(i8, D),
5236 primary: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211_common::ChannelNumber, D),
5237 protection: fidl::new_empty!(Protection, D),
5238 bandwidth: fidl::new_empty!(
5239 fidl_fuchsia_wlan_ieee80211_common::ChannelBandwidth,
5240 D
5241 ),
5242 vht_secondary_80_channel: fidl::new_empty!(
5243 fidl_fuchsia_wlan_ieee80211_common::ChannelNumber,
5244 D
5245 ),
5246 }
5247 }
5248
5249 #[inline]
5250 unsafe fn decode(
5251 &mut self,
5252 decoder: &mut fidl::encoding::Decoder<'_, D>,
5253 offset: usize,
5254 _depth: fidl::encoding::Depth,
5255 ) -> fidl::Result<()> {
5256 decoder.debug_check_bounds::<Self>(offset);
5257 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
5259 let padval = unsafe { (ptr as *const u64).read_unaligned() };
5260 let mask = 0xffff000000000000u64;
5261 let maskedval = padval & mask;
5262 if maskedval != 0 {
5263 return Err(fidl::Error::NonZeroPadding {
5264 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
5265 });
5266 }
5267 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
5268 let padval = unsafe { (ptr as *const u64).read_unaligned() };
5269 let mask = 0xffff000000000000u64;
5270 let maskedval = padval & mask;
5271 if maskedval != 0 {
5272 return Err(fidl::Error::NonZeroPadding {
5273 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
5274 });
5275 }
5276 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.bssid, decoder, offset + 0, _depth)?;
5277 fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 8, _depth)?;
5278 fidl::decode!(i8, D, &mut self.rssi_dbm, decoder, offset + 24, _depth)?;
5279 fidl::decode!(i8, D, &mut self.snr_db, decoder, offset + 25, _depth)?;
5280 fidl::decode!(
5281 fidl_fuchsia_wlan_ieee80211_common::ChannelNumber,
5282 D,
5283 &mut self.primary,
5284 decoder,
5285 offset + 26,
5286 _depth
5287 )?;
5288 fidl::decode!(Protection, D, &mut self.protection, decoder, offset + 28, _depth)?;
5289 fidl::decode!(
5290 fidl_fuchsia_wlan_ieee80211_common::ChannelBandwidth,
5291 D,
5292 &mut self.bandwidth,
5293 decoder,
5294 offset + 32,
5295 _depth
5296 )?;
5297 fidl::decode!(
5298 fidl_fuchsia_wlan_ieee80211_common::ChannelNumber,
5299 D,
5300 &mut self.vht_secondary_80_channel,
5301 decoder,
5302 offset + 36,
5303 _depth
5304 )?;
5305 Ok(())
5306 }
5307 }
5308
5309 impl fidl::encoding::ValueTypeMarker for TelemetryGetHistogramStatsResponse {
5310 type Borrowed<'a> = &'a Self;
5311 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5312 value
5313 }
5314 }
5315
5316 unsafe impl fidl::encoding::TypeMarker for TelemetryGetHistogramStatsResponse {
5317 type Owned = Self;
5318
5319 #[inline(always)]
5320 fn inline_align(_context: fidl::encoding::Context) -> usize {
5321 8
5322 }
5323
5324 #[inline(always)]
5325 fn inline_size(_context: fidl::encoding::Context) -> usize {
5326 16
5327 }
5328 }
5329
5330 unsafe impl<D: fidl::encoding::ResourceDialect>
5331 fidl::encoding::Encode<TelemetryGetHistogramStatsResponse, D>
5332 for &TelemetryGetHistogramStatsResponse
5333 {
5334 #[inline]
5335 unsafe fn encode(
5336 self,
5337 encoder: &mut fidl::encoding::Encoder<'_, D>,
5338 offset: usize,
5339 _depth: fidl::encoding::Depth,
5340 ) -> fidl::Result<()> {
5341 encoder.debug_check_bounds::<TelemetryGetHistogramStatsResponse>(offset);
5342 fidl::encoding::Encode::<TelemetryGetHistogramStatsResponse, D>::encode(
5344 (
5345 <fidl_fuchsia_wlan_stats_common::IfaceHistogramStats as fidl::encoding::ValueTypeMarker>::borrow(&self.stats),
5346 ),
5347 encoder, offset, _depth
5348 )
5349 }
5350 }
5351 unsafe impl<
5352 D: fidl::encoding::ResourceDialect,
5353 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_stats_common::IfaceHistogramStats, D>,
5354 > fidl::encoding::Encode<TelemetryGetHistogramStatsResponse, D> for (T0,)
5355 {
5356 #[inline]
5357 unsafe fn encode(
5358 self,
5359 encoder: &mut fidl::encoding::Encoder<'_, D>,
5360 offset: usize,
5361 depth: fidl::encoding::Depth,
5362 ) -> fidl::Result<()> {
5363 encoder.debug_check_bounds::<TelemetryGetHistogramStatsResponse>(offset);
5364 self.0.encode(encoder, offset + 0, depth)?;
5368 Ok(())
5369 }
5370 }
5371
5372 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5373 for TelemetryGetHistogramStatsResponse
5374 {
5375 #[inline(always)]
5376 fn new_empty() -> Self {
5377 Self { stats: fidl::new_empty!(fidl_fuchsia_wlan_stats_common::IfaceHistogramStats, D) }
5378 }
5379
5380 #[inline]
5381 unsafe fn decode(
5382 &mut self,
5383 decoder: &mut fidl::encoding::Decoder<'_, D>,
5384 offset: usize,
5385 _depth: fidl::encoding::Depth,
5386 ) -> fidl::Result<()> {
5387 decoder.debug_check_bounds::<Self>(offset);
5388 fidl::decode!(
5390 fidl_fuchsia_wlan_stats_common::IfaceHistogramStats,
5391 D,
5392 &mut self.stats,
5393 decoder,
5394 offset + 0,
5395 _depth
5396 )?;
5397 Ok(())
5398 }
5399 }
5400
5401 impl fidl::encoding::ValueTypeMarker for TelemetryGetIfaceStatsResponse {
5402 type Borrowed<'a> = &'a Self;
5403 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5404 value
5405 }
5406 }
5407
5408 unsafe impl fidl::encoding::TypeMarker for TelemetryGetIfaceStatsResponse {
5409 type Owned = Self;
5410
5411 #[inline(always)]
5412 fn inline_align(_context: fidl::encoding::Context) -> usize {
5413 8
5414 }
5415
5416 #[inline(always)]
5417 fn inline_size(_context: fidl::encoding::Context) -> usize {
5418 16
5419 }
5420 }
5421
5422 unsafe impl<D: fidl::encoding::ResourceDialect>
5423 fidl::encoding::Encode<TelemetryGetIfaceStatsResponse, D>
5424 for &TelemetryGetIfaceStatsResponse
5425 {
5426 #[inline]
5427 unsafe fn encode(
5428 self,
5429 encoder: &mut fidl::encoding::Encoder<'_, D>,
5430 offset: usize,
5431 _depth: fidl::encoding::Depth,
5432 ) -> fidl::Result<()> {
5433 encoder.debug_check_bounds::<TelemetryGetIfaceStatsResponse>(offset);
5434 fidl::encoding::Encode::<TelemetryGetIfaceStatsResponse, D>::encode(
5436 (
5437 <fidl_fuchsia_wlan_stats_common::IfaceStats as fidl::encoding::ValueTypeMarker>::borrow(&self.stats),
5438 ),
5439 encoder, offset, _depth
5440 )
5441 }
5442 }
5443 unsafe impl<
5444 D: fidl::encoding::ResourceDialect,
5445 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_stats_common::IfaceStats, D>,
5446 > fidl::encoding::Encode<TelemetryGetIfaceStatsResponse, D> for (T0,)
5447 {
5448 #[inline]
5449 unsafe fn encode(
5450 self,
5451 encoder: &mut fidl::encoding::Encoder<'_, D>,
5452 offset: usize,
5453 depth: fidl::encoding::Depth,
5454 ) -> fidl::Result<()> {
5455 encoder.debug_check_bounds::<TelemetryGetIfaceStatsResponse>(offset);
5456 self.0.encode(encoder, offset + 0, depth)?;
5460 Ok(())
5461 }
5462 }
5463
5464 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5465 for TelemetryGetIfaceStatsResponse
5466 {
5467 #[inline(always)]
5468 fn new_empty() -> Self {
5469 Self { stats: fidl::new_empty!(fidl_fuchsia_wlan_stats_common::IfaceStats, D) }
5470 }
5471
5472 #[inline]
5473 unsafe fn decode(
5474 &mut self,
5475 decoder: &mut fidl::encoding::Decoder<'_, D>,
5476 offset: usize,
5477 _depth: fidl::encoding::Depth,
5478 ) -> fidl::Result<()> {
5479 decoder.debug_check_bounds::<Self>(offset);
5480 fidl::decode!(
5482 fidl_fuchsia_wlan_stats_common::IfaceStats,
5483 D,
5484 &mut self.stats,
5485 decoder,
5486 offset + 0,
5487 _depth
5488 )?;
5489 Ok(())
5490 }
5491 }
5492
5493 impl fidl::encoding::ValueTypeMarker for TelemetryGetSignalReportResponse {
5494 type Borrowed<'a> = &'a Self;
5495 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5496 value
5497 }
5498 }
5499
5500 unsafe impl fidl::encoding::TypeMarker for TelemetryGetSignalReportResponse {
5501 type Owned = Self;
5502
5503 #[inline(always)]
5504 fn inline_align(_context: fidl::encoding::Context) -> usize {
5505 8
5506 }
5507
5508 #[inline(always)]
5509 fn inline_size(_context: fidl::encoding::Context) -> usize {
5510 16
5511 }
5512 }
5513
5514 unsafe impl<D: fidl::encoding::ResourceDialect>
5515 fidl::encoding::Encode<TelemetryGetSignalReportResponse, D>
5516 for &TelemetryGetSignalReportResponse
5517 {
5518 #[inline]
5519 unsafe fn encode(
5520 self,
5521 encoder: &mut fidl::encoding::Encoder<'_, D>,
5522 offset: usize,
5523 _depth: fidl::encoding::Depth,
5524 ) -> fidl::Result<()> {
5525 encoder.debug_check_bounds::<TelemetryGetSignalReportResponse>(offset);
5526 fidl::encoding::Encode::<TelemetryGetSignalReportResponse, D>::encode(
5528 (
5529 <fidl_fuchsia_wlan_stats_common::SignalReport as fidl::encoding::ValueTypeMarker>::borrow(&self.stats),
5530 ),
5531 encoder, offset, _depth
5532 )
5533 }
5534 }
5535 unsafe impl<
5536 D: fidl::encoding::ResourceDialect,
5537 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_stats_common::SignalReport, D>,
5538 > fidl::encoding::Encode<TelemetryGetSignalReportResponse, D> for (T0,)
5539 {
5540 #[inline]
5541 unsafe fn encode(
5542 self,
5543 encoder: &mut fidl::encoding::Encoder<'_, D>,
5544 offset: usize,
5545 depth: fidl::encoding::Depth,
5546 ) -> fidl::Result<()> {
5547 encoder.debug_check_bounds::<TelemetryGetSignalReportResponse>(offset);
5548 self.0.encode(encoder, offset + 0, depth)?;
5552 Ok(())
5553 }
5554 }
5555
5556 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5557 for TelemetryGetSignalReportResponse
5558 {
5559 #[inline(always)]
5560 fn new_empty() -> Self {
5561 Self { stats: fidl::new_empty!(fidl_fuchsia_wlan_stats_common::SignalReport, D) }
5562 }
5563
5564 #[inline]
5565 unsafe fn decode(
5566 &mut self,
5567 decoder: &mut fidl::encoding::Decoder<'_, D>,
5568 offset: usize,
5569 _depth: fidl::encoding::Depth,
5570 ) -> fidl::Result<()> {
5571 decoder.debug_check_bounds::<Self>(offset);
5572 fidl::decode!(
5574 fidl_fuchsia_wlan_stats_common::SignalReport,
5575 D,
5576 &mut self.stats,
5577 decoder,
5578 offset + 0,
5579 _depth
5580 )?;
5581 Ok(())
5582 }
5583 }
5584
5585 impl fidl::encoding::ValueTypeMarker for TelemetryQueryTelemetrySupportResponse {
5586 type Borrowed<'a> = &'a Self;
5587 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5588 value
5589 }
5590 }
5591
5592 unsafe impl fidl::encoding::TypeMarker for TelemetryQueryTelemetrySupportResponse {
5593 type Owned = Self;
5594
5595 #[inline(always)]
5596 fn inline_align(_context: fidl::encoding::Context) -> usize {
5597 8
5598 }
5599
5600 #[inline(always)]
5601 fn inline_size(_context: fidl::encoding::Context) -> usize {
5602 16
5603 }
5604 }
5605
5606 unsafe impl<D: fidl::encoding::ResourceDialect>
5607 fidl::encoding::Encode<TelemetryQueryTelemetrySupportResponse, D>
5608 for &TelemetryQueryTelemetrySupportResponse
5609 {
5610 #[inline]
5611 unsafe fn encode(
5612 self,
5613 encoder: &mut fidl::encoding::Encoder<'_, D>,
5614 offset: usize,
5615 _depth: fidl::encoding::Depth,
5616 ) -> fidl::Result<()> {
5617 encoder.debug_check_bounds::<TelemetryQueryTelemetrySupportResponse>(offset);
5618 fidl::encoding::Encode::<TelemetryQueryTelemetrySupportResponse, D>::encode(
5620 (
5621 <fidl_fuchsia_wlan_stats_common::TelemetrySupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
5622 ),
5623 encoder, offset, _depth
5624 )
5625 }
5626 }
5627 unsafe impl<
5628 D: fidl::encoding::ResourceDialect,
5629 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_stats_common::TelemetrySupport, D>,
5630 > fidl::encoding::Encode<TelemetryQueryTelemetrySupportResponse, D> for (T0,)
5631 {
5632 #[inline]
5633 unsafe fn encode(
5634 self,
5635 encoder: &mut fidl::encoding::Encoder<'_, D>,
5636 offset: usize,
5637 depth: fidl::encoding::Depth,
5638 ) -> fidl::Result<()> {
5639 encoder.debug_check_bounds::<TelemetryQueryTelemetrySupportResponse>(offset);
5640 self.0.encode(encoder, offset + 0, depth)?;
5644 Ok(())
5645 }
5646 }
5647
5648 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5649 for TelemetryQueryTelemetrySupportResponse
5650 {
5651 #[inline(always)]
5652 fn new_empty() -> Self {
5653 Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_stats_common::TelemetrySupport, D) }
5654 }
5655
5656 #[inline]
5657 unsafe fn decode(
5658 &mut self,
5659 decoder: &mut fidl::encoding::Decoder<'_, D>,
5660 offset: usize,
5661 _depth: fidl::encoding::Depth,
5662 ) -> fidl::Result<()> {
5663 decoder.debug_check_bounds::<Self>(offset);
5664 fidl::decode!(
5666 fidl_fuchsia_wlan_stats_common::TelemetrySupport,
5667 D,
5668 &mut self.resp,
5669 decoder,
5670 offset + 0,
5671 _depth
5672 )?;
5673 Ok(())
5674 }
5675 }
5676
5677 impl GenericSmeQueryIfaceCapabilitiesResponse {
5678 #[inline(always)]
5679 fn max_ordinal_present(&self) -> u64 {
5680 if let Some(_) = self.rssi_monitor_support {
5681 return 2;
5682 }
5683 if let Some(_) = self.apf_support {
5684 return 1;
5685 }
5686 0
5687 }
5688 }
5689
5690 impl fidl::encoding::ValueTypeMarker for GenericSmeQueryIfaceCapabilitiesResponse {
5691 type Borrowed<'a> = &'a Self;
5692 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5693 value
5694 }
5695 }
5696
5697 unsafe impl fidl::encoding::TypeMarker for GenericSmeQueryIfaceCapabilitiesResponse {
5698 type Owned = Self;
5699
5700 #[inline(always)]
5701 fn inline_align(_context: fidl::encoding::Context) -> usize {
5702 8
5703 }
5704
5705 #[inline(always)]
5706 fn inline_size(_context: fidl::encoding::Context) -> usize {
5707 16
5708 }
5709 }
5710
5711 unsafe impl<D: fidl::encoding::ResourceDialect>
5712 fidl::encoding::Encode<GenericSmeQueryIfaceCapabilitiesResponse, D>
5713 for &GenericSmeQueryIfaceCapabilitiesResponse
5714 {
5715 unsafe fn encode(
5716 self,
5717 encoder: &mut fidl::encoding::Encoder<'_, D>,
5718 offset: usize,
5719 mut depth: fidl::encoding::Depth,
5720 ) -> fidl::Result<()> {
5721 encoder.debug_check_bounds::<GenericSmeQueryIfaceCapabilitiesResponse>(offset);
5722 let max_ordinal: u64 = self.max_ordinal_present();
5724 encoder.write_num(max_ordinal, offset);
5725 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
5726 if max_ordinal == 0 {
5728 return Ok(());
5729 }
5730 depth.increment()?;
5731 let envelope_size = 8;
5732 let bytes_len = max_ordinal as usize * envelope_size;
5733 #[allow(unused_variables)]
5734 let offset = encoder.out_of_line_offset(bytes_len);
5735 let mut _prev_end_offset: usize = 0;
5736 if 1 > max_ordinal {
5737 return Ok(());
5738 }
5739
5740 let cur_offset: usize = (1 - 1) * envelope_size;
5743
5744 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5746
5747 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_common_common::ApfPacketFilterSupport, D>(
5752 self.apf_support.as_ref().map(<fidl_fuchsia_wlan_common_common::ApfPacketFilterSupport as fidl::encoding::ValueTypeMarker>::borrow),
5753 encoder, offset + cur_offset, depth
5754 )?;
5755
5756 _prev_end_offset = cur_offset + envelope_size;
5757 if 2 > max_ordinal {
5758 return Ok(());
5759 }
5760
5761 let cur_offset: usize = (2 - 1) * envelope_size;
5764
5765 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5767
5768 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_common_common::RssiMonitorSupport, D>(
5773 self.rssi_monitor_support.as_ref().map(<fidl_fuchsia_wlan_common_common::RssiMonitorSupport as fidl::encoding::ValueTypeMarker>::borrow),
5774 encoder, offset + cur_offset, depth
5775 )?;
5776
5777 _prev_end_offset = cur_offset + envelope_size;
5778
5779 Ok(())
5780 }
5781 }
5782
5783 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5784 for GenericSmeQueryIfaceCapabilitiesResponse
5785 {
5786 #[inline(always)]
5787 fn new_empty() -> Self {
5788 Self::default()
5789 }
5790
5791 unsafe fn decode(
5792 &mut self,
5793 decoder: &mut fidl::encoding::Decoder<'_, D>,
5794 offset: usize,
5795 mut depth: fidl::encoding::Depth,
5796 ) -> fidl::Result<()> {
5797 decoder.debug_check_bounds::<Self>(offset);
5798 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
5799 None => return Err(fidl::Error::NotNullable),
5800 Some(len) => len,
5801 };
5802 if len == 0 {
5804 return Ok(());
5805 };
5806 depth.increment()?;
5807 let envelope_size = 8;
5808 let bytes_len = len * envelope_size;
5809 let offset = decoder.out_of_line_offset(bytes_len)?;
5810 let mut _next_ordinal_to_read = 0;
5812 let mut next_offset = offset;
5813 let end_offset = offset + bytes_len;
5814 _next_ordinal_to_read += 1;
5815 if next_offset >= end_offset {
5816 return Ok(());
5817 }
5818
5819 while _next_ordinal_to_read < 1 {
5821 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5822 _next_ordinal_to_read += 1;
5823 next_offset += envelope_size;
5824 }
5825
5826 let next_out_of_line = decoder.next_out_of_line();
5827 let handles_before = decoder.remaining_handles();
5828 if let Some((inlined, num_bytes, num_handles)) =
5829 fidl::encoding::decode_envelope_header(decoder, next_offset)?
5830 {
5831 let member_inline_size = <fidl_fuchsia_wlan_common_common::ApfPacketFilterSupport as fidl::encoding::TypeMarker>::inline_size(decoder.context);
5832 if inlined != (member_inline_size <= 4) {
5833 return Err(fidl::Error::InvalidInlineBitInEnvelope);
5834 }
5835 let inner_offset;
5836 let mut inner_depth = depth.clone();
5837 if inlined {
5838 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5839 inner_offset = next_offset;
5840 } else {
5841 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5842 inner_depth.increment()?;
5843 }
5844 let val_ref = self.apf_support.get_or_insert_with(|| {
5845 fidl::new_empty!(fidl_fuchsia_wlan_common_common::ApfPacketFilterSupport, D)
5846 });
5847 fidl::decode!(
5848 fidl_fuchsia_wlan_common_common::ApfPacketFilterSupport,
5849 D,
5850 val_ref,
5851 decoder,
5852 inner_offset,
5853 inner_depth
5854 )?;
5855 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5856 {
5857 return Err(fidl::Error::InvalidNumBytesInEnvelope);
5858 }
5859 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5860 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5861 }
5862 }
5863
5864 next_offset += envelope_size;
5865 _next_ordinal_to_read += 1;
5866 if next_offset >= end_offset {
5867 return Ok(());
5868 }
5869
5870 while _next_ordinal_to_read < 2 {
5872 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5873 _next_ordinal_to_read += 1;
5874 next_offset += envelope_size;
5875 }
5876
5877 let next_out_of_line = decoder.next_out_of_line();
5878 let handles_before = decoder.remaining_handles();
5879 if let Some((inlined, num_bytes, num_handles)) =
5880 fidl::encoding::decode_envelope_header(decoder, next_offset)?
5881 {
5882 let member_inline_size = <fidl_fuchsia_wlan_common_common::RssiMonitorSupport as fidl::encoding::TypeMarker>::inline_size(decoder.context);
5883 if inlined != (member_inline_size <= 4) {
5884 return Err(fidl::Error::InvalidInlineBitInEnvelope);
5885 }
5886 let inner_offset;
5887 let mut inner_depth = depth.clone();
5888 if inlined {
5889 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5890 inner_offset = next_offset;
5891 } else {
5892 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5893 inner_depth.increment()?;
5894 }
5895 let val_ref = self.rssi_monitor_support.get_or_insert_with(|| {
5896 fidl::new_empty!(fidl_fuchsia_wlan_common_common::RssiMonitorSupport, D)
5897 });
5898 fidl::decode!(
5899 fidl_fuchsia_wlan_common_common::RssiMonitorSupport,
5900 D,
5901 val_ref,
5902 decoder,
5903 inner_offset,
5904 inner_depth
5905 )?;
5906 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5907 {
5908 return Err(fidl::Error::InvalidNumBytesInEnvelope);
5909 }
5910 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5911 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5912 }
5913 }
5914
5915 next_offset += envelope_size;
5916
5917 while next_offset < end_offset {
5919 _next_ordinal_to_read += 1;
5920 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5921 next_offset += envelope_size;
5922 }
5923
5924 Ok(())
5925 }
5926 }
5927
5928 impl fidl::encoding::ValueTypeMarker for ClientStatusResponse {
5929 type Borrowed<'a> = &'a Self;
5930 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5931 value
5932 }
5933 }
5934
5935 unsafe impl fidl::encoding::TypeMarker for ClientStatusResponse {
5936 type Owned = Self;
5937
5938 #[inline(always)]
5939 fn inline_align(_context: fidl::encoding::Context) -> usize {
5940 8
5941 }
5942
5943 #[inline(always)]
5944 fn inline_size(_context: fidl::encoding::Context) -> usize {
5945 16
5946 }
5947 }
5948
5949 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ClientStatusResponse, D>
5950 for &ClientStatusResponse
5951 {
5952 #[inline]
5953 unsafe fn encode(
5954 self,
5955 encoder: &mut fidl::encoding::Encoder<'_, D>,
5956 offset: usize,
5957 _depth: fidl::encoding::Depth,
5958 ) -> fidl::Result<()> {
5959 encoder.debug_check_bounds::<ClientStatusResponse>(offset);
5960 encoder.write_num::<u64>(self.ordinal(), offset);
5961 match self {
5962 ClientStatusResponse::Connected(ref val) => {
5963 fidl::encoding::encode_in_envelope::<ServingApInfo, D>(
5964 <ServingApInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
5965 encoder,
5966 offset + 8,
5967 _depth,
5968 )
5969 }
5970 ClientStatusResponse::Connecting(ref val) => {
5971 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<u8, 32>, D>(
5972 <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
5973 val,
5974 ),
5975 encoder,
5976 offset + 8,
5977 _depth,
5978 )
5979 }
5980 ClientStatusResponse::Idle(ref val) => {
5981 fidl::encoding::encode_in_envelope::<Empty, D>(
5982 <Empty as fidl::encoding::ValueTypeMarker>::borrow(val),
5983 encoder,
5984 offset + 8,
5985 _depth,
5986 )
5987 }
5988 ClientStatusResponse::Roaming(ref val) => fidl::encoding::encode_in_envelope::<
5989 fidl::encoding::Array<u8, 6>,
5990 D,
5991 >(
5992 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(val),
5993 encoder,
5994 offset + 8,
5995 _depth,
5996 ),
5997 }
5998 }
5999 }
6000
6001 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ClientStatusResponse {
6002 #[inline(always)]
6003 fn new_empty() -> Self {
6004 Self::Connected(fidl::new_empty!(ServingApInfo, D))
6005 }
6006
6007 #[inline]
6008 unsafe fn decode(
6009 &mut self,
6010 decoder: &mut fidl::encoding::Decoder<'_, D>,
6011 offset: usize,
6012 mut depth: fidl::encoding::Depth,
6013 ) -> fidl::Result<()> {
6014 decoder.debug_check_bounds::<Self>(offset);
6015 #[allow(unused_variables)]
6016 let next_out_of_line = decoder.next_out_of_line();
6017 let handles_before = decoder.remaining_handles();
6018 let (ordinal, inlined, num_bytes, num_handles) =
6019 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
6020
6021 let member_inline_size = match ordinal {
6022 1 => <ServingApInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6023 2 => <fidl::encoding::Vector<u8, 32> as fidl::encoding::TypeMarker>::inline_size(
6024 decoder.context,
6025 ),
6026 3 => <Empty as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6027 4 => <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
6028 decoder.context,
6029 ),
6030 _ => return Err(fidl::Error::UnknownUnionTag),
6031 };
6032
6033 if inlined != (member_inline_size <= 4) {
6034 return Err(fidl::Error::InvalidInlineBitInEnvelope);
6035 }
6036 let _inner_offset;
6037 if inlined {
6038 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
6039 _inner_offset = offset + 8;
6040 } else {
6041 depth.increment()?;
6042 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6043 }
6044 match ordinal {
6045 1 => {
6046 #[allow(irrefutable_let_patterns)]
6047 if let ClientStatusResponse::Connected(_) = self {
6048 } else {
6050 *self = ClientStatusResponse::Connected(fidl::new_empty!(ServingApInfo, D));
6052 }
6053 #[allow(irrefutable_let_patterns)]
6054 if let ClientStatusResponse::Connected(ref mut val) = self {
6055 fidl::decode!(ServingApInfo, D, val, decoder, _inner_offset, depth)?;
6056 } else {
6057 unreachable!()
6058 }
6059 }
6060 2 => {
6061 #[allow(irrefutable_let_patterns)]
6062 if let ClientStatusResponse::Connecting(_) = self {
6063 } else {
6065 *self = ClientStatusResponse::Connecting(
6067 fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
6068 );
6069 }
6070 #[allow(irrefutable_let_patterns)]
6071 if let ClientStatusResponse::Connecting(ref mut val) = self {
6072 fidl::decode!(fidl::encoding::Vector<u8, 32>, D, val, decoder, _inner_offset, depth)?;
6073 } else {
6074 unreachable!()
6075 }
6076 }
6077 3 => {
6078 #[allow(irrefutable_let_patterns)]
6079 if let ClientStatusResponse::Idle(_) = self {
6080 } else {
6082 *self = ClientStatusResponse::Idle(fidl::new_empty!(Empty, D));
6084 }
6085 #[allow(irrefutable_let_patterns)]
6086 if let ClientStatusResponse::Idle(ref mut val) = self {
6087 fidl::decode!(Empty, D, val, decoder, _inner_offset, depth)?;
6088 } else {
6089 unreachable!()
6090 }
6091 }
6092 4 => {
6093 #[allow(irrefutable_let_patterns)]
6094 if let ClientStatusResponse::Roaming(_) = self {
6095 } else {
6097 *self = ClientStatusResponse::Roaming(
6099 fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
6100 );
6101 }
6102 #[allow(irrefutable_let_patterns)]
6103 if let ClientStatusResponse::Roaming(ref mut val) = self {
6104 fidl::decode!(fidl::encoding::Array<u8, 6>, D, val, decoder, _inner_offset, depth)?;
6105 } else {
6106 unreachable!()
6107 }
6108 }
6109 ordinal => panic!("unexpected ordinal {:?}", ordinal),
6110 }
6111 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
6112 return Err(fidl::Error::InvalidNumBytesInEnvelope);
6113 }
6114 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6115 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6116 }
6117 Ok(())
6118 }
6119 }
6120
6121 impl fidl::encoding::ValueTypeMarker for Compatibility {
6122 type Borrowed<'a> = &'a Self;
6123 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6124 value
6125 }
6126 }
6127
6128 unsafe impl fidl::encoding::TypeMarker for Compatibility {
6129 type Owned = Self;
6130
6131 #[inline(always)]
6132 fn inline_align(_context: fidl::encoding::Context) -> usize {
6133 8
6134 }
6135
6136 #[inline(always)]
6137 fn inline_size(_context: fidl::encoding::Context) -> usize {
6138 16
6139 }
6140 }
6141
6142 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Compatibility, D>
6143 for &Compatibility
6144 {
6145 #[inline]
6146 unsafe fn encode(
6147 self,
6148 encoder: &mut fidl::encoding::Encoder<'_, D>,
6149 offset: usize,
6150 _depth: fidl::encoding::Depth,
6151 ) -> fidl::Result<()> {
6152 encoder.debug_check_bounds::<Compatibility>(offset);
6153 encoder.write_num::<u64>(self.ordinal(), offset);
6154 match self {
6155 Compatibility::Compatible(ref val) => {
6156 fidl::encoding::encode_in_envelope::<Compatible, D>(
6157 <Compatible as fidl::encoding::ValueTypeMarker>::borrow(val),
6158 encoder,
6159 offset + 8,
6160 _depth,
6161 )
6162 }
6163 Compatibility::Incompatible(ref val) => {
6164 fidl::encoding::encode_in_envelope::<Incompatible, D>(
6165 <Incompatible as fidl::encoding::ValueTypeMarker>::borrow(val),
6166 encoder,
6167 offset + 8,
6168 _depth,
6169 )
6170 }
6171 }
6172 }
6173 }
6174
6175 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Compatibility {
6176 #[inline(always)]
6177 fn new_empty() -> Self {
6178 Self::Compatible(fidl::new_empty!(Compatible, D))
6179 }
6180
6181 #[inline]
6182 unsafe fn decode(
6183 &mut self,
6184 decoder: &mut fidl::encoding::Decoder<'_, D>,
6185 offset: usize,
6186 mut depth: fidl::encoding::Depth,
6187 ) -> fidl::Result<()> {
6188 decoder.debug_check_bounds::<Self>(offset);
6189 #[allow(unused_variables)]
6190 let next_out_of_line = decoder.next_out_of_line();
6191 let handles_before = decoder.remaining_handles();
6192 let (ordinal, inlined, num_bytes, num_handles) =
6193 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
6194
6195 let member_inline_size = match ordinal {
6196 1 => <Compatible as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6197 2 => <Incompatible as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6198 _ => return Err(fidl::Error::UnknownUnionTag),
6199 };
6200
6201 if inlined != (member_inline_size <= 4) {
6202 return Err(fidl::Error::InvalidInlineBitInEnvelope);
6203 }
6204 let _inner_offset;
6205 if inlined {
6206 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
6207 _inner_offset = offset + 8;
6208 } else {
6209 depth.increment()?;
6210 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6211 }
6212 match ordinal {
6213 1 => {
6214 #[allow(irrefutable_let_patterns)]
6215 if let Compatibility::Compatible(_) = self {
6216 } else {
6218 *self = Compatibility::Compatible(fidl::new_empty!(Compatible, D));
6220 }
6221 #[allow(irrefutable_let_patterns)]
6222 if let Compatibility::Compatible(ref mut val) = self {
6223 fidl::decode!(Compatible, D, val, decoder, _inner_offset, depth)?;
6224 } else {
6225 unreachable!()
6226 }
6227 }
6228 2 => {
6229 #[allow(irrefutable_let_patterns)]
6230 if let Compatibility::Incompatible(_) = self {
6231 } else {
6233 *self = Compatibility::Incompatible(fidl::new_empty!(Incompatible, D));
6235 }
6236 #[allow(irrefutable_let_patterns)]
6237 if let Compatibility::Incompatible(ref mut val) = self {
6238 fidl::decode!(Incompatible, D, val, decoder, _inner_offset, depth)?;
6239 } else {
6240 unreachable!()
6241 }
6242 }
6243 ordinal => panic!("unexpected ordinal {:?}", ordinal),
6244 }
6245 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
6246 return Err(fidl::Error::InvalidNumBytesInEnvelope);
6247 }
6248 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6249 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6250 }
6251 Ok(())
6252 }
6253 }
6254
6255 impl fidl::encoding::ValueTypeMarker for DisconnectSource {
6256 type Borrowed<'a> = &'a Self;
6257 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6258 value
6259 }
6260 }
6261
6262 unsafe impl fidl::encoding::TypeMarker for DisconnectSource {
6263 type Owned = Self;
6264
6265 #[inline(always)]
6266 fn inline_align(_context: fidl::encoding::Context) -> usize {
6267 8
6268 }
6269
6270 #[inline(always)]
6271 fn inline_size(_context: fidl::encoding::Context) -> usize {
6272 16
6273 }
6274 }
6275
6276 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisconnectSource, D>
6277 for &DisconnectSource
6278 {
6279 #[inline]
6280 unsafe fn encode(
6281 self,
6282 encoder: &mut fidl::encoding::Encoder<'_, D>,
6283 offset: usize,
6284 _depth: fidl::encoding::Depth,
6285 ) -> fidl::Result<()> {
6286 encoder.debug_check_bounds::<DisconnectSource>(offset);
6287 encoder.write_num::<u64>(self.ordinal(), offset);
6288 match self {
6289 DisconnectSource::Ap(ref val) => {
6290 fidl::encoding::encode_in_envelope::<DisconnectCause, D>(
6291 <DisconnectCause as fidl::encoding::ValueTypeMarker>::borrow(val),
6292 encoder,
6293 offset + 8,
6294 _depth,
6295 )
6296 }
6297 DisconnectSource::User(ref val) => {
6298 fidl::encoding::encode_in_envelope::<UserDisconnectReason, D>(
6299 <UserDisconnectReason as fidl::encoding::ValueTypeMarker>::borrow(val),
6300 encoder,
6301 offset + 8,
6302 _depth,
6303 )
6304 }
6305 DisconnectSource::Mlme(ref val) => {
6306 fidl::encoding::encode_in_envelope::<DisconnectCause, D>(
6307 <DisconnectCause as fidl::encoding::ValueTypeMarker>::borrow(val),
6308 encoder,
6309 offset + 8,
6310 _depth,
6311 )
6312 }
6313 }
6314 }
6315 }
6316
6317 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisconnectSource {
6318 #[inline(always)]
6319 fn new_empty() -> Self {
6320 Self::Ap(fidl::new_empty!(DisconnectCause, D))
6321 }
6322
6323 #[inline]
6324 unsafe fn decode(
6325 &mut self,
6326 decoder: &mut fidl::encoding::Decoder<'_, D>,
6327 offset: usize,
6328 mut depth: fidl::encoding::Depth,
6329 ) -> fidl::Result<()> {
6330 decoder.debug_check_bounds::<Self>(offset);
6331 #[allow(unused_variables)]
6332 let next_out_of_line = decoder.next_out_of_line();
6333 let handles_before = decoder.remaining_handles();
6334 let (ordinal, inlined, num_bytes, num_handles) =
6335 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
6336
6337 let member_inline_size = match ordinal {
6338 1 => <DisconnectCause as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6339 2 => <UserDisconnectReason as fidl::encoding::TypeMarker>::inline_size(
6340 decoder.context,
6341 ),
6342 3 => <DisconnectCause as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6343 _ => return Err(fidl::Error::UnknownUnionTag),
6344 };
6345
6346 if inlined != (member_inline_size <= 4) {
6347 return Err(fidl::Error::InvalidInlineBitInEnvelope);
6348 }
6349 let _inner_offset;
6350 if inlined {
6351 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
6352 _inner_offset = offset + 8;
6353 } else {
6354 depth.increment()?;
6355 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6356 }
6357 match ordinal {
6358 1 => {
6359 #[allow(irrefutable_let_patterns)]
6360 if let DisconnectSource::Ap(_) = self {
6361 } else {
6363 *self = DisconnectSource::Ap(fidl::new_empty!(DisconnectCause, D));
6365 }
6366 #[allow(irrefutable_let_patterns)]
6367 if let DisconnectSource::Ap(ref mut val) = self {
6368 fidl::decode!(DisconnectCause, D, val, decoder, _inner_offset, depth)?;
6369 } else {
6370 unreachable!()
6371 }
6372 }
6373 2 => {
6374 #[allow(irrefutable_let_patterns)]
6375 if let DisconnectSource::User(_) = self {
6376 } else {
6378 *self = DisconnectSource::User(fidl::new_empty!(UserDisconnectReason, D));
6380 }
6381 #[allow(irrefutable_let_patterns)]
6382 if let DisconnectSource::User(ref mut val) = self {
6383 fidl::decode!(UserDisconnectReason, D, val, decoder, _inner_offset, depth)?;
6384 } else {
6385 unreachable!()
6386 }
6387 }
6388 3 => {
6389 #[allow(irrefutable_let_patterns)]
6390 if let DisconnectSource::Mlme(_) = self {
6391 } else {
6393 *self = DisconnectSource::Mlme(fidl::new_empty!(DisconnectCause, D));
6395 }
6396 #[allow(irrefutable_let_patterns)]
6397 if let DisconnectSource::Mlme(ref mut val) = self {
6398 fidl::decode!(DisconnectCause, D, val, decoder, _inner_offset, depth)?;
6399 } else {
6400 unreachable!()
6401 }
6402 }
6403 ordinal => panic!("unexpected ordinal {:?}", ordinal),
6404 }
6405 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
6406 return Err(fidl::Error::InvalidNumBytesInEnvelope);
6407 }
6408 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6409 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6410 }
6411 Ok(())
6412 }
6413 }
6414
6415 impl fidl::encoding::ValueTypeMarker for ScanRequest {
6416 type Borrowed<'a> = &'a Self;
6417 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6418 value
6419 }
6420 }
6421
6422 unsafe impl fidl::encoding::TypeMarker for ScanRequest {
6423 type Owned = Self;
6424
6425 #[inline(always)]
6426 fn inline_align(_context: fidl::encoding::Context) -> usize {
6427 8
6428 }
6429
6430 #[inline(always)]
6431 fn inline_size(_context: fidl::encoding::Context) -> usize {
6432 16
6433 }
6434 }
6435
6436 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ScanRequest, D>
6437 for &ScanRequest
6438 {
6439 #[inline]
6440 unsafe fn encode(
6441 self,
6442 encoder: &mut fidl::encoding::Encoder<'_, D>,
6443 offset: usize,
6444 _depth: fidl::encoding::Depth,
6445 ) -> fidl::Result<()> {
6446 encoder.debug_check_bounds::<ScanRequest>(offset);
6447 encoder.write_num::<u64>(self.ordinal(), offset);
6448 match self {
6449 ScanRequest::Active(ref val) => {
6450 fidl::encoding::encode_in_envelope::<ActiveScanRequest, D>(
6451 <ActiveScanRequest as fidl::encoding::ValueTypeMarker>::borrow(val),
6452 encoder,
6453 offset + 8,
6454 _depth,
6455 )
6456 }
6457 ScanRequest::Passive(ref val) => {
6458 fidl::encoding::encode_in_envelope::<PassiveScanRequest, D>(
6459 <PassiveScanRequest as fidl::encoding::ValueTypeMarker>::borrow(val),
6460 encoder,
6461 offset + 8,
6462 _depth,
6463 )
6464 }
6465 }
6466 }
6467 }
6468
6469 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanRequest {
6470 #[inline(always)]
6471 fn new_empty() -> Self {
6472 Self::Active(fidl::new_empty!(ActiveScanRequest, D))
6473 }
6474
6475 #[inline]
6476 unsafe fn decode(
6477 &mut self,
6478 decoder: &mut fidl::encoding::Decoder<'_, D>,
6479 offset: usize,
6480 mut depth: fidl::encoding::Depth,
6481 ) -> fidl::Result<()> {
6482 decoder.debug_check_bounds::<Self>(offset);
6483 #[allow(unused_variables)]
6484 let next_out_of_line = decoder.next_out_of_line();
6485 let handles_before = decoder.remaining_handles();
6486 let (ordinal, inlined, num_bytes, num_handles) =
6487 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
6488
6489 let member_inline_size = match ordinal {
6490 1 => {
6491 <ActiveScanRequest as fidl::encoding::TypeMarker>::inline_size(decoder.context)
6492 }
6493 2 => {
6494 <PassiveScanRequest as fidl::encoding::TypeMarker>::inline_size(decoder.context)
6495 }
6496 _ => return Err(fidl::Error::UnknownUnionTag),
6497 };
6498
6499 if inlined != (member_inline_size <= 4) {
6500 return Err(fidl::Error::InvalidInlineBitInEnvelope);
6501 }
6502 let _inner_offset;
6503 if inlined {
6504 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
6505 _inner_offset = offset + 8;
6506 } else {
6507 depth.increment()?;
6508 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6509 }
6510 match ordinal {
6511 1 => {
6512 #[allow(irrefutable_let_patterns)]
6513 if let ScanRequest::Active(_) = self {
6514 } else {
6516 *self = ScanRequest::Active(fidl::new_empty!(ActiveScanRequest, D));
6518 }
6519 #[allow(irrefutable_let_patterns)]
6520 if let ScanRequest::Active(ref mut val) = self {
6521 fidl::decode!(ActiveScanRequest, D, val, decoder, _inner_offset, depth)?;
6522 } else {
6523 unreachable!()
6524 }
6525 }
6526 2 => {
6527 #[allow(irrefutable_let_patterns)]
6528 if let ScanRequest::Passive(_) = self {
6529 } else {
6531 *self = ScanRequest::Passive(fidl::new_empty!(PassiveScanRequest, D));
6533 }
6534 #[allow(irrefutable_let_patterns)]
6535 if let ScanRequest::Passive(ref mut val) = self {
6536 fidl::decode!(PassiveScanRequest, D, val, decoder, _inner_offset, depth)?;
6537 } else {
6538 unreachable!()
6539 }
6540 }
6541 ordinal => panic!("unexpected ordinal {:?}", ordinal),
6542 }
6543 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
6544 return Err(fidl::Error::InvalidNumBytesInEnvelope);
6545 }
6546 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6547 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6548 }
6549 Ok(())
6550 }
6551 }
6552}