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