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, Debug, PartialEq)]
334pub struct ClientSmeStatusResponse {
335 pub resp: ClientStatusResponse,
336}
337
338impl fidl::Persistable for ClientSmeStatusResponse {}
339
340#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
341pub struct ClientSmeGetApfPacketFilterEnabledResponse {
342 pub enabled: bool,
343}
344
345impl fidl::Persistable for ClientSmeGetApfPacketFilterEnabledResponse {}
346
347#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
348pub struct ClientSmeReadApfPacketFilterDataResponse {
349 pub memory: Vec<u8>,
350}
351
352impl fidl::Persistable for ClientSmeReadApfPacketFilterDataResponse {}
353
354#[derive(Clone, Debug, PartialEq)]
355pub struct ClientSmeWmmStatusResponse {
356 pub resp: fidl_fuchsia_wlan_internal__common::WmmStatusResponse,
357}
358
359impl fidl::Persistable for ClientSmeWmmStatusResponse {}
360
361#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
362pub struct Compatible {
363 pub mutual_security_protocols: Vec<fidl_fuchsia_wlan_internal__common::Protocol>,
364}
365
366impl fidl::Persistable for Compatible {}
367
368#[derive(Clone, Debug, PartialEq)]
369pub struct ConnectRequest {
370 pub ssid: Vec<u8>,
371 pub bss_description: fidl_fuchsia_wlan_ieee80211__common::BssDescription,
372 pub multiple_bss_candidates: bool,
374 pub authentication: fidl_fuchsia_wlan_internal__common::Authentication,
378 pub deprecated_scan_type: fidl_fuchsia_wlan_common__common::ScanType,
382}
383
384impl fidl::Persistable for ConnectRequest {}
385
386#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
387pub struct ConnectResult {
388 pub code: fidl_fuchsia_wlan_ieee80211__common::StatusCode,
389 pub is_credential_rejected: bool,
392 pub is_reconnect: bool,
395}
396
397impl fidl::Persistable for ConnectResult {}
398
399#[derive(Clone, Debug, PartialEq)]
400pub struct ConnectTransactionOnChannelSwitchedRequest {
401 pub info: fidl_fuchsia_wlan_internal__common::ChannelSwitchInfo,
402}
403
404impl fidl::Persistable for ConnectTransactionOnChannelSwitchedRequest {}
405
406#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
407pub struct ConnectTransactionOnConnectResultRequest {
408 pub result: ConnectResult,
409}
410
411impl fidl::Persistable for ConnectTransactionOnConnectResultRequest {}
412
413#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
414pub struct ConnectTransactionOnDisconnectRequest {
415 pub info: DisconnectInfo,
416}
417
418impl fidl::Persistable for ConnectTransactionOnDisconnectRequest {}
419
420#[derive(Clone, Debug, PartialEq)]
421pub struct ConnectTransactionOnRoamResultRequest {
422 pub result: RoamResult,
423}
424
425impl fidl::Persistable for ConnectTransactionOnRoamResultRequest {}
426
427#[derive(Clone, Debug, PartialEq)]
428pub struct ConnectTransactionOnSignalReportRequest {
429 pub ind: fidl_fuchsia_wlan_internal__common::SignalReportIndication,
430}
431
432impl fidl::Persistable for ConnectTransactionOnSignalReportRequest {}
433
434#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
435pub struct DisconnectCause {
436 pub mlme_event_name: DisconnectMlmeEventName,
437 pub reason_code: fidl_fuchsia_wlan_ieee80211__common::ReasonCode,
438}
439
440impl fidl::Persistable for DisconnectCause {}
441
442#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
443pub struct DisconnectInfo {
444 pub is_sme_reconnecting: bool,
446 pub disconnect_source: DisconnectSource,
448}
449
450impl fidl::Persistable for DisconnectInfo {}
451
452#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
453pub struct DisjointSecurityProtocol {
454 pub protocol: fidl_fuchsia_wlan_internal__common::Protocol,
455 pub role: fidl_fuchsia_wlan_common__common::WlanMacRole,
456}
457
458impl fidl::Persistable for DisjointSecurityProtocol {}
459
460#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
462pub struct Empty;
463
464impl fidl::Persistable for Empty {}
465
466#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
467pub struct GenericSmeQuery {
468 pub role: fidl_fuchsia_wlan_common__common::WlanMacRole,
469 pub sta_addr: [u8; 6],
470 pub factory_addr: [u8; 6],
471}
472
473impl fidl::Persistable for GenericSmeQuery {}
474
475#[derive(Clone, Debug, PartialEq)]
476pub struct GenericSmeQueryIfaceCapabilitiesResponse {
477 pub apf_support: fidl_fuchsia_wlan_common__common::ApfPacketFilterSupport,
479}
480
481impl fidl::Persistable for GenericSmeQueryIfaceCapabilitiesResponse {}
482
483#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
484pub struct Incompatible {
485 pub description: String,
486 pub disjoint_security_protocols: Option<Vec<DisjointSecurityProtocol>>,
487}
488
489impl fidl::Persistable for Incompatible {}
490
491#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
492pub struct LegacyPrivacySupport {
493 pub wep_supported: bool,
494 pub wpa1_supported: bool,
495}
496
497impl fidl::Persistable for LegacyPrivacySupport {}
498
499#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
500pub struct PassiveScanRequest {
501 pub channels: Vec<u8>,
503}
504
505impl fidl::Persistable for PassiveScanRequest {}
506
507#[derive(Clone, Debug, PartialEq)]
508pub struct RadioConfig {
509 pub phy: fidl_fuchsia_wlan_ieee80211__common::WlanPhyType,
510 pub channel: fidl_fuchsia_wlan_ieee80211__common::WlanChannel,
511}
512
513impl fidl::Persistable for RadioConfig {}
514
515#[derive(Clone, Debug, PartialEq)]
516pub struct RoamRequest {
517 pub bss_description: fidl_fuchsia_wlan_ieee80211__common::BssDescription,
518}
519
520impl fidl::Persistable for RoamRequest {}
521
522#[derive(Clone, Debug, PartialEq)]
524pub struct RoamResult {
525 pub bssid: [u8; 6],
527 pub status_code: fidl_fuchsia_wlan_ieee80211__common::StatusCode,
528 pub original_association_maintained: bool,
533 pub bss_description: Option<Box<fidl_fuchsia_wlan_ieee80211__common::BssDescription>>,
534 pub disconnect_info: Option<Box<DisconnectInfo>>,
537 pub is_credential_rejected: bool,
540}
541
542impl fidl::Persistable for RoamResult {}
543
544#[derive(Clone, Debug, PartialEq)]
545pub struct ScanResult {
546 pub compatibility: Compatibility,
547 pub timestamp_nanos: i64,
548 pub bss_description: fidl_fuchsia_wlan_ieee80211__common::BssDescription,
549}
550
551impl fidl::Persistable for ScanResult {}
552
553#[derive(Clone, Debug, PartialEq)]
554pub struct ScanResultVector {
555 pub results: Vec<ScanResult>,
556}
557
558impl fidl::Persistable for ScanResultVector {}
559
560#[derive(Clone, Debug, PartialEq)]
561pub struct ServingApInfo {
562 pub bssid: [u8; 6],
563 pub ssid: Vec<u8>,
564 pub rssi_dbm: i8,
565 pub snr_db: i8,
566 pub channel: fidl_fuchsia_wlan_ieee80211__common::WlanChannel,
567 pub protection: Protection,
568}
569
570impl fidl::Persistable for ServingApInfo {}
571
572#[derive(Clone, Debug, PartialEq)]
573pub struct TelemetryGetHistogramStatsResponse {
574 pub stats: fidl_fuchsia_wlan_stats__common::IfaceHistogramStats,
575}
576
577impl fidl::Persistable for TelemetryGetHistogramStatsResponse {}
578
579#[derive(Clone, Debug, PartialEq)]
580pub struct TelemetryGetIfaceStatsResponse {
581 pub stats: fidl_fuchsia_wlan_stats__common::IfaceStats,
582}
583
584impl fidl::Persistable for TelemetryGetIfaceStatsResponse {}
585
586#[derive(Clone, Debug, PartialEq)]
587pub struct TelemetryGetSignalReportResponse {
588 pub stats: fidl_fuchsia_wlan_stats__common::SignalReport,
589}
590
591impl fidl::Persistable for TelemetryGetSignalReportResponse {}
592
593#[derive(Clone, Debug, PartialEq)]
594pub struct TelemetryQueryTelemetrySupportResponse {
595 pub resp: fidl_fuchsia_wlan_stats__common::TelemetrySupport,
596}
597
598impl fidl::Persistable for TelemetryQueryTelemetrySupportResponse {}
599
600#[derive(Clone, Debug, PartialEq)]
601pub enum ClientStatusResponse {
602 Connected(ServingApInfo),
603 Connecting(Vec<u8>),
604 Idle(Empty),
605 Roaming([u8; 6]),
606}
607
608impl ClientStatusResponse {
609 #[inline]
610 pub fn ordinal(&self) -> u64 {
611 match *self {
612 Self::Connected(_) => 1,
613 Self::Connecting(_) => 2,
614 Self::Idle(_) => 3,
615 Self::Roaming(_) => 4,
616 }
617 }
618}
619
620impl fidl::Persistable for ClientStatusResponse {}
621
622#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
623pub enum Compatibility {
624 Compatible(Compatible),
625 Incompatible(Incompatible),
626}
627
628impl Compatibility {
629 #[inline]
630 pub fn ordinal(&self) -> u64 {
631 match *self {
632 Self::Compatible(_) => 1,
633 Self::Incompatible(_) => 2,
634 }
635 }
636}
637
638impl fidl::Persistable for Compatibility {}
639
640#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
641pub enum DisconnectSource {
642 Ap(DisconnectCause),
643 User(UserDisconnectReason),
644 Mlme(DisconnectCause),
645}
646
647impl DisconnectSource {
648 #[inline]
649 pub fn ordinal(&self) -> u64 {
650 match *self {
651 Self::Ap(_) => 1,
652 Self::User(_) => 2,
653 Self::Mlme(_) => 3,
654 }
655 }
656}
657
658impl fidl::Persistable for DisconnectSource {}
659
660#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
661pub enum ScanRequest {
662 Active(ActiveScanRequest),
663 Passive(PassiveScanRequest),
664}
665
666impl ScanRequest {
667 #[inline]
668 pub fn ordinal(&self) -> u64 {
669 match *self {
670 Self::Active(_) => 1,
671 Self::Passive(_) => 2,
672 }
673 }
674}
675
676impl fidl::Persistable for ScanRequest {}
677
678pub mod ap_sme_ordinals {
679 pub const START: u64 = 0x33fa134ceda8624d;
680 pub const STOP: u64 = 0x56423f5b49a2e851;
681 pub const STATUS: u64 = 0x51c688ac7a101606;
682}
683
684pub mod client_sme_ordinals {
685 pub const SCAN: u64 = 0xded0ce3b1685822;
686 pub const CONNECT: u64 = 0x250a0f6fe9f85351;
687 pub const ROAM: u64 = 0x107ead7d84723921;
688 pub const DISCONNECT: u64 = 0x39a578de9a107304;
689 pub const STATUS: u64 = 0xda00b607470faf2;
690 pub const WMM_STATUS: u64 = 0x3d0ccc75f6baa9e3;
691 pub const SCAN_FOR_CONTROLLER: u64 = 0x21f00ab22ff79a12;
692 pub const SET_MAC_ADDRESS: u64 = 0x13e0a0bee8962f58;
693 pub const INSTALL_APF_PACKET_FILTER: u64 = 0x77435965e7bfaf83;
694 pub const READ_APF_PACKET_FILTER_DATA: u64 = 0x66fc6616b9963023;
695 pub const SET_APF_PACKET_FILTER_ENABLED: u64 = 0x5070d2ed31580b81;
696 pub const GET_APF_PACKET_FILTER_ENABLED: u64 = 0xdda5c1533526869;
697}
698
699pub mod connect_transaction_ordinals {
700 pub const ON_CONNECT_RESULT: u64 = 0x48d2cf407da489a7;
701 pub const ON_DISCONNECT: u64 = 0x40dea7b1449cc733;
702 pub const ON_ROAM_RESULT: u64 = 0x656267da4ccf2a41;
703 pub const ON_SIGNAL_REPORT: u64 = 0x5e968bd5e267e262;
704 pub const ON_CHANNEL_SWITCHED: u64 = 0x5f5153778cd70512;
705}
706
707pub mod generic_sme_ordinals {
708 pub const QUERY: u64 = 0x6ef4a820c153e249;
709 pub const QUERY_IFACE_CAPABILITIES: u64 = 0x2f483964e794fbba;
710 pub const GET_CLIENT_SME: u64 = 0x2439ad714c642f15;
711 pub const GET_AP_SME: u64 = 0x4d2a40be2b44ad6c;
712 pub const GET_SME_TELEMETRY: u64 = 0x7ea015b3060fa;
713}
714
715pub mod telemetry_ordinals {
716 pub const QUERY_TELEMETRY_SUPPORT: u64 = 0x69443ad35b204686;
717 pub const GET_IFACE_STATS: u64 = 0x6af057f3a017f572;
718 pub const GET_HISTOGRAM_STATS: u64 = 0x46d2b6a23f764564;
719 pub const GET_SIGNAL_REPORT: u64 = 0x24133aeac3225e28;
720 pub const CLONE_INSPECT_VMO: u64 = 0x47153917e84c5a21;
721}
722
723pub mod usme_bootstrap_ordinals {
724 pub const START: u64 = 0x58850dfb76c29a0e;
725}
726
727mod internal {
728 use super::*;
729 unsafe impl fidl::encoding::TypeMarker for DisconnectMlmeEventName {
730 type Owned = Self;
731
732 #[inline(always)]
733 fn inline_align(_context: fidl::encoding::Context) -> usize {
734 std::mem::align_of::<u32>()
735 }
736
737 #[inline(always)]
738 fn inline_size(_context: fidl::encoding::Context) -> usize {
739 std::mem::size_of::<u32>()
740 }
741
742 #[inline(always)]
743 fn encode_is_copy() -> bool {
744 true
745 }
746
747 #[inline(always)]
748 fn decode_is_copy() -> bool {
749 false
750 }
751 }
752
753 impl fidl::encoding::ValueTypeMarker for DisconnectMlmeEventName {
754 type Borrowed<'a> = Self;
755 #[inline(always)]
756 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
757 *value
758 }
759 }
760
761 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
762 for DisconnectMlmeEventName
763 {
764 #[inline]
765 unsafe fn encode(
766 self,
767 encoder: &mut fidl::encoding::Encoder<'_, D>,
768 offset: usize,
769 _depth: fidl::encoding::Depth,
770 ) -> fidl::Result<()> {
771 encoder.debug_check_bounds::<Self>(offset);
772 encoder.write_num(self.into_primitive(), offset);
773 Ok(())
774 }
775 }
776
777 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
778 for DisconnectMlmeEventName
779 {
780 #[inline(always)]
781 fn new_empty() -> Self {
782 Self::DeauthenticateIndication
783 }
784
785 #[inline]
786 unsafe fn decode(
787 &mut self,
788 decoder: &mut fidl::encoding::Decoder<'_, D>,
789 offset: usize,
790 _depth: fidl::encoding::Depth,
791 ) -> fidl::Result<()> {
792 decoder.debug_check_bounds::<Self>(offset);
793 let prim = decoder.read_num::<u32>(offset);
794
795 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
796 Ok(())
797 }
798 }
799 unsafe impl fidl::encoding::TypeMarker for Protection {
800 type Owned = Self;
801
802 #[inline(always)]
803 fn inline_align(_context: fidl::encoding::Context) -> usize {
804 std::mem::align_of::<u32>()
805 }
806
807 #[inline(always)]
808 fn inline_size(_context: fidl::encoding::Context) -> usize {
809 std::mem::size_of::<u32>()
810 }
811
812 #[inline(always)]
813 fn encode_is_copy() -> bool {
814 true
815 }
816
817 #[inline(always)]
818 fn decode_is_copy() -> bool {
819 false
820 }
821 }
822
823 impl fidl::encoding::ValueTypeMarker for Protection {
824 type Borrowed<'a> = Self;
825 #[inline(always)]
826 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
827 *value
828 }
829 }
830
831 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for Protection {
832 #[inline]
833 unsafe fn encode(
834 self,
835 encoder: &mut fidl::encoding::Encoder<'_, D>,
836 offset: usize,
837 _depth: fidl::encoding::Depth,
838 ) -> fidl::Result<()> {
839 encoder.debug_check_bounds::<Self>(offset);
840 encoder.write_num(self.into_primitive(), offset);
841 Ok(())
842 }
843 }
844
845 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Protection {
846 #[inline(always)]
847 fn new_empty() -> Self {
848 Self::Unknown
849 }
850
851 #[inline]
852 unsafe fn decode(
853 &mut self,
854 decoder: &mut fidl::encoding::Decoder<'_, D>,
855 offset: usize,
856 _depth: fidl::encoding::Depth,
857 ) -> fidl::Result<()> {
858 decoder.debug_check_bounds::<Self>(offset);
859 let prim = decoder.read_num::<u32>(offset);
860
861 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
862 Ok(())
863 }
864 }
865 unsafe impl fidl::encoding::TypeMarker for ScanErrorCode {
866 type Owned = Self;
867
868 #[inline(always)]
869 fn inline_align(_context: fidl::encoding::Context) -> usize {
870 std::mem::align_of::<u32>()
871 }
872
873 #[inline(always)]
874 fn inline_size(_context: fidl::encoding::Context) -> usize {
875 std::mem::size_of::<u32>()
876 }
877
878 #[inline(always)]
879 fn encode_is_copy() -> bool {
880 true
881 }
882
883 #[inline(always)]
884 fn decode_is_copy() -> bool {
885 false
886 }
887 }
888
889 impl fidl::encoding::ValueTypeMarker for ScanErrorCode {
890 type Borrowed<'a> = Self;
891 #[inline(always)]
892 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
893 *value
894 }
895 }
896
897 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ScanErrorCode {
898 #[inline]
899 unsafe fn encode(
900 self,
901 encoder: &mut fidl::encoding::Encoder<'_, D>,
902 offset: usize,
903 _depth: fidl::encoding::Depth,
904 ) -> fidl::Result<()> {
905 encoder.debug_check_bounds::<Self>(offset);
906 encoder.write_num(self.into_primitive(), offset);
907 Ok(())
908 }
909 }
910
911 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanErrorCode {
912 #[inline(always)]
913 fn new_empty() -> Self {
914 Self::NotSupported
915 }
916
917 #[inline]
918 unsafe fn decode(
919 &mut self,
920 decoder: &mut fidl::encoding::Decoder<'_, D>,
921 offset: usize,
922 _depth: fidl::encoding::Depth,
923 ) -> fidl::Result<()> {
924 decoder.debug_check_bounds::<Self>(offset);
925 let prim = decoder.read_num::<u32>(offset);
926
927 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
928 Ok(())
929 }
930 }
931 unsafe impl fidl::encoding::TypeMarker for StartApResultCode {
932 type Owned = Self;
933
934 #[inline(always)]
935 fn inline_align(_context: fidl::encoding::Context) -> usize {
936 std::mem::align_of::<u32>()
937 }
938
939 #[inline(always)]
940 fn inline_size(_context: fidl::encoding::Context) -> usize {
941 std::mem::size_of::<u32>()
942 }
943
944 #[inline(always)]
945 fn encode_is_copy() -> bool {
946 true
947 }
948
949 #[inline(always)]
950 fn decode_is_copy() -> bool {
951 false
952 }
953 }
954
955 impl fidl::encoding::ValueTypeMarker for StartApResultCode {
956 type Borrowed<'a> = Self;
957 #[inline(always)]
958 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
959 *value
960 }
961 }
962
963 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
964 for StartApResultCode
965 {
966 #[inline]
967 unsafe fn encode(
968 self,
969 encoder: &mut fidl::encoding::Encoder<'_, D>,
970 offset: usize,
971 _depth: fidl::encoding::Depth,
972 ) -> fidl::Result<()> {
973 encoder.debug_check_bounds::<Self>(offset);
974 encoder.write_num(self.into_primitive(), offset);
975 Ok(())
976 }
977 }
978
979 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StartApResultCode {
980 #[inline(always)]
981 fn new_empty() -> Self {
982 Self::Success
983 }
984
985 #[inline]
986 unsafe fn decode(
987 &mut self,
988 decoder: &mut fidl::encoding::Decoder<'_, D>,
989 offset: usize,
990 _depth: fidl::encoding::Depth,
991 ) -> fidl::Result<()> {
992 decoder.debug_check_bounds::<Self>(offset);
993 let prim = decoder.read_num::<u32>(offset);
994
995 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
996 Ok(())
997 }
998 }
999 unsafe impl fidl::encoding::TypeMarker for StopApResultCode {
1000 type Owned = Self;
1001
1002 #[inline(always)]
1003 fn inline_align(_context: fidl::encoding::Context) -> usize {
1004 std::mem::align_of::<u32>()
1005 }
1006
1007 #[inline(always)]
1008 fn inline_size(_context: fidl::encoding::Context) -> usize {
1009 std::mem::size_of::<u32>()
1010 }
1011
1012 #[inline(always)]
1013 fn encode_is_copy() -> bool {
1014 true
1015 }
1016
1017 #[inline(always)]
1018 fn decode_is_copy() -> bool {
1019 false
1020 }
1021 }
1022
1023 impl fidl::encoding::ValueTypeMarker for StopApResultCode {
1024 type Borrowed<'a> = Self;
1025 #[inline(always)]
1026 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1027 *value
1028 }
1029 }
1030
1031 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1032 for StopApResultCode
1033 {
1034 #[inline]
1035 unsafe fn encode(
1036 self,
1037 encoder: &mut fidl::encoding::Encoder<'_, D>,
1038 offset: usize,
1039 _depth: fidl::encoding::Depth,
1040 ) -> fidl::Result<()> {
1041 encoder.debug_check_bounds::<Self>(offset);
1042 encoder.write_num(self.into_primitive(), offset);
1043 Ok(())
1044 }
1045 }
1046
1047 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StopApResultCode {
1048 #[inline(always)]
1049 fn new_empty() -> Self {
1050 Self::Success
1051 }
1052
1053 #[inline]
1054 unsafe fn decode(
1055 &mut self,
1056 decoder: &mut fidl::encoding::Decoder<'_, D>,
1057 offset: usize,
1058 _depth: fidl::encoding::Depth,
1059 ) -> fidl::Result<()> {
1060 decoder.debug_check_bounds::<Self>(offset);
1061 let prim = decoder.read_num::<u32>(offset);
1062
1063 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1064 Ok(())
1065 }
1066 }
1067 unsafe impl fidl::encoding::TypeMarker for UserDisconnectReason {
1068 type Owned = Self;
1069
1070 #[inline(always)]
1071 fn inline_align(_context: fidl::encoding::Context) -> usize {
1072 std::mem::align_of::<u32>()
1073 }
1074
1075 #[inline(always)]
1076 fn inline_size(_context: fidl::encoding::Context) -> usize {
1077 std::mem::size_of::<u32>()
1078 }
1079
1080 #[inline(always)]
1081 fn encode_is_copy() -> bool {
1082 true
1083 }
1084
1085 #[inline(always)]
1086 fn decode_is_copy() -> bool {
1087 false
1088 }
1089 }
1090
1091 impl fidl::encoding::ValueTypeMarker for UserDisconnectReason {
1092 type Borrowed<'a> = Self;
1093 #[inline(always)]
1094 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1095 *value
1096 }
1097 }
1098
1099 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1100 for UserDisconnectReason
1101 {
1102 #[inline]
1103 unsafe fn encode(
1104 self,
1105 encoder: &mut fidl::encoding::Encoder<'_, D>,
1106 offset: usize,
1107 _depth: fidl::encoding::Depth,
1108 ) -> fidl::Result<()> {
1109 encoder.debug_check_bounds::<Self>(offset);
1110 encoder.write_num(self.into_primitive(), offset);
1111 Ok(())
1112 }
1113 }
1114
1115 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UserDisconnectReason {
1116 #[inline(always)]
1117 fn new_empty() -> Self {
1118 Self::Unknown
1119 }
1120
1121 #[inline]
1122 unsafe fn decode(
1123 &mut self,
1124 decoder: &mut fidl::encoding::Decoder<'_, D>,
1125 offset: usize,
1126 _depth: fidl::encoding::Depth,
1127 ) -> fidl::Result<()> {
1128 decoder.debug_check_bounds::<Self>(offset);
1129 let prim = decoder.read_num::<u32>(offset);
1130
1131 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1132 Ok(())
1133 }
1134 }
1135
1136 impl fidl::encoding::ValueTypeMarker for ActiveScanRequest {
1137 type Borrowed<'a> = &'a Self;
1138 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1139 value
1140 }
1141 }
1142
1143 unsafe impl fidl::encoding::TypeMarker for ActiveScanRequest {
1144 type Owned = Self;
1145
1146 #[inline(always)]
1147 fn inline_align(_context: fidl::encoding::Context) -> usize {
1148 8
1149 }
1150
1151 #[inline(always)]
1152 fn inline_size(_context: fidl::encoding::Context) -> usize {
1153 32
1154 }
1155 }
1156
1157 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ActiveScanRequest, D>
1158 for &ActiveScanRequest
1159 {
1160 #[inline]
1161 unsafe fn encode(
1162 self,
1163 encoder: &mut fidl::encoding::Encoder<'_, D>,
1164 offset: usize,
1165 _depth: fidl::encoding::Depth,
1166 ) -> fidl::Result<()> {
1167 encoder.debug_check_bounds::<ActiveScanRequest>(offset);
1168 fidl::encoding::Encode::<ActiveScanRequest, D>::encode(
1170 (
1171 <fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssids),
1172 <fidl::encoding::Vector<u8, 500> as fidl::encoding::ValueTypeMarker>::borrow(&self.channels),
1173 ),
1174 encoder, offset, _depth
1175 )
1176 }
1177 }
1178 unsafe impl<
1179 D: fidl::encoding::ResourceDialect,
1180 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>, D>,
1181 T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 500>, D>,
1182 > fidl::encoding::Encode<ActiveScanRequest, D> for (T0, T1)
1183 {
1184 #[inline]
1185 unsafe fn encode(
1186 self,
1187 encoder: &mut fidl::encoding::Encoder<'_, D>,
1188 offset: usize,
1189 depth: fidl::encoding::Depth,
1190 ) -> fidl::Result<()> {
1191 encoder.debug_check_bounds::<ActiveScanRequest>(offset);
1192 self.0.encode(encoder, offset + 0, depth)?;
1196 self.1.encode(encoder, offset + 16, depth)?;
1197 Ok(())
1198 }
1199 }
1200
1201 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ActiveScanRequest {
1202 #[inline(always)]
1203 fn new_empty() -> Self {
1204 Self {
1205 ssids: fidl::new_empty!(
1206 fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>,
1207 D
1208 ),
1209 channels: fidl::new_empty!(fidl::encoding::Vector<u8, 500>, D),
1210 }
1211 }
1212
1213 #[inline]
1214 unsafe fn decode(
1215 &mut self,
1216 decoder: &mut fidl::encoding::Decoder<'_, D>,
1217 offset: usize,
1218 _depth: fidl::encoding::Depth,
1219 ) -> fidl::Result<()> {
1220 decoder.debug_check_bounds::<Self>(offset);
1221 fidl::decode!(
1223 fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>,
1224 D,
1225 &mut self.ssids,
1226 decoder,
1227 offset + 0,
1228 _depth
1229 )?;
1230 fidl::decode!(fidl::encoding::Vector<u8, 500>, D, &mut self.channels, decoder, offset + 16, _depth)?;
1231 Ok(())
1232 }
1233 }
1234
1235 impl fidl::encoding::ValueTypeMarker for Ap {
1236 type Borrowed<'a> = &'a Self;
1237 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1238 value
1239 }
1240 }
1241
1242 unsafe impl fidl::encoding::TypeMarker for Ap {
1243 type Owned = Self;
1244
1245 #[inline(always)]
1246 fn inline_align(_context: fidl::encoding::Context) -> usize {
1247 8
1248 }
1249
1250 #[inline(always)]
1251 fn inline_size(_context: fidl::encoding::Context) -> usize {
1252 24
1253 }
1254 }
1255
1256 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Ap, D> for &Ap {
1257 #[inline]
1258 unsafe fn encode(
1259 self,
1260 encoder: &mut fidl::encoding::Encoder<'_, D>,
1261 offset: usize,
1262 _depth: fidl::encoding::Depth,
1263 ) -> fidl::Result<()> {
1264 encoder.debug_check_bounds::<Ap>(offset);
1265 fidl::encoding::Encode::<Ap, D>::encode(
1267 (
1268 <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
1269 &self.ssid,
1270 ),
1271 <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.channel),
1272 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.num_clients),
1273 ),
1274 encoder,
1275 offset,
1276 _depth,
1277 )
1278 }
1279 }
1280 unsafe impl<
1281 D: fidl::encoding::ResourceDialect,
1282 T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
1283 T1: fidl::encoding::Encode<u8, D>,
1284 T2: fidl::encoding::Encode<u16, D>,
1285 > fidl::encoding::Encode<Ap, D> for (T0, T1, T2)
1286 {
1287 #[inline]
1288 unsafe fn encode(
1289 self,
1290 encoder: &mut fidl::encoding::Encoder<'_, D>,
1291 offset: usize,
1292 depth: fidl::encoding::Depth,
1293 ) -> fidl::Result<()> {
1294 encoder.debug_check_bounds::<Ap>(offset);
1295 unsafe {
1298 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
1299 (ptr as *mut u64).write_unaligned(0);
1300 }
1301 self.0.encode(encoder, offset + 0, depth)?;
1303 self.1.encode(encoder, offset + 16, depth)?;
1304 self.2.encode(encoder, offset + 18, depth)?;
1305 Ok(())
1306 }
1307 }
1308
1309 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Ap {
1310 #[inline(always)]
1311 fn new_empty() -> Self {
1312 Self {
1313 ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
1314 channel: fidl::new_empty!(u8, D),
1315 num_clients: fidl::new_empty!(u16, D),
1316 }
1317 }
1318
1319 #[inline]
1320 unsafe fn decode(
1321 &mut self,
1322 decoder: &mut fidl::encoding::Decoder<'_, D>,
1323 offset: usize,
1324 _depth: fidl::encoding::Depth,
1325 ) -> fidl::Result<()> {
1326 decoder.debug_check_bounds::<Self>(offset);
1327 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
1329 let padval = unsafe { (ptr as *const u64).read_unaligned() };
1330 let mask = 0xffffffff0000ff00u64;
1331 let maskedval = padval & mask;
1332 if maskedval != 0 {
1333 return Err(fidl::Error::NonZeroPadding {
1334 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
1335 });
1336 }
1337 fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 0, _depth)?;
1338 fidl::decode!(u8, D, &mut self.channel, decoder, offset + 16, _depth)?;
1339 fidl::decode!(u16, D, &mut self.num_clients, decoder, offset + 18, _depth)?;
1340 Ok(())
1341 }
1342 }
1343
1344 impl fidl::encoding::ValueTypeMarker for ApConfig {
1345 type Borrowed<'a> = &'a Self;
1346 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1347 value
1348 }
1349 }
1350
1351 unsafe impl fidl::encoding::TypeMarker for ApConfig {
1352 type Owned = Self;
1353
1354 #[inline(always)]
1355 fn inline_align(_context: fidl::encoding::Context) -> usize {
1356 8
1357 }
1358
1359 #[inline(always)]
1360 fn inline_size(_context: fidl::encoding::Context) -> usize {
1361 48
1362 }
1363 }
1364
1365 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApConfig, D> for &ApConfig {
1366 #[inline]
1367 unsafe fn encode(
1368 self,
1369 encoder: &mut fidl::encoding::Encoder<'_, D>,
1370 offset: usize,
1371 _depth: fidl::encoding::Depth,
1372 ) -> fidl::Result<()> {
1373 encoder.debug_check_bounds::<ApConfig>(offset);
1374 fidl::encoding::Encode::<ApConfig, D>::encode(
1376 (
1377 <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
1378 &self.ssid,
1379 ),
1380 <fidl::encoding::Vector<u8, 64> as fidl::encoding::ValueTypeMarker>::borrow(
1381 &self.password,
1382 ),
1383 <RadioConfig as fidl::encoding::ValueTypeMarker>::borrow(&self.radio_cfg),
1384 ),
1385 encoder,
1386 offset,
1387 _depth,
1388 )
1389 }
1390 }
1391 unsafe impl<
1392 D: fidl::encoding::ResourceDialect,
1393 T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
1394 T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 64>, D>,
1395 T2: fidl::encoding::Encode<RadioConfig, D>,
1396 > fidl::encoding::Encode<ApConfig, D> for (T0, T1, T2)
1397 {
1398 #[inline]
1399 unsafe fn encode(
1400 self,
1401 encoder: &mut fidl::encoding::Encoder<'_, D>,
1402 offset: usize,
1403 depth: fidl::encoding::Depth,
1404 ) -> fidl::Result<()> {
1405 encoder.debug_check_bounds::<ApConfig>(offset);
1406 self.0.encode(encoder, offset + 0, depth)?;
1410 self.1.encode(encoder, offset + 16, depth)?;
1411 self.2.encode(encoder, offset + 32, depth)?;
1412 Ok(())
1413 }
1414 }
1415
1416 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApConfig {
1417 #[inline(always)]
1418 fn new_empty() -> Self {
1419 Self {
1420 ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
1421 password: fidl::new_empty!(fidl::encoding::Vector<u8, 64>, D),
1422 radio_cfg: fidl::new_empty!(RadioConfig, D),
1423 }
1424 }
1425
1426 #[inline]
1427 unsafe fn decode(
1428 &mut self,
1429 decoder: &mut fidl::encoding::Decoder<'_, D>,
1430 offset: usize,
1431 _depth: fidl::encoding::Depth,
1432 ) -> fidl::Result<()> {
1433 decoder.debug_check_bounds::<Self>(offset);
1434 fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 0, _depth)?;
1436 fidl::decode!(fidl::encoding::Vector<u8, 64>, D, &mut self.password, decoder, offset + 16, _depth)?;
1437 fidl::decode!(RadioConfig, D, &mut self.radio_cfg, decoder, offset + 32, _depth)?;
1438 Ok(())
1439 }
1440 }
1441
1442 impl fidl::encoding::ValueTypeMarker for ApSmeStartRequest {
1443 type Borrowed<'a> = &'a Self;
1444 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1445 value
1446 }
1447 }
1448
1449 unsafe impl fidl::encoding::TypeMarker for ApSmeStartRequest {
1450 type Owned = Self;
1451
1452 #[inline(always)]
1453 fn inline_align(_context: fidl::encoding::Context) -> usize {
1454 8
1455 }
1456
1457 #[inline(always)]
1458 fn inline_size(_context: fidl::encoding::Context) -> usize {
1459 48
1460 }
1461 }
1462
1463 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApSmeStartRequest, D>
1464 for &ApSmeStartRequest
1465 {
1466 #[inline]
1467 unsafe fn encode(
1468 self,
1469 encoder: &mut fidl::encoding::Encoder<'_, D>,
1470 offset: usize,
1471 _depth: fidl::encoding::Depth,
1472 ) -> fidl::Result<()> {
1473 encoder.debug_check_bounds::<ApSmeStartRequest>(offset);
1474 fidl::encoding::Encode::<ApSmeStartRequest, D>::encode(
1476 (<ApConfig as fidl::encoding::ValueTypeMarker>::borrow(&self.config),),
1477 encoder,
1478 offset,
1479 _depth,
1480 )
1481 }
1482 }
1483 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ApConfig, D>>
1484 fidl::encoding::Encode<ApSmeStartRequest, D> for (T0,)
1485 {
1486 #[inline]
1487 unsafe fn encode(
1488 self,
1489 encoder: &mut fidl::encoding::Encoder<'_, D>,
1490 offset: usize,
1491 depth: fidl::encoding::Depth,
1492 ) -> fidl::Result<()> {
1493 encoder.debug_check_bounds::<ApSmeStartRequest>(offset);
1494 self.0.encode(encoder, offset + 0, depth)?;
1498 Ok(())
1499 }
1500 }
1501
1502 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApSmeStartRequest {
1503 #[inline(always)]
1504 fn new_empty() -> Self {
1505 Self { config: fidl::new_empty!(ApConfig, D) }
1506 }
1507
1508 #[inline]
1509 unsafe fn decode(
1510 &mut self,
1511 decoder: &mut fidl::encoding::Decoder<'_, D>,
1512 offset: usize,
1513 _depth: fidl::encoding::Depth,
1514 ) -> fidl::Result<()> {
1515 decoder.debug_check_bounds::<Self>(offset);
1516 fidl::decode!(ApConfig, D, &mut self.config, decoder, offset + 0, _depth)?;
1518 Ok(())
1519 }
1520 }
1521
1522 impl fidl::encoding::ValueTypeMarker for ApSmeStartResponse {
1523 type Borrowed<'a> = &'a Self;
1524 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1525 value
1526 }
1527 }
1528
1529 unsafe impl fidl::encoding::TypeMarker for ApSmeStartResponse {
1530 type Owned = Self;
1531
1532 #[inline(always)]
1533 fn inline_align(_context: fidl::encoding::Context) -> usize {
1534 4
1535 }
1536
1537 #[inline(always)]
1538 fn inline_size(_context: fidl::encoding::Context) -> usize {
1539 4
1540 }
1541 }
1542
1543 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApSmeStartResponse, D>
1544 for &ApSmeStartResponse
1545 {
1546 #[inline]
1547 unsafe fn encode(
1548 self,
1549 encoder: &mut fidl::encoding::Encoder<'_, D>,
1550 offset: usize,
1551 _depth: fidl::encoding::Depth,
1552 ) -> fidl::Result<()> {
1553 encoder.debug_check_bounds::<ApSmeStartResponse>(offset);
1554 fidl::encoding::Encode::<ApSmeStartResponse, D>::encode(
1556 (<StartApResultCode as fidl::encoding::ValueTypeMarker>::borrow(&self.code),),
1557 encoder,
1558 offset,
1559 _depth,
1560 )
1561 }
1562 }
1563 unsafe impl<
1564 D: fidl::encoding::ResourceDialect,
1565 T0: fidl::encoding::Encode<StartApResultCode, D>,
1566 > fidl::encoding::Encode<ApSmeStartResponse, D> for (T0,)
1567 {
1568 #[inline]
1569 unsafe fn encode(
1570 self,
1571 encoder: &mut fidl::encoding::Encoder<'_, D>,
1572 offset: usize,
1573 depth: fidl::encoding::Depth,
1574 ) -> fidl::Result<()> {
1575 encoder.debug_check_bounds::<ApSmeStartResponse>(offset);
1576 self.0.encode(encoder, offset + 0, depth)?;
1580 Ok(())
1581 }
1582 }
1583
1584 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApSmeStartResponse {
1585 #[inline(always)]
1586 fn new_empty() -> Self {
1587 Self { code: fidl::new_empty!(StartApResultCode, D) }
1588 }
1589
1590 #[inline]
1591 unsafe fn decode(
1592 &mut self,
1593 decoder: &mut fidl::encoding::Decoder<'_, D>,
1594 offset: usize,
1595 _depth: fidl::encoding::Depth,
1596 ) -> fidl::Result<()> {
1597 decoder.debug_check_bounds::<Self>(offset);
1598 fidl::decode!(StartApResultCode, D, &mut self.code, decoder, offset + 0, _depth)?;
1600 Ok(())
1601 }
1602 }
1603
1604 impl fidl::encoding::ValueTypeMarker for ApSmeStatusResponse {
1605 type Borrowed<'a> = &'a Self;
1606 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1607 value
1608 }
1609 }
1610
1611 unsafe impl fidl::encoding::TypeMarker for ApSmeStatusResponse {
1612 type Owned = Self;
1613
1614 #[inline(always)]
1615 fn inline_align(_context: fidl::encoding::Context) -> usize {
1616 8
1617 }
1618
1619 #[inline(always)]
1620 fn inline_size(_context: fidl::encoding::Context) -> usize {
1621 8
1622 }
1623 }
1624
1625 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApSmeStatusResponse, D>
1626 for &ApSmeStatusResponse
1627 {
1628 #[inline]
1629 unsafe fn encode(
1630 self,
1631 encoder: &mut fidl::encoding::Encoder<'_, D>,
1632 offset: usize,
1633 _depth: fidl::encoding::Depth,
1634 ) -> fidl::Result<()> {
1635 encoder.debug_check_bounds::<ApSmeStatusResponse>(offset);
1636 fidl::encoding::Encode::<ApSmeStatusResponse, D>::encode(
1638 (<ApStatusResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
1639 encoder,
1640 offset,
1641 _depth,
1642 )
1643 }
1644 }
1645 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ApStatusResponse, D>>
1646 fidl::encoding::Encode<ApSmeStatusResponse, D> for (T0,)
1647 {
1648 #[inline]
1649 unsafe fn encode(
1650 self,
1651 encoder: &mut fidl::encoding::Encoder<'_, D>,
1652 offset: usize,
1653 depth: fidl::encoding::Depth,
1654 ) -> fidl::Result<()> {
1655 encoder.debug_check_bounds::<ApSmeStatusResponse>(offset);
1656 self.0.encode(encoder, offset + 0, depth)?;
1660 Ok(())
1661 }
1662 }
1663
1664 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApSmeStatusResponse {
1665 #[inline(always)]
1666 fn new_empty() -> Self {
1667 Self { resp: fidl::new_empty!(ApStatusResponse, D) }
1668 }
1669
1670 #[inline]
1671 unsafe fn decode(
1672 &mut self,
1673 decoder: &mut fidl::encoding::Decoder<'_, D>,
1674 offset: usize,
1675 _depth: fidl::encoding::Depth,
1676 ) -> fidl::Result<()> {
1677 decoder.debug_check_bounds::<Self>(offset);
1678 fidl::decode!(ApStatusResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
1680 Ok(())
1681 }
1682 }
1683
1684 impl fidl::encoding::ValueTypeMarker for ApSmeStopResponse {
1685 type Borrowed<'a> = &'a Self;
1686 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1687 value
1688 }
1689 }
1690
1691 unsafe impl fidl::encoding::TypeMarker for ApSmeStopResponse {
1692 type Owned = Self;
1693
1694 #[inline(always)]
1695 fn inline_align(_context: fidl::encoding::Context) -> usize {
1696 4
1697 }
1698
1699 #[inline(always)]
1700 fn inline_size(_context: fidl::encoding::Context) -> usize {
1701 4
1702 }
1703 }
1704
1705 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApSmeStopResponse, D>
1706 for &ApSmeStopResponse
1707 {
1708 #[inline]
1709 unsafe fn encode(
1710 self,
1711 encoder: &mut fidl::encoding::Encoder<'_, D>,
1712 offset: usize,
1713 _depth: fidl::encoding::Depth,
1714 ) -> fidl::Result<()> {
1715 encoder.debug_check_bounds::<ApSmeStopResponse>(offset);
1716 fidl::encoding::Encode::<ApSmeStopResponse, D>::encode(
1718 (<StopApResultCode as fidl::encoding::ValueTypeMarker>::borrow(&self.code),),
1719 encoder,
1720 offset,
1721 _depth,
1722 )
1723 }
1724 }
1725 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StopApResultCode, D>>
1726 fidl::encoding::Encode<ApSmeStopResponse, D> for (T0,)
1727 {
1728 #[inline]
1729 unsafe fn encode(
1730 self,
1731 encoder: &mut fidl::encoding::Encoder<'_, D>,
1732 offset: usize,
1733 depth: fidl::encoding::Depth,
1734 ) -> fidl::Result<()> {
1735 encoder.debug_check_bounds::<ApSmeStopResponse>(offset);
1736 self.0.encode(encoder, offset + 0, depth)?;
1740 Ok(())
1741 }
1742 }
1743
1744 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApSmeStopResponse {
1745 #[inline(always)]
1746 fn new_empty() -> Self {
1747 Self { code: fidl::new_empty!(StopApResultCode, D) }
1748 }
1749
1750 #[inline]
1751 unsafe fn decode(
1752 &mut self,
1753 decoder: &mut fidl::encoding::Decoder<'_, D>,
1754 offset: usize,
1755 _depth: fidl::encoding::Depth,
1756 ) -> fidl::Result<()> {
1757 decoder.debug_check_bounds::<Self>(offset);
1758 fidl::decode!(StopApResultCode, D, &mut self.code, decoder, offset + 0, _depth)?;
1760 Ok(())
1761 }
1762 }
1763
1764 impl fidl::encoding::ValueTypeMarker for ApStatusResponse {
1765 type Borrowed<'a> = &'a Self;
1766 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1767 value
1768 }
1769 }
1770
1771 unsafe impl fidl::encoding::TypeMarker for ApStatusResponse {
1772 type Owned = Self;
1773
1774 #[inline(always)]
1775 fn inline_align(_context: fidl::encoding::Context) -> usize {
1776 8
1777 }
1778
1779 #[inline(always)]
1780 fn inline_size(_context: fidl::encoding::Context) -> usize {
1781 8
1782 }
1783 }
1784
1785 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApStatusResponse, D>
1786 for &ApStatusResponse
1787 {
1788 #[inline]
1789 unsafe fn encode(
1790 self,
1791 encoder: &mut fidl::encoding::Encoder<'_, D>,
1792 offset: usize,
1793 _depth: fidl::encoding::Depth,
1794 ) -> fidl::Result<()> {
1795 encoder.debug_check_bounds::<ApStatusResponse>(offset);
1796 fidl::encoding::Encode::<ApStatusResponse, D>::encode(
1798 (<fidl::encoding::Boxed<Ap> as fidl::encoding::ValueTypeMarker>::borrow(
1799 &self.running_ap,
1800 ),),
1801 encoder,
1802 offset,
1803 _depth,
1804 )
1805 }
1806 }
1807 unsafe impl<
1808 D: fidl::encoding::ResourceDialect,
1809 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Ap>, D>,
1810 > fidl::encoding::Encode<ApStatusResponse, D> for (T0,)
1811 {
1812 #[inline]
1813 unsafe fn encode(
1814 self,
1815 encoder: &mut fidl::encoding::Encoder<'_, D>,
1816 offset: usize,
1817 depth: fidl::encoding::Depth,
1818 ) -> fidl::Result<()> {
1819 encoder.debug_check_bounds::<ApStatusResponse>(offset);
1820 self.0.encode(encoder, offset + 0, depth)?;
1824 Ok(())
1825 }
1826 }
1827
1828 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApStatusResponse {
1829 #[inline(always)]
1830 fn new_empty() -> Self {
1831 Self { running_ap: fidl::new_empty!(fidl::encoding::Boxed<Ap>, D) }
1832 }
1833
1834 #[inline]
1835 unsafe fn decode(
1836 &mut self,
1837 decoder: &mut fidl::encoding::Decoder<'_, D>,
1838 offset: usize,
1839 _depth: fidl::encoding::Depth,
1840 ) -> fidl::Result<()> {
1841 decoder.debug_check_bounds::<Self>(offset);
1842 fidl::decode!(
1844 fidl::encoding::Boxed<Ap>,
1845 D,
1846 &mut self.running_ap,
1847 decoder,
1848 offset + 0,
1849 _depth
1850 )?;
1851 Ok(())
1852 }
1853 }
1854
1855 impl fidl::encoding::ValueTypeMarker for ClientSmeDisconnectRequest {
1856 type Borrowed<'a> = &'a Self;
1857 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1858 value
1859 }
1860 }
1861
1862 unsafe impl fidl::encoding::TypeMarker for ClientSmeDisconnectRequest {
1863 type Owned = Self;
1864
1865 #[inline(always)]
1866 fn inline_align(_context: fidl::encoding::Context) -> usize {
1867 4
1868 }
1869
1870 #[inline(always)]
1871 fn inline_size(_context: fidl::encoding::Context) -> usize {
1872 4
1873 }
1874 }
1875
1876 unsafe impl<D: fidl::encoding::ResourceDialect>
1877 fidl::encoding::Encode<ClientSmeDisconnectRequest, D> for &ClientSmeDisconnectRequest
1878 {
1879 #[inline]
1880 unsafe fn encode(
1881 self,
1882 encoder: &mut fidl::encoding::Encoder<'_, D>,
1883 offset: usize,
1884 _depth: fidl::encoding::Depth,
1885 ) -> fidl::Result<()> {
1886 encoder.debug_check_bounds::<ClientSmeDisconnectRequest>(offset);
1887 fidl::encoding::Encode::<ClientSmeDisconnectRequest, D>::encode(
1889 (<UserDisconnectReason as fidl::encoding::ValueTypeMarker>::borrow(&self.reason),),
1890 encoder,
1891 offset,
1892 _depth,
1893 )
1894 }
1895 }
1896 unsafe impl<
1897 D: fidl::encoding::ResourceDialect,
1898 T0: fidl::encoding::Encode<UserDisconnectReason, D>,
1899 > fidl::encoding::Encode<ClientSmeDisconnectRequest, D> for (T0,)
1900 {
1901 #[inline]
1902 unsafe fn encode(
1903 self,
1904 encoder: &mut fidl::encoding::Encoder<'_, D>,
1905 offset: usize,
1906 depth: fidl::encoding::Depth,
1907 ) -> fidl::Result<()> {
1908 encoder.debug_check_bounds::<ClientSmeDisconnectRequest>(offset);
1909 self.0.encode(encoder, offset + 0, depth)?;
1913 Ok(())
1914 }
1915 }
1916
1917 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1918 for ClientSmeDisconnectRequest
1919 {
1920 #[inline(always)]
1921 fn new_empty() -> Self {
1922 Self { reason: fidl::new_empty!(UserDisconnectReason, D) }
1923 }
1924
1925 #[inline]
1926 unsafe fn decode(
1927 &mut self,
1928 decoder: &mut fidl::encoding::Decoder<'_, D>,
1929 offset: usize,
1930 _depth: fidl::encoding::Depth,
1931 ) -> fidl::Result<()> {
1932 decoder.debug_check_bounds::<Self>(offset);
1933 fidl::decode!(UserDisconnectReason, D, &mut self.reason, decoder, offset + 0, _depth)?;
1935 Ok(())
1936 }
1937 }
1938
1939 impl fidl::encoding::ValueTypeMarker for ClientSmeInstallApfPacketFilterRequest {
1940 type Borrowed<'a> = &'a Self;
1941 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1942 value
1943 }
1944 }
1945
1946 unsafe impl fidl::encoding::TypeMarker for ClientSmeInstallApfPacketFilterRequest {
1947 type Owned = Self;
1948
1949 #[inline(always)]
1950 fn inline_align(_context: fidl::encoding::Context) -> usize {
1951 8
1952 }
1953
1954 #[inline(always)]
1955 fn inline_size(_context: fidl::encoding::Context) -> usize {
1956 16
1957 }
1958 }
1959
1960 unsafe impl<D: fidl::encoding::ResourceDialect>
1961 fidl::encoding::Encode<ClientSmeInstallApfPacketFilterRequest, D>
1962 for &ClientSmeInstallApfPacketFilterRequest
1963 {
1964 #[inline]
1965 unsafe fn encode(
1966 self,
1967 encoder: &mut fidl::encoding::Encoder<'_, D>,
1968 offset: usize,
1969 _depth: fidl::encoding::Depth,
1970 ) -> fidl::Result<()> {
1971 encoder.debug_check_bounds::<ClientSmeInstallApfPacketFilterRequest>(offset);
1972 fidl::encoding::Encode::<ClientSmeInstallApfPacketFilterRequest, D>::encode(
1974 (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
1975 &self.program,
1976 ),),
1977 encoder,
1978 offset,
1979 _depth,
1980 )
1981 }
1982 }
1983 unsafe impl<
1984 D: fidl::encoding::ResourceDialect,
1985 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
1986 > fidl::encoding::Encode<ClientSmeInstallApfPacketFilterRequest, D> for (T0,)
1987 {
1988 #[inline]
1989 unsafe fn encode(
1990 self,
1991 encoder: &mut fidl::encoding::Encoder<'_, D>,
1992 offset: usize,
1993 depth: fidl::encoding::Depth,
1994 ) -> fidl::Result<()> {
1995 encoder.debug_check_bounds::<ClientSmeInstallApfPacketFilterRequest>(offset);
1996 self.0.encode(encoder, offset + 0, depth)?;
2000 Ok(())
2001 }
2002 }
2003
2004 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2005 for ClientSmeInstallApfPacketFilterRequest
2006 {
2007 #[inline(always)]
2008 fn new_empty() -> Self {
2009 Self { program: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
2010 }
2011
2012 #[inline]
2013 unsafe fn decode(
2014 &mut self,
2015 decoder: &mut fidl::encoding::Decoder<'_, D>,
2016 offset: usize,
2017 _depth: fidl::encoding::Depth,
2018 ) -> fidl::Result<()> {
2019 decoder.debug_check_bounds::<Self>(offset);
2020 fidl::decode!(
2022 fidl::encoding::UnboundedVector<u8>,
2023 D,
2024 &mut self.program,
2025 decoder,
2026 offset + 0,
2027 _depth
2028 )?;
2029 Ok(())
2030 }
2031 }
2032
2033 impl fidl::encoding::ValueTypeMarker for ClientSmeRoamRequest {
2034 type Borrowed<'a> = &'a Self;
2035 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2036 value
2037 }
2038 }
2039
2040 unsafe impl fidl::encoding::TypeMarker for ClientSmeRoamRequest {
2041 type Owned = Self;
2042
2043 #[inline(always)]
2044 fn inline_align(_context: fidl::encoding::Context) -> usize {
2045 8
2046 }
2047
2048 #[inline(always)]
2049 fn inline_size(_context: fidl::encoding::Context) -> usize {
2050 48
2051 }
2052 }
2053
2054 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ClientSmeRoamRequest, D>
2055 for &ClientSmeRoamRequest
2056 {
2057 #[inline]
2058 unsafe fn encode(
2059 self,
2060 encoder: &mut fidl::encoding::Encoder<'_, D>,
2061 offset: usize,
2062 _depth: fidl::encoding::Depth,
2063 ) -> fidl::Result<()> {
2064 encoder.debug_check_bounds::<ClientSmeRoamRequest>(offset);
2065 fidl::encoding::Encode::<ClientSmeRoamRequest, D>::encode(
2067 (<RoamRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
2068 encoder,
2069 offset,
2070 _depth,
2071 )
2072 }
2073 }
2074 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<RoamRequest, D>>
2075 fidl::encoding::Encode<ClientSmeRoamRequest, D> for (T0,)
2076 {
2077 #[inline]
2078 unsafe fn encode(
2079 self,
2080 encoder: &mut fidl::encoding::Encoder<'_, D>,
2081 offset: usize,
2082 depth: fidl::encoding::Depth,
2083 ) -> fidl::Result<()> {
2084 encoder.debug_check_bounds::<ClientSmeRoamRequest>(offset);
2085 self.0.encode(encoder, offset + 0, depth)?;
2089 Ok(())
2090 }
2091 }
2092
2093 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ClientSmeRoamRequest {
2094 #[inline(always)]
2095 fn new_empty() -> Self {
2096 Self { req: fidl::new_empty!(RoamRequest, D) }
2097 }
2098
2099 #[inline]
2100 unsafe fn decode(
2101 &mut self,
2102 decoder: &mut fidl::encoding::Decoder<'_, D>,
2103 offset: usize,
2104 _depth: fidl::encoding::Depth,
2105 ) -> fidl::Result<()> {
2106 decoder.debug_check_bounds::<Self>(offset);
2107 fidl::decode!(RoamRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
2109 Ok(())
2110 }
2111 }
2112
2113 impl fidl::encoding::ValueTypeMarker for ClientSmeSetApfPacketFilterEnabledRequest {
2114 type Borrowed<'a> = &'a Self;
2115 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2116 value
2117 }
2118 }
2119
2120 unsafe impl fidl::encoding::TypeMarker for ClientSmeSetApfPacketFilterEnabledRequest {
2121 type Owned = Self;
2122
2123 #[inline(always)]
2124 fn inline_align(_context: fidl::encoding::Context) -> usize {
2125 1
2126 }
2127
2128 #[inline(always)]
2129 fn inline_size(_context: fidl::encoding::Context) -> usize {
2130 1
2131 }
2132 }
2133
2134 unsafe impl<D: fidl::encoding::ResourceDialect>
2135 fidl::encoding::Encode<ClientSmeSetApfPacketFilterEnabledRequest, D>
2136 for &ClientSmeSetApfPacketFilterEnabledRequest
2137 {
2138 #[inline]
2139 unsafe fn encode(
2140 self,
2141 encoder: &mut fidl::encoding::Encoder<'_, D>,
2142 offset: usize,
2143 _depth: fidl::encoding::Depth,
2144 ) -> fidl::Result<()> {
2145 encoder.debug_check_bounds::<ClientSmeSetApfPacketFilterEnabledRequest>(offset);
2146 fidl::encoding::Encode::<ClientSmeSetApfPacketFilterEnabledRequest, D>::encode(
2148 (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.enabled),),
2149 encoder,
2150 offset,
2151 _depth,
2152 )
2153 }
2154 }
2155 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
2156 fidl::encoding::Encode<ClientSmeSetApfPacketFilterEnabledRequest, D> for (T0,)
2157 {
2158 #[inline]
2159 unsafe fn encode(
2160 self,
2161 encoder: &mut fidl::encoding::Encoder<'_, D>,
2162 offset: usize,
2163 depth: fidl::encoding::Depth,
2164 ) -> fidl::Result<()> {
2165 encoder.debug_check_bounds::<ClientSmeSetApfPacketFilterEnabledRequest>(offset);
2166 self.0.encode(encoder, offset + 0, depth)?;
2170 Ok(())
2171 }
2172 }
2173
2174 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2175 for ClientSmeSetApfPacketFilterEnabledRequest
2176 {
2177 #[inline(always)]
2178 fn new_empty() -> Self {
2179 Self { enabled: fidl::new_empty!(bool, D) }
2180 }
2181
2182 #[inline]
2183 unsafe fn decode(
2184 &mut self,
2185 decoder: &mut fidl::encoding::Decoder<'_, D>,
2186 offset: usize,
2187 _depth: fidl::encoding::Depth,
2188 ) -> fidl::Result<()> {
2189 decoder.debug_check_bounds::<Self>(offset);
2190 fidl::decode!(bool, D, &mut self.enabled, decoder, offset + 0, _depth)?;
2192 Ok(())
2193 }
2194 }
2195
2196 impl fidl::encoding::ValueTypeMarker for ClientSmeSetMacAddressRequest {
2197 type Borrowed<'a> = &'a Self;
2198 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2199 value
2200 }
2201 }
2202
2203 unsafe impl fidl::encoding::TypeMarker for ClientSmeSetMacAddressRequest {
2204 type Owned = Self;
2205
2206 #[inline(always)]
2207 fn inline_align(_context: fidl::encoding::Context) -> usize {
2208 1
2209 }
2210
2211 #[inline(always)]
2212 fn inline_size(_context: fidl::encoding::Context) -> usize {
2213 6
2214 }
2215 #[inline(always)]
2216 fn encode_is_copy() -> bool {
2217 true
2218 }
2219
2220 #[inline(always)]
2221 fn decode_is_copy() -> bool {
2222 true
2223 }
2224 }
2225
2226 unsafe impl<D: fidl::encoding::ResourceDialect>
2227 fidl::encoding::Encode<ClientSmeSetMacAddressRequest, D>
2228 for &ClientSmeSetMacAddressRequest
2229 {
2230 #[inline]
2231 unsafe fn encode(
2232 self,
2233 encoder: &mut fidl::encoding::Encoder<'_, D>,
2234 offset: usize,
2235 _depth: fidl::encoding::Depth,
2236 ) -> fidl::Result<()> {
2237 encoder.debug_check_bounds::<ClientSmeSetMacAddressRequest>(offset);
2238 unsafe {
2239 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2241 (buf_ptr as *mut ClientSmeSetMacAddressRequest)
2242 .write_unaligned((self as *const ClientSmeSetMacAddressRequest).read());
2243 }
2246 Ok(())
2247 }
2248 }
2249 unsafe impl<
2250 D: fidl::encoding::ResourceDialect,
2251 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
2252 > fidl::encoding::Encode<ClientSmeSetMacAddressRequest, D> for (T0,)
2253 {
2254 #[inline]
2255 unsafe fn encode(
2256 self,
2257 encoder: &mut fidl::encoding::Encoder<'_, D>,
2258 offset: usize,
2259 depth: fidl::encoding::Depth,
2260 ) -> fidl::Result<()> {
2261 encoder.debug_check_bounds::<ClientSmeSetMacAddressRequest>(offset);
2262 self.0.encode(encoder, offset + 0, depth)?;
2266 Ok(())
2267 }
2268 }
2269
2270 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2271 for ClientSmeSetMacAddressRequest
2272 {
2273 #[inline(always)]
2274 fn new_empty() -> Self {
2275 Self { mac_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D) }
2276 }
2277
2278 #[inline]
2279 unsafe fn decode(
2280 &mut self,
2281 decoder: &mut fidl::encoding::Decoder<'_, D>,
2282 offset: usize,
2283 _depth: fidl::encoding::Depth,
2284 ) -> fidl::Result<()> {
2285 decoder.debug_check_bounds::<Self>(offset);
2286 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2287 unsafe {
2290 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
2291 }
2292 Ok(())
2293 }
2294 }
2295
2296 impl fidl::encoding::ValueTypeMarker for ClientSmeStatusResponse {
2297 type Borrowed<'a> = &'a Self;
2298 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2299 value
2300 }
2301 }
2302
2303 unsafe impl fidl::encoding::TypeMarker for ClientSmeStatusResponse {
2304 type Owned = Self;
2305
2306 #[inline(always)]
2307 fn inline_align(_context: fidl::encoding::Context) -> usize {
2308 8
2309 }
2310
2311 #[inline(always)]
2312 fn inline_size(_context: fidl::encoding::Context) -> usize {
2313 16
2314 }
2315 }
2316
2317 unsafe impl<D: fidl::encoding::ResourceDialect>
2318 fidl::encoding::Encode<ClientSmeStatusResponse, D> for &ClientSmeStatusResponse
2319 {
2320 #[inline]
2321 unsafe fn encode(
2322 self,
2323 encoder: &mut fidl::encoding::Encoder<'_, D>,
2324 offset: usize,
2325 _depth: fidl::encoding::Depth,
2326 ) -> fidl::Result<()> {
2327 encoder.debug_check_bounds::<ClientSmeStatusResponse>(offset);
2328 fidl::encoding::Encode::<ClientSmeStatusResponse, D>::encode(
2330 (<ClientStatusResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
2331 encoder,
2332 offset,
2333 _depth,
2334 )
2335 }
2336 }
2337 unsafe impl<
2338 D: fidl::encoding::ResourceDialect,
2339 T0: fidl::encoding::Encode<ClientStatusResponse, D>,
2340 > fidl::encoding::Encode<ClientSmeStatusResponse, D> for (T0,)
2341 {
2342 #[inline]
2343 unsafe fn encode(
2344 self,
2345 encoder: &mut fidl::encoding::Encoder<'_, D>,
2346 offset: usize,
2347 depth: fidl::encoding::Depth,
2348 ) -> fidl::Result<()> {
2349 encoder.debug_check_bounds::<ClientSmeStatusResponse>(offset);
2350 self.0.encode(encoder, offset + 0, depth)?;
2354 Ok(())
2355 }
2356 }
2357
2358 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2359 for ClientSmeStatusResponse
2360 {
2361 #[inline(always)]
2362 fn new_empty() -> Self {
2363 Self { resp: fidl::new_empty!(ClientStatusResponse, D) }
2364 }
2365
2366 #[inline]
2367 unsafe fn decode(
2368 &mut self,
2369 decoder: &mut fidl::encoding::Decoder<'_, D>,
2370 offset: usize,
2371 _depth: fidl::encoding::Depth,
2372 ) -> fidl::Result<()> {
2373 decoder.debug_check_bounds::<Self>(offset);
2374 fidl::decode!(ClientStatusResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
2376 Ok(())
2377 }
2378 }
2379
2380 impl fidl::encoding::ValueTypeMarker for ClientSmeGetApfPacketFilterEnabledResponse {
2381 type Borrowed<'a> = &'a Self;
2382 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2383 value
2384 }
2385 }
2386
2387 unsafe impl fidl::encoding::TypeMarker for ClientSmeGetApfPacketFilterEnabledResponse {
2388 type Owned = Self;
2389
2390 #[inline(always)]
2391 fn inline_align(_context: fidl::encoding::Context) -> usize {
2392 1
2393 }
2394
2395 #[inline(always)]
2396 fn inline_size(_context: fidl::encoding::Context) -> usize {
2397 1
2398 }
2399 }
2400
2401 unsafe impl<D: fidl::encoding::ResourceDialect>
2402 fidl::encoding::Encode<ClientSmeGetApfPacketFilterEnabledResponse, D>
2403 for &ClientSmeGetApfPacketFilterEnabledResponse
2404 {
2405 #[inline]
2406 unsafe fn encode(
2407 self,
2408 encoder: &mut fidl::encoding::Encoder<'_, D>,
2409 offset: usize,
2410 _depth: fidl::encoding::Depth,
2411 ) -> fidl::Result<()> {
2412 encoder.debug_check_bounds::<ClientSmeGetApfPacketFilterEnabledResponse>(offset);
2413 fidl::encoding::Encode::<ClientSmeGetApfPacketFilterEnabledResponse, D>::encode(
2415 (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.enabled),),
2416 encoder,
2417 offset,
2418 _depth,
2419 )
2420 }
2421 }
2422 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
2423 fidl::encoding::Encode<ClientSmeGetApfPacketFilterEnabledResponse, D> for (T0,)
2424 {
2425 #[inline]
2426 unsafe fn encode(
2427 self,
2428 encoder: &mut fidl::encoding::Encoder<'_, D>,
2429 offset: usize,
2430 depth: fidl::encoding::Depth,
2431 ) -> fidl::Result<()> {
2432 encoder.debug_check_bounds::<ClientSmeGetApfPacketFilterEnabledResponse>(offset);
2433 self.0.encode(encoder, offset + 0, depth)?;
2437 Ok(())
2438 }
2439 }
2440
2441 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2442 for ClientSmeGetApfPacketFilterEnabledResponse
2443 {
2444 #[inline(always)]
2445 fn new_empty() -> Self {
2446 Self { enabled: fidl::new_empty!(bool, D) }
2447 }
2448
2449 #[inline]
2450 unsafe fn decode(
2451 &mut self,
2452 decoder: &mut fidl::encoding::Decoder<'_, D>,
2453 offset: usize,
2454 _depth: fidl::encoding::Depth,
2455 ) -> fidl::Result<()> {
2456 decoder.debug_check_bounds::<Self>(offset);
2457 fidl::decode!(bool, D, &mut self.enabled, decoder, offset + 0, _depth)?;
2459 Ok(())
2460 }
2461 }
2462
2463 impl fidl::encoding::ValueTypeMarker for ClientSmeReadApfPacketFilterDataResponse {
2464 type Borrowed<'a> = &'a Self;
2465 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2466 value
2467 }
2468 }
2469
2470 unsafe impl fidl::encoding::TypeMarker for ClientSmeReadApfPacketFilterDataResponse {
2471 type Owned = Self;
2472
2473 #[inline(always)]
2474 fn inline_align(_context: fidl::encoding::Context) -> usize {
2475 8
2476 }
2477
2478 #[inline(always)]
2479 fn inline_size(_context: fidl::encoding::Context) -> usize {
2480 16
2481 }
2482 }
2483
2484 unsafe impl<D: fidl::encoding::ResourceDialect>
2485 fidl::encoding::Encode<ClientSmeReadApfPacketFilterDataResponse, D>
2486 for &ClientSmeReadApfPacketFilterDataResponse
2487 {
2488 #[inline]
2489 unsafe fn encode(
2490 self,
2491 encoder: &mut fidl::encoding::Encoder<'_, D>,
2492 offset: usize,
2493 _depth: fidl::encoding::Depth,
2494 ) -> fidl::Result<()> {
2495 encoder.debug_check_bounds::<ClientSmeReadApfPacketFilterDataResponse>(offset);
2496 fidl::encoding::Encode::<ClientSmeReadApfPacketFilterDataResponse, D>::encode(
2498 (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
2499 &self.memory,
2500 ),),
2501 encoder,
2502 offset,
2503 _depth,
2504 )
2505 }
2506 }
2507 unsafe impl<
2508 D: fidl::encoding::ResourceDialect,
2509 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
2510 > fidl::encoding::Encode<ClientSmeReadApfPacketFilterDataResponse, D> for (T0,)
2511 {
2512 #[inline]
2513 unsafe fn encode(
2514 self,
2515 encoder: &mut fidl::encoding::Encoder<'_, D>,
2516 offset: usize,
2517 depth: fidl::encoding::Depth,
2518 ) -> fidl::Result<()> {
2519 encoder.debug_check_bounds::<ClientSmeReadApfPacketFilterDataResponse>(offset);
2520 self.0.encode(encoder, offset + 0, depth)?;
2524 Ok(())
2525 }
2526 }
2527
2528 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2529 for ClientSmeReadApfPacketFilterDataResponse
2530 {
2531 #[inline(always)]
2532 fn new_empty() -> Self {
2533 Self { memory: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
2534 }
2535
2536 #[inline]
2537 unsafe fn decode(
2538 &mut self,
2539 decoder: &mut fidl::encoding::Decoder<'_, D>,
2540 offset: usize,
2541 _depth: fidl::encoding::Depth,
2542 ) -> fidl::Result<()> {
2543 decoder.debug_check_bounds::<Self>(offset);
2544 fidl::decode!(
2546 fidl::encoding::UnboundedVector<u8>,
2547 D,
2548 &mut self.memory,
2549 decoder,
2550 offset + 0,
2551 _depth
2552 )?;
2553 Ok(())
2554 }
2555 }
2556
2557 impl fidl::encoding::ValueTypeMarker for ClientSmeWmmStatusResponse {
2558 type Borrowed<'a> = &'a Self;
2559 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2560 value
2561 }
2562 }
2563
2564 unsafe impl fidl::encoding::TypeMarker for ClientSmeWmmStatusResponse {
2565 type Owned = Self;
2566
2567 #[inline(always)]
2568 fn inline_align(_context: fidl::encoding::Context) -> usize {
2569 2
2570 }
2571
2572 #[inline(always)]
2573 fn inline_size(_context: fidl::encoding::Context) -> usize {
2574 34
2575 }
2576 }
2577
2578 unsafe impl<D: fidl::encoding::ResourceDialect>
2579 fidl::encoding::Encode<ClientSmeWmmStatusResponse, D> for &ClientSmeWmmStatusResponse
2580 {
2581 #[inline]
2582 unsafe fn encode(
2583 self,
2584 encoder: &mut fidl::encoding::Encoder<'_, D>,
2585 offset: usize,
2586 _depth: fidl::encoding::Depth,
2587 ) -> fidl::Result<()> {
2588 encoder.debug_check_bounds::<ClientSmeWmmStatusResponse>(offset);
2589 fidl::encoding::Encode::<ClientSmeWmmStatusResponse, D>::encode(
2591 (
2592 <fidl_fuchsia_wlan_internal__common::WmmStatusResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
2593 ),
2594 encoder, offset, _depth
2595 )
2596 }
2597 }
2598 unsafe impl<
2599 D: fidl::encoding::ResourceDialect,
2600 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal__common::WmmStatusResponse, D>,
2601 > fidl::encoding::Encode<ClientSmeWmmStatusResponse, D> for (T0,)
2602 {
2603 #[inline]
2604 unsafe fn encode(
2605 self,
2606 encoder: &mut fidl::encoding::Encoder<'_, D>,
2607 offset: usize,
2608 depth: fidl::encoding::Depth,
2609 ) -> fidl::Result<()> {
2610 encoder.debug_check_bounds::<ClientSmeWmmStatusResponse>(offset);
2611 self.0.encode(encoder, offset + 0, depth)?;
2615 Ok(())
2616 }
2617 }
2618
2619 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2620 for ClientSmeWmmStatusResponse
2621 {
2622 #[inline(always)]
2623 fn new_empty() -> Self {
2624 Self {
2625 resp: fidl::new_empty!(fidl_fuchsia_wlan_internal__common::WmmStatusResponse, D),
2626 }
2627 }
2628
2629 #[inline]
2630 unsafe fn decode(
2631 &mut self,
2632 decoder: &mut fidl::encoding::Decoder<'_, D>,
2633 offset: usize,
2634 _depth: fidl::encoding::Depth,
2635 ) -> fidl::Result<()> {
2636 decoder.debug_check_bounds::<Self>(offset);
2637 fidl::decode!(
2639 fidl_fuchsia_wlan_internal__common::WmmStatusResponse,
2640 D,
2641 &mut self.resp,
2642 decoder,
2643 offset + 0,
2644 _depth
2645 )?;
2646 Ok(())
2647 }
2648 }
2649
2650 impl fidl::encoding::ValueTypeMarker for Compatible {
2651 type Borrowed<'a> = &'a Self;
2652 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2653 value
2654 }
2655 }
2656
2657 unsafe impl fidl::encoding::TypeMarker for Compatible {
2658 type Owned = Self;
2659
2660 #[inline(always)]
2661 fn inline_align(_context: fidl::encoding::Context) -> usize {
2662 8
2663 }
2664
2665 #[inline(always)]
2666 fn inline_size(_context: fidl::encoding::Context) -> usize {
2667 16
2668 }
2669 }
2670
2671 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Compatible, D>
2672 for &Compatible
2673 {
2674 #[inline]
2675 unsafe fn encode(
2676 self,
2677 encoder: &mut fidl::encoding::Encoder<'_, D>,
2678 offset: usize,
2679 _depth: fidl::encoding::Depth,
2680 ) -> fidl::Result<()> {
2681 encoder.debug_check_bounds::<Compatible>(offset);
2682 fidl::encoding::Encode::<Compatible, D>::encode(
2684 (
2685 <fidl::encoding::Vector<fidl_fuchsia_wlan_internal__common::Protocol, 16> as fidl::encoding::ValueTypeMarker>::borrow(&self.mutual_security_protocols),
2686 ),
2687 encoder, offset, _depth
2688 )
2689 }
2690 }
2691 unsafe impl<
2692 D: fidl::encoding::ResourceDialect,
2693 T0: fidl::encoding::Encode<
2694 fidl::encoding::Vector<fidl_fuchsia_wlan_internal__common::Protocol, 16>,
2695 D,
2696 >,
2697 > fidl::encoding::Encode<Compatible, D> for (T0,)
2698 {
2699 #[inline]
2700 unsafe fn encode(
2701 self,
2702 encoder: &mut fidl::encoding::Encoder<'_, D>,
2703 offset: usize,
2704 depth: fidl::encoding::Depth,
2705 ) -> fidl::Result<()> {
2706 encoder.debug_check_bounds::<Compatible>(offset);
2707 self.0.encode(encoder, offset + 0, depth)?;
2711 Ok(())
2712 }
2713 }
2714
2715 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Compatible {
2716 #[inline(always)]
2717 fn new_empty() -> Self {
2718 Self {
2719 mutual_security_protocols: fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_wlan_internal__common::Protocol, 16>, D),
2720 }
2721 }
2722
2723 #[inline]
2724 unsafe fn decode(
2725 &mut self,
2726 decoder: &mut fidl::encoding::Decoder<'_, D>,
2727 offset: usize,
2728 _depth: fidl::encoding::Depth,
2729 ) -> fidl::Result<()> {
2730 decoder.debug_check_bounds::<Self>(offset);
2731 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_wlan_internal__common::Protocol, 16>, D, &mut self.mutual_security_protocols, decoder, offset + 0, _depth)?;
2733 Ok(())
2734 }
2735 }
2736
2737 impl fidl::encoding::ValueTypeMarker for ConnectRequest {
2738 type Borrowed<'a> = &'a Self;
2739 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2740 value
2741 }
2742 }
2743
2744 unsafe impl fidl::encoding::TypeMarker for ConnectRequest {
2745 type Owned = Self;
2746
2747 #[inline(always)]
2748 fn inline_align(_context: fidl::encoding::Context) -> usize {
2749 8
2750 }
2751
2752 #[inline(always)]
2753 fn inline_size(_context: fidl::encoding::Context) -> usize {
2754 104
2755 }
2756 }
2757
2758 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ConnectRequest, D>
2759 for &ConnectRequest
2760 {
2761 #[inline]
2762 unsafe fn encode(
2763 self,
2764 encoder: &mut fidl::encoding::Encoder<'_, D>,
2765 offset: usize,
2766 _depth: fidl::encoding::Depth,
2767 ) -> fidl::Result<()> {
2768 encoder.debug_check_bounds::<ConnectRequest>(offset);
2769 fidl::encoding::Encode::<ConnectRequest, D>::encode(
2771 (
2772 <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssid),
2773 <fidl_fuchsia_wlan_ieee80211__common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.bss_description),
2774 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.multiple_bss_candidates),
2775 <fidl_fuchsia_wlan_internal__common::Authentication as fidl::encoding::ValueTypeMarker>::borrow(&self.authentication),
2776 <fidl_fuchsia_wlan_common__common::ScanType as fidl::encoding::ValueTypeMarker>::borrow(&self.deprecated_scan_type),
2777 ),
2778 encoder, offset, _depth
2779 )
2780 }
2781 }
2782 unsafe impl<
2783 D: fidl::encoding::ResourceDialect,
2784 T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
2785 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211__common::BssDescription, D>,
2786 T2: fidl::encoding::Encode<bool, D>,
2787 T3: fidl::encoding::Encode<fidl_fuchsia_wlan_internal__common::Authentication, D>,
2788 T4: fidl::encoding::Encode<fidl_fuchsia_wlan_common__common::ScanType, D>,
2789 > fidl::encoding::Encode<ConnectRequest, D> for (T0, T1, T2, T3, T4)
2790 {
2791 #[inline]
2792 unsafe fn encode(
2793 self,
2794 encoder: &mut fidl::encoding::Encoder<'_, D>,
2795 offset: usize,
2796 depth: fidl::encoding::Depth,
2797 ) -> fidl::Result<()> {
2798 encoder.debug_check_bounds::<ConnectRequest>(offset);
2799 unsafe {
2802 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(64);
2803 (ptr as *mut u64).write_unaligned(0);
2804 }
2805 unsafe {
2806 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(96);
2807 (ptr as *mut u64).write_unaligned(0);
2808 }
2809 self.0.encode(encoder, offset + 0, depth)?;
2811 self.1.encode(encoder, offset + 16, depth)?;
2812 self.2.encode(encoder, offset + 64, depth)?;
2813 self.3.encode(encoder, offset + 72, depth)?;
2814 self.4.encode(encoder, offset + 96, depth)?;
2815 Ok(())
2816 }
2817 }
2818
2819 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ConnectRequest {
2820 #[inline(always)]
2821 fn new_empty() -> Self {
2822 Self {
2823 ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
2824 bss_description: fidl::new_empty!(
2825 fidl_fuchsia_wlan_ieee80211__common::BssDescription,
2826 D
2827 ),
2828 multiple_bss_candidates: fidl::new_empty!(bool, D),
2829 authentication: fidl::new_empty!(
2830 fidl_fuchsia_wlan_internal__common::Authentication,
2831 D
2832 ),
2833 deprecated_scan_type: fidl::new_empty!(
2834 fidl_fuchsia_wlan_common__common::ScanType,
2835 D
2836 ),
2837 }
2838 }
2839
2840 #[inline]
2841 unsafe fn decode(
2842 &mut self,
2843 decoder: &mut fidl::encoding::Decoder<'_, D>,
2844 offset: usize,
2845 _depth: fidl::encoding::Depth,
2846 ) -> fidl::Result<()> {
2847 decoder.debug_check_bounds::<Self>(offset);
2848 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(64) };
2850 let padval = unsafe { (ptr as *const u64).read_unaligned() };
2851 let mask = 0xffffffffffffff00u64;
2852 let maskedval = padval & mask;
2853 if maskedval != 0 {
2854 return Err(fidl::Error::NonZeroPadding {
2855 padding_start: offset + 64 + ((mask as u64).trailing_zeros() / 8) as usize,
2856 });
2857 }
2858 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(96) };
2859 let padval = unsafe { (ptr as *const u64).read_unaligned() };
2860 let mask = 0xffffffff00000000u64;
2861 let maskedval = padval & mask;
2862 if maskedval != 0 {
2863 return Err(fidl::Error::NonZeroPadding {
2864 padding_start: offset + 96 + ((mask as u64).trailing_zeros() / 8) as usize,
2865 });
2866 }
2867 fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 0, _depth)?;
2868 fidl::decode!(
2869 fidl_fuchsia_wlan_ieee80211__common::BssDescription,
2870 D,
2871 &mut self.bss_description,
2872 decoder,
2873 offset + 16,
2874 _depth
2875 )?;
2876 fidl::decode!(
2877 bool,
2878 D,
2879 &mut self.multiple_bss_candidates,
2880 decoder,
2881 offset + 64,
2882 _depth
2883 )?;
2884 fidl::decode!(
2885 fidl_fuchsia_wlan_internal__common::Authentication,
2886 D,
2887 &mut self.authentication,
2888 decoder,
2889 offset + 72,
2890 _depth
2891 )?;
2892 fidl::decode!(
2893 fidl_fuchsia_wlan_common__common::ScanType,
2894 D,
2895 &mut self.deprecated_scan_type,
2896 decoder,
2897 offset + 96,
2898 _depth
2899 )?;
2900 Ok(())
2901 }
2902 }
2903
2904 impl fidl::encoding::ValueTypeMarker for ConnectResult {
2905 type Borrowed<'a> = &'a Self;
2906 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2907 value
2908 }
2909 }
2910
2911 unsafe impl fidl::encoding::TypeMarker for ConnectResult {
2912 type Owned = Self;
2913
2914 #[inline(always)]
2915 fn inline_align(_context: fidl::encoding::Context) -> usize {
2916 2
2917 }
2918
2919 #[inline(always)]
2920 fn inline_size(_context: fidl::encoding::Context) -> usize {
2921 4
2922 }
2923 }
2924
2925 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ConnectResult, D>
2926 for &ConnectResult
2927 {
2928 #[inline]
2929 unsafe fn encode(
2930 self,
2931 encoder: &mut fidl::encoding::Encoder<'_, D>,
2932 offset: usize,
2933 _depth: fidl::encoding::Depth,
2934 ) -> fidl::Result<()> {
2935 encoder.debug_check_bounds::<ConnectResult>(offset);
2936 fidl::encoding::Encode::<ConnectResult, D>::encode(
2938 (
2939 <fidl_fuchsia_wlan_ieee80211__common::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.code),
2940 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.is_credential_rejected),
2941 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.is_reconnect),
2942 ),
2943 encoder, offset, _depth
2944 )
2945 }
2946 }
2947 unsafe impl<
2948 D: fidl::encoding::ResourceDialect,
2949 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211__common::StatusCode, D>,
2950 T1: fidl::encoding::Encode<bool, D>,
2951 T2: fidl::encoding::Encode<bool, D>,
2952 > fidl::encoding::Encode<ConnectResult, D> for (T0, T1, T2)
2953 {
2954 #[inline]
2955 unsafe fn encode(
2956 self,
2957 encoder: &mut fidl::encoding::Encoder<'_, D>,
2958 offset: usize,
2959 depth: fidl::encoding::Depth,
2960 ) -> fidl::Result<()> {
2961 encoder.debug_check_bounds::<ConnectResult>(offset);
2962 self.0.encode(encoder, offset + 0, depth)?;
2966 self.1.encode(encoder, offset + 2, depth)?;
2967 self.2.encode(encoder, offset + 3, depth)?;
2968 Ok(())
2969 }
2970 }
2971
2972 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ConnectResult {
2973 #[inline(always)]
2974 fn new_empty() -> Self {
2975 Self {
2976 code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::StatusCode, D),
2977 is_credential_rejected: fidl::new_empty!(bool, D),
2978 is_reconnect: fidl::new_empty!(bool, D),
2979 }
2980 }
2981
2982 #[inline]
2983 unsafe fn decode(
2984 &mut self,
2985 decoder: &mut fidl::encoding::Decoder<'_, D>,
2986 offset: usize,
2987 _depth: fidl::encoding::Depth,
2988 ) -> fidl::Result<()> {
2989 decoder.debug_check_bounds::<Self>(offset);
2990 fidl::decode!(
2992 fidl_fuchsia_wlan_ieee80211__common::StatusCode,
2993 D,
2994 &mut self.code,
2995 decoder,
2996 offset + 0,
2997 _depth
2998 )?;
2999 fidl::decode!(bool, D, &mut self.is_credential_rejected, decoder, offset + 2, _depth)?;
3000 fidl::decode!(bool, D, &mut self.is_reconnect, decoder, offset + 3, _depth)?;
3001 Ok(())
3002 }
3003 }
3004
3005 impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnChannelSwitchedRequest {
3006 type Borrowed<'a> = &'a Self;
3007 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3008 value
3009 }
3010 }
3011
3012 unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnChannelSwitchedRequest {
3013 type Owned = Self;
3014
3015 #[inline(always)]
3016 fn inline_align(_context: fidl::encoding::Context) -> usize {
3017 1
3018 }
3019
3020 #[inline(always)]
3021 fn inline_size(_context: fidl::encoding::Context) -> usize {
3022 1
3023 }
3024 }
3025
3026 unsafe impl<D: fidl::encoding::ResourceDialect>
3027 fidl::encoding::Encode<ConnectTransactionOnChannelSwitchedRequest, D>
3028 for &ConnectTransactionOnChannelSwitchedRequest
3029 {
3030 #[inline]
3031 unsafe fn encode(
3032 self,
3033 encoder: &mut fidl::encoding::Encoder<'_, D>,
3034 offset: usize,
3035 _depth: fidl::encoding::Depth,
3036 ) -> fidl::Result<()> {
3037 encoder.debug_check_bounds::<ConnectTransactionOnChannelSwitchedRequest>(offset);
3038 fidl::encoding::Encode::<ConnectTransactionOnChannelSwitchedRequest, D>::encode(
3040 (
3041 <fidl_fuchsia_wlan_internal__common::ChannelSwitchInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),
3042 ),
3043 encoder, offset, _depth
3044 )
3045 }
3046 }
3047 unsafe impl<
3048 D: fidl::encoding::ResourceDialect,
3049 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal__common::ChannelSwitchInfo, D>,
3050 > fidl::encoding::Encode<ConnectTransactionOnChannelSwitchedRequest, D> for (T0,)
3051 {
3052 #[inline]
3053 unsafe fn encode(
3054 self,
3055 encoder: &mut fidl::encoding::Encoder<'_, D>,
3056 offset: usize,
3057 depth: fidl::encoding::Depth,
3058 ) -> fidl::Result<()> {
3059 encoder.debug_check_bounds::<ConnectTransactionOnChannelSwitchedRequest>(offset);
3060 self.0.encode(encoder, offset + 0, depth)?;
3064 Ok(())
3065 }
3066 }
3067
3068 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3069 for ConnectTransactionOnChannelSwitchedRequest
3070 {
3071 #[inline(always)]
3072 fn new_empty() -> Self {
3073 Self {
3074 info: fidl::new_empty!(fidl_fuchsia_wlan_internal__common::ChannelSwitchInfo, D),
3075 }
3076 }
3077
3078 #[inline]
3079 unsafe fn decode(
3080 &mut self,
3081 decoder: &mut fidl::encoding::Decoder<'_, D>,
3082 offset: usize,
3083 _depth: fidl::encoding::Depth,
3084 ) -> fidl::Result<()> {
3085 decoder.debug_check_bounds::<Self>(offset);
3086 fidl::decode!(
3088 fidl_fuchsia_wlan_internal__common::ChannelSwitchInfo,
3089 D,
3090 &mut self.info,
3091 decoder,
3092 offset + 0,
3093 _depth
3094 )?;
3095 Ok(())
3096 }
3097 }
3098
3099 impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnConnectResultRequest {
3100 type Borrowed<'a> = &'a Self;
3101 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3102 value
3103 }
3104 }
3105
3106 unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnConnectResultRequest {
3107 type Owned = Self;
3108
3109 #[inline(always)]
3110 fn inline_align(_context: fidl::encoding::Context) -> usize {
3111 2
3112 }
3113
3114 #[inline(always)]
3115 fn inline_size(_context: fidl::encoding::Context) -> usize {
3116 4
3117 }
3118 }
3119
3120 unsafe impl<D: fidl::encoding::ResourceDialect>
3121 fidl::encoding::Encode<ConnectTransactionOnConnectResultRequest, D>
3122 for &ConnectTransactionOnConnectResultRequest
3123 {
3124 #[inline]
3125 unsafe fn encode(
3126 self,
3127 encoder: &mut fidl::encoding::Encoder<'_, D>,
3128 offset: usize,
3129 _depth: fidl::encoding::Depth,
3130 ) -> fidl::Result<()> {
3131 encoder.debug_check_bounds::<ConnectTransactionOnConnectResultRequest>(offset);
3132 fidl::encoding::Encode::<ConnectTransactionOnConnectResultRequest, D>::encode(
3134 (<ConnectResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
3135 encoder,
3136 offset,
3137 _depth,
3138 )
3139 }
3140 }
3141 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ConnectResult, D>>
3142 fidl::encoding::Encode<ConnectTransactionOnConnectResultRequest, D> for (T0,)
3143 {
3144 #[inline]
3145 unsafe fn encode(
3146 self,
3147 encoder: &mut fidl::encoding::Encoder<'_, D>,
3148 offset: usize,
3149 depth: fidl::encoding::Depth,
3150 ) -> fidl::Result<()> {
3151 encoder.debug_check_bounds::<ConnectTransactionOnConnectResultRequest>(offset);
3152 self.0.encode(encoder, offset + 0, depth)?;
3156 Ok(())
3157 }
3158 }
3159
3160 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3161 for ConnectTransactionOnConnectResultRequest
3162 {
3163 #[inline(always)]
3164 fn new_empty() -> Self {
3165 Self { result: fidl::new_empty!(ConnectResult, D) }
3166 }
3167
3168 #[inline]
3169 unsafe fn decode(
3170 &mut self,
3171 decoder: &mut fidl::encoding::Decoder<'_, D>,
3172 offset: usize,
3173 _depth: fidl::encoding::Depth,
3174 ) -> fidl::Result<()> {
3175 decoder.debug_check_bounds::<Self>(offset);
3176 fidl::decode!(ConnectResult, D, &mut self.result, decoder, offset + 0, _depth)?;
3178 Ok(())
3179 }
3180 }
3181
3182 impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnDisconnectRequest {
3183 type Borrowed<'a> = &'a Self;
3184 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3185 value
3186 }
3187 }
3188
3189 unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnDisconnectRequest {
3190 type Owned = Self;
3191
3192 #[inline(always)]
3193 fn inline_align(_context: fidl::encoding::Context) -> usize {
3194 8
3195 }
3196
3197 #[inline(always)]
3198 fn inline_size(_context: fidl::encoding::Context) -> usize {
3199 24
3200 }
3201 }
3202
3203 unsafe impl<D: fidl::encoding::ResourceDialect>
3204 fidl::encoding::Encode<ConnectTransactionOnDisconnectRequest, D>
3205 for &ConnectTransactionOnDisconnectRequest
3206 {
3207 #[inline]
3208 unsafe fn encode(
3209 self,
3210 encoder: &mut fidl::encoding::Encoder<'_, D>,
3211 offset: usize,
3212 _depth: fidl::encoding::Depth,
3213 ) -> fidl::Result<()> {
3214 encoder.debug_check_bounds::<ConnectTransactionOnDisconnectRequest>(offset);
3215 fidl::encoding::Encode::<ConnectTransactionOnDisconnectRequest, D>::encode(
3217 (<DisconnectInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),),
3218 encoder,
3219 offset,
3220 _depth,
3221 )
3222 }
3223 }
3224 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<DisconnectInfo, D>>
3225 fidl::encoding::Encode<ConnectTransactionOnDisconnectRequest, D> for (T0,)
3226 {
3227 #[inline]
3228 unsafe fn encode(
3229 self,
3230 encoder: &mut fidl::encoding::Encoder<'_, D>,
3231 offset: usize,
3232 depth: fidl::encoding::Depth,
3233 ) -> fidl::Result<()> {
3234 encoder.debug_check_bounds::<ConnectTransactionOnDisconnectRequest>(offset);
3235 self.0.encode(encoder, offset + 0, depth)?;
3239 Ok(())
3240 }
3241 }
3242
3243 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3244 for ConnectTransactionOnDisconnectRequest
3245 {
3246 #[inline(always)]
3247 fn new_empty() -> Self {
3248 Self { info: fidl::new_empty!(DisconnectInfo, D) }
3249 }
3250
3251 #[inline]
3252 unsafe fn decode(
3253 &mut self,
3254 decoder: &mut fidl::encoding::Decoder<'_, D>,
3255 offset: usize,
3256 _depth: fidl::encoding::Depth,
3257 ) -> fidl::Result<()> {
3258 decoder.debug_check_bounds::<Self>(offset);
3259 fidl::decode!(DisconnectInfo, D, &mut self.info, decoder, offset + 0, _depth)?;
3261 Ok(())
3262 }
3263 }
3264
3265 impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnRoamResultRequest {
3266 type Borrowed<'a> = &'a Self;
3267 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3268 value
3269 }
3270 }
3271
3272 unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnRoamResultRequest {
3273 type Owned = Self;
3274
3275 #[inline(always)]
3276 fn inline_align(_context: fidl::encoding::Context) -> usize {
3277 8
3278 }
3279
3280 #[inline(always)]
3281 fn inline_size(_context: fidl::encoding::Context) -> usize {
3282 40
3283 }
3284 }
3285
3286 unsafe impl<D: fidl::encoding::ResourceDialect>
3287 fidl::encoding::Encode<ConnectTransactionOnRoamResultRequest, D>
3288 for &ConnectTransactionOnRoamResultRequest
3289 {
3290 #[inline]
3291 unsafe fn encode(
3292 self,
3293 encoder: &mut fidl::encoding::Encoder<'_, D>,
3294 offset: usize,
3295 _depth: fidl::encoding::Depth,
3296 ) -> fidl::Result<()> {
3297 encoder.debug_check_bounds::<ConnectTransactionOnRoamResultRequest>(offset);
3298 fidl::encoding::Encode::<ConnectTransactionOnRoamResultRequest, D>::encode(
3300 (<RoamResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
3301 encoder,
3302 offset,
3303 _depth,
3304 )
3305 }
3306 }
3307 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<RoamResult, D>>
3308 fidl::encoding::Encode<ConnectTransactionOnRoamResultRequest, D> for (T0,)
3309 {
3310 #[inline]
3311 unsafe fn encode(
3312 self,
3313 encoder: &mut fidl::encoding::Encoder<'_, D>,
3314 offset: usize,
3315 depth: fidl::encoding::Depth,
3316 ) -> fidl::Result<()> {
3317 encoder.debug_check_bounds::<ConnectTransactionOnRoamResultRequest>(offset);
3318 self.0.encode(encoder, offset + 0, depth)?;
3322 Ok(())
3323 }
3324 }
3325
3326 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3327 for ConnectTransactionOnRoamResultRequest
3328 {
3329 #[inline(always)]
3330 fn new_empty() -> Self {
3331 Self { result: fidl::new_empty!(RoamResult, D) }
3332 }
3333
3334 #[inline]
3335 unsafe fn decode(
3336 &mut self,
3337 decoder: &mut fidl::encoding::Decoder<'_, D>,
3338 offset: usize,
3339 _depth: fidl::encoding::Depth,
3340 ) -> fidl::Result<()> {
3341 decoder.debug_check_bounds::<Self>(offset);
3342 fidl::decode!(RoamResult, D, &mut self.result, decoder, offset + 0, _depth)?;
3344 Ok(())
3345 }
3346 }
3347
3348 impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnSignalReportRequest {
3349 type Borrowed<'a> = &'a Self;
3350 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3351 value
3352 }
3353 }
3354
3355 unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnSignalReportRequest {
3356 type Owned = Self;
3357
3358 #[inline(always)]
3359 fn inline_align(_context: fidl::encoding::Context) -> usize {
3360 1
3361 }
3362
3363 #[inline(always)]
3364 fn inline_size(_context: fidl::encoding::Context) -> usize {
3365 2
3366 }
3367 }
3368
3369 unsafe impl<D: fidl::encoding::ResourceDialect>
3370 fidl::encoding::Encode<ConnectTransactionOnSignalReportRequest, D>
3371 for &ConnectTransactionOnSignalReportRequest
3372 {
3373 #[inline]
3374 unsafe fn encode(
3375 self,
3376 encoder: &mut fidl::encoding::Encoder<'_, D>,
3377 offset: usize,
3378 _depth: fidl::encoding::Depth,
3379 ) -> fidl::Result<()> {
3380 encoder.debug_check_bounds::<ConnectTransactionOnSignalReportRequest>(offset);
3381 fidl::encoding::Encode::<ConnectTransactionOnSignalReportRequest, D>::encode(
3383 (
3384 <fidl_fuchsia_wlan_internal__common::SignalReportIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),
3385 ),
3386 encoder, offset, _depth
3387 )
3388 }
3389 }
3390 unsafe impl<
3391 D: fidl::encoding::ResourceDialect,
3392 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal__common::SignalReportIndication, D>,
3393 > fidl::encoding::Encode<ConnectTransactionOnSignalReportRequest, D> for (T0,)
3394 {
3395 #[inline]
3396 unsafe fn encode(
3397 self,
3398 encoder: &mut fidl::encoding::Encoder<'_, D>,
3399 offset: usize,
3400 depth: fidl::encoding::Depth,
3401 ) -> fidl::Result<()> {
3402 encoder.debug_check_bounds::<ConnectTransactionOnSignalReportRequest>(offset);
3403 self.0.encode(encoder, offset + 0, depth)?;
3407 Ok(())
3408 }
3409 }
3410
3411 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3412 for ConnectTransactionOnSignalReportRequest
3413 {
3414 #[inline(always)]
3415 fn new_empty() -> Self {
3416 Self {
3417 ind: fidl::new_empty!(
3418 fidl_fuchsia_wlan_internal__common::SignalReportIndication,
3419 D
3420 ),
3421 }
3422 }
3423
3424 #[inline]
3425 unsafe fn decode(
3426 &mut self,
3427 decoder: &mut fidl::encoding::Decoder<'_, D>,
3428 offset: usize,
3429 _depth: fidl::encoding::Depth,
3430 ) -> fidl::Result<()> {
3431 decoder.debug_check_bounds::<Self>(offset);
3432 fidl::decode!(
3434 fidl_fuchsia_wlan_internal__common::SignalReportIndication,
3435 D,
3436 &mut self.ind,
3437 decoder,
3438 offset + 0,
3439 _depth
3440 )?;
3441 Ok(())
3442 }
3443 }
3444
3445 impl fidl::encoding::ValueTypeMarker for DisconnectCause {
3446 type Borrowed<'a> = &'a Self;
3447 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3448 value
3449 }
3450 }
3451
3452 unsafe impl fidl::encoding::TypeMarker for DisconnectCause {
3453 type Owned = Self;
3454
3455 #[inline(always)]
3456 fn inline_align(_context: fidl::encoding::Context) -> usize {
3457 4
3458 }
3459
3460 #[inline(always)]
3461 fn inline_size(_context: fidl::encoding::Context) -> usize {
3462 8
3463 }
3464 }
3465
3466 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisconnectCause, D>
3467 for &DisconnectCause
3468 {
3469 #[inline]
3470 unsafe fn encode(
3471 self,
3472 encoder: &mut fidl::encoding::Encoder<'_, D>,
3473 offset: usize,
3474 _depth: fidl::encoding::Depth,
3475 ) -> fidl::Result<()> {
3476 encoder.debug_check_bounds::<DisconnectCause>(offset);
3477 fidl::encoding::Encode::<DisconnectCause, D>::encode(
3479 (
3480 <DisconnectMlmeEventName as fidl::encoding::ValueTypeMarker>::borrow(&self.mlme_event_name),
3481 <fidl_fuchsia_wlan_ieee80211__common::ReasonCode as fidl::encoding::ValueTypeMarker>::borrow(&self.reason_code),
3482 ),
3483 encoder, offset, _depth
3484 )
3485 }
3486 }
3487 unsafe impl<
3488 D: fidl::encoding::ResourceDialect,
3489 T0: fidl::encoding::Encode<DisconnectMlmeEventName, D>,
3490 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211__common::ReasonCode, D>,
3491 > fidl::encoding::Encode<DisconnectCause, D> for (T0, T1)
3492 {
3493 #[inline]
3494 unsafe fn encode(
3495 self,
3496 encoder: &mut fidl::encoding::Encoder<'_, D>,
3497 offset: usize,
3498 depth: fidl::encoding::Depth,
3499 ) -> fidl::Result<()> {
3500 encoder.debug_check_bounds::<DisconnectCause>(offset);
3501 unsafe {
3504 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
3505 (ptr as *mut u32).write_unaligned(0);
3506 }
3507 self.0.encode(encoder, offset + 0, depth)?;
3509 self.1.encode(encoder, offset + 4, depth)?;
3510 Ok(())
3511 }
3512 }
3513
3514 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisconnectCause {
3515 #[inline(always)]
3516 fn new_empty() -> Self {
3517 Self {
3518 mlme_event_name: fidl::new_empty!(DisconnectMlmeEventName, D),
3519 reason_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::ReasonCode, D),
3520 }
3521 }
3522
3523 #[inline]
3524 unsafe fn decode(
3525 &mut self,
3526 decoder: &mut fidl::encoding::Decoder<'_, D>,
3527 offset: usize,
3528 _depth: fidl::encoding::Depth,
3529 ) -> fidl::Result<()> {
3530 decoder.debug_check_bounds::<Self>(offset);
3531 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
3533 let padval = unsafe { (ptr as *const u32).read_unaligned() };
3534 let mask = 0xffff0000u32;
3535 let maskedval = padval & mask;
3536 if maskedval != 0 {
3537 return Err(fidl::Error::NonZeroPadding {
3538 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
3539 });
3540 }
3541 fidl::decode!(
3542 DisconnectMlmeEventName,
3543 D,
3544 &mut self.mlme_event_name,
3545 decoder,
3546 offset + 0,
3547 _depth
3548 )?;
3549 fidl::decode!(
3550 fidl_fuchsia_wlan_ieee80211__common::ReasonCode,
3551 D,
3552 &mut self.reason_code,
3553 decoder,
3554 offset + 4,
3555 _depth
3556 )?;
3557 Ok(())
3558 }
3559 }
3560
3561 impl fidl::encoding::ValueTypeMarker for DisconnectInfo {
3562 type Borrowed<'a> = &'a Self;
3563 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3564 value
3565 }
3566 }
3567
3568 unsafe impl fidl::encoding::TypeMarker for DisconnectInfo {
3569 type Owned = Self;
3570
3571 #[inline(always)]
3572 fn inline_align(_context: fidl::encoding::Context) -> usize {
3573 8
3574 }
3575
3576 #[inline(always)]
3577 fn inline_size(_context: fidl::encoding::Context) -> usize {
3578 24
3579 }
3580 }
3581
3582 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisconnectInfo, D>
3583 for &DisconnectInfo
3584 {
3585 #[inline]
3586 unsafe fn encode(
3587 self,
3588 encoder: &mut fidl::encoding::Encoder<'_, D>,
3589 offset: usize,
3590 _depth: fidl::encoding::Depth,
3591 ) -> fidl::Result<()> {
3592 encoder.debug_check_bounds::<DisconnectInfo>(offset);
3593 fidl::encoding::Encode::<DisconnectInfo, D>::encode(
3595 (
3596 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.is_sme_reconnecting),
3597 <DisconnectSource as fidl::encoding::ValueTypeMarker>::borrow(
3598 &self.disconnect_source,
3599 ),
3600 ),
3601 encoder,
3602 offset,
3603 _depth,
3604 )
3605 }
3606 }
3607 unsafe impl<
3608 D: fidl::encoding::ResourceDialect,
3609 T0: fidl::encoding::Encode<bool, D>,
3610 T1: fidl::encoding::Encode<DisconnectSource, D>,
3611 > fidl::encoding::Encode<DisconnectInfo, D> for (T0, T1)
3612 {
3613 #[inline]
3614 unsafe fn encode(
3615 self,
3616 encoder: &mut fidl::encoding::Encoder<'_, D>,
3617 offset: usize,
3618 depth: fidl::encoding::Depth,
3619 ) -> fidl::Result<()> {
3620 encoder.debug_check_bounds::<DisconnectInfo>(offset);
3621 unsafe {
3624 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
3625 (ptr as *mut u64).write_unaligned(0);
3626 }
3627 self.0.encode(encoder, offset + 0, depth)?;
3629 self.1.encode(encoder, offset + 8, depth)?;
3630 Ok(())
3631 }
3632 }
3633
3634 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisconnectInfo {
3635 #[inline(always)]
3636 fn new_empty() -> Self {
3637 Self {
3638 is_sme_reconnecting: fidl::new_empty!(bool, D),
3639 disconnect_source: fidl::new_empty!(DisconnectSource, D),
3640 }
3641 }
3642
3643 #[inline]
3644 unsafe fn decode(
3645 &mut self,
3646 decoder: &mut fidl::encoding::Decoder<'_, D>,
3647 offset: usize,
3648 _depth: fidl::encoding::Depth,
3649 ) -> fidl::Result<()> {
3650 decoder.debug_check_bounds::<Self>(offset);
3651 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
3653 let padval = unsafe { (ptr as *const u64).read_unaligned() };
3654 let mask = 0xffffffffffffff00u64;
3655 let maskedval = padval & mask;
3656 if maskedval != 0 {
3657 return Err(fidl::Error::NonZeroPadding {
3658 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
3659 });
3660 }
3661 fidl::decode!(bool, D, &mut self.is_sme_reconnecting, decoder, offset + 0, _depth)?;
3662 fidl::decode!(
3663 DisconnectSource,
3664 D,
3665 &mut self.disconnect_source,
3666 decoder,
3667 offset + 8,
3668 _depth
3669 )?;
3670 Ok(())
3671 }
3672 }
3673
3674 impl fidl::encoding::ValueTypeMarker for DisjointSecurityProtocol {
3675 type Borrowed<'a> = &'a Self;
3676 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3677 value
3678 }
3679 }
3680
3681 unsafe impl fidl::encoding::TypeMarker for DisjointSecurityProtocol {
3682 type Owned = Self;
3683
3684 #[inline(always)]
3685 fn inline_align(_context: fidl::encoding::Context) -> usize {
3686 4
3687 }
3688
3689 #[inline(always)]
3690 fn inline_size(_context: fidl::encoding::Context) -> usize {
3691 8
3692 }
3693 }
3694
3695 unsafe impl<D: fidl::encoding::ResourceDialect>
3696 fidl::encoding::Encode<DisjointSecurityProtocol, D> for &DisjointSecurityProtocol
3697 {
3698 #[inline]
3699 unsafe fn encode(
3700 self,
3701 encoder: &mut fidl::encoding::Encoder<'_, D>,
3702 offset: usize,
3703 _depth: fidl::encoding::Depth,
3704 ) -> fidl::Result<()> {
3705 encoder.debug_check_bounds::<DisjointSecurityProtocol>(offset);
3706 fidl::encoding::Encode::<DisjointSecurityProtocol, D>::encode(
3708 (
3709 <fidl_fuchsia_wlan_internal__common::Protocol as fidl::encoding::ValueTypeMarker>::borrow(&self.protocol),
3710 <fidl_fuchsia_wlan_common__common::WlanMacRole as fidl::encoding::ValueTypeMarker>::borrow(&self.role),
3711 ),
3712 encoder, offset, _depth
3713 )
3714 }
3715 }
3716 unsafe impl<
3717 D: fidl::encoding::ResourceDialect,
3718 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal__common::Protocol, D>,
3719 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_common__common::WlanMacRole, D>,
3720 > fidl::encoding::Encode<DisjointSecurityProtocol, D> for (T0, T1)
3721 {
3722 #[inline]
3723 unsafe fn encode(
3724 self,
3725 encoder: &mut fidl::encoding::Encoder<'_, D>,
3726 offset: usize,
3727 depth: fidl::encoding::Depth,
3728 ) -> fidl::Result<()> {
3729 encoder.debug_check_bounds::<DisjointSecurityProtocol>(offset);
3730 self.0.encode(encoder, offset + 0, depth)?;
3734 self.1.encode(encoder, offset + 4, depth)?;
3735 Ok(())
3736 }
3737 }
3738
3739 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3740 for DisjointSecurityProtocol
3741 {
3742 #[inline(always)]
3743 fn new_empty() -> Self {
3744 Self {
3745 protocol: fidl::new_empty!(fidl_fuchsia_wlan_internal__common::Protocol, D),
3746 role: fidl::new_empty!(fidl_fuchsia_wlan_common__common::WlanMacRole, D),
3747 }
3748 }
3749
3750 #[inline]
3751 unsafe fn decode(
3752 &mut self,
3753 decoder: &mut fidl::encoding::Decoder<'_, D>,
3754 offset: usize,
3755 _depth: fidl::encoding::Depth,
3756 ) -> fidl::Result<()> {
3757 decoder.debug_check_bounds::<Self>(offset);
3758 fidl::decode!(
3760 fidl_fuchsia_wlan_internal__common::Protocol,
3761 D,
3762 &mut self.protocol,
3763 decoder,
3764 offset + 0,
3765 _depth
3766 )?;
3767 fidl::decode!(
3768 fidl_fuchsia_wlan_common__common::WlanMacRole,
3769 D,
3770 &mut self.role,
3771 decoder,
3772 offset + 4,
3773 _depth
3774 )?;
3775 Ok(())
3776 }
3777 }
3778
3779 impl fidl::encoding::ValueTypeMarker for Empty {
3780 type Borrowed<'a> = &'a Self;
3781 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3782 value
3783 }
3784 }
3785
3786 unsafe impl fidl::encoding::TypeMarker for Empty {
3787 type Owned = Self;
3788
3789 #[inline(always)]
3790 fn inline_align(_context: fidl::encoding::Context) -> usize {
3791 1
3792 }
3793
3794 #[inline(always)]
3795 fn inline_size(_context: fidl::encoding::Context) -> usize {
3796 1
3797 }
3798 }
3799
3800 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Empty, D> for &Empty {
3801 #[inline]
3802 unsafe fn encode(
3803 self,
3804 encoder: &mut fidl::encoding::Encoder<'_, D>,
3805 offset: usize,
3806 _depth: fidl::encoding::Depth,
3807 ) -> fidl::Result<()> {
3808 encoder.debug_check_bounds::<Empty>(offset);
3809 encoder.write_num(0u8, offset);
3810 Ok(())
3811 }
3812 }
3813
3814 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Empty {
3815 #[inline(always)]
3816 fn new_empty() -> Self {
3817 Self
3818 }
3819
3820 #[inline]
3821 unsafe fn decode(
3822 &mut self,
3823 decoder: &mut fidl::encoding::Decoder<'_, D>,
3824 offset: usize,
3825 _depth: fidl::encoding::Depth,
3826 ) -> fidl::Result<()> {
3827 decoder.debug_check_bounds::<Self>(offset);
3828 match decoder.read_num::<u8>(offset) {
3829 0 => Ok(()),
3830 _ => Err(fidl::Error::Invalid),
3831 }
3832 }
3833 }
3834
3835 impl fidl::encoding::ValueTypeMarker for GenericSmeQuery {
3836 type Borrowed<'a> = &'a Self;
3837 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3838 value
3839 }
3840 }
3841
3842 unsafe impl fidl::encoding::TypeMarker for GenericSmeQuery {
3843 type Owned = Self;
3844
3845 #[inline(always)]
3846 fn inline_align(_context: fidl::encoding::Context) -> usize {
3847 4
3848 }
3849
3850 #[inline(always)]
3851 fn inline_size(_context: fidl::encoding::Context) -> usize {
3852 16
3853 }
3854 }
3855
3856 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GenericSmeQuery, D>
3857 for &GenericSmeQuery
3858 {
3859 #[inline]
3860 unsafe fn encode(
3861 self,
3862 encoder: &mut fidl::encoding::Encoder<'_, D>,
3863 offset: usize,
3864 _depth: fidl::encoding::Depth,
3865 ) -> fidl::Result<()> {
3866 encoder.debug_check_bounds::<GenericSmeQuery>(offset);
3867 fidl::encoding::Encode::<GenericSmeQuery, D>::encode(
3869 (
3870 <fidl_fuchsia_wlan_common__common::WlanMacRole as fidl::encoding::ValueTypeMarker>::borrow(&self.role),
3871 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.sta_addr),
3872 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.factory_addr),
3873 ),
3874 encoder, offset, _depth
3875 )
3876 }
3877 }
3878 unsafe impl<
3879 D: fidl::encoding::ResourceDialect,
3880 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common__common::WlanMacRole, D>,
3881 T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
3882 T2: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
3883 > fidl::encoding::Encode<GenericSmeQuery, D> for (T0, T1, T2)
3884 {
3885 #[inline]
3886 unsafe fn encode(
3887 self,
3888 encoder: &mut fidl::encoding::Encoder<'_, D>,
3889 offset: usize,
3890 depth: fidl::encoding::Depth,
3891 ) -> fidl::Result<()> {
3892 encoder.debug_check_bounds::<GenericSmeQuery>(offset);
3893 self.0.encode(encoder, offset + 0, depth)?;
3897 self.1.encode(encoder, offset + 4, depth)?;
3898 self.2.encode(encoder, offset + 10, depth)?;
3899 Ok(())
3900 }
3901 }
3902
3903 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GenericSmeQuery {
3904 #[inline(always)]
3905 fn new_empty() -> Self {
3906 Self {
3907 role: fidl::new_empty!(fidl_fuchsia_wlan_common__common::WlanMacRole, D),
3908 sta_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
3909 factory_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
3910 }
3911 }
3912
3913 #[inline]
3914 unsafe fn decode(
3915 &mut self,
3916 decoder: &mut fidl::encoding::Decoder<'_, D>,
3917 offset: usize,
3918 _depth: fidl::encoding::Depth,
3919 ) -> fidl::Result<()> {
3920 decoder.debug_check_bounds::<Self>(offset);
3921 fidl::decode!(
3923 fidl_fuchsia_wlan_common__common::WlanMacRole,
3924 D,
3925 &mut self.role,
3926 decoder,
3927 offset + 0,
3928 _depth
3929 )?;
3930 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.sta_addr, decoder, offset + 4, _depth)?;
3931 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.factory_addr, decoder, offset + 10, _depth)?;
3932 Ok(())
3933 }
3934 }
3935
3936 impl fidl::encoding::ValueTypeMarker for GenericSmeQueryIfaceCapabilitiesResponse {
3937 type Borrowed<'a> = &'a Self;
3938 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3939 value
3940 }
3941 }
3942
3943 unsafe impl fidl::encoding::TypeMarker for GenericSmeQueryIfaceCapabilitiesResponse {
3944 type Owned = Self;
3945
3946 #[inline(always)]
3947 fn inline_align(_context: fidl::encoding::Context) -> usize {
3948 8
3949 }
3950
3951 #[inline(always)]
3952 fn inline_size(_context: fidl::encoding::Context) -> usize {
3953 16
3954 }
3955 }
3956
3957 unsafe impl<D: fidl::encoding::ResourceDialect>
3958 fidl::encoding::Encode<GenericSmeQueryIfaceCapabilitiesResponse, D>
3959 for &GenericSmeQueryIfaceCapabilitiesResponse
3960 {
3961 #[inline]
3962 unsafe fn encode(
3963 self,
3964 encoder: &mut fidl::encoding::Encoder<'_, D>,
3965 offset: usize,
3966 _depth: fidl::encoding::Depth,
3967 ) -> fidl::Result<()> {
3968 encoder.debug_check_bounds::<GenericSmeQueryIfaceCapabilitiesResponse>(offset);
3969 fidl::encoding::Encode::<GenericSmeQueryIfaceCapabilitiesResponse, D>::encode(
3971 (
3972 <fidl_fuchsia_wlan_common__common::ApfPacketFilterSupport as fidl::encoding::ValueTypeMarker>::borrow(&self.apf_support),
3973 ),
3974 encoder, offset, _depth
3975 )
3976 }
3977 }
3978 unsafe impl<
3979 D: fidl::encoding::ResourceDialect,
3980 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common__common::ApfPacketFilterSupport, D>,
3981 > fidl::encoding::Encode<GenericSmeQueryIfaceCapabilitiesResponse, D> for (T0,)
3982 {
3983 #[inline]
3984 unsafe fn encode(
3985 self,
3986 encoder: &mut fidl::encoding::Encoder<'_, D>,
3987 offset: usize,
3988 depth: fidl::encoding::Depth,
3989 ) -> fidl::Result<()> {
3990 encoder.debug_check_bounds::<GenericSmeQueryIfaceCapabilitiesResponse>(offset);
3991 self.0.encode(encoder, offset + 0, depth)?;
3995 Ok(())
3996 }
3997 }
3998
3999 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4000 for GenericSmeQueryIfaceCapabilitiesResponse
4001 {
4002 #[inline(always)]
4003 fn new_empty() -> Self {
4004 Self {
4005 apf_support: fidl::new_empty!(
4006 fidl_fuchsia_wlan_common__common::ApfPacketFilterSupport,
4007 D
4008 ),
4009 }
4010 }
4011
4012 #[inline]
4013 unsafe fn decode(
4014 &mut self,
4015 decoder: &mut fidl::encoding::Decoder<'_, D>,
4016 offset: usize,
4017 _depth: fidl::encoding::Depth,
4018 ) -> fidl::Result<()> {
4019 decoder.debug_check_bounds::<Self>(offset);
4020 fidl::decode!(
4022 fidl_fuchsia_wlan_common__common::ApfPacketFilterSupport,
4023 D,
4024 &mut self.apf_support,
4025 decoder,
4026 offset + 0,
4027 _depth
4028 )?;
4029 Ok(())
4030 }
4031 }
4032
4033 impl fidl::encoding::ValueTypeMarker for Incompatible {
4034 type Borrowed<'a> = &'a Self;
4035 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4036 value
4037 }
4038 }
4039
4040 unsafe impl fidl::encoding::TypeMarker for Incompatible {
4041 type Owned = Self;
4042
4043 #[inline(always)]
4044 fn inline_align(_context: fidl::encoding::Context) -> usize {
4045 8
4046 }
4047
4048 #[inline(always)]
4049 fn inline_size(_context: fidl::encoding::Context) -> usize {
4050 32
4051 }
4052 }
4053
4054 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Incompatible, D>
4055 for &Incompatible
4056 {
4057 #[inline]
4058 unsafe fn encode(
4059 self,
4060 encoder: &mut fidl::encoding::Encoder<'_, D>,
4061 offset: usize,
4062 _depth: fidl::encoding::Depth,
4063 ) -> fidl::Result<()> {
4064 encoder.debug_check_bounds::<Incompatible>(offset);
4065 fidl::encoding::Encode::<Incompatible, D>::encode(
4067 (
4068 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.description),
4069 <fidl::encoding::Optional<fidl::encoding::Vector<DisjointSecurityProtocol, 32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.disjoint_security_protocols),
4070 ),
4071 encoder, offset, _depth
4072 )
4073 }
4074 }
4075 unsafe impl<
4076 D: fidl::encoding::ResourceDialect,
4077 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
4078 T1: fidl::encoding::Encode<
4079 fidl::encoding::Optional<fidl::encoding::Vector<DisjointSecurityProtocol, 32>>,
4080 D,
4081 >,
4082 > fidl::encoding::Encode<Incompatible, D> for (T0, T1)
4083 {
4084 #[inline]
4085 unsafe fn encode(
4086 self,
4087 encoder: &mut fidl::encoding::Encoder<'_, D>,
4088 offset: usize,
4089 depth: fidl::encoding::Depth,
4090 ) -> fidl::Result<()> {
4091 encoder.debug_check_bounds::<Incompatible>(offset);
4092 self.0.encode(encoder, offset + 0, depth)?;
4096 self.1.encode(encoder, offset + 16, depth)?;
4097 Ok(())
4098 }
4099 }
4100
4101 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Incompatible {
4102 #[inline(always)]
4103 fn new_empty() -> Self {
4104 Self {
4105 description: fidl::new_empty!(fidl::encoding::UnboundedString, D),
4106 disjoint_security_protocols: fidl::new_empty!(
4107 fidl::encoding::Optional<fidl::encoding::Vector<DisjointSecurityProtocol, 32>>,
4108 D
4109 ),
4110 }
4111 }
4112
4113 #[inline]
4114 unsafe fn decode(
4115 &mut self,
4116 decoder: &mut fidl::encoding::Decoder<'_, D>,
4117 offset: usize,
4118 _depth: fidl::encoding::Depth,
4119 ) -> fidl::Result<()> {
4120 decoder.debug_check_bounds::<Self>(offset);
4121 fidl::decode!(
4123 fidl::encoding::UnboundedString,
4124 D,
4125 &mut self.description,
4126 decoder,
4127 offset + 0,
4128 _depth
4129 )?;
4130 fidl::decode!(
4131 fidl::encoding::Optional<fidl::encoding::Vector<DisjointSecurityProtocol, 32>>,
4132 D,
4133 &mut self.disjoint_security_protocols,
4134 decoder,
4135 offset + 16,
4136 _depth
4137 )?;
4138 Ok(())
4139 }
4140 }
4141
4142 impl fidl::encoding::ValueTypeMarker for LegacyPrivacySupport {
4143 type Borrowed<'a> = &'a Self;
4144 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4145 value
4146 }
4147 }
4148
4149 unsafe impl fidl::encoding::TypeMarker for LegacyPrivacySupport {
4150 type Owned = Self;
4151
4152 #[inline(always)]
4153 fn inline_align(_context: fidl::encoding::Context) -> usize {
4154 1
4155 }
4156
4157 #[inline(always)]
4158 fn inline_size(_context: fidl::encoding::Context) -> usize {
4159 2
4160 }
4161 }
4162
4163 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LegacyPrivacySupport, D>
4164 for &LegacyPrivacySupport
4165 {
4166 #[inline]
4167 unsafe fn encode(
4168 self,
4169 encoder: &mut fidl::encoding::Encoder<'_, D>,
4170 offset: usize,
4171 _depth: fidl::encoding::Depth,
4172 ) -> fidl::Result<()> {
4173 encoder.debug_check_bounds::<LegacyPrivacySupport>(offset);
4174 fidl::encoding::Encode::<LegacyPrivacySupport, D>::encode(
4176 (
4177 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.wep_supported),
4178 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.wpa1_supported),
4179 ),
4180 encoder,
4181 offset,
4182 _depth,
4183 )
4184 }
4185 }
4186 unsafe impl<
4187 D: fidl::encoding::ResourceDialect,
4188 T0: fidl::encoding::Encode<bool, D>,
4189 T1: fidl::encoding::Encode<bool, D>,
4190 > fidl::encoding::Encode<LegacyPrivacySupport, D> for (T0, T1)
4191 {
4192 #[inline]
4193 unsafe fn encode(
4194 self,
4195 encoder: &mut fidl::encoding::Encoder<'_, D>,
4196 offset: usize,
4197 depth: fidl::encoding::Depth,
4198 ) -> fidl::Result<()> {
4199 encoder.debug_check_bounds::<LegacyPrivacySupport>(offset);
4200 self.0.encode(encoder, offset + 0, depth)?;
4204 self.1.encode(encoder, offset + 1, depth)?;
4205 Ok(())
4206 }
4207 }
4208
4209 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LegacyPrivacySupport {
4210 #[inline(always)]
4211 fn new_empty() -> Self {
4212 Self {
4213 wep_supported: fidl::new_empty!(bool, D),
4214 wpa1_supported: fidl::new_empty!(bool, D),
4215 }
4216 }
4217
4218 #[inline]
4219 unsafe fn decode(
4220 &mut self,
4221 decoder: &mut fidl::encoding::Decoder<'_, D>,
4222 offset: usize,
4223 _depth: fidl::encoding::Depth,
4224 ) -> fidl::Result<()> {
4225 decoder.debug_check_bounds::<Self>(offset);
4226 fidl::decode!(bool, D, &mut self.wep_supported, decoder, offset + 0, _depth)?;
4228 fidl::decode!(bool, D, &mut self.wpa1_supported, decoder, offset + 1, _depth)?;
4229 Ok(())
4230 }
4231 }
4232
4233 impl fidl::encoding::ValueTypeMarker for PassiveScanRequest {
4234 type Borrowed<'a> = &'a Self;
4235 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4236 value
4237 }
4238 }
4239
4240 unsafe impl fidl::encoding::TypeMarker for PassiveScanRequest {
4241 type Owned = Self;
4242
4243 #[inline(always)]
4244 fn inline_align(_context: fidl::encoding::Context) -> usize {
4245 8
4246 }
4247
4248 #[inline(always)]
4249 fn inline_size(_context: fidl::encoding::Context) -> usize {
4250 16
4251 }
4252 }
4253
4254 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PassiveScanRequest, D>
4255 for &PassiveScanRequest
4256 {
4257 #[inline]
4258 unsafe fn encode(
4259 self,
4260 encoder: &mut fidl::encoding::Encoder<'_, D>,
4261 offset: usize,
4262 _depth: fidl::encoding::Depth,
4263 ) -> fidl::Result<()> {
4264 encoder.debug_check_bounds::<PassiveScanRequest>(offset);
4265 fidl::encoding::Encode::<PassiveScanRequest, D>::encode(
4267 (<fidl::encoding::Vector<u8, 500> as fidl::encoding::ValueTypeMarker>::borrow(
4268 &self.channels,
4269 ),),
4270 encoder,
4271 offset,
4272 _depth,
4273 )
4274 }
4275 }
4276 unsafe impl<
4277 D: fidl::encoding::ResourceDialect,
4278 T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 500>, D>,
4279 > fidl::encoding::Encode<PassiveScanRequest, D> for (T0,)
4280 {
4281 #[inline]
4282 unsafe fn encode(
4283 self,
4284 encoder: &mut fidl::encoding::Encoder<'_, D>,
4285 offset: usize,
4286 depth: fidl::encoding::Depth,
4287 ) -> fidl::Result<()> {
4288 encoder.debug_check_bounds::<PassiveScanRequest>(offset);
4289 self.0.encode(encoder, offset + 0, depth)?;
4293 Ok(())
4294 }
4295 }
4296
4297 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PassiveScanRequest {
4298 #[inline(always)]
4299 fn new_empty() -> Self {
4300 Self { channels: fidl::new_empty!(fidl::encoding::Vector<u8, 500>, D) }
4301 }
4302
4303 #[inline]
4304 unsafe fn decode(
4305 &mut self,
4306 decoder: &mut fidl::encoding::Decoder<'_, D>,
4307 offset: usize,
4308 _depth: fidl::encoding::Depth,
4309 ) -> fidl::Result<()> {
4310 decoder.debug_check_bounds::<Self>(offset);
4311 fidl::decode!(fidl::encoding::Vector<u8, 500>, D, &mut self.channels, decoder, offset + 0, _depth)?;
4313 Ok(())
4314 }
4315 }
4316
4317 impl fidl::encoding::ValueTypeMarker for RadioConfig {
4318 type Borrowed<'a> = &'a Self;
4319 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4320 value
4321 }
4322 }
4323
4324 unsafe impl fidl::encoding::TypeMarker for RadioConfig {
4325 type Owned = Self;
4326
4327 #[inline(always)]
4328 fn inline_align(_context: fidl::encoding::Context) -> usize {
4329 4
4330 }
4331
4332 #[inline(always)]
4333 fn inline_size(_context: fidl::encoding::Context) -> usize {
4334 16
4335 }
4336 }
4337
4338 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RadioConfig, D>
4339 for &RadioConfig
4340 {
4341 #[inline]
4342 unsafe fn encode(
4343 self,
4344 encoder: &mut fidl::encoding::Encoder<'_, D>,
4345 offset: usize,
4346 _depth: fidl::encoding::Depth,
4347 ) -> fidl::Result<()> {
4348 encoder.debug_check_bounds::<RadioConfig>(offset);
4349 fidl::encoding::Encode::<RadioConfig, D>::encode(
4351 (
4352 <fidl_fuchsia_wlan_ieee80211__common::WlanPhyType as fidl::encoding::ValueTypeMarker>::borrow(&self.phy),
4353 <fidl_fuchsia_wlan_ieee80211__common::WlanChannel as fidl::encoding::ValueTypeMarker>::borrow(&self.channel),
4354 ),
4355 encoder, offset, _depth
4356 )
4357 }
4358 }
4359 unsafe impl<
4360 D: fidl::encoding::ResourceDialect,
4361 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211__common::WlanPhyType, D>,
4362 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211__common::WlanChannel, D>,
4363 > fidl::encoding::Encode<RadioConfig, D> for (T0, T1)
4364 {
4365 #[inline]
4366 unsafe fn encode(
4367 self,
4368 encoder: &mut fidl::encoding::Encoder<'_, D>,
4369 offset: usize,
4370 depth: fidl::encoding::Depth,
4371 ) -> fidl::Result<()> {
4372 encoder.debug_check_bounds::<RadioConfig>(offset);
4373 self.0.encode(encoder, offset + 0, depth)?;
4377 self.1.encode(encoder, offset + 4, depth)?;
4378 Ok(())
4379 }
4380 }
4381
4382 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RadioConfig {
4383 #[inline(always)]
4384 fn new_empty() -> Self {
4385 Self {
4386 phy: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::WlanPhyType, D),
4387 channel: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::WlanChannel, D),
4388 }
4389 }
4390
4391 #[inline]
4392 unsafe fn decode(
4393 &mut self,
4394 decoder: &mut fidl::encoding::Decoder<'_, D>,
4395 offset: usize,
4396 _depth: fidl::encoding::Depth,
4397 ) -> fidl::Result<()> {
4398 decoder.debug_check_bounds::<Self>(offset);
4399 fidl::decode!(
4401 fidl_fuchsia_wlan_ieee80211__common::WlanPhyType,
4402 D,
4403 &mut self.phy,
4404 decoder,
4405 offset + 0,
4406 _depth
4407 )?;
4408 fidl::decode!(
4409 fidl_fuchsia_wlan_ieee80211__common::WlanChannel,
4410 D,
4411 &mut self.channel,
4412 decoder,
4413 offset + 4,
4414 _depth
4415 )?;
4416 Ok(())
4417 }
4418 }
4419
4420 impl fidl::encoding::ValueTypeMarker for RoamRequest {
4421 type Borrowed<'a> = &'a Self;
4422 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4423 value
4424 }
4425 }
4426
4427 unsafe impl fidl::encoding::TypeMarker for RoamRequest {
4428 type Owned = Self;
4429
4430 #[inline(always)]
4431 fn inline_align(_context: fidl::encoding::Context) -> usize {
4432 8
4433 }
4434
4435 #[inline(always)]
4436 fn inline_size(_context: fidl::encoding::Context) -> usize {
4437 48
4438 }
4439 }
4440
4441 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RoamRequest, D>
4442 for &RoamRequest
4443 {
4444 #[inline]
4445 unsafe fn encode(
4446 self,
4447 encoder: &mut fidl::encoding::Encoder<'_, D>,
4448 offset: usize,
4449 _depth: fidl::encoding::Depth,
4450 ) -> fidl::Result<()> {
4451 encoder.debug_check_bounds::<RoamRequest>(offset);
4452 fidl::encoding::Encode::<RoamRequest, D>::encode(
4454 (
4455 <fidl_fuchsia_wlan_ieee80211__common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.bss_description),
4456 ),
4457 encoder, offset, _depth
4458 )
4459 }
4460 }
4461 unsafe impl<
4462 D: fidl::encoding::ResourceDialect,
4463 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211__common::BssDescription, D>,
4464 > fidl::encoding::Encode<RoamRequest, D> for (T0,)
4465 {
4466 #[inline]
4467 unsafe fn encode(
4468 self,
4469 encoder: &mut fidl::encoding::Encoder<'_, D>,
4470 offset: usize,
4471 depth: fidl::encoding::Depth,
4472 ) -> fidl::Result<()> {
4473 encoder.debug_check_bounds::<RoamRequest>(offset);
4474 self.0.encode(encoder, offset + 0, depth)?;
4478 Ok(())
4479 }
4480 }
4481
4482 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RoamRequest {
4483 #[inline(always)]
4484 fn new_empty() -> Self {
4485 Self {
4486 bss_description: fidl::new_empty!(
4487 fidl_fuchsia_wlan_ieee80211__common::BssDescription,
4488 D
4489 ),
4490 }
4491 }
4492
4493 #[inline]
4494 unsafe fn decode(
4495 &mut self,
4496 decoder: &mut fidl::encoding::Decoder<'_, D>,
4497 offset: usize,
4498 _depth: fidl::encoding::Depth,
4499 ) -> fidl::Result<()> {
4500 decoder.debug_check_bounds::<Self>(offset);
4501 fidl::decode!(
4503 fidl_fuchsia_wlan_ieee80211__common::BssDescription,
4504 D,
4505 &mut self.bss_description,
4506 decoder,
4507 offset + 0,
4508 _depth
4509 )?;
4510 Ok(())
4511 }
4512 }
4513
4514 impl fidl::encoding::ValueTypeMarker for RoamResult {
4515 type Borrowed<'a> = &'a Self;
4516 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4517 value
4518 }
4519 }
4520
4521 unsafe impl fidl::encoding::TypeMarker for RoamResult {
4522 type Owned = Self;
4523
4524 #[inline(always)]
4525 fn inline_align(_context: fidl::encoding::Context) -> usize {
4526 8
4527 }
4528
4529 #[inline(always)]
4530 fn inline_size(_context: fidl::encoding::Context) -> usize {
4531 40
4532 }
4533 }
4534
4535 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RoamResult, D>
4536 for &RoamResult
4537 {
4538 #[inline]
4539 unsafe fn encode(
4540 self,
4541 encoder: &mut fidl::encoding::Encoder<'_, D>,
4542 offset: usize,
4543 _depth: fidl::encoding::Depth,
4544 ) -> fidl::Result<()> {
4545 encoder.debug_check_bounds::<RoamResult>(offset);
4546 fidl::encoding::Encode::<RoamResult, D>::encode(
4548 (
4549 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.bssid),
4550 <fidl_fuchsia_wlan_ieee80211__common::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.status_code),
4551 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.original_association_maintained),
4552 <fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211__common::BssDescription> as fidl::encoding::ValueTypeMarker>::borrow(&self.bss_description),
4553 <fidl::encoding::Boxed<DisconnectInfo> as fidl::encoding::ValueTypeMarker>::borrow(&self.disconnect_info),
4554 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.is_credential_rejected),
4555 ),
4556 encoder, offset, _depth
4557 )
4558 }
4559 }
4560 unsafe impl<
4561 D: fidl::encoding::ResourceDialect,
4562 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
4563 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211__common::StatusCode, D>,
4564 T2: fidl::encoding::Encode<bool, D>,
4565 T3: fidl::encoding::Encode<
4566 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211__common::BssDescription>,
4567 D,
4568 >,
4569 T4: fidl::encoding::Encode<fidl::encoding::Boxed<DisconnectInfo>, D>,
4570 T5: fidl::encoding::Encode<bool, D>,
4571 > fidl::encoding::Encode<RoamResult, D> for (T0, T1, T2, T3, T4, T5)
4572 {
4573 #[inline]
4574 unsafe fn encode(
4575 self,
4576 encoder: &mut fidl::encoding::Encoder<'_, D>,
4577 offset: usize,
4578 depth: fidl::encoding::Depth,
4579 ) -> fidl::Result<()> {
4580 encoder.debug_check_bounds::<RoamResult>(offset);
4581 unsafe {
4584 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
4585 (ptr as *mut u64).write_unaligned(0);
4586 }
4587 unsafe {
4588 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
4589 (ptr as *mut u64).write_unaligned(0);
4590 }
4591 self.0.encode(encoder, offset + 0, depth)?;
4593 self.1.encode(encoder, offset + 6, depth)?;
4594 self.2.encode(encoder, offset + 8, depth)?;
4595 self.3.encode(encoder, offset + 16, depth)?;
4596 self.4.encode(encoder, offset + 24, depth)?;
4597 self.5.encode(encoder, offset + 32, depth)?;
4598 Ok(())
4599 }
4600 }
4601
4602 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RoamResult {
4603 #[inline(always)]
4604 fn new_empty() -> Self {
4605 Self {
4606 bssid: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
4607 status_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::StatusCode, D),
4608 original_association_maintained: fidl::new_empty!(bool, D),
4609 bss_description: fidl::new_empty!(
4610 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211__common::BssDescription>,
4611 D
4612 ),
4613 disconnect_info: fidl::new_empty!(fidl::encoding::Boxed<DisconnectInfo>, D),
4614 is_credential_rejected: fidl::new_empty!(bool, D),
4615 }
4616 }
4617
4618 #[inline]
4619 unsafe fn decode(
4620 &mut self,
4621 decoder: &mut fidl::encoding::Decoder<'_, D>,
4622 offset: usize,
4623 _depth: fidl::encoding::Depth,
4624 ) -> fidl::Result<()> {
4625 decoder.debug_check_bounds::<Self>(offset);
4626 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
4628 let padval = unsafe { (ptr as *const u64).read_unaligned() };
4629 let mask = 0xffffffffffffff00u64;
4630 let maskedval = padval & mask;
4631 if maskedval != 0 {
4632 return Err(fidl::Error::NonZeroPadding {
4633 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
4634 });
4635 }
4636 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
4637 let padval = unsafe { (ptr as *const u64).read_unaligned() };
4638 let mask = 0xffffffffffffff00u64;
4639 let maskedval = padval & mask;
4640 if maskedval != 0 {
4641 return Err(fidl::Error::NonZeroPadding {
4642 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
4643 });
4644 }
4645 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.bssid, decoder, offset + 0, _depth)?;
4646 fidl::decode!(
4647 fidl_fuchsia_wlan_ieee80211__common::StatusCode,
4648 D,
4649 &mut self.status_code,
4650 decoder,
4651 offset + 6,
4652 _depth
4653 )?;
4654 fidl::decode!(
4655 bool,
4656 D,
4657 &mut self.original_association_maintained,
4658 decoder,
4659 offset + 8,
4660 _depth
4661 )?;
4662 fidl::decode!(
4663 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211__common::BssDescription>,
4664 D,
4665 &mut self.bss_description,
4666 decoder,
4667 offset + 16,
4668 _depth
4669 )?;
4670 fidl::decode!(
4671 fidl::encoding::Boxed<DisconnectInfo>,
4672 D,
4673 &mut self.disconnect_info,
4674 decoder,
4675 offset + 24,
4676 _depth
4677 )?;
4678 fidl::decode!(bool, D, &mut self.is_credential_rejected, decoder, offset + 32, _depth)?;
4679 Ok(())
4680 }
4681 }
4682
4683 impl fidl::encoding::ValueTypeMarker for ScanResult {
4684 type Borrowed<'a> = &'a Self;
4685 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4686 value
4687 }
4688 }
4689
4690 unsafe impl fidl::encoding::TypeMarker for ScanResult {
4691 type Owned = Self;
4692
4693 #[inline(always)]
4694 fn inline_align(_context: fidl::encoding::Context) -> usize {
4695 8
4696 }
4697
4698 #[inline(always)]
4699 fn inline_size(_context: fidl::encoding::Context) -> usize {
4700 72
4701 }
4702 }
4703
4704 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ScanResult, D>
4705 for &ScanResult
4706 {
4707 #[inline]
4708 unsafe fn encode(
4709 self,
4710 encoder: &mut fidl::encoding::Encoder<'_, D>,
4711 offset: usize,
4712 _depth: fidl::encoding::Depth,
4713 ) -> fidl::Result<()> {
4714 encoder.debug_check_bounds::<ScanResult>(offset);
4715 fidl::encoding::Encode::<ScanResult, D>::encode(
4717 (
4718 <Compatibility as fidl::encoding::ValueTypeMarker>::borrow(&self.compatibility),
4719 <i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.timestamp_nanos),
4720 <fidl_fuchsia_wlan_ieee80211__common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.bss_description),
4721 ),
4722 encoder, offset, _depth
4723 )
4724 }
4725 }
4726 unsafe impl<
4727 D: fidl::encoding::ResourceDialect,
4728 T0: fidl::encoding::Encode<Compatibility, D>,
4729 T1: fidl::encoding::Encode<i64, D>,
4730 T2: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211__common::BssDescription, D>,
4731 > fidl::encoding::Encode<ScanResult, D> for (T0, T1, T2)
4732 {
4733 #[inline]
4734 unsafe fn encode(
4735 self,
4736 encoder: &mut fidl::encoding::Encoder<'_, D>,
4737 offset: usize,
4738 depth: fidl::encoding::Depth,
4739 ) -> fidl::Result<()> {
4740 encoder.debug_check_bounds::<ScanResult>(offset);
4741 self.0.encode(encoder, offset + 0, depth)?;
4745 self.1.encode(encoder, offset + 16, depth)?;
4746 self.2.encode(encoder, offset + 24, depth)?;
4747 Ok(())
4748 }
4749 }
4750
4751 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanResult {
4752 #[inline(always)]
4753 fn new_empty() -> Self {
4754 Self {
4755 compatibility: fidl::new_empty!(Compatibility, D),
4756 timestamp_nanos: fidl::new_empty!(i64, D),
4757 bss_description: fidl::new_empty!(
4758 fidl_fuchsia_wlan_ieee80211__common::BssDescription,
4759 D
4760 ),
4761 }
4762 }
4763
4764 #[inline]
4765 unsafe fn decode(
4766 &mut self,
4767 decoder: &mut fidl::encoding::Decoder<'_, D>,
4768 offset: usize,
4769 _depth: fidl::encoding::Depth,
4770 ) -> fidl::Result<()> {
4771 decoder.debug_check_bounds::<Self>(offset);
4772 fidl::decode!(Compatibility, D, &mut self.compatibility, decoder, offset + 0, _depth)?;
4774 fidl::decode!(i64, D, &mut self.timestamp_nanos, decoder, offset + 16, _depth)?;
4775 fidl::decode!(
4776 fidl_fuchsia_wlan_ieee80211__common::BssDescription,
4777 D,
4778 &mut self.bss_description,
4779 decoder,
4780 offset + 24,
4781 _depth
4782 )?;
4783 Ok(())
4784 }
4785 }
4786
4787 impl fidl::encoding::ValueTypeMarker for ScanResultVector {
4788 type Borrowed<'a> = &'a Self;
4789 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4790 value
4791 }
4792 }
4793
4794 unsafe impl fidl::encoding::TypeMarker for ScanResultVector {
4795 type Owned = Self;
4796
4797 #[inline(always)]
4798 fn inline_align(_context: fidl::encoding::Context) -> usize {
4799 8
4800 }
4801
4802 #[inline(always)]
4803 fn inline_size(_context: fidl::encoding::Context) -> usize {
4804 16
4805 }
4806 }
4807
4808 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ScanResultVector, D>
4809 for &ScanResultVector
4810 {
4811 #[inline]
4812 unsafe fn encode(
4813 self,
4814 encoder: &mut fidl::encoding::Encoder<'_, D>,
4815 offset: usize,
4816 _depth: fidl::encoding::Depth,
4817 ) -> fidl::Result<()> {
4818 encoder.debug_check_bounds::<ScanResultVector>(offset);
4819 fidl::encoding::Encode::<ScanResultVector, D>::encode(
4821 (
4822 <fidl::encoding::UnboundedVector<ScanResult> as fidl::encoding::ValueTypeMarker>::borrow(&self.results),
4823 ),
4824 encoder, offset, _depth
4825 )
4826 }
4827 }
4828 unsafe impl<
4829 D: fidl::encoding::ResourceDialect,
4830 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<ScanResult>, D>,
4831 > fidl::encoding::Encode<ScanResultVector, D> for (T0,)
4832 {
4833 #[inline]
4834 unsafe fn encode(
4835 self,
4836 encoder: &mut fidl::encoding::Encoder<'_, D>,
4837 offset: usize,
4838 depth: fidl::encoding::Depth,
4839 ) -> fidl::Result<()> {
4840 encoder.debug_check_bounds::<ScanResultVector>(offset);
4841 self.0.encode(encoder, offset + 0, depth)?;
4845 Ok(())
4846 }
4847 }
4848
4849 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanResultVector {
4850 #[inline(always)]
4851 fn new_empty() -> Self {
4852 Self { results: fidl::new_empty!(fidl::encoding::UnboundedVector<ScanResult>, D) }
4853 }
4854
4855 #[inline]
4856 unsafe fn decode(
4857 &mut self,
4858 decoder: &mut fidl::encoding::Decoder<'_, D>,
4859 offset: usize,
4860 _depth: fidl::encoding::Depth,
4861 ) -> fidl::Result<()> {
4862 decoder.debug_check_bounds::<Self>(offset);
4863 fidl::decode!(
4865 fidl::encoding::UnboundedVector<ScanResult>,
4866 D,
4867 &mut self.results,
4868 decoder,
4869 offset + 0,
4870 _depth
4871 )?;
4872 Ok(())
4873 }
4874 }
4875
4876 impl fidl::encoding::ValueTypeMarker for ServingApInfo {
4877 type Borrowed<'a> = &'a Self;
4878 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4879 value
4880 }
4881 }
4882
4883 unsafe impl fidl::encoding::TypeMarker for ServingApInfo {
4884 type Owned = Self;
4885
4886 #[inline(always)]
4887 fn inline_align(_context: fidl::encoding::Context) -> usize {
4888 8
4889 }
4890
4891 #[inline(always)]
4892 fn inline_size(_context: fidl::encoding::Context) -> usize {
4893 48
4894 }
4895 }
4896
4897 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ServingApInfo, D>
4898 for &ServingApInfo
4899 {
4900 #[inline]
4901 unsafe fn encode(
4902 self,
4903 encoder: &mut fidl::encoding::Encoder<'_, D>,
4904 offset: usize,
4905 _depth: fidl::encoding::Depth,
4906 ) -> fidl::Result<()> {
4907 encoder.debug_check_bounds::<ServingApInfo>(offset);
4908 fidl::encoding::Encode::<ServingApInfo, D>::encode(
4910 (
4911 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.bssid),
4912 <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssid),
4913 <i8 as fidl::encoding::ValueTypeMarker>::borrow(&self.rssi_dbm),
4914 <i8 as fidl::encoding::ValueTypeMarker>::borrow(&self.snr_db),
4915 <fidl_fuchsia_wlan_ieee80211__common::WlanChannel as fidl::encoding::ValueTypeMarker>::borrow(&self.channel),
4916 <Protection as fidl::encoding::ValueTypeMarker>::borrow(&self.protection),
4917 ),
4918 encoder, offset, _depth
4919 )
4920 }
4921 }
4922 unsafe impl<
4923 D: fidl::encoding::ResourceDialect,
4924 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
4925 T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
4926 T2: fidl::encoding::Encode<i8, D>,
4927 T3: fidl::encoding::Encode<i8, D>,
4928 T4: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211__common::WlanChannel, D>,
4929 T5: fidl::encoding::Encode<Protection, D>,
4930 > fidl::encoding::Encode<ServingApInfo, D> for (T0, T1, T2, T3, T4, T5)
4931 {
4932 #[inline]
4933 unsafe fn encode(
4934 self,
4935 encoder: &mut fidl::encoding::Encoder<'_, D>,
4936 offset: usize,
4937 depth: fidl::encoding::Depth,
4938 ) -> fidl::Result<()> {
4939 encoder.debug_check_bounds::<ServingApInfo>(offset);
4940 unsafe {
4943 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
4944 (ptr as *mut u64).write_unaligned(0);
4945 }
4946 unsafe {
4947 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
4948 (ptr as *mut u64).write_unaligned(0);
4949 }
4950 unsafe {
4951 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
4952 (ptr as *mut u64).write_unaligned(0);
4953 }
4954 self.0.encode(encoder, offset + 0, depth)?;
4956 self.1.encode(encoder, offset + 8, depth)?;
4957 self.2.encode(encoder, offset + 24, depth)?;
4958 self.3.encode(encoder, offset + 25, depth)?;
4959 self.4.encode(encoder, offset + 28, depth)?;
4960 self.5.encode(encoder, offset + 40, depth)?;
4961 Ok(())
4962 }
4963 }
4964
4965 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ServingApInfo {
4966 #[inline(always)]
4967 fn new_empty() -> Self {
4968 Self {
4969 bssid: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
4970 ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
4971 rssi_dbm: fidl::new_empty!(i8, D),
4972 snr_db: fidl::new_empty!(i8, D),
4973 channel: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::WlanChannel, D),
4974 protection: fidl::new_empty!(Protection, D),
4975 }
4976 }
4977
4978 #[inline]
4979 unsafe fn decode(
4980 &mut self,
4981 decoder: &mut fidl::encoding::Decoder<'_, D>,
4982 offset: usize,
4983 _depth: fidl::encoding::Depth,
4984 ) -> fidl::Result<()> {
4985 decoder.debug_check_bounds::<Self>(offset);
4986 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
4988 let padval = unsafe { (ptr as *const u64).read_unaligned() };
4989 let mask = 0xffff000000000000u64;
4990 let maskedval = padval & mask;
4991 if maskedval != 0 {
4992 return Err(fidl::Error::NonZeroPadding {
4993 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
4994 });
4995 }
4996 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
4997 let padval = unsafe { (ptr as *const u64).read_unaligned() };
4998 let mask = 0xffff0000u64;
4999 let maskedval = padval & mask;
5000 if maskedval != 0 {
5001 return Err(fidl::Error::NonZeroPadding {
5002 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
5003 });
5004 }
5005 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
5006 let padval = unsafe { (ptr as *const u64).read_unaligned() };
5007 let mask = 0xffffffff00000000u64;
5008 let maskedval = padval & mask;
5009 if maskedval != 0 {
5010 return Err(fidl::Error::NonZeroPadding {
5011 padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
5012 });
5013 }
5014 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.bssid, decoder, offset + 0, _depth)?;
5015 fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 8, _depth)?;
5016 fidl::decode!(i8, D, &mut self.rssi_dbm, decoder, offset + 24, _depth)?;
5017 fidl::decode!(i8, D, &mut self.snr_db, decoder, offset + 25, _depth)?;
5018 fidl::decode!(
5019 fidl_fuchsia_wlan_ieee80211__common::WlanChannel,
5020 D,
5021 &mut self.channel,
5022 decoder,
5023 offset + 28,
5024 _depth
5025 )?;
5026 fidl::decode!(Protection, D, &mut self.protection, decoder, offset + 40, _depth)?;
5027 Ok(())
5028 }
5029 }
5030
5031 impl fidl::encoding::ValueTypeMarker for TelemetryGetHistogramStatsResponse {
5032 type Borrowed<'a> = &'a Self;
5033 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5034 value
5035 }
5036 }
5037
5038 unsafe impl fidl::encoding::TypeMarker for TelemetryGetHistogramStatsResponse {
5039 type Owned = Self;
5040
5041 #[inline(always)]
5042 fn inline_align(_context: fidl::encoding::Context) -> usize {
5043 8
5044 }
5045
5046 #[inline(always)]
5047 fn inline_size(_context: fidl::encoding::Context) -> usize {
5048 16
5049 }
5050 }
5051
5052 unsafe impl<D: fidl::encoding::ResourceDialect>
5053 fidl::encoding::Encode<TelemetryGetHistogramStatsResponse, D>
5054 for &TelemetryGetHistogramStatsResponse
5055 {
5056 #[inline]
5057 unsafe fn encode(
5058 self,
5059 encoder: &mut fidl::encoding::Encoder<'_, D>,
5060 offset: usize,
5061 _depth: fidl::encoding::Depth,
5062 ) -> fidl::Result<()> {
5063 encoder.debug_check_bounds::<TelemetryGetHistogramStatsResponse>(offset);
5064 fidl::encoding::Encode::<TelemetryGetHistogramStatsResponse, D>::encode(
5066 (
5067 <fidl_fuchsia_wlan_stats__common::IfaceHistogramStats as fidl::encoding::ValueTypeMarker>::borrow(&self.stats),
5068 ),
5069 encoder, offset, _depth
5070 )
5071 }
5072 }
5073 unsafe impl<
5074 D: fidl::encoding::ResourceDialect,
5075 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_stats__common::IfaceHistogramStats, D>,
5076 > fidl::encoding::Encode<TelemetryGetHistogramStatsResponse, D> for (T0,)
5077 {
5078 #[inline]
5079 unsafe fn encode(
5080 self,
5081 encoder: &mut fidl::encoding::Encoder<'_, D>,
5082 offset: usize,
5083 depth: fidl::encoding::Depth,
5084 ) -> fidl::Result<()> {
5085 encoder.debug_check_bounds::<TelemetryGetHistogramStatsResponse>(offset);
5086 self.0.encode(encoder, offset + 0, depth)?;
5090 Ok(())
5091 }
5092 }
5093
5094 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5095 for TelemetryGetHistogramStatsResponse
5096 {
5097 #[inline(always)]
5098 fn new_empty() -> Self {
5099 Self {
5100 stats: fidl::new_empty!(fidl_fuchsia_wlan_stats__common::IfaceHistogramStats, D),
5101 }
5102 }
5103
5104 #[inline]
5105 unsafe fn decode(
5106 &mut self,
5107 decoder: &mut fidl::encoding::Decoder<'_, D>,
5108 offset: usize,
5109 _depth: fidl::encoding::Depth,
5110 ) -> fidl::Result<()> {
5111 decoder.debug_check_bounds::<Self>(offset);
5112 fidl::decode!(
5114 fidl_fuchsia_wlan_stats__common::IfaceHistogramStats,
5115 D,
5116 &mut self.stats,
5117 decoder,
5118 offset + 0,
5119 _depth
5120 )?;
5121 Ok(())
5122 }
5123 }
5124
5125 impl fidl::encoding::ValueTypeMarker for TelemetryGetIfaceStatsResponse {
5126 type Borrowed<'a> = &'a Self;
5127 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5128 value
5129 }
5130 }
5131
5132 unsafe impl fidl::encoding::TypeMarker for TelemetryGetIfaceStatsResponse {
5133 type Owned = Self;
5134
5135 #[inline(always)]
5136 fn inline_align(_context: fidl::encoding::Context) -> usize {
5137 8
5138 }
5139
5140 #[inline(always)]
5141 fn inline_size(_context: fidl::encoding::Context) -> usize {
5142 16
5143 }
5144 }
5145
5146 unsafe impl<D: fidl::encoding::ResourceDialect>
5147 fidl::encoding::Encode<TelemetryGetIfaceStatsResponse, D>
5148 for &TelemetryGetIfaceStatsResponse
5149 {
5150 #[inline]
5151 unsafe fn encode(
5152 self,
5153 encoder: &mut fidl::encoding::Encoder<'_, D>,
5154 offset: usize,
5155 _depth: fidl::encoding::Depth,
5156 ) -> fidl::Result<()> {
5157 encoder.debug_check_bounds::<TelemetryGetIfaceStatsResponse>(offset);
5158 fidl::encoding::Encode::<TelemetryGetIfaceStatsResponse, D>::encode(
5160 (
5161 <fidl_fuchsia_wlan_stats__common::IfaceStats as fidl::encoding::ValueTypeMarker>::borrow(&self.stats),
5162 ),
5163 encoder, offset, _depth
5164 )
5165 }
5166 }
5167 unsafe impl<
5168 D: fidl::encoding::ResourceDialect,
5169 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_stats__common::IfaceStats, D>,
5170 > fidl::encoding::Encode<TelemetryGetIfaceStatsResponse, D> for (T0,)
5171 {
5172 #[inline]
5173 unsafe fn encode(
5174 self,
5175 encoder: &mut fidl::encoding::Encoder<'_, D>,
5176 offset: usize,
5177 depth: fidl::encoding::Depth,
5178 ) -> fidl::Result<()> {
5179 encoder.debug_check_bounds::<TelemetryGetIfaceStatsResponse>(offset);
5180 self.0.encode(encoder, offset + 0, depth)?;
5184 Ok(())
5185 }
5186 }
5187
5188 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5189 for TelemetryGetIfaceStatsResponse
5190 {
5191 #[inline(always)]
5192 fn new_empty() -> Self {
5193 Self { stats: fidl::new_empty!(fidl_fuchsia_wlan_stats__common::IfaceStats, D) }
5194 }
5195
5196 #[inline]
5197 unsafe fn decode(
5198 &mut self,
5199 decoder: &mut fidl::encoding::Decoder<'_, D>,
5200 offset: usize,
5201 _depth: fidl::encoding::Depth,
5202 ) -> fidl::Result<()> {
5203 decoder.debug_check_bounds::<Self>(offset);
5204 fidl::decode!(
5206 fidl_fuchsia_wlan_stats__common::IfaceStats,
5207 D,
5208 &mut self.stats,
5209 decoder,
5210 offset + 0,
5211 _depth
5212 )?;
5213 Ok(())
5214 }
5215 }
5216
5217 impl fidl::encoding::ValueTypeMarker for TelemetryGetSignalReportResponse {
5218 type Borrowed<'a> = &'a Self;
5219 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5220 value
5221 }
5222 }
5223
5224 unsafe impl fidl::encoding::TypeMarker for TelemetryGetSignalReportResponse {
5225 type Owned = Self;
5226
5227 #[inline(always)]
5228 fn inline_align(_context: fidl::encoding::Context) -> usize {
5229 8
5230 }
5231
5232 #[inline(always)]
5233 fn inline_size(_context: fidl::encoding::Context) -> usize {
5234 16
5235 }
5236 }
5237
5238 unsafe impl<D: fidl::encoding::ResourceDialect>
5239 fidl::encoding::Encode<TelemetryGetSignalReportResponse, D>
5240 for &TelemetryGetSignalReportResponse
5241 {
5242 #[inline]
5243 unsafe fn encode(
5244 self,
5245 encoder: &mut fidl::encoding::Encoder<'_, D>,
5246 offset: usize,
5247 _depth: fidl::encoding::Depth,
5248 ) -> fidl::Result<()> {
5249 encoder.debug_check_bounds::<TelemetryGetSignalReportResponse>(offset);
5250 fidl::encoding::Encode::<TelemetryGetSignalReportResponse, D>::encode(
5252 (
5253 <fidl_fuchsia_wlan_stats__common::SignalReport as fidl::encoding::ValueTypeMarker>::borrow(&self.stats),
5254 ),
5255 encoder, offset, _depth
5256 )
5257 }
5258 }
5259 unsafe impl<
5260 D: fidl::encoding::ResourceDialect,
5261 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_stats__common::SignalReport, D>,
5262 > fidl::encoding::Encode<TelemetryGetSignalReportResponse, D> for (T0,)
5263 {
5264 #[inline]
5265 unsafe fn encode(
5266 self,
5267 encoder: &mut fidl::encoding::Encoder<'_, D>,
5268 offset: usize,
5269 depth: fidl::encoding::Depth,
5270 ) -> fidl::Result<()> {
5271 encoder.debug_check_bounds::<TelemetryGetSignalReportResponse>(offset);
5272 self.0.encode(encoder, offset + 0, depth)?;
5276 Ok(())
5277 }
5278 }
5279
5280 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5281 for TelemetryGetSignalReportResponse
5282 {
5283 #[inline(always)]
5284 fn new_empty() -> Self {
5285 Self { stats: fidl::new_empty!(fidl_fuchsia_wlan_stats__common::SignalReport, D) }
5286 }
5287
5288 #[inline]
5289 unsafe fn decode(
5290 &mut self,
5291 decoder: &mut fidl::encoding::Decoder<'_, D>,
5292 offset: usize,
5293 _depth: fidl::encoding::Depth,
5294 ) -> fidl::Result<()> {
5295 decoder.debug_check_bounds::<Self>(offset);
5296 fidl::decode!(
5298 fidl_fuchsia_wlan_stats__common::SignalReport,
5299 D,
5300 &mut self.stats,
5301 decoder,
5302 offset + 0,
5303 _depth
5304 )?;
5305 Ok(())
5306 }
5307 }
5308
5309 impl fidl::encoding::ValueTypeMarker for TelemetryQueryTelemetrySupportResponse {
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 TelemetryQueryTelemetrySupportResponse {
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<TelemetryQueryTelemetrySupportResponse, D>
5332 for &TelemetryQueryTelemetrySupportResponse
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::<TelemetryQueryTelemetrySupportResponse>(offset);
5342 fidl::encoding::Encode::<TelemetryQueryTelemetrySupportResponse, D>::encode(
5344 (
5345 <fidl_fuchsia_wlan_stats__common::TelemetrySupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
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::TelemetrySupport, D>,
5354 > fidl::encoding::Encode<TelemetryQueryTelemetrySupportResponse, 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::<TelemetryQueryTelemetrySupportResponse>(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 TelemetryQueryTelemetrySupportResponse
5374 {
5375 #[inline(always)]
5376 fn new_empty() -> Self {
5377 Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_stats__common::TelemetrySupport, 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::TelemetrySupport,
5391 D,
5392 &mut self.resp,
5393 decoder,
5394 offset + 0,
5395 _depth
5396 )?;
5397 Ok(())
5398 }
5399 }
5400
5401 impl fidl::encoding::ValueTypeMarker for ClientStatusResponse {
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 ClientStatusResponse {
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> fidl::encoding::Encode<ClientStatusResponse, D>
5423 for &ClientStatusResponse
5424 {
5425 #[inline]
5426 unsafe fn encode(
5427 self,
5428 encoder: &mut fidl::encoding::Encoder<'_, D>,
5429 offset: usize,
5430 _depth: fidl::encoding::Depth,
5431 ) -> fidl::Result<()> {
5432 encoder.debug_check_bounds::<ClientStatusResponse>(offset);
5433 encoder.write_num::<u64>(self.ordinal(), offset);
5434 match self {
5435 ClientStatusResponse::Connected(ref val) => {
5436 fidl::encoding::encode_in_envelope::<ServingApInfo, D>(
5437 <ServingApInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
5438 encoder,
5439 offset + 8,
5440 _depth,
5441 )
5442 }
5443 ClientStatusResponse::Connecting(ref val) => {
5444 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<u8, 32>, D>(
5445 <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
5446 val,
5447 ),
5448 encoder,
5449 offset + 8,
5450 _depth,
5451 )
5452 }
5453 ClientStatusResponse::Idle(ref val) => {
5454 fidl::encoding::encode_in_envelope::<Empty, D>(
5455 <Empty as fidl::encoding::ValueTypeMarker>::borrow(val),
5456 encoder,
5457 offset + 8,
5458 _depth,
5459 )
5460 }
5461 ClientStatusResponse::Roaming(ref val) => fidl::encoding::encode_in_envelope::<
5462 fidl::encoding::Array<u8, 6>,
5463 D,
5464 >(
5465 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(val),
5466 encoder,
5467 offset + 8,
5468 _depth,
5469 ),
5470 }
5471 }
5472 }
5473
5474 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ClientStatusResponse {
5475 #[inline(always)]
5476 fn new_empty() -> Self {
5477 Self::Connected(fidl::new_empty!(ServingApInfo, D))
5478 }
5479
5480 #[inline]
5481 unsafe fn decode(
5482 &mut self,
5483 decoder: &mut fidl::encoding::Decoder<'_, D>,
5484 offset: usize,
5485 mut depth: fidl::encoding::Depth,
5486 ) -> fidl::Result<()> {
5487 decoder.debug_check_bounds::<Self>(offset);
5488 #[allow(unused_variables)]
5489 let next_out_of_line = decoder.next_out_of_line();
5490 let handles_before = decoder.remaining_handles();
5491 let (ordinal, inlined, num_bytes, num_handles) =
5492 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
5493
5494 let member_inline_size = match ordinal {
5495 1 => <ServingApInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5496 2 => <fidl::encoding::Vector<u8, 32> as fidl::encoding::TypeMarker>::inline_size(
5497 decoder.context,
5498 ),
5499 3 => <Empty as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5500 4 => <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
5501 decoder.context,
5502 ),
5503 _ => return Err(fidl::Error::UnknownUnionTag),
5504 };
5505
5506 if inlined != (member_inline_size <= 4) {
5507 return Err(fidl::Error::InvalidInlineBitInEnvelope);
5508 }
5509 let _inner_offset;
5510 if inlined {
5511 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
5512 _inner_offset = offset + 8;
5513 } else {
5514 depth.increment()?;
5515 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5516 }
5517 match ordinal {
5518 1 => {
5519 #[allow(irrefutable_let_patterns)]
5520 if let ClientStatusResponse::Connected(_) = self {
5521 } else {
5523 *self = ClientStatusResponse::Connected(fidl::new_empty!(ServingApInfo, D));
5525 }
5526 #[allow(irrefutable_let_patterns)]
5527 if let ClientStatusResponse::Connected(ref mut val) = self {
5528 fidl::decode!(ServingApInfo, D, val, decoder, _inner_offset, depth)?;
5529 } else {
5530 unreachable!()
5531 }
5532 }
5533 2 => {
5534 #[allow(irrefutable_let_patterns)]
5535 if let ClientStatusResponse::Connecting(_) = self {
5536 } else {
5538 *self = ClientStatusResponse::Connecting(
5540 fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
5541 );
5542 }
5543 #[allow(irrefutable_let_patterns)]
5544 if let ClientStatusResponse::Connecting(ref mut val) = self {
5545 fidl::decode!(fidl::encoding::Vector<u8, 32>, D, val, decoder, _inner_offset, depth)?;
5546 } else {
5547 unreachable!()
5548 }
5549 }
5550 3 => {
5551 #[allow(irrefutable_let_patterns)]
5552 if let ClientStatusResponse::Idle(_) = self {
5553 } else {
5555 *self = ClientStatusResponse::Idle(fidl::new_empty!(Empty, D));
5557 }
5558 #[allow(irrefutable_let_patterns)]
5559 if let ClientStatusResponse::Idle(ref mut val) = self {
5560 fidl::decode!(Empty, D, val, decoder, _inner_offset, depth)?;
5561 } else {
5562 unreachable!()
5563 }
5564 }
5565 4 => {
5566 #[allow(irrefutable_let_patterns)]
5567 if let ClientStatusResponse::Roaming(_) = self {
5568 } else {
5570 *self = ClientStatusResponse::Roaming(
5572 fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
5573 );
5574 }
5575 #[allow(irrefutable_let_patterns)]
5576 if let ClientStatusResponse::Roaming(ref mut val) = self {
5577 fidl::decode!(fidl::encoding::Array<u8, 6>, D, val, decoder, _inner_offset, depth)?;
5578 } else {
5579 unreachable!()
5580 }
5581 }
5582 ordinal => panic!("unexpected ordinal {:?}", ordinal),
5583 }
5584 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
5585 return Err(fidl::Error::InvalidNumBytesInEnvelope);
5586 }
5587 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5588 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5589 }
5590 Ok(())
5591 }
5592 }
5593
5594 impl fidl::encoding::ValueTypeMarker for Compatibility {
5595 type Borrowed<'a> = &'a Self;
5596 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5597 value
5598 }
5599 }
5600
5601 unsafe impl fidl::encoding::TypeMarker for Compatibility {
5602 type Owned = Self;
5603
5604 #[inline(always)]
5605 fn inline_align(_context: fidl::encoding::Context) -> usize {
5606 8
5607 }
5608
5609 #[inline(always)]
5610 fn inline_size(_context: fidl::encoding::Context) -> usize {
5611 16
5612 }
5613 }
5614
5615 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Compatibility, D>
5616 for &Compatibility
5617 {
5618 #[inline]
5619 unsafe fn encode(
5620 self,
5621 encoder: &mut fidl::encoding::Encoder<'_, D>,
5622 offset: usize,
5623 _depth: fidl::encoding::Depth,
5624 ) -> fidl::Result<()> {
5625 encoder.debug_check_bounds::<Compatibility>(offset);
5626 encoder.write_num::<u64>(self.ordinal(), offset);
5627 match self {
5628 Compatibility::Compatible(ref val) => {
5629 fidl::encoding::encode_in_envelope::<Compatible, D>(
5630 <Compatible as fidl::encoding::ValueTypeMarker>::borrow(val),
5631 encoder,
5632 offset + 8,
5633 _depth,
5634 )
5635 }
5636 Compatibility::Incompatible(ref val) => {
5637 fidl::encoding::encode_in_envelope::<Incompatible, D>(
5638 <Incompatible as fidl::encoding::ValueTypeMarker>::borrow(val),
5639 encoder,
5640 offset + 8,
5641 _depth,
5642 )
5643 }
5644 }
5645 }
5646 }
5647
5648 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Compatibility {
5649 #[inline(always)]
5650 fn new_empty() -> Self {
5651 Self::Compatible(fidl::new_empty!(Compatible, D))
5652 }
5653
5654 #[inline]
5655 unsafe fn decode(
5656 &mut self,
5657 decoder: &mut fidl::encoding::Decoder<'_, D>,
5658 offset: usize,
5659 mut depth: fidl::encoding::Depth,
5660 ) -> fidl::Result<()> {
5661 decoder.debug_check_bounds::<Self>(offset);
5662 #[allow(unused_variables)]
5663 let next_out_of_line = decoder.next_out_of_line();
5664 let handles_before = decoder.remaining_handles();
5665 let (ordinal, inlined, num_bytes, num_handles) =
5666 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
5667
5668 let member_inline_size = match ordinal {
5669 1 => <Compatible as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5670 2 => <Incompatible as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5671 _ => return Err(fidl::Error::UnknownUnionTag),
5672 };
5673
5674 if inlined != (member_inline_size <= 4) {
5675 return Err(fidl::Error::InvalidInlineBitInEnvelope);
5676 }
5677 let _inner_offset;
5678 if inlined {
5679 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
5680 _inner_offset = offset + 8;
5681 } else {
5682 depth.increment()?;
5683 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5684 }
5685 match ordinal {
5686 1 => {
5687 #[allow(irrefutable_let_patterns)]
5688 if let Compatibility::Compatible(_) = self {
5689 } else {
5691 *self = Compatibility::Compatible(fidl::new_empty!(Compatible, D));
5693 }
5694 #[allow(irrefutable_let_patterns)]
5695 if let Compatibility::Compatible(ref mut val) = self {
5696 fidl::decode!(Compatible, D, val, decoder, _inner_offset, depth)?;
5697 } else {
5698 unreachable!()
5699 }
5700 }
5701 2 => {
5702 #[allow(irrefutable_let_patterns)]
5703 if let Compatibility::Incompatible(_) = self {
5704 } else {
5706 *self = Compatibility::Incompatible(fidl::new_empty!(Incompatible, D));
5708 }
5709 #[allow(irrefutable_let_patterns)]
5710 if let Compatibility::Incompatible(ref mut val) = self {
5711 fidl::decode!(Incompatible, D, val, decoder, _inner_offset, depth)?;
5712 } else {
5713 unreachable!()
5714 }
5715 }
5716 ordinal => panic!("unexpected ordinal {:?}", ordinal),
5717 }
5718 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
5719 return Err(fidl::Error::InvalidNumBytesInEnvelope);
5720 }
5721 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5722 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5723 }
5724 Ok(())
5725 }
5726 }
5727
5728 impl fidl::encoding::ValueTypeMarker for DisconnectSource {
5729 type Borrowed<'a> = &'a Self;
5730 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5731 value
5732 }
5733 }
5734
5735 unsafe impl fidl::encoding::TypeMarker for DisconnectSource {
5736 type Owned = Self;
5737
5738 #[inline(always)]
5739 fn inline_align(_context: fidl::encoding::Context) -> usize {
5740 8
5741 }
5742
5743 #[inline(always)]
5744 fn inline_size(_context: fidl::encoding::Context) -> usize {
5745 16
5746 }
5747 }
5748
5749 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisconnectSource, D>
5750 for &DisconnectSource
5751 {
5752 #[inline]
5753 unsafe fn encode(
5754 self,
5755 encoder: &mut fidl::encoding::Encoder<'_, D>,
5756 offset: usize,
5757 _depth: fidl::encoding::Depth,
5758 ) -> fidl::Result<()> {
5759 encoder.debug_check_bounds::<DisconnectSource>(offset);
5760 encoder.write_num::<u64>(self.ordinal(), offset);
5761 match self {
5762 DisconnectSource::Ap(ref val) => {
5763 fidl::encoding::encode_in_envelope::<DisconnectCause, D>(
5764 <DisconnectCause as fidl::encoding::ValueTypeMarker>::borrow(val),
5765 encoder,
5766 offset + 8,
5767 _depth,
5768 )
5769 }
5770 DisconnectSource::User(ref val) => {
5771 fidl::encoding::encode_in_envelope::<UserDisconnectReason, D>(
5772 <UserDisconnectReason as fidl::encoding::ValueTypeMarker>::borrow(val),
5773 encoder,
5774 offset + 8,
5775 _depth,
5776 )
5777 }
5778 DisconnectSource::Mlme(ref val) => {
5779 fidl::encoding::encode_in_envelope::<DisconnectCause, D>(
5780 <DisconnectCause as fidl::encoding::ValueTypeMarker>::borrow(val),
5781 encoder,
5782 offset + 8,
5783 _depth,
5784 )
5785 }
5786 }
5787 }
5788 }
5789
5790 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisconnectSource {
5791 #[inline(always)]
5792 fn new_empty() -> Self {
5793 Self::Ap(fidl::new_empty!(DisconnectCause, D))
5794 }
5795
5796 #[inline]
5797 unsafe fn decode(
5798 &mut self,
5799 decoder: &mut fidl::encoding::Decoder<'_, D>,
5800 offset: usize,
5801 mut depth: fidl::encoding::Depth,
5802 ) -> fidl::Result<()> {
5803 decoder.debug_check_bounds::<Self>(offset);
5804 #[allow(unused_variables)]
5805 let next_out_of_line = decoder.next_out_of_line();
5806 let handles_before = decoder.remaining_handles();
5807 let (ordinal, inlined, num_bytes, num_handles) =
5808 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
5809
5810 let member_inline_size = match ordinal {
5811 1 => <DisconnectCause as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5812 2 => <UserDisconnectReason as fidl::encoding::TypeMarker>::inline_size(
5813 decoder.context,
5814 ),
5815 3 => <DisconnectCause as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5816 _ => return Err(fidl::Error::UnknownUnionTag),
5817 };
5818
5819 if inlined != (member_inline_size <= 4) {
5820 return Err(fidl::Error::InvalidInlineBitInEnvelope);
5821 }
5822 let _inner_offset;
5823 if inlined {
5824 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
5825 _inner_offset = offset + 8;
5826 } else {
5827 depth.increment()?;
5828 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5829 }
5830 match ordinal {
5831 1 => {
5832 #[allow(irrefutable_let_patterns)]
5833 if let DisconnectSource::Ap(_) = self {
5834 } else {
5836 *self = DisconnectSource::Ap(fidl::new_empty!(DisconnectCause, D));
5838 }
5839 #[allow(irrefutable_let_patterns)]
5840 if let DisconnectSource::Ap(ref mut val) = self {
5841 fidl::decode!(DisconnectCause, D, val, decoder, _inner_offset, depth)?;
5842 } else {
5843 unreachable!()
5844 }
5845 }
5846 2 => {
5847 #[allow(irrefutable_let_patterns)]
5848 if let DisconnectSource::User(_) = self {
5849 } else {
5851 *self = DisconnectSource::User(fidl::new_empty!(UserDisconnectReason, D));
5853 }
5854 #[allow(irrefutable_let_patterns)]
5855 if let DisconnectSource::User(ref mut val) = self {
5856 fidl::decode!(UserDisconnectReason, D, val, decoder, _inner_offset, depth)?;
5857 } else {
5858 unreachable!()
5859 }
5860 }
5861 3 => {
5862 #[allow(irrefutable_let_patterns)]
5863 if let DisconnectSource::Mlme(_) = self {
5864 } else {
5866 *self = DisconnectSource::Mlme(fidl::new_empty!(DisconnectCause, D));
5868 }
5869 #[allow(irrefutable_let_patterns)]
5870 if let DisconnectSource::Mlme(ref mut val) = self {
5871 fidl::decode!(DisconnectCause, D, val, decoder, _inner_offset, depth)?;
5872 } else {
5873 unreachable!()
5874 }
5875 }
5876 ordinal => panic!("unexpected ordinal {:?}", ordinal),
5877 }
5878 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
5879 return Err(fidl::Error::InvalidNumBytesInEnvelope);
5880 }
5881 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5882 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5883 }
5884 Ok(())
5885 }
5886 }
5887
5888 impl fidl::encoding::ValueTypeMarker for ScanRequest {
5889 type Borrowed<'a> = &'a Self;
5890 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5891 value
5892 }
5893 }
5894
5895 unsafe impl fidl::encoding::TypeMarker for ScanRequest {
5896 type Owned = Self;
5897
5898 #[inline(always)]
5899 fn inline_align(_context: fidl::encoding::Context) -> usize {
5900 8
5901 }
5902
5903 #[inline(always)]
5904 fn inline_size(_context: fidl::encoding::Context) -> usize {
5905 16
5906 }
5907 }
5908
5909 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ScanRequest, D>
5910 for &ScanRequest
5911 {
5912 #[inline]
5913 unsafe fn encode(
5914 self,
5915 encoder: &mut fidl::encoding::Encoder<'_, D>,
5916 offset: usize,
5917 _depth: fidl::encoding::Depth,
5918 ) -> fidl::Result<()> {
5919 encoder.debug_check_bounds::<ScanRequest>(offset);
5920 encoder.write_num::<u64>(self.ordinal(), offset);
5921 match self {
5922 ScanRequest::Active(ref val) => {
5923 fidl::encoding::encode_in_envelope::<ActiveScanRequest, D>(
5924 <ActiveScanRequest as fidl::encoding::ValueTypeMarker>::borrow(val),
5925 encoder,
5926 offset + 8,
5927 _depth,
5928 )
5929 }
5930 ScanRequest::Passive(ref val) => {
5931 fidl::encoding::encode_in_envelope::<PassiveScanRequest, D>(
5932 <PassiveScanRequest as fidl::encoding::ValueTypeMarker>::borrow(val),
5933 encoder,
5934 offset + 8,
5935 _depth,
5936 )
5937 }
5938 }
5939 }
5940 }
5941
5942 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanRequest {
5943 #[inline(always)]
5944 fn new_empty() -> Self {
5945 Self::Active(fidl::new_empty!(ActiveScanRequest, D))
5946 }
5947
5948 #[inline]
5949 unsafe fn decode(
5950 &mut self,
5951 decoder: &mut fidl::encoding::Decoder<'_, D>,
5952 offset: usize,
5953 mut depth: fidl::encoding::Depth,
5954 ) -> fidl::Result<()> {
5955 decoder.debug_check_bounds::<Self>(offset);
5956 #[allow(unused_variables)]
5957 let next_out_of_line = decoder.next_out_of_line();
5958 let handles_before = decoder.remaining_handles();
5959 let (ordinal, inlined, num_bytes, num_handles) =
5960 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
5961
5962 let member_inline_size = match ordinal {
5963 1 => {
5964 <ActiveScanRequest as fidl::encoding::TypeMarker>::inline_size(decoder.context)
5965 }
5966 2 => {
5967 <PassiveScanRequest as fidl::encoding::TypeMarker>::inline_size(decoder.context)
5968 }
5969 _ => return Err(fidl::Error::UnknownUnionTag),
5970 };
5971
5972 if inlined != (member_inline_size <= 4) {
5973 return Err(fidl::Error::InvalidInlineBitInEnvelope);
5974 }
5975 let _inner_offset;
5976 if inlined {
5977 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
5978 _inner_offset = offset + 8;
5979 } else {
5980 depth.increment()?;
5981 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5982 }
5983 match ordinal {
5984 1 => {
5985 #[allow(irrefutable_let_patterns)]
5986 if let ScanRequest::Active(_) = self {
5987 } else {
5989 *self = ScanRequest::Active(fidl::new_empty!(ActiveScanRequest, D));
5991 }
5992 #[allow(irrefutable_let_patterns)]
5993 if let ScanRequest::Active(ref mut val) = self {
5994 fidl::decode!(ActiveScanRequest, D, val, decoder, _inner_offset, depth)?;
5995 } else {
5996 unreachable!()
5997 }
5998 }
5999 2 => {
6000 #[allow(irrefutable_let_patterns)]
6001 if let ScanRequest::Passive(_) = self {
6002 } else {
6004 *self = ScanRequest::Passive(fidl::new_empty!(PassiveScanRequest, D));
6006 }
6007 #[allow(irrefutable_let_patterns)]
6008 if let ScanRequest::Passive(ref mut val) = self {
6009 fidl::decode!(PassiveScanRequest, D, val, decoder, _inner_offset, depth)?;
6010 } else {
6011 unreachable!()
6012 }
6013 }
6014 ordinal => panic!("unexpected ordinal {:?}", ordinal),
6015 }
6016 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
6017 return Err(fidl::Error::InvalidNumBytesInEnvelope);
6018 }
6019 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6020 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6021 }
6022 Ok(())
6023 }
6024 }
6025}