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