fidl_fuchsia_wlan_sme__common/
fidl_fuchsia_wlan_sme__common.rs

1// WARNING: This file is machine generated by fidlgen.
2
3#![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/// Security protection which should mirror the Protection enum defined in wlan lib common
45#[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}
61
62impl Protection {
63    #[inline]
64    pub fn from_primitive(prim: u32) -> Option<Self> {
65        match prim {
66            0 => Some(Self::Unknown),
67            1 => Some(Self::Open),
68            2 => Some(Self::Wep),
69            3 => Some(Self::Wpa1),
70            4 => Some(Self::Wpa1Wpa2PersonalTkipOnly),
71            5 => Some(Self::Wpa2PersonalTkipOnly),
72            6 => Some(Self::Wpa1Wpa2Personal),
73            7 => Some(Self::Wpa2Personal),
74            8 => Some(Self::Wpa2Wpa3Personal),
75            9 => Some(Self::Wpa3Personal),
76            10 => Some(Self::Wpa2Enterprise),
77            11 => Some(Self::Wpa3Enterprise),
78            _ => None,
79        }
80    }
81
82    #[inline]
83    pub const fn into_primitive(self) -> u32 {
84        self as u32
85    }
86}
87
88#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
89#[repr(u32)]
90pub enum ScanErrorCode {
91    NotSupported = 1,
92    InternalError = 2,
93    InternalMlmeError = 3,
94    ShouldWait = 4,
95    CanceledByDriverOrFirmware = 5,
96}
97
98impl ScanErrorCode {
99    #[inline]
100    pub fn from_primitive(prim: u32) -> Option<Self> {
101        match prim {
102            1 => Some(Self::NotSupported),
103            2 => Some(Self::InternalError),
104            3 => Some(Self::InternalMlmeError),
105            4 => Some(Self::ShouldWait),
106            5 => Some(Self::CanceledByDriverOrFirmware),
107            _ => None,
108        }
109    }
110
111    #[inline]
112    pub const fn into_primitive(self) -> u32 {
113        self as u32
114    }
115}
116
117#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
118#[repr(u32)]
119pub enum StartApResultCode {
120    Success = 0,
121    AlreadyStarted = 1,
122    InternalError = 2,
123    Canceled = 3,
124    TimedOut = 4,
125    PreviousStartInProgress = 5,
126    InvalidArguments = 6,
127}
128
129impl StartApResultCode {
130    #[inline]
131    pub fn from_primitive(prim: u32) -> Option<Self> {
132        match prim {
133            0 => Some(Self::Success),
134            1 => Some(Self::AlreadyStarted),
135            2 => Some(Self::InternalError),
136            3 => Some(Self::Canceled),
137            4 => Some(Self::TimedOut),
138            5 => Some(Self::PreviousStartInProgress),
139            6 => Some(Self::InvalidArguments),
140            _ => None,
141        }
142    }
143
144    #[inline]
145    pub const fn into_primitive(self) -> u32 {
146        self as u32
147    }
148}
149
150#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
151#[repr(u32)]
152pub enum StopApResultCode {
153    Success = 0,
154    InternalError = 1,
155    TimedOut = 2,
156}
157
158impl StopApResultCode {
159    #[inline]
160    pub fn from_primitive(prim: u32) -> Option<Self> {
161        match prim {
162            0 => Some(Self::Success),
163            1 => Some(Self::InternalError),
164            2 => Some(Self::TimedOut),
165            _ => None,
166        }
167    }
168
169    #[inline]
170    pub const fn into_primitive(self) -> u32 {
171        self as u32
172    }
173}
174
175#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
176#[repr(u32)]
177pub enum UserDisconnectReason {
178    Unknown = 0,
179    FailedToConnect = 1,
180    FidlConnectRequest = 2,
181    FidlStopClientConnectionsRequest = 3,
182    ProactiveNetworkSwitch = 4,
183    DisconnectDetectedFromSme = 5,
184    RegulatoryRegionChange = 6,
185    Startup = 7,
186    NetworkUnsaved = 8,
187    NetworkConfigUpdated = 9,
188    Recovery = 10,
189    WlanstackUnitTesting = 124,
190    WlanSmeUnitTesting = 125,
191    WlanServiceUtilTesting = 126,
192    WlanDevTool = 127,
193}
194
195impl UserDisconnectReason {
196    #[inline]
197    pub fn from_primitive(prim: u32) -> Option<Self> {
198        match prim {
199            0 => Some(Self::Unknown),
200            1 => Some(Self::FailedToConnect),
201            2 => Some(Self::FidlConnectRequest),
202            3 => Some(Self::FidlStopClientConnectionsRequest),
203            4 => Some(Self::ProactiveNetworkSwitch),
204            5 => Some(Self::DisconnectDetectedFromSme),
205            6 => Some(Self::RegulatoryRegionChange),
206            7 => Some(Self::Startup),
207            8 => Some(Self::NetworkUnsaved),
208            9 => Some(Self::NetworkConfigUpdated),
209            10 => Some(Self::Recovery),
210            124 => Some(Self::WlanstackUnitTesting),
211            125 => Some(Self::WlanSmeUnitTesting),
212            126 => Some(Self::WlanServiceUtilTesting),
213            127 => Some(Self::WlanDevTool),
214            _ => None,
215        }
216    }
217
218    #[inline]
219    pub const fn into_primitive(self) -> u32 {
220        self as u32
221    }
222}
223
224#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
225pub struct ActiveScanRequest {
226    /// List of SSIDs to scan for. An empty list of ssids is the same as specifying
227    /// a list containing only the wildcard SSID.
228    ///
229    /// There is no limit on the number of SSIDs specified, but a large number of
230    /// SSIDs may result in extended scan times or the error ZX_ERR_INVALID_ARGS to be
231    /// returned.
232    pub ssids: Vec<Vec<u8>>,
233    /// Channels to scan on. Leave empty for all supported channels.
234    pub channels: Vec<u8>,
235}
236
237impl fidl::Persistable for ActiveScanRequest {}
238
239#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
240pub struct Ap {
241    pub ssid: Vec<u8>,
242    pub channel: u8,
243    pub num_clients: u16,
244}
245
246impl fidl::Persistable for Ap {}
247
248#[derive(Clone, Debug, PartialEq)]
249pub struct ApConfig {
250    pub ssid: Vec<u8>,
251    pub password: Vec<u8>,
252    pub radio_cfg: RadioConfig,
253}
254
255impl fidl::Persistable for ApConfig {}
256
257#[derive(Clone, Debug, PartialEq)]
258pub struct ApSmeStartRequest {
259    pub config: ApConfig,
260}
261
262impl fidl::Persistable for ApSmeStartRequest {}
263
264#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
265pub struct ApSmeStartResponse {
266    pub code: StartApResultCode,
267}
268
269impl fidl::Persistable for ApSmeStartResponse {}
270
271#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
272pub struct ApSmeStatusResponse {
273    pub resp: ApStatusResponse,
274}
275
276impl fidl::Persistable for ApSmeStatusResponse {}
277
278#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
279pub struct ApSmeStopResponse {
280    pub code: StopApResultCode,
281}
282
283impl fidl::Persistable for ApSmeStopResponse {}
284
285#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
286pub struct ApStatusResponse {
287    pub running_ap: Option<Box<Ap>>,
288}
289
290impl fidl::Persistable for ApStatusResponse {}
291
292#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
293pub struct ClientSmeDisconnectRequest {
294    pub reason: UserDisconnectReason,
295}
296
297impl fidl::Persistable for ClientSmeDisconnectRequest {}
298
299#[derive(Clone, Debug, PartialEq)]
300pub struct ClientSmeRoamRequest {
301    pub req: RoamRequest,
302}
303
304impl fidl::Persistable for ClientSmeRoamRequest {}
305
306#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
307#[repr(C)]
308pub struct ClientSmeSetMacAddressRequest {
309    pub mac_addr: [u8; 6],
310}
311
312impl fidl::Persistable for ClientSmeSetMacAddressRequest {}
313
314#[derive(Clone, Debug, PartialEq)]
315pub struct ClientSmeStatusResponse {
316    pub resp: ClientStatusResponse,
317}
318
319impl fidl::Persistable for ClientSmeStatusResponse {}
320
321#[derive(Clone, Debug, PartialEq)]
322pub struct ClientSmeWmmStatusResponse {
323    pub resp: fidl_fuchsia_wlan_internal__common::WmmStatusResponse,
324}
325
326impl fidl::Persistable for ClientSmeWmmStatusResponse {}
327
328#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
329pub struct Compatible {
330    pub mutual_security_protocols: Vec<fidl_fuchsia_wlan_common_security__common::Protocol>,
331}
332
333impl fidl::Persistable for Compatible {}
334
335#[derive(Clone, Debug, PartialEq)]
336pub struct ConnectRequest {
337    pub ssid: Vec<u8>,
338    pub bss_description: fidl_fuchsia_wlan_common__common::BssDescription,
339    /// Informs SME whether multiple candidates were available, for metrics.
340    pub multiple_bss_candidates: bool,
341    /// Authentication method.
342    ///
343    /// Describes how SME authenticates when connecting to the target network.
344    pub authentication: fidl_fuchsia_wlan_common_security__common::Authentication,
345    /// Deprecated. SME makes internal decision on whether to perform a passive or active
346    /// scan during connect. Setting this field will not affect anything for FullMAC, but
347    /// currently SoftMAC still honor this argument.
348    pub deprecated_scan_type: fidl_fuchsia_wlan_common__common::ScanType,
349}
350
351impl fidl::Persistable for ConnectRequest {}
352
353#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
354pub struct ConnectResult {
355    pub code: fidl_fuchsia_wlan_ieee80211__common::StatusCode,
356    /// `is_credential_rejected` is true if connect failure is likely due to wrong credential.
357    /// Policy uses this to determine whether to retry with the same password.
358    pub is_credential_rejected: bool,
359    /// If `is_reconnect` is false, the result comes from the initial connection request.
360    /// If it's true, the result comes from an SME-initiated reconnection.
361    pub is_reconnect: bool,
362}
363
364impl fidl::Persistable for ConnectResult {}
365
366#[derive(Clone, Debug, PartialEq)]
367pub struct ConnectTransactionOnChannelSwitchedRequest {
368    pub info: fidl_fuchsia_wlan_internal__common::ChannelSwitchInfo,
369}
370
371impl fidl::Persistable for ConnectTransactionOnChannelSwitchedRequest {}
372
373#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
374pub struct ConnectTransactionOnConnectResultRequest {
375    pub result: ConnectResult,
376}
377
378impl fidl::Persistable for ConnectTransactionOnConnectResultRequest {}
379
380#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
381pub struct ConnectTransactionOnDisconnectRequest {
382    pub info: DisconnectInfo,
383}
384
385impl fidl::Persistable for ConnectTransactionOnDisconnectRequest {}
386
387#[derive(Clone, Debug, PartialEq)]
388pub struct ConnectTransactionOnRoamResultRequest {
389    pub result: RoamResult,
390}
391
392impl fidl::Persistable for ConnectTransactionOnRoamResultRequest {}
393
394#[derive(Clone, Debug, PartialEq)]
395pub struct ConnectTransactionOnSignalReportRequest {
396    pub ind: fidl_fuchsia_wlan_internal__common::SignalReportIndication,
397}
398
399impl fidl::Persistable for ConnectTransactionOnSignalReportRequest {}
400
401#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
402pub struct DisconnectCause {
403    pub mlme_event_name: DisconnectMlmeEventName,
404    pub reason_code: fidl_fuchsia_wlan_ieee80211__common::ReasonCode,
405}
406
407impl fidl::Persistable for DisconnectCause {}
408
409#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
410pub struct DisconnectInfo {
411    /// Whether SME is attempting to reconnect by itself
412    pub is_sme_reconnecting: bool,
413    /// Where the disconnect originated and associated reason
414    pub disconnect_source: DisconnectSource,
415}
416
417impl fidl::Persistable for DisconnectInfo {}
418
419#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
420pub struct DisjointSecurityProtocol {
421    pub protocol: fidl_fuchsia_wlan_common_security__common::Protocol,
422    pub role: fidl_fuchsia_wlan_common__common::WlanMacRole,
423}
424
425impl fidl::Persistable for DisjointSecurityProtocol {}
426
427/// Empty struct used for union variants with no associated data.
428#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
429pub struct Empty;
430
431impl fidl::Persistable for Empty {}
432
433#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
434pub struct GenericSmeQuery {
435    pub role: fidl_fuchsia_wlan_common__common::WlanMacRole,
436    pub sta_addr: [u8; 6],
437}
438
439impl fidl::Persistable for GenericSmeQuery {}
440
441#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
442pub struct Incompatible {
443    pub description: String,
444    pub disjoint_security_protocols: Option<Vec<DisjointSecurityProtocol>>,
445}
446
447impl fidl::Persistable for Incompatible {}
448
449#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
450pub struct LegacyPrivacySupport {
451    pub wep_supported: bool,
452    pub wpa1_supported: bool,
453}
454
455impl fidl::Persistable for LegacyPrivacySupport {}
456
457#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
458pub struct PassiveScanRequest;
459
460impl fidl::Persistable for PassiveScanRequest {}
461
462#[derive(Clone, Debug, PartialEq)]
463pub struct RadioConfig {
464    pub phy: fidl_fuchsia_wlan_common__common::WlanPhyType,
465    pub channel: fidl_fuchsia_wlan_ieee80211__common::WlanChannel,
466}
467
468impl fidl::Persistable for RadioConfig {}
469
470#[derive(Clone, Debug, PartialEq)]
471pub struct RoamRequest {
472    pub bss_description: fidl_fuchsia_wlan_common__common::BssDescription,
473}
474
475impl fidl::Persistable for RoamRequest {}
476
477/// Result of a roam attempt.
478#[derive(Clone, Debug, PartialEq)]
479pub struct RoamResult {
480    /// BSSID of the selected BSS for this roam attempt.
481    pub bssid: [u8; 6],
482    pub status_code: fidl_fuchsia_wlan_ieee80211__common::StatusCode,
483    /// Whether the original BSS association has been maintained through the roam attempt.
484    /// A successful roam always incurs disassociation from the original BSS, so if `status_code` is
485    /// success then this field must be set to false; a roam failure typically incurs disassociation
486    /// from the original BSS, but may not in some cases (e.g. in some Fast BSS Transition scenarios).
487    pub original_association_maintained: bool,
488    pub bss_description: Option<Box<fidl_fuchsia_wlan_common__common::BssDescription>>,
489    /// If the roam attempt failed and the original association was not maintained, this field must
490    /// be populated; otherwise this field must be empty.
491    pub disconnect_info: Option<Box<DisconnectInfo>>,
492    /// `is_credential_rejected` is true if roam failure is likely due to wrong credential.
493    /// Policy may use this to determine whether to decide whether to roam to this BSS in the future.
494    pub is_credential_rejected: bool,
495}
496
497impl fidl::Persistable for RoamResult {}
498
499#[derive(Clone, Debug, PartialEq)]
500pub struct ScanResult {
501    pub compatibility: Compatibility,
502    pub timestamp_nanos: i64,
503    pub bss_description: fidl_fuchsia_wlan_common__common::BssDescription,
504}
505
506impl fidl::Persistable for ScanResult {}
507
508#[derive(Clone, Debug, PartialEq)]
509pub struct ScanResultVector {
510    pub results: Vec<ScanResult>,
511}
512
513impl fidl::Persistable for ScanResultVector {}
514
515#[derive(Clone, Debug, PartialEq)]
516pub struct ServingApInfo {
517    pub bssid: [u8; 6],
518    pub ssid: Vec<u8>,
519    pub rssi_dbm: i8,
520    pub snr_db: i8,
521    pub channel: fidl_fuchsia_wlan_ieee80211__common::WlanChannel,
522    pub protection: Protection,
523}
524
525impl fidl::Persistable for ServingApInfo {}
526
527#[derive(Clone, Debug, PartialEq)]
528pub struct TelemetryGetHistogramStatsResponse {
529    pub stats: fidl_fuchsia_wlan_stats__common::IfaceHistogramStats,
530}
531
532impl fidl::Persistable for TelemetryGetHistogramStatsResponse {}
533
534#[derive(Clone, Debug, PartialEq)]
535pub struct TelemetryGetIfaceStatsResponse {
536    pub stats: fidl_fuchsia_wlan_stats__common::IfaceStats,
537}
538
539impl fidl::Persistable for TelemetryGetIfaceStatsResponse {}
540
541#[derive(Clone, Debug, PartialEq)]
542pub struct TelemetryGetSignalReportResponse {
543    pub stats: fidl_fuchsia_wlan_stats__common::SignalReport,
544}
545
546impl fidl::Persistable for TelemetryGetSignalReportResponse {}
547
548#[derive(Clone, Debug, PartialEq)]
549pub struct TelemetryQueryTelemetrySupportResponse {
550    pub resp: fidl_fuchsia_wlan_stats__common::TelemetrySupport,
551}
552
553impl fidl::Persistable for TelemetryQueryTelemetrySupportResponse {}
554
555#[derive(Clone, Debug, PartialEq)]
556pub enum ClientStatusResponse {
557    Connected(ServingApInfo),
558    Connecting(Vec<u8>),
559    Idle(Empty),
560    Roaming([u8; 6]),
561}
562
563impl ClientStatusResponse {
564    #[inline]
565    pub fn ordinal(&self) -> u64 {
566        match *self {
567            Self::Connected(_) => 1,
568            Self::Connecting(_) => 2,
569            Self::Idle(_) => 3,
570            Self::Roaming(_) => 4,
571        }
572    }
573}
574
575impl fidl::Persistable for ClientStatusResponse {}
576
577#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
578pub enum Compatibility {
579    Compatible(Compatible),
580    Incompatible(Incompatible),
581}
582
583impl Compatibility {
584    #[inline]
585    pub fn ordinal(&self) -> u64 {
586        match *self {
587            Self::Compatible(_) => 1,
588            Self::Incompatible(_) => 2,
589        }
590    }
591}
592
593impl fidl::Persistable for Compatibility {}
594
595#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
596pub enum DisconnectSource {
597    Ap(DisconnectCause),
598    User(UserDisconnectReason),
599    Mlme(DisconnectCause),
600}
601
602impl DisconnectSource {
603    #[inline]
604    pub fn ordinal(&self) -> u64 {
605        match *self {
606            Self::Ap(_) => 1,
607            Self::User(_) => 2,
608            Self::Mlme(_) => 3,
609        }
610    }
611}
612
613impl fidl::Persistable for DisconnectSource {}
614
615#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
616pub enum ScanRequest {
617    Active(ActiveScanRequest),
618    Passive(PassiveScanRequest),
619}
620
621impl ScanRequest {
622    #[inline]
623    pub fn ordinal(&self) -> u64 {
624        match *self {
625            Self::Active(_) => 1,
626            Self::Passive(_) => 2,
627        }
628    }
629}
630
631impl fidl::Persistable for ScanRequest {}
632
633pub mod ap_sme_ordinals {
634    pub const START: u64 = 0x33fa134ceda8624d;
635    pub const STOP: u64 = 0x56423f5b49a2e851;
636    pub const STATUS: u64 = 0x51c688ac7a101606;
637}
638
639pub mod client_sme_ordinals {
640    pub const SCAN: u64 = 0xded0ce3b1685822;
641    pub const CONNECT: u64 = 0x250a0f6fe9f85351;
642    pub const ROAM: u64 = 0x107ead7d84723921;
643    pub const DISCONNECT: u64 = 0x39a578de9a107304;
644    pub const STATUS: u64 = 0xda00b607470faf2;
645    pub const WMM_STATUS: u64 = 0x3d0ccc75f6baa9e3;
646    pub const SCAN_FOR_CONTROLLER: u64 = 0x21f00ab22ff79a12;
647    pub const SET_MAC_ADDRESS: u64 = 0x13e0a0bee8962f58;
648}
649
650pub mod connect_transaction_ordinals {
651    pub const ON_CONNECT_RESULT: u64 = 0x48d2cf407da489a7;
652    pub const ON_DISCONNECT: u64 = 0x40dea7b1449cc733;
653    pub const ON_ROAM_RESULT: u64 = 0x656267da4ccf2a41;
654    pub const ON_SIGNAL_REPORT: u64 = 0x5e968bd5e267e262;
655    pub const ON_CHANNEL_SWITCHED: u64 = 0x5f5153778cd70512;
656}
657
658pub mod generic_sme_ordinals {
659    pub const QUERY: u64 = 0x6ef4a820c153e249;
660    pub const GET_CLIENT_SME: u64 = 0x2439ad714c642f15;
661    pub const GET_AP_SME: u64 = 0x4d2a40be2b44ad6c;
662    pub const GET_SME_TELEMETRY: u64 = 0x7ea015b3060fa;
663}
664
665pub mod telemetry_ordinals {
666    pub const QUERY_TELEMETRY_SUPPORT: u64 = 0x69443ad35b204686;
667    pub const GET_IFACE_STATS: u64 = 0x6af057f3a017f572;
668    pub const GET_HISTOGRAM_STATS: u64 = 0x46d2b6a23f764564;
669    pub const GET_SIGNAL_REPORT: u64 = 0x24133aeac3225e28;
670    pub const CLONE_INSPECT_VMO: u64 = 0x47153917e84c5a21;
671}
672
673pub mod usme_bootstrap_ordinals {
674    pub const START: u64 = 0x58850dfb76c29a0e;
675}
676
677mod internal {
678    use super::*;
679    unsafe impl fidl::encoding::TypeMarker for DisconnectMlmeEventName {
680        type Owned = Self;
681
682        #[inline(always)]
683        fn inline_align(_context: fidl::encoding::Context) -> usize {
684            std::mem::align_of::<u32>()
685        }
686
687        #[inline(always)]
688        fn inline_size(_context: fidl::encoding::Context) -> usize {
689            std::mem::size_of::<u32>()
690        }
691
692        #[inline(always)]
693        fn encode_is_copy() -> bool {
694            true
695        }
696
697        #[inline(always)]
698        fn decode_is_copy() -> bool {
699            false
700        }
701    }
702
703    impl fidl::encoding::ValueTypeMarker for DisconnectMlmeEventName {
704        type Borrowed<'a> = Self;
705        #[inline(always)]
706        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
707            *value
708        }
709    }
710
711    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
712        for DisconnectMlmeEventName
713    {
714        #[inline]
715        unsafe fn encode(
716            self,
717            encoder: &mut fidl::encoding::Encoder<'_, D>,
718            offset: usize,
719            _depth: fidl::encoding::Depth,
720        ) -> fidl::Result<()> {
721            encoder.debug_check_bounds::<Self>(offset);
722            encoder.write_num(self.into_primitive(), offset);
723            Ok(())
724        }
725    }
726
727    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
728        for DisconnectMlmeEventName
729    {
730        #[inline(always)]
731        fn new_empty() -> Self {
732            Self::DeauthenticateIndication
733        }
734
735        #[inline]
736        unsafe fn decode(
737            &mut self,
738            decoder: &mut fidl::encoding::Decoder<'_, D>,
739            offset: usize,
740            _depth: fidl::encoding::Depth,
741        ) -> fidl::Result<()> {
742            decoder.debug_check_bounds::<Self>(offset);
743            let prim = decoder.read_num::<u32>(offset);
744
745            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
746            Ok(())
747        }
748    }
749    unsafe impl fidl::encoding::TypeMarker for Protection {
750        type Owned = Self;
751
752        #[inline(always)]
753        fn inline_align(_context: fidl::encoding::Context) -> usize {
754            std::mem::align_of::<u32>()
755        }
756
757        #[inline(always)]
758        fn inline_size(_context: fidl::encoding::Context) -> usize {
759            std::mem::size_of::<u32>()
760        }
761
762        #[inline(always)]
763        fn encode_is_copy() -> bool {
764            true
765        }
766
767        #[inline(always)]
768        fn decode_is_copy() -> bool {
769            false
770        }
771    }
772
773    impl fidl::encoding::ValueTypeMarker for Protection {
774        type Borrowed<'a> = Self;
775        #[inline(always)]
776        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
777            *value
778        }
779    }
780
781    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for Protection {
782        #[inline]
783        unsafe fn encode(
784            self,
785            encoder: &mut fidl::encoding::Encoder<'_, D>,
786            offset: usize,
787            _depth: fidl::encoding::Depth,
788        ) -> fidl::Result<()> {
789            encoder.debug_check_bounds::<Self>(offset);
790            encoder.write_num(self.into_primitive(), offset);
791            Ok(())
792        }
793    }
794
795    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Protection {
796        #[inline(always)]
797        fn new_empty() -> Self {
798            Self::Unknown
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 ScanErrorCode {
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 ScanErrorCode {
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 ScanErrorCode {
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 ScanErrorCode {
862        #[inline(always)]
863        fn new_empty() -> Self {
864            Self::NotSupported
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 StartApResultCode {
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 StartApResultCode {
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>
914        for StartApResultCode
915    {
916        #[inline]
917        unsafe fn encode(
918            self,
919            encoder: &mut fidl::encoding::Encoder<'_, D>,
920            offset: usize,
921            _depth: fidl::encoding::Depth,
922        ) -> fidl::Result<()> {
923            encoder.debug_check_bounds::<Self>(offset);
924            encoder.write_num(self.into_primitive(), offset);
925            Ok(())
926        }
927    }
928
929    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StartApResultCode {
930        #[inline(always)]
931        fn new_empty() -> Self {
932            Self::Success
933        }
934
935        #[inline]
936        unsafe fn decode(
937            &mut self,
938            decoder: &mut fidl::encoding::Decoder<'_, D>,
939            offset: usize,
940            _depth: fidl::encoding::Depth,
941        ) -> fidl::Result<()> {
942            decoder.debug_check_bounds::<Self>(offset);
943            let prim = decoder.read_num::<u32>(offset);
944
945            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
946            Ok(())
947        }
948    }
949    unsafe impl fidl::encoding::TypeMarker for StopApResultCode {
950        type Owned = Self;
951
952        #[inline(always)]
953        fn inline_align(_context: fidl::encoding::Context) -> usize {
954            std::mem::align_of::<u32>()
955        }
956
957        #[inline(always)]
958        fn inline_size(_context: fidl::encoding::Context) -> usize {
959            std::mem::size_of::<u32>()
960        }
961
962        #[inline(always)]
963        fn encode_is_copy() -> bool {
964            true
965        }
966
967        #[inline(always)]
968        fn decode_is_copy() -> bool {
969            false
970        }
971    }
972
973    impl fidl::encoding::ValueTypeMarker for StopApResultCode {
974        type Borrowed<'a> = Self;
975        #[inline(always)]
976        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
977            *value
978        }
979    }
980
981    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
982        for StopApResultCode
983    {
984        #[inline]
985        unsafe fn encode(
986            self,
987            encoder: &mut fidl::encoding::Encoder<'_, D>,
988            offset: usize,
989            _depth: fidl::encoding::Depth,
990        ) -> fidl::Result<()> {
991            encoder.debug_check_bounds::<Self>(offset);
992            encoder.write_num(self.into_primitive(), offset);
993            Ok(())
994        }
995    }
996
997    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StopApResultCode {
998        #[inline(always)]
999        fn new_empty() -> Self {
1000            Self::Success
1001        }
1002
1003        #[inline]
1004        unsafe fn decode(
1005            &mut self,
1006            decoder: &mut fidl::encoding::Decoder<'_, D>,
1007            offset: usize,
1008            _depth: fidl::encoding::Depth,
1009        ) -> fidl::Result<()> {
1010            decoder.debug_check_bounds::<Self>(offset);
1011            let prim = decoder.read_num::<u32>(offset);
1012
1013            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1014            Ok(())
1015        }
1016    }
1017    unsafe impl fidl::encoding::TypeMarker for UserDisconnectReason {
1018        type Owned = Self;
1019
1020        #[inline(always)]
1021        fn inline_align(_context: fidl::encoding::Context) -> usize {
1022            std::mem::align_of::<u32>()
1023        }
1024
1025        #[inline(always)]
1026        fn inline_size(_context: fidl::encoding::Context) -> usize {
1027            std::mem::size_of::<u32>()
1028        }
1029
1030        #[inline(always)]
1031        fn encode_is_copy() -> bool {
1032            true
1033        }
1034
1035        #[inline(always)]
1036        fn decode_is_copy() -> bool {
1037            false
1038        }
1039    }
1040
1041    impl fidl::encoding::ValueTypeMarker for UserDisconnectReason {
1042        type Borrowed<'a> = Self;
1043        #[inline(always)]
1044        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1045            *value
1046        }
1047    }
1048
1049    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1050        for UserDisconnectReason
1051    {
1052        #[inline]
1053        unsafe fn encode(
1054            self,
1055            encoder: &mut fidl::encoding::Encoder<'_, D>,
1056            offset: usize,
1057            _depth: fidl::encoding::Depth,
1058        ) -> fidl::Result<()> {
1059            encoder.debug_check_bounds::<Self>(offset);
1060            encoder.write_num(self.into_primitive(), offset);
1061            Ok(())
1062        }
1063    }
1064
1065    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UserDisconnectReason {
1066        #[inline(always)]
1067        fn new_empty() -> Self {
1068            Self::Unknown
1069        }
1070
1071        #[inline]
1072        unsafe fn decode(
1073            &mut self,
1074            decoder: &mut fidl::encoding::Decoder<'_, D>,
1075            offset: usize,
1076            _depth: fidl::encoding::Depth,
1077        ) -> fidl::Result<()> {
1078            decoder.debug_check_bounds::<Self>(offset);
1079            let prim = decoder.read_num::<u32>(offset);
1080
1081            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1082            Ok(())
1083        }
1084    }
1085
1086    impl fidl::encoding::ValueTypeMarker for ActiveScanRequest {
1087        type Borrowed<'a> = &'a Self;
1088        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1089            value
1090        }
1091    }
1092
1093    unsafe impl fidl::encoding::TypeMarker for ActiveScanRequest {
1094        type Owned = Self;
1095
1096        #[inline(always)]
1097        fn inline_align(_context: fidl::encoding::Context) -> usize {
1098            8
1099        }
1100
1101        #[inline(always)]
1102        fn inline_size(_context: fidl::encoding::Context) -> usize {
1103            32
1104        }
1105    }
1106
1107    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ActiveScanRequest, D>
1108        for &ActiveScanRequest
1109    {
1110        #[inline]
1111        unsafe fn encode(
1112            self,
1113            encoder: &mut fidl::encoding::Encoder<'_, D>,
1114            offset: usize,
1115            _depth: fidl::encoding::Depth,
1116        ) -> fidl::Result<()> {
1117            encoder.debug_check_bounds::<ActiveScanRequest>(offset);
1118            // Delegate to tuple encoding.
1119            fidl::encoding::Encode::<ActiveScanRequest, D>::encode(
1120                (
1121                    <fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssids),
1122                    <fidl::encoding::Vector<u8, 500> as fidl::encoding::ValueTypeMarker>::borrow(&self.channels),
1123                ),
1124                encoder, offset, _depth
1125            )
1126        }
1127    }
1128    unsafe impl<
1129        D: fidl::encoding::ResourceDialect,
1130        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>, D>,
1131        T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 500>, D>,
1132    > fidl::encoding::Encode<ActiveScanRequest, D> for (T0, T1)
1133    {
1134        #[inline]
1135        unsafe fn encode(
1136            self,
1137            encoder: &mut fidl::encoding::Encoder<'_, D>,
1138            offset: usize,
1139            depth: fidl::encoding::Depth,
1140        ) -> fidl::Result<()> {
1141            encoder.debug_check_bounds::<ActiveScanRequest>(offset);
1142            // Zero out padding regions. There's no need to apply masks
1143            // because the unmasked parts will be overwritten by fields.
1144            // Write the fields.
1145            self.0.encode(encoder, offset + 0, depth)?;
1146            self.1.encode(encoder, offset + 16, depth)?;
1147            Ok(())
1148        }
1149    }
1150
1151    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ActiveScanRequest {
1152        #[inline(always)]
1153        fn new_empty() -> Self {
1154            Self {
1155                ssids: fidl::new_empty!(
1156                    fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>,
1157                    D
1158                ),
1159                channels: fidl::new_empty!(fidl::encoding::Vector<u8, 500>, D),
1160            }
1161        }
1162
1163        #[inline]
1164        unsafe fn decode(
1165            &mut self,
1166            decoder: &mut fidl::encoding::Decoder<'_, D>,
1167            offset: usize,
1168            _depth: fidl::encoding::Depth,
1169        ) -> fidl::Result<()> {
1170            decoder.debug_check_bounds::<Self>(offset);
1171            // Verify that padding bytes are zero.
1172            fidl::decode!(
1173                fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>,
1174                D,
1175                &mut self.ssids,
1176                decoder,
1177                offset + 0,
1178                _depth
1179            )?;
1180            fidl::decode!(fidl::encoding::Vector<u8, 500>, D, &mut self.channels, decoder, offset + 16, _depth)?;
1181            Ok(())
1182        }
1183    }
1184
1185    impl fidl::encoding::ValueTypeMarker for Ap {
1186        type Borrowed<'a> = &'a Self;
1187        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1188            value
1189        }
1190    }
1191
1192    unsafe impl fidl::encoding::TypeMarker for Ap {
1193        type Owned = Self;
1194
1195        #[inline(always)]
1196        fn inline_align(_context: fidl::encoding::Context) -> usize {
1197            8
1198        }
1199
1200        #[inline(always)]
1201        fn inline_size(_context: fidl::encoding::Context) -> usize {
1202            24
1203        }
1204    }
1205
1206    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Ap, D> for &Ap {
1207        #[inline]
1208        unsafe fn encode(
1209            self,
1210            encoder: &mut fidl::encoding::Encoder<'_, D>,
1211            offset: usize,
1212            _depth: fidl::encoding::Depth,
1213        ) -> fidl::Result<()> {
1214            encoder.debug_check_bounds::<Ap>(offset);
1215            // Delegate to tuple encoding.
1216            fidl::encoding::Encode::<Ap, D>::encode(
1217                (
1218                    <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
1219                        &self.ssid,
1220                    ),
1221                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.channel),
1222                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.num_clients),
1223                ),
1224                encoder,
1225                offset,
1226                _depth,
1227            )
1228        }
1229    }
1230    unsafe impl<
1231        D: fidl::encoding::ResourceDialect,
1232        T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
1233        T1: fidl::encoding::Encode<u8, D>,
1234        T2: fidl::encoding::Encode<u16, D>,
1235    > fidl::encoding::Encode<Ap, D> for (T0, T1, T2)
1236    {
1237        #[inline]
1238        unsafe fn encode(
1239            self,
1240            encoder: &mut fidl::encoding::Encoder<'_, D>,
1241            offset: usize,
1242            depth: fidl::encoding::Depth,
1243        ) -> fidl::Result<()> {
1244            encoder.debug_check_bounds::<Ap>(offset);
1245            // Zero out padding regions. There's no need to apply masks
1246            // because the unmasked parts will be overwritten by fields.
1247            unsafe {
1248                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
1249                (ptr as *mut u64).write_unaligned(0);
1250            }
1251            // Write the fields.
1252            self.0.encode(encoder, offset + 0, depth)?;
1253            self.1.encode(encoder, offset + 16, depth)?;
1254            self.2.encode(encoder, offset + 18, depth)?;
1255            Ok(())
1256        }
1257    }
1258
1259    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Ap {
1260        #[inline(always)]
1261        fn new_empty() -> Self {
1262            Self {
1263                ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
1264                channel: fidl::new_empty!(u8, D),
1265                num_clients: fidl::new_empty!(u16, D),
1266            }
1267        }
1268
1269        #[inline]
1270        unsafe fn decode(
1271            &mut self,
1272            decoder: &mut fidl::encoding::Decoder<'_, D>,
1273            offset: usize,
1274            _depth: fidl::encoding::Depth,
1275        ) -> fidl::Result<()> {
1276            decoder.debug_check_bounds::<Self>(offset);
1277            // Verify that padding bytes are zero.
1278            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
1279            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1280            let mask = 0xffffffff0000ff00u64;
1281            let maskedval = padval & mask;
1282            if maskedval != 0 {
1283                return Err(fidl::Error::NonZeroPadding {
1284                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
1285                });
1286            }
1287            fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 0, _depth)?;
1288            fidl::decode!(u8, D, &mut self.channel, decoder, offset + 16, _depth)?;
1289            fidl::decode!(u16, D, &mut self.num_clients, decoder, offset + 18, _depth)?;
1290            Ok(())
1291        }
1292    }
1293
1294    impl fidl::encoding::ValueTypeMarker for ApConfig {
1295        type Borrowed<'a> = &'a Self;
1296        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1297            value
1298        }
1299    }
1300
1301    unsafe impl fidl::encoding::TypeMarker for ApConfig {
1302        type Owned = Self;
1303
1304        #[inline(always)]
1305        fn inline_align(_context: fidl::encoding::Context) -> usize {
1306            8
1307        }
1308
1309        #[inline(always)]
1310        fn inline_size(_context: fidl::encoding::Context) -> usize {
1311            48
1312        }
1313    }
1314
1315    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApConfig, D> for &ApConfig {
1316        #[inline]
1317        unsafe fn encode(
1318            self,
1319            encoder: &mut fidl::encoding::Encoder<'_, D>,
1320            offset: usize,
1321            _depth: fidl::encoding::Depth,
1322        ) -> fidl::Result<()> {
1323            encoder.debug_check_bounds::<ApConfig>(offset);
1324            // Delegate to tuple encoding.
1325            fidl::encoding::Encode::<ApConfig, D>::encode(
1326                (
1327                    <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
1328                        &self.ssid,
1329                    ),
1330                    <fidl::encoding::Vector<u8, 64> as fidl::encoding::ValueTypeMarker>::borrow(
1331                        &self.password,
1332                    ),
1333                    <RadioConfig as fidl::encoding::ValueTypeMarker>::borrow(&self.radio_cfg),
1334                ),
1335                encoder,
1336                offset,
1337                _depth,
1338            )
1339        }
1340    }
1341    unsafe impl<
1342        D: fidl::encoding::ResourceDialect,
1343        T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
1344        T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 64>, D>,
1345        T2: fidl::encoding::Encode<RadioConfig, D>,
1346    > fidl::encoding::Encode<ApConfig, D> for (T0, T1, T2)
1347    {
1348        #[inline]
1349        unsafe fn encode(
1350            self,
1351            encoder: &mut fidl::encoding::Encoder<'_, D>,
1352            offset: usize,
1353            depth: fidl::encoding::Depth,
1354        ) -> fidl::Result<()> {
1355            encoder.debug_check_bounds::<ApConfig>(offset);
1356            // Zero out padding regions. There's no need to apply masks
1357            // because the unmasked parts will be overwritten by fields.
1358            // Write the fields.
1359            self.0.encode(encoder, offset + 0, depth)?;
1360            self.1.encode(encoder, offset + 16, depth)?;
1361            self.2.encode(encoder, offset + 32, depth)?;
1362            Ok(())
1363        }
1364    }
1365
1366    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApConfig {
1367        #[inline(always)]
1368        fn new_empty() -> Self {
1369            Self {
1370                ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
1371                password: fidl::new_empty!(fidl::encoding::Vector<u8, 64>, D),
1372                radio_cfg: fidl::new_empty!(RadioConfig, D),
1373            }
1374        }
1375
1376        #[inline]
1377        unsafe fn decode(
1378            &mut self,
1379            decoder: &mut fidl::encoding::Decoder<'_, D>,
1380            offset: usize,
1381            _depth: fidl::encoding::Depth,
1382        ) -> fidl::Result<()> {
1383            decoder.debug_check_bounds::<Self>(offset);
1384            // Verify that padding bytes are zero.
1385            fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 0, _depth)?;
1386            fidl::decode!(fidl::encoding::Vector<u8, 64>, D, &mut self.password, decoder, offset + 16, _depth)?;
1387            fidl::decode!(RadioConfig, D, &mut self.radio_cfg, decoder, offset + 32, _depth)?;
1388            Ok(())
1389        }
1390    }
1391
1392    impl fidl::encoding::ValueTypeMarker for ApSmeStartRequest {
1393        type Borrowed<'a> = &'a Self;
1394        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1395            value
1396        }
1397    }
1398
1399    unsafe impl fidl::encoding::TypeMarker for ApSmeStartRequest {
1400        type Owned = Self;
1401
1402        #[inline(always)]
1403        fn inline_align(_context: fidl::encoding::Context) -> usize {
1404            8
1405        }
1406
1407        #[inline(always)]
1408        fn inline_size(_context: fidl::encoding::Context) -> usize {
1409            48
1410        }
1411    }
1412
1413    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApSmeStartRequest, D>
1414        for &ApSmeStartRequest
1415    {
1416        #[inline]
1417        unsafe fn encode(
1418            self,
1419            encoder: &mut fidl::encoding::Encoder<'_, D>,
1420            offset: usize,
1421            _depth: fidl::encoding::Depth,
1422        ) -> fidl::Result<()> {
1423            encoder.debug_check_bounds::<ApSmeStartRequest>(offset);
1424            // Delegate to tuple encoding.
1425            fidl::encoding::Encode::<ApSmeStartRequest, D>::encode(
1426                (<ApConfig as fidl::encoding::ValueTypeMarker>::borrow(&self.config),),
1427                encoder,
1428                offset,
1429                _depth,
1430            )
1431        }
1432    }
1433    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ApConfig, D>>
1434        fidl::encoding::Encode<ApSmeStartRequest, D> for (T0,)
1435    {
1436        #[inline]
1437        unsafe fn encode(
1438            self,
1439            encoder: &mut fidl::encoding::Encoder<'_, D>,
1440            offset: usize,
1441            depth: fidl::encoding::Depth,
1442        ) -> fidl::Result<()> {
1443            encoder.debug_check_bounds::<ApSmeStartRequest>(offset);
1444            // Zero out padding regions. There's no need to apply masks
1445            // because the unmasked parts will be overwritten by fields.
1446            // Write the fields.
1447            self.0.encode(encoder, offset + 0, depth)?;
1448            Ok(())
1449        }
1450    }
1451
1452    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApSmeStartRequest {
1453        #[inline(always)]
1454        fn new_empty() -> Self {
1455            Self { config: fidl::new_empty!(ApConfig, D) }
1456        }
1457
1458        #[inline]
1459        unsafe fn decode(
1460            &mut self,
1461            decoder: &mut fidl::encoding::Decoder<'_, D>,
1462            offset: usize,
1463            _depth: fidl::encoding::Depth,
1464        ) -> fidl::Result<()> {
1465            decoder.debug_check_bounds::<Self>(offset);
1466            // Verify that padding bytes are zero.
1467            fidl::decode!(ApConfig, D, &mut self.config, decoder, offset + 0, _depth)?;
1468            Ok(())
1469        }
1470    }
1471
1472    impl fidl::encoding::ValueTypeMarker for ApSmeStartResponse {
1473        type Borrowed<'a> = &'a Self;
1474        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1475            value
1476        }
1477    }
1478
1479    unsafe impl fidl::encoding::TypeMarker for ApSmeStartResponse {
1480        type Owned = Self;
1481
1482        #[inline(always)]
1483        fn inline_align(_context: fidl::encoding::Context) -> usize {
1484            4
1485        }
1486
1487        #[inline(always)]
1488        fn inline_size(_context: fidl::encoding::Context) -> usize {
1489            4
1490        }
1491    }
1492
1493    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApSmeStartResponse, D>
1494        for &ApSmeStartResponse
1495    {
1496        #[inline]
1497        unsafe fn encode(
1498            self,
1499            encoder: &mut fidl::encoding::Encoder<'_, D>,
1500            offset: usize,
1501            _depth: fidl::encoding::Depth,
1502        ) -> fidl::Result<()> {
1503            encoder.debug_check_bounds::<ApSmeStartResponse>(offset);
1504            // Delegate to tuple encoding.
1505            fidl::encoding::Encode::<ApSmeStartResponse, D>::encode(
1506                (<StartApResultCode as fidl::encoding::ValueTypeMarker>::borrow(&self.code),),
1507                encoder,
1508                offset,
1509                _depth,
1510            )
1511        }
1512    }
1513    unsafe impl<
1514        D: fidl::encoding::ResourceDialect,
1515        T0: fidl::encoding::Encode<StartApResultCode, D>,
1516    > fidl::encoding::Encode<ApSmeStartResponse, D> for (T0,)
1517    {
1518        #[inline]
1519        unsafe fn encode(
1520            self,
1521            encoder: &mut fidl::encoding::Encoder<'_, D>,
1522            offset: usize,
1523            depth: fidl::encoding::Depth,
1524        ) -> fidl::Result<()> {
1525            encoder.debug_check_bounds::<ApSmeStartResponse>(offset);
1526            // Zero out padding regions. There's no need to apply masks
1527            // because the unmasked parts will be overwritten by fields.
1528            // Write the fields.
1529            self.0.encode(encoder, offset + 0, depth)?;
1530            Ok(())
1531        }
1532    }
1533
1534    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApSmeStartResponse {
1535        #[inline(always)]
1536        fn new_empty() -> Self {
1537            Self { code: fidl::new_empty!(StartApResultCode, D) }
1538        }
1539
1540        #[inline]
1541        unsafe fn decode(
1542            &mut self,
1543            decoder: &mut fidl::encoding::Decoder<'_, D>,
1544            offset: usize,
1545            _depth: fidl::encoding::Depth,
1546        ) -> fidl::Result<()> {
1547            decoder.debug_check_bounds::<Self>(offset);
1548            // Verify that padding bytes are zero.
1549            fidl::decode!(StartApResultCode, D, &mut self.code, decoder, offset + 0, _depth)?;
1550            Ok(())
1551        }
1552    }
1553
1554    impl fidl::encoding::ValueTypeMarker for ApSmeStatusResponse {
1555        type Borrowed<'a> = &'a Self;
1556        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1557            value
1558        }
1559    }
1560
1561    unsafe impl fidl::encoding::TypeMarker for ApSmeStatusResponse {
1562        type Owned = Self;
1563
1564        #[inline(always)]
1565        fn inline_align(_context: fidl::encoding::Context) -> usize {
1566            8
1567        }
1568
1569        #[inline(always)]
1570        fn inline_size(_context: fidl::encoding::Context) -> usize {
1571            8
1572        }
1573    }
1574
1575    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApSmeStatusResponse, D>
1576        for &ApSmeStatusResponse
1577    {
1578        #[inline]
1579        unsafe fn encode(
1580            self,
1581            encoder: &mut fidl::encoding::Encoder<'_, D>,
1582            offset: usize,
1583            _depth: fidl::encoding::Depth,
1584        ) -> fidl::Result<()> {
1585            encoder.debug_check_bounds::<ApSmeStatusResponse>(offset);
1586            // Delegate to tuple encoding.
1587            fidl::encoding::Encode::<ApSmeStatusResponse, D>::encode(
1588                (<ApStatusResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
1589                encoder,
1590                offset,
1591                _depth,
1592            )
1593        }
1594    }
1595    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ApStatusResponse, D>>
1596        fidl::encoding::Encode<ApSmeStatusResponse, D> for (T0,)
1597    {
1598        #[inline]
1599        unsafe fn encode(
1600            self,
1601            encoder: &mut fidl::encoding::Encoder<'_, D>,
1602            offset: usize,
1603            depth: fidl::encoding::Depth,
1604        ) -> fidl::Result<()> {
1605            encoder.debug_check_bounds::<ApSmeStatusResponse>(offset);
1606            // Zero out padding regions. There's no need to apply masks
1607            // because the unmasked parts will be overwritten by fields.
1608            // Write the fields.
1609            self.0.encode(encoder, offset + 0, depth)?;
1610            Ok(())
1611        }
1612    }
1613
1614    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApSmeStatusResponse {
1615        #[inline(always)]
1616        fn new_empty() -> Self {
1617            Self { resp: fidl::new_empty!(ApStatusResponse, D) }
1618        }
1619
1620        #[inline]
1621        unsafe fn decode(
1622            &mut self,
1623            decoder: &mut fidl::encoding::Decoder<'_, D>,
1624            offset: usize,
1625            _depth: fidl::encoding::Depth,
1626        ) -> fidl::Result<()> {
1627            decoder.debug_check_bounds::<Self>(offset);
1628            // Verify that padding bytes are zero.
1629            fidl::decode!(ApStatusResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
1630            Ok(())
1631        }
1632    }
1633
1634    impl fidl::encoding::ValueTypeMarker for ApSmeStopResponse {
1635        type Borrowed<'a> = &'a Self;
1636        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1637            value
1638        }
1639    }
1640
1641    unsafe impl fidl::encoding::TypeMarker for ApSmeStopResponse {
1642        type Owned = Self;
1643
1644        #[inline(always)]
1645        fn inline_align(_context: fidl::encoding::Context) -> usize {
1646            4
1647        }
1648
1649        #[inline(always)]
1650        fn inline_size(_context: fidl::encoding::Context) -> usize {
1651            4
1652        }
1653    }
1654
1655    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApSmeStopResponse, D>
1656        for &ApSmeStopResponse
1657    {
1658        #[inline]
1659        unsafe fn encode(
1660            self,
1661            encoder: &mut fidl::encoding::Encoder<'_, D>,
1662            offset: usize,
1663            _depth: fidl::encoding::Depth,
1664        ) -> fidl::Result<()> {
1665            encoder.debug_check_bounds::<ApSmeStopResponse>(offset);
1666            // Delegate to tuple encoding.
1667            fidl::encoding::Encode::<ApSmeStopResponse, D>::encode(
1668                (<StopApResultCode as fidl::encoding::ValueTypeMarker>::borrow(&self.code),),
1669                encoder,
1670                offset,
1671                _depth,
1672            )
1673        }
1674    }
1675    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StopApResultCode, D>>
1676        fidl::encoding::Encode<ApSmeStopResponse, D> for (T0,)
1677    {
1678        #[inline]
1679        unsafe fn encode(
1680            self,
1681            encoder: &mut fidl::encoding::Encoder<'_, D>,
1682            offset: usize,
1683            depth: fidl::encoding::Depth,
1684        ) -> fidl::Result<()> {
1685            encoder.debug_check_bounds::<ApSmeStopResponse>(offset);
1686            // Zero out padding regions. There's no need to apply masks
1687            // because the unmasked parts will be overwritten by fields.
1688            // Write the fields.
1689            self.0.encode(encoder, offset + 0, depth)?;
1690            Ok(())
1691        }
1692    }
1693
1694    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApSmeStopResponse {
1695        #[inline(always)]
1696        fn new_empty() -> Self {
1697            Self { code: fidl::new_empty!(StopApResultCode, D) }
1698        }
1699
1700        #[inline]
1701        unsafe fn decode(
1702            &mut self,
1703            decoder: &mut fidl::encoding::Decoder<'_, D>,
1704            offset: usize,
1705            _depth: fidl::encoding::Depth,
1706        ) -> fidl::Result<()> {
1707            decoder.debug_check_bounds::<Self>(offset);
1708            // Verify that padding bytes are zero.
1709            fidl::decode!(StopApResultCode, D, &mut self.code, decoder, offset + 0, _depth)?;
1710            Ok(())
1711        }
1712    }
1713
1714    impl fidl::encoding::ValueTypeMarker for ApStatusResponse {
1715        type Borrowed<'a> = &'a Self;
1716        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1717            value
1718        }
1719    }
1720
1721    unsafe impl fidl::encoding::TypeMarker for ApStatusResponse {
1722        type Owned = Self;
1723
1724        #[inline(always)]
1725        fn inline_align(_context: fidl::encoding::Context) -> usize {
1726            8
1727        }
1728
1729        #[inline(always)]
1730        fn inline_size(_context: fidl::encoding::Context) -> usize {
1731            8
1732        }
1733    }
1734
1735    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApStatusResponse, D>
1736        for &ApStatusResponse
1737    {
1738        #[inline]
1739        unsafe fn encode(
1740            self,
1741            encoder: &mut fidl::encoding::Encoder<'_, D>,
1742            offset: usize,
1743            _depth: fidl::encoding::Depth,
1744        ) -> fidl::Result<()> {
1745            encoder.debug_check_bounds::<ApStatusResponse>(offset);
1746            // Delegate to tuple encoding.
1747            fidl::encoding::Encode::<ApStatusResponse, D>::encode(
1748                (<fidl::encoding::Boxed<Ap> as fidl::encoding::ValueTypeMarker>::borrow(
1749                    &self.running_ap,
1750                ),),
1751                encoder,
1752                offset,
1753                _depth,
1754            )
1755        }
1756    }
1757    unsafe impl<
1758        D: fidl::encoding::ResourceDialect,
1759        T0: fidl::encoding::Encode<fidl::encoding::Boxed<Ap>, D>,
1760    > fidl::encoding::Encode<ApStatusResponse, D> for (T0,)
1761    {
1762        #[inline]
1763        unsafe fn encode(
1764            self,
1765            encoder: &mut fidl::encoding::Encoder<'_, D>,
1766            offset: usize,
1767            depth: fidl::encoding::Depth,
1768        ) -> fidl::Result<()> {
1769            encoder.debug_check_bounds::<ApStatusResponse>(offset);
1770            // Zero out padding regions. There's no need to apply masks
1771            // because the unmasked parts will be overwritten by fields.
1772            // Write the fields.
1773            self.0.encode(encoder, offset + 0, depth)?;
1774            Ok(())
1775        }
1776    }
1777
1778    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApStatusResponse {
1779        #[inline(always)]
1780        fn new_empty() -> Self {
1781            Self { running_ap: fidl::new_empty!(fidl::encoding::Boxed<Ap>, D) }
1782        }
1783
1784        #[inline]
1785        unsafe fn decode(
1786            &mut self,
1787            decoder: &mut fidl::encoding::Decoder<'_, D>,
1788            offset: usize,
1789            _depth: fidl::encoding::Depth,
1790        ) -> fidl::Result<()> {
1791            decoder.debug_check_bounds::<Self>(offset);
1792            // Verify that padding bytes are zero.
1793            fidl::decode!(
1794                fidl::encoding::Boxed<Ap>,
1795                D,
1796                &mut self.running_ap,
1797                decoder,
1798                offset + 0,
1799                _depth
1800            )?;
1801            Ok(())
1802        }
1803    }
1804
1805    impl fidl::encoding::ValueTypeMarker for ClientSmeDisconnectRequest {
1806        type Borrowed<'a> = &'a Self;
1807        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1808            value
1809        }
1810    }
1811
1812    unsafe impl fidl::encoding::TypeMarker for ClientSmeDisconnectRequest {
1813        type Owned = Self;
1814
1815        #[inline(always)]
1816        fn inline_align(_context: fidl::encoding::Context) -> usize {
1817            4
1818        }
1819
1820        #[inline(always)]
1821        fn inline_size(_context: fidl::encoding::Context) -> usize {
1822            4
1823        }
1824    }
1825
1826    unsafe impl<D: fidl::encoding::ResourceDialect>
1827        fidl::encoding::Encode<ClientSmeDisconnectRequest, D> for &ClientSmeDisconnectRequest
1828    {
1829        #[inline]
1830        unsafe fn encode(
1831            self,
1832            encoder: &mut fidl::encoding::Encoder<'_, D>,
1833            offset: usize,
1834            _depth: fidl::encoding::Depth,
1835        ) -> fidl::Result<()> {
1836            encoder.debug_check_bounds::<ClientSmeDisconnectRequest>(offset);
1837            // Delegate to tuple encoding.
1838            fidl::encoding::Encode::<ClientSmeDisconnectRequest, D>::encode(
1839                (<UserDisconnectReason as fidl::encoding::ValueTypeMarker>::borrow(&self.reason),),
1840                encoder,
1841                offset,
1842                _depth,
1843            )
1844        }
1845    }
1846    unsafe impl<
1847        D: fidl::encoding::ResourceDialect,
1848        T0: fidl::encoding::Encode<UserDisconnectReason, D>,
1849    > fidl::encoding::Encode<ClientSmeDisconnectRequest, D> for (T0,)
1850    {
1851        #[inline]
1852        unsafe fn encode(
1853            self,
1854            encoder: &mut fidl::encoding::Encoder<'_, D>,
1855            offset: usize,
1856            depth: fidl::encoding::Depth,
1857        ) -> fidl::Result<()> {
1858            encoder.debug_check_bounds::<ClientSmeDisconnectRequest>(offset);
1859            // Zero out padding regions. There's no need to apply masks
1860            // because the unmasked parts will be overwritten by fields.
1861            // Write the fields.
1862            self.0.encode(encoder, offset + 0, depth)?;
1863            Ok(())
1864        }
1865    }
1866
1867    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1868        for ClientSmeDisconnectRequest
1869    {
1870        #[inline(always)]
1871        fn new_empty() -> Self {
1872            Self { reason: fidl::new_empty!(UserDisconnectReason, D) }
1873        }
1874
1875        #[inline]
1876        unsafe fn decode(
1877            &mut self,
1878            decoder: &mut fidl::encoding::Decoder<'_, D>,
1879            offset: usize,
1880            _depth: fidl::encoding::Depth,
1881        ) -> fidl::Result<()> {
1882            decoder.debug_check_bounds::<Self>(offset);
1883            // Verify that padding bytes are zero.
1884            fidl::decode!(UserDisconnectReason, D, &mut self.reason, decoder, offset + 0, _depth)?;
1885            Ok(())
1886        }
1887    }
1888
1889    impl fidl::encoding::ValueTypeMarker for ClientSmeRoamRequest {
1890        type Borrowed<'a> = &'a Self;
1891        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1892            value
1893        }
1894    }
1895
1896    unsafe impl fidl::encoding::TypeMarker for ClientSmeRoamRequest {
1897        type Owned = Self;
1898
1899        #[inline(always)]
1900        fn inline_align(_context: fidl::encoding::Context) -> usize {
1901            8
1902        }
1903
1904        #[inline(always)]
1905        fn inline_size(_context: fidl::encoding::Context) -> usize {
1906            48
1907        }
1908    }
1909
1910    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ClientSmeRoamRequest, D>
1911        for &ClientSmeRoamRequest
1912    {
1913        #[inline]
1914        unsafe fn encode(
1915            self,
1916            encoder: &mut fidl::encoding::Encoder<'_, D>,
1917            offset: usize,
1918            _depth: fidl::encoding::Depth,
1919        ) -> fidl::Result<()> {
1920            encoder.debug_check_bounds::<ClientSmeRoamRequest>(offset);
1921            // Delegate to tuple encoding.
1922            fidl::encoding::Encode::<ClientSmeRoamRequest, D>::encode(
1923                (<RoamRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
1924                encoder,
1925                offset,
1926                _depth,
1927            )
1928        }
1929    }
1930    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<RoamRequest, D>>
1931        fidl::encoding::Encode<ClientSmeRoamRequest, D> for (T0,)
1932    {
1933        #[inline]
1934        unsafe fn encode(
1935            self,
1936            encoder: &mut fidl::encoding::Encoder<'_, D>,
1937            offset: usize,
1938            depth: fidl::encoding::Depth,
1939        ) -> fidl::Result<()> {
1940            encoder.debug_check_bounds::<ClientSmeRoamRequest>(offset);
1941            // Zero out padding regions. There's no need to apply masks
1942            // because the unmasked parts will be overwritten by fields.
1943            // Write the fields.
1944            self.0.encode(encoder, offset + 0, depth)?;
1945            Ok(())
1946        }
1947    }
1948
1949    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ClientSmeRoamRequest {
1950        #[inline(always)]
1951        fn new_empty() -> Self {
1952            Self { req: fidl::new_empty!(RoamRequest, D) }
1953        }
1954
1955        #[inline]
1956        unsafe fn decode(
1957            &mut self,
1958            decoder: &mut fidl::encoding::Decoder<'_, D>,
1959            offset: usize,
1960            _depth: fidl::encoding::Depth,
1961        ) -> fidl::Result<()> {
1962            decoder.debug_check_bounds::<Self>(offset);
1963            // Verify that padding bytes are zero.
1964            fidl::decode!(RoamRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
1965            Ok(())
1966        }
1967    }
1968
1969    impl fidl::encoding::ValueTypeMarker for ClientSmeSetMacAddressRequest {
1970        type Borrowed<'a> = &'a Self;
1971        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1972            value
1973        }
1974    }
1975
1976    unsafe impl fidl::encoding::TypeMarker for ClientSmeSetMacAddressRequest {
1977        type Owned = Self;
1978
1979        #[inline(always)]
1980        fn inline_align(_context: fidl::encoding::Context) -> usize {
1981            1
1982        }
1983
1984        #[inline(always)]
1985        fn inline_size(_context: fidl::encoding::Context) -> usize {
1986            6
1987        }
1988        #[inline(always)]
1989        fn encode_is_copy() -> bool {
1990            true
1991        }
1992
1993        #[inline(always)]
1994        fn decode_is_copy() -> bool {
1995            true
1996        }
1997    }
1998
1999    unsafe impl<D: fidl::encoding::ResourceDialect>
2000        fidl::encoding::Encode<ClientSmeSetMacAddressRequest, D>
2001        for &ClientSmeSetMacAddressRequest
2002    {
2003        #[inline]
2004        unsafe fn encode(
2005            self,
2006            encoder: &mut fidl::encoding::Encoder<'_, D>,
2007            offset: usize,
2008            _depth: fidl::encoding::Depth,
2009        ) -> fidl::Result<()> {
2010            encoder.debug_check_bounds::<ClientSmeSetMacAddressRequest>(offset);
2011            unsafe {
2012                // Copy the object into the buffer.
2013                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2014                (buf_ptr as *mut ClientSmeSetMacAddressRequest)
2015                    .write_unaligned((self as *const ClientSmeSetMacAddressRequest).read());
2016                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2017                // done second because the memcpy will write garbage to these bytes.
2018            }
2019            Ok(())
2020        }
2021    }
2022    unsafe impl<
2023        D: fidl::encoding::ResourceDialect,
2024        T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
2025    > fidl::encoding::Encode<ClientSmeSetMacAddressRequest, D> for (T0,)
2026    {
2027        #[inline]
2028        unsafe fn encode(
2029            self,
2030            encoder: &mut fidl::encoding::Encoder<'_, D>,
2031            offset: usize,
2032            depth: fidl::encoding::Depth,
2033        ) -> fidl::Result<()> {
2034            encoder.debug_check_bounds::<ClientSmeSetMacAddressRequest>(offset);
2035            // Zero out padding regions. There's no need to apply masks
2036            // because the unmasked parts will be overwritten by fields.
2037            // Write the fields.
2038            self.0.encode(encoder, offset + 0, depth)?;
2039            Ok(())
2040        }
2041    }
2042
2043    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2044        for ClientSmeSetMacAddressRequest
2045    {
2046        #[inline(always)]
2047        fn new_empty() -> Self {
2048            Self { mac_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D) }
2049        }
2050
2051        #[inline]
2052        unsafe fn decode(
2053            &mut self,
2054            decoder: &mut fidl::encoding::Decoder<'_, D>,
2055            offset: usize,
2056            _depth: fidl::encoding::Depth,
2057        ) -> fidl::Result<()> {
2058            decoder.debug_check_bounds::<Self>(offset);
2059            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2060            // Verify that padding bytes are zero.
2061            // Copy from the buffer into the object.
2062            unsafe {
2063                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
2064            }
2065            Ok(())
2066        }
2067    }
2068
2069    impl fidl::encoding::ValueTypeMarker for ClientSmeStatusResponse {
2070        type Borrowed<'a> = &'a Self;
2071        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2072            value
2073        }
2074    }
2075
2076    unsafe impl fidl::encoding::TypeMarker for ClientSmeStatusResponse {
2077        type Owned = Self;
2078
2079        #[inline(always)]
2080        fn inline_align(_context: fidl::encoding::Context) -> usize {
2081            8
2082        }
2083
2084        #[inline(always)]
2085        fn inline_size(_context: fidl::encoding::Context) -> usize {
2086            16
2087        }
2088    }
2089
2090    unsafe impl<D: fidl::encoding::ResourceDialect>
2091        fidl::encoding::Encode<ClientSmeStatusResponse, D> for &ClientSmeStatusResponse
2092    {
2093        #[inline]
2094        unsafe fn encode(
2095            self,
2096            encoder: &mut fidl::encoding::Encoder<'_, D>,
2097            offset: usize,
2098            _depth: fidl::encoding::Depth,
2099        ) -> fidl::Result<()> {
2100            encoder.debug_check_bounds::<ClientSmeStatusResponse>(offset);
2101            // Delegate to tuple encoding.
2102            fidl::encoding::Encode::<ClientSmeStatusResponse, D>::encode(
2103                (<ClientStatusResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
2104                encoder,
2105                offset,
2106                _depth,
2107            )
2108        }
2109    }
2110    unsafe impl<
2111        D: fidl::encoding::ResourceDialect,
2112        T0: fidl::encoding::Encode<ClientStatusResponse, D>,
2113    > fidl::encoding::Encode<ClientSmeStatusResponse, D> for (T0,)
2114    {
2115        #[inline]
2116        unsafe fn encode(
2117            self,
2118            encoder: &mut fidl::encoding::Encoder<'_, D>,
2119            offset: usize,
2120            depth: fidl::encoding::Depth,
2121        ) -> fidl::Result<()> {
2122            encoder.debug_check_bounds::<ClientSmeStatusResponse>(offset);
2123            // Zero out padding regions. There's no need to apply masks
2124            // because the unmasked parts will be overwritten by fields.
2125            // Write the fields.
2126            self.0.encode(encoder, offset + 0, depth)?;
2127            Ok(())
2128        }
2129    }
2130
2131    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2132        for ClientSmeStatusResponse
2133    {
2134        #[inline(always)]
2135        fn new_empty() -> Self {
2136            Self { resp: fidl::new_empty!(ClientStatusResponse, D) }
2137        }
2138
2139        #[inline]
2140        unsafe fn decode(
2141            &mut self,
2142            decoder: &mut fidl::encoding::Decoder<'_, D>,
2143            offset: usize,
2144            _depth: fidl::encoding::Depth,
2145        ) -> fidl::Result<()> {
2146            decoder.debug_check_bounds::<Self>(offset);
2147            // Verify that padding bytes are zero.
2148            fidl::decode!(ClientStatusResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
2149            Ok(())
2150        }
2151    }
2152
2153    impl fidl::encoding::ValueTypeMarker for ClientSmeWmmStatusResponse {
2154        type Borrowed<'a> = &'a Self;
2155        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2156            value
2157        }
2158    }
2159
2160    unsafe impl fidl::encoding::TypeMarker for ClientSmeWmmStatusResponse {
2161        type Owned = Self;
2162
2163        #[inline(always)]
2164        fn inline_align(_context: fidl::encoding::Context) -> usize {
2165            2
2166        }
2167
2168        #[inline(always)]
2169        fn inline_size(_context: fidl::encoding::Context) -> usize {
2170            34
2171        }
2172    }
2173
2174    unsafe impl<D: fidl::encoding::ResourceDialect>
2175        fidl::encoding::Encode<ClientSmeWmmStatusResponse, D> for &ClientSmeWmmStatusResponse
2176    {
2177        #[inline]
2178        unsafe fn encode(
2179            self,
2180            encoder: &mut fidl::encoding::Encoder<'_, D>,
2181            offset: usize,
2182            _depth: fidl::encoding::Depth,
2183        ) -> fidl::Result<()> {
2184            encoder.debug_check_bounds::<ClientSmeWmmStatusResponse>(offset);
2185            // Delegate to tuple encoding.
2186            fidl::encoding::Encode::<ClientSmeWmmStatusResponse, D>::encode(
2187                (
2188                    <fidl_fuchsia_wlan_internal__common::WmmStatusResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
2189                ),
2190                encoder, offset, _depth
2191            )
2192        }
2193    }
2194    unsafe impl<
2195        D: fidl::encoding::ResourceDialect,
2196        T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal__common::WmmStatusResponse, D>,
2197    > fidl::encoding::Encode<ClientSmeWmmStatusResponse, D> for (T0,)
2198    {
2199        #[inline]
2200        unsafe fn encode(
2201            self,
2202            encoder: &mut fidl::encoding::Encoder<'_, D>,
2203            offset: usize,
2204            depth: fidl::encoding::Depth,
2205        ) -> fidl::Result<()> {
2206            encoder.debug_check_bounds::<ClientSmeWmmStatusResponse>(offset);
2207            // Zero out padding regions. There's no need to apply masks
2208            // because the unmasked parts will be overwritten by fields.
2209            // Write the fields.
2210            self.0.encode(encoder, offset + 0, depth)?;
2211            Ok(())
2212        }
2213    }
2214
2215    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2216        for ClientSmeWmmStatusResponse
2217    {
2218        #[inline(always)]
2219        fn new_empty() -> Self {
2220            Self {
2221                resp: fidl::new_empty!(fidl_fuchsia_wlan_internal__common::WmmStatusResponse, D),
2222            }
2223        }
2224
2225        #[inline]
2226        unsafe fn decode(
2227            &mut self,
2228            decoder: &mut fidl::encoding::Decoder<'_, D>,
2229            offset: usize,
2230            _depth: fidl::encoding::Depth,
2231        ) -> fidl::Result<()> {
2232            decoder.debug_check_bounds::<Self>(offset);
2233            // Verify that padding bytes are zero.
2234            fidl::decode!(
2235                fidl_fuchsia_wlan_internal__common::WmmStatusResponse,
2236                D,
2237                &mut self.resp,
2238                decoder,
2239                offset + 0,
2240                _depth
2241            )?;
2242            Ok(())
2243        }
2244    }
2245
2246    impl fidl::encoding::ValueTypeMarker for Compatible {
2247        type Borrowed<'a> = &'a Self;
2248        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2249            value
2250        }
2251    }
2252
2253    unsafe impl fidl::encoding::TypeMarker for Compatible {
2254        type Owned = Self;
2255
2256        #[inline(always)]
2257        fn inline_align(_context: fidl::encoding::Context) -> usize {
2258            8
2259        }
2260
2261        #[inline(always)]
2262        fn inline_size(_context: fidl::encoding::Context) -> usize {
2263            16
2264        }
2265    }
2266
2267    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Compatible, D>
2268        for &Compatible
2269    {
2270        #[inline]
2271        unsafe fn encode(
2272            self,
2273            encoder: &mut fidl::encoding::Encoder<'_, D>,
2274            offset: usize,
2275            _depth: fidl::encoding::Depth,
2276        ) -> fidl::Result<()> {
2277            encoder.debug_check_bounds::<Compatible>(offset);
2278            // Delegate to tuple encoding.
2279            fidl::encoding::Encode::<Compatible, D>::encode(
2280                (
2281                    <fidl::encoding::Vector<fidl_fuchsia_wlan_common_security__common::Protocol, 16> as fidl::encoding::ValueTypeMarker>::borrow(&self.mutual_security_protocols),
2282                ),
2283                encoder, offset, _depth
2284            )
2285        }
2286    }
2287    unsafe impl<
2288        D: fidl::encoding::ResourceDialect,
2289        T0: fidl::encoding::Encode<
2290                fidl::encoding::Vector<fidl_fuchsia_wlan_common_security__common::Protocol, 16>,
2291                D,
2292            >,
2293    > fidl::encoding::Encode<Compatible, D> for (T0,)
2294    {
2295        #[inline]
2296        unsafe fn encode(
2297            self,
2298            encoder: &mut fidl::encoding::Encoder<'_, D>,
2299            offset: usize,
2300            depth: fidl::encoding::Depth,
2301        ) -> fidl::Result<()> {
2302            encoder.debug_check_bounds::<Compatible>(offset);
2303            // Zero out padding regions. There's no need to apply masks
2304            // because the unmasked parts will be overwritten by fields.
2305            // Write the fields.
2306            self.0.encode(encoder, offset + 0, depth)?;
2307            Ok(())
2308        }
2309    }
2310
2311    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Compatible {
2312        #[inline(always)]
2313        fn new_empty() -> Self {
2314            Self {
2315                mutual_security_protocols: fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_wlan_common_security__common::Protocol, 16>, D),
2316            }
2317        }
2318
2319        #[inline]
2320        unsafe fn decode(
2321            &mut self,
2322            decoder: &mut fidl::encoding::Decoder<'_, D>,
2323            offset: usize,
2324            _depth: fidl::encoding::Depth,
2325        ) -> fidl::Result<()> {
2326            decoder.debug_check_bounds::<Self>(offset);
2327            // Verify that padding bytes are zero.
2328            fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_wlan_common_security__common::Protocol, 16>, D, &mut self.mutual_security_protocols, decoder, offset + 0, _depth)?;
2329            Ok(())
2330        }
2331    }
2332
2333    impl fidl::encoding::ValueTypeMarker for ConnectRequest {
2334        type Borrowed<'a> = &'a Self;
2335        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2336            value
2337        }
2338    }
2339
2340    unsafe impl fidl::encoding::TypeMarker for ConnectRequest {
2341        type Owned = Self;
2342
2343        #[inline(always)]
2344        fn inline_align(_context: fidl::encoding::Context) -> usize {
2345            8
2346        }
2347
2348        #[inline(always)]
2349        fn inline_size(_context: fidl::encoding::Context) -> usize {
2350            104
2351        }
2352    }
2353
2354    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ConnectRequest, D>
2355        for &ConnectRequest
2356    {
2357        #[inline]
2358        unsafe fn encode(
2359            self,
2360            encoder: &mut fidl::encoding::Encoder<'_, D>,
2361            offset: usize,
2362            _depth: fidl::encoding::Depth,
2363        ) -> fidl::Result<()> {
2364            encoder.debug_check_bounds::<ConnectRequest>(offset);
2365            // Delegate to tuple encoding.
2366            fidl::encoding::Encode::<ConnectRequest, D>::encode(
2367                (
2368                    <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssid),
2369                    <fidl_fuchsia_wlan_common__common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.bss_description),
2370                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.multiple_bss_candidates),
2371                    <fidl_fuchsia_wlan_common_security__common::Authentication as fidl::encoding::ValueTypeMarker>::borrow(&self.authentication),
2372                    <fidl_fuchsia_wlan_common__common::ScanType as fidl::encoding::ValueTypeMarker>::borrow(&self.deprecated_scan_type),
2373                ),
2374                encoder, offset, _depth
2375            )
2376        }
2377    }
2378    unsafe impl<
2379        D: fidl::encoding::ResourceDialect,
2380        T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
2381        T1: fidl::encoding::Encode<fidl_fuchsia_wlan_common__common::BssDescription, D>,
2382        T2: fidl::encoding::Encode<bool, D>,
2383        T3: fidl::encoding::Encode<fidl_fuchsia_wlan_common_security__common::Authentication, D>,
2384        T4: fidl::encoding::Encode<fidl_fuchsia_wlan_common__common::ScanType, D>,
2385    > fidl::encoding::Encode<ConnectRequest, D> for (T0, T1, T2, T3, T4)
2386    {
2387        #[inline]
2388        unsafe fn encode(
2389            self,
2390            encoder: &mut fidl::encoding::Encoder<'_, D>,
2391            offset: usize,
2392            depth: fidl::encoding::Depth,
2393        ) -> fidl::Result<()> {
2394            encoder.debug_check_bounds::<ConnectRequest>(offset);
2395            // Zero out padding regions. There's no need to apply masks
2396            // because the unmasked parts will be overwritten by fields.
2397            unsafe {
2398                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(64);
2399                (ptr as *mut u64).write_unaligned(0);
2400            }
2401            unsafe {
2402                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(96);
2403                (ptr as *mut u64).write_unaligned(0);
2404            }
2405            // Write the fields.
2406            self.0.encode(encoder, offset + 0, depth)?;
2407            self.1.encode(encoder, offset + 16, depth)?;
2408            self.2.encode(encoder, offset + 64, depth)?;
2409            self.3.encode(encoder, offset + 72, depth)?;
2410            self.4.encode(encoder, offset + 96, depth)?;
2411            Ok(())
2412        }
2413    }
2414
2415    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ConnectRequest {
2416        #[inline(always)]
2417        fn new_empty() -> Self {
2418            Self {
2419                ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
2420                bss_description: fidl::new_empty!(
2421                    fidl_fuchsia_wlan_common__common::BssDescription,
2422                    D
2423                ),
2424                multiple_bss_candidates: fidl::new_empty!(bool, D),
2425                authentication: fidl::new_empty!(
2426                    fidl_fuchsia_wlan_common_security__common::Authentication,
2427                    D
2428                ),
2429                deprecated_scan_type: fidl::new_empty!(
2430                    fidl_fuchsia_wlan_common__common::ScanType,
2431                    D
2432                ),
2433            }
2434        }
2435
2436        #[inline]
2437        unsafe fn decode(
2438            &mut self,
2439            decoder: &mut fidl::encoding::Decoder<'_, D>,
2440            offset: usize,
2441            _depth: fidl::encoding::Depth,
2442        ) -> fidl::Result<()> {
2443            decoder.debug_check_bounds::<Self>(offset);
2444            // Verify that padding bytes are zero.
2445            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(64) };
2446            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2447            let mask = 0xffffffffffffff00u64;
2448            let maskedval = padval & mask;
2449            if maskedval != 0 {
2450                return Err(fidl::Error::NonZeroPadding {
2451                    padding_start: offset + 64 + ((mask as u64).trailing_zeros() / 8) as usize,
2452                });
2453            }
2454            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(96) };
2455            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2456            let mask = 0xffffffff00000000u64;
2457            let maskedval = padval & mask;
2458            if maskedval != 0 {
2459                return Err(fidl::Error::NonZeroPadding {
2460                    padding_start: offset + 96 + ((mask as u64).trailing_zeros() / 8) as usize,
2461                });
2462            }
2463            fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 0, _depth)?;
2464            fidl::decode!(
2465                fidl_fuchsia_wlan_common__common::BssDescription,
2466                D,
2467                &mut self.bss_description,
2468                decoder,
2469                offset + 16,
2470                _depth
2471            )?;
2472            fidl::decode!(
2473                bool,
2474                D,
2475                &mut self.multiple_bss_candidates,
2476                decoder,
2477                offset + 64,
2478                _depth
2479            )?;
2480            fidl::decode!(
2481                fidl_fuchsia_wlan_common_security__common::Authentication,
2482                D,
2483                &mut self.authentication,
2484                decoder,
2485                offset + 72,
2486                _depth
2487            )?;
2488            fidl::decode!(
2489                fidl_fuchsia_wlan_common__common::ScanType,
2490                D,
2491                &mut self.deprecated_scan_type,
2492                decoder,
2493                offset + 96,
2494                _depth
2495            )?;
2496            Ok(())
2497        }
2498    }
2499
2500    impl fidl::encoding::ValueTypeMarker for ConnectResult {
2501        type Borrowed<'a> = &'a Self;
2502        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2503            value
2504        }
2505    }
2506
2507    unsafe impl fidl::encoding::TypeMarker for ConnectResult {
2508        type Owned = Self;
2509
2510        #[inline(always)]
2511        fn inline_align(_context: fidl::encoding::Context) -> usize {
2512            2
2513        }
2514
2515        #[inline(always)]
2516        fn inline_size(_context: fidl::encoding::Context) -> usize {
2517            4
2518        }
2519    }
2520
2521    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ConnectResult, D>
2522        for &ConnectResult
2523    {
2524        #[inline]
2525        unsafe fn encode(
2526            self,
2527            encoder: &mut fidl::encoding::Encoder<'_, D>,
2528            offset: usize,
2529            _depth: fidl::encoding::Depth,
2530        ) -> fidl::Result<()> {
2531            encoder.debug_check_bounds::<ConnectResult>(offset);
2532            // Delegate to tuple encoding.
2533            fidl::encoding::Encode::<ConnectResult, D>::encode(
2534                (
2535                    <fidl_fuchsia_wlan_ieee80211__common::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.code),
2536                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.is_credential_rejected),
2537                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.is_reconnect),
2538                ),
2539                encoder, offset, _depth
2540            )
2541        }
2542    }
2543    unsafe impl<
2544        D: fidl::encoding::ResourceDialect,
2545        T0: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211__common::StatusCode, D>,
2546        T1: fidl::encoding::Encode<bool, D>,
2547        T2: fidl::encoding::Encode<bool, D>,
2548    > fidl::encoding::Encode<ConnectResult, D> for (T0, T1, T2)
2549    {
2550        #[inline]
2551        unsafe fn encode(
2552            self,
2553            encoder: &mut fidl::encoding::Encoder<'_, D>,
2554            offset: usize,
2555            depth: fidl::encoding::Depth,
2556        ) -> fidl::Result<()> {
2557            encoder.debug_check_bounds::<ConnectResult>(offset);
2558            // Zero out padding regions. There's no need to apply masks
2559            // because the unmasked parts will be overwritten by fields.
2560            // Write the fields.
2561            self.0.encode(encoder, offset + 0, depth)?;
2562            self.1.encode(encoder, offset + 2, depth)?;
2563            self.2.encode(encoder, offset + 3, depth)?;
2564            Ok(())
2565        }
2566    }
2567
2568    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ConnectResult {
2569        #[inline(always)]
2570        fn new_empty() -> Self {
2571            Self {
2572                code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::StatusCode, D),
2573                is_credential_rejected: fidl::new_empty!(bool, D),
2574                is_reconnect: fidl::new_empty!(bool, D),
2575            }
2576        }
2577
2578        #[inline]
2579        unsafe fn decode(
2580            &mut self,
2581            decoder: &mut fidl::encoding::Decoder<'_, D>,
2582            offset: usize,
2583            _depth: fidl::encoding::Depth,
2584        ) -> fidl::Result<()> {
2585            decoder.debug_check_bounds::<Self>(offset);
2586            // Verify that padding bytes are zero.
2587            fidl::decode!(
2588                fidl_fuchsia_wlan_ieee80211__common::StatusCode,
2589                D,
2590                &mut self.code,
2591                decoder,
2592                offset + 0,
2593                _depth
2594            )?;
2595            fidl::decode!(bool, D, &mut self.is_credential_rejected, decoder, offset + 2, _depth)?;
2596            fidl::decode!(bool, D, &mut self.is_reconnect, decoder, offset + 3, _depth)?;
2597            Ok(())
2598        }
2599    }
2600
2601    impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnChannelSwitchedRequest {
2602        type Borrowed<'a> = &'a Self;
2603        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2604            value
2605        }
2606    }
2607
2608    unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnChannelSwitchedRequest {
2609        type Owned = Self;
2610
2611        #[inline(always)]
2612        fn inline_align(_context: fidl::encoding::Context) -> usize {
2613            1
2614        }
2615
2616        #[inline(always)]
2617        fn inline_size(_context: fidl::encoding::Context) -> usize {
2618            1
2619        }
2620    }
2621
2622    unsafe impl<D: fidl::encoding::ResourceDialect>
2623        fidl::encoding::Encode<ConnectTransactionOnChannelSwitchedRequest, D>
2624        for &ConnectTransactionOnChannelSwitchedRequest
2625    {
2626        #[inline]
2627        unsafe fn encode(
2628            self,
2629            encoder: &mut fidl::encoding::Encoder<'_, D>,
2630            offset: usize,
2631            _depth: fidl::encoding::Depth,
2632        ) -> fidl::Result<()> {
2633            encoder.debug_check_bounds::<ConnectTransactionOnChannelSwitchedRequest>(offset);
2634            // Delegate to tuple encoding.
2635            fidl::encoding::Encode::<ConnectTransactionOnChannelSwitchedRequest, D>::encode(
2636                (
2637                    <fidl_fuchsia_wlan_internal__common::ChannelSwitchInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),
2638                ),
2639                encoder, offset, _depth
2640            )
2641        }
2642    }
2643    unsafe impl<
2644        D: fidl::encoding::ResourceDialect,
2645        T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal__common::ChannelSwitchInfo, D>,
2646    > fidl::encoding::Encode<ConnectTransactionOnChannelSwitchedRequest, D> for (T0,)
2647    {
2648        #[inline]
2649        unsafe fn encode(
2650            self,
2651            encoder: &mut fidl::encoding::Encoder<'_, D>,
2652            offset: usize,
2653            depth: fidl::encoding::Depth,
2654        ) -> fidl::Result<()> {
2655            encoder.debug_check_bounds::<ConnectTransactionOnChannelSwitchedRequest>(offset);
2656            // Zero out padding regions. There's no need to apply masks
2657            // because the unmasked parts will be overwritten by fields.
2658            // Write the fields.
2659            self.0.encode(encoder, offset + 0, depth)?;
2660            Ok(())
2661        }
2662    }
2663
2664    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2665        for ConnectTransactionOnChannelSwitchedRequest
2666    {
2667        #[inline(always)]
2668        fn new_empty() -> Self {
2669            Self {
2670                info: fidl::new_empty!(fidl_fuchsia_wlan_internal__common::ChannelSwitchInfo, D),
2671            }
2672        }
2673
2674        #[inline]
2675        unsafe fn decode(
2676            &mut self,
2677            decoder: &mut fidl::encoding::Decoder<'_, D>,
2678            offset: usize,
2679            _depth: fidl::encoding::Depth,
2680        ) -> fidl::Result<()> {
2681            decoder.debug_check_bounds::<Self>(offset);
2682            // Verify that padding bytes are zero.
2683            fidl::decode!(
2684                fidl_fuchsia_wlan_internal__common::ChannelSwitchInfo,
2685                D,
2686                &mut self.info,
2687                decoder,
2688                offset + 0,
2689                _depth
2690            )?;
2691            Ok(())
2692        }
2693    }
2694
2695    impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnConnectResultRequest {
2696        type Borrowed<'a> = &'a Self;
2697        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2698            value
2699        }
2700    }
2701
2702    unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnConnectResultRequest {
2703        type Owned = Self;
2704
2705        #[inline(always)]
2706        fn inline_align(_context: fidl::encoding::Context) -> usize {
2707            2
2708        }
2709
2710        #[inline(always)]
2711        fn inline_size(_context: fidl::encoding::Context) -> usize {
2712            4
2713        }
2714    }
2715
2716    unsafe impl<D: fidl::encoding::ResourceDialect>
2717        fidl::encoding::Encode<ConnectTransactionOnConnectResultRequest, D>
2718        for &ConnectTransactionOnConnectResultRequest
2719    {
2720        #[inline]
2721        unsafe fn encode(
2722            self,
2723            encoder: &mut fidl::encoding::Encoder<'_, D>,
2724            offset: usize,
2725            _depth: fidl::encoding::Depth,
2726        ) -> fidl::Result<()> {
2727            encoder.debug_check_bounds::<ConnectTransactionOnConnectResultRequest>(offset);
2728            // Delegate to tuple encoding.
2729            fidl::encoding::Encode::<ConnectTransactionOnConnectResultRequest, D>::encode(
2730                (<ConnectResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
2731                encoder,
2732                offset,
2733                _depth,
2734            )
2735        }
2736    }
2737    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ConnectResult, D>>
2738        fidl::encoding::Encode<ConnectTransactionOnConnectResultRequest, D> for (T0,)
2739    {
2740        #[inline]
2741        unsafe fn encode(
2742            self,
2743            encoder: &mut fidl::encoding::Encoder<'_, D>,
2744            offset: usize,
2745            depth: fidl::encoding::Depth,
2746        ) -> fidl::Result<()> {
2747            encoder.debug_check_bounds::<ConnectTransactionOnConnectResultRequest>(offset);
2748            // Zero out padding regions. There's no need to apply masks
2749            // because the unmasked parts will be overwritten by fields.
2750            // Write the fields.
2751            self.0.encode(encoder, offset + 0, depth)?;
2752            Ok(())
2753        }
2754    }
2755
2756    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2757        for ConnectTransactionOnConnectResultRequest
2758    {
2759        #[inline(always)]
2760        fn new_empty() -> Self {
2761            Self { result: fidl::new_empty!(ConnectResult, D) }
2762        }
2763
2764        #[inline]
2765        unsafe fn decode(
2766            &mut self,
2767            decoder: &mut fidl::encoding::Decoder<'_, D>,
2768            offset: usize,
2769            _depth: fidl::encoding::Depth,
2770        ) -> fidl::Result<()> {
2771            decoder.debug_check_bounds::<Self>(offset);
2772            // Verify that padding bytes are zero.
2773            fidl::decode!(ConnectResult, D, &mut self.result, decoder, offset + 0, _depth)?;
2774            Ok(())
2775        }
2776    }
2777
2778    impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnDisconnectRequest {
2779        type Borrowed<'a> = &'a Self;
2780        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2781            value
2782        }
2783    }
2784
2785    unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnDisconnectRequest {
2786        type Owned = Self;
2787
2788        #[inline(always)]
2789        fn inline_align(_context: fidl::encoding::Context) -> usize {
2790            8
2791        }
2792
2793        #[inline(always)]
2794        fn inline_size(_context: fidl::encoding::Context) -> usize {
2795            24
2796        }
2797    }
2798
2799    unsafe impl<D: fidl::encoding::ResourceDialect>
2800        fidl::encoding::Encode<ConnectTransactionOnDisconnectRequest, D>
2801        for &ConnectTransactionOnDisconnectRequest
2802    {
2803        #[inline]
2804        unsafe fn encode(
2805            self,
2806            encoder: &mut fidl::encoding::Encoder<'_, D>,
2807            offset: usize,
2808            _depth: fidl::encoding::Depth,
2809        ) -> fidl::Result<()> {
2810            encoder.debug_check_bounds::<ConnectTransactionOnDisconnectRequest>(offset);
2811            // Delegate to tuple encoding.
2812            fidl::encoding::Encode::<ConnectTransactionOnDisconnectRequest, D>::encode(
2813                (<DisconnectInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),),
2814                encoder,
2815                offset,
2816                _depth,
2817            )
2818        }
2819    }
2820    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<DisconnectInfo, D>>
2821        fidl::encoding::Encode<ConnectTransactionOnDisconnectRequest, D> for (T0,)
2822    {
2823        #[inline]
2824        unsafe fn encode(
2825            self,
2826            encoder: &mut fidl::encoding::Encoder<'_, D>,
2827            offset: usize,
2828            depth: fidl::encoding::Depth,
2829        ) -> fidl::Result<()> {
2830            encoder.debug_check_bounds::<ConnectTransactionOnDisconnectRequest>(offset);
2831            // Zero out padding regions. There's no need to apply masks
2832            // because the unmasked parts will be overwritten by fields.
2833            // Write the fields.
2834            self.0.encode(encoder, offset + 0, depth)?;
2835            Ok(())
2836        }
2837    }
2838
2839    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2840        for ConnectTransactionOnDisconnectRequest
2841    {
2842        #[inline(always)]
2843        fn new_empty() -> Self {
2844            Self { info: fidl::new_empty!(DisconnectInfo, D) }
2845        }
2846
2847        #[inline]
2848        unsafe fn decode(
2849            &mut self,
2850            decoder: &mut fidl::encoding::Decoder<'_, D>,
2851            offset: usize,
2852            _depth: fidl::encoding::Depth,
2853        ) -> fidl::Result<()> {
2854            decoder.debug_check_bounds::<Self>(offset);
2855            // Verify that padding bytes are zero.
2856            fidl::decode!(DisconnectInfo, D, &mut self.info, decoder, offset + 0, _depth)?;
2857            Ok(())
2858        }
2859    }
2860
2861    impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnRoamResultRequest {
2862        type Borrowed<'a> = &'a Self;
2863        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2864            value
2865        }
2866    }
2867
2868    unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnRoamResultRequest {
2869        type Owned = Self;
2870
2871        #[inline(always)]
2872        fn inline_align(_context: fidl::encoding::Context) -> usize {
2873            8
2874        }
2875
2876        #[inline(always)]
2877        fn inline_size(_context: fidl::encoding::Context) -> usize {
2878            40
2879        }
2880    }
2881
2882    unsafe impl<D: fidl::encoding::ResourceDialect>
2883        fidl::encoding::Encode<ConnectTransactionOnRoamResultRequest, D>
2884        for &ConnectTransactionOnRoamResultRequest
2885    {
2886        #[inline]
2887        unsafe fn encode(
2888            self,
2889            encoder: &mut fidl::encoding::Encoder<'_, D>,
2890            offset: usize,
2891            _depth: fidl::encoding::Depth,
2892        ) -> fidl::Result<()> {
2893            encoder.debug_check_bounds::<ConnectTransactionOnRoamResultRequest>(offset);
2894            // Delegate to tuple encoding.
2895            fidl::encoding::Encode::<ConnectTransactionOnRoamResultRequest, D>::encode(
2896                (<RoamResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
2897                encoder,
2898                offset,
2899                _depth,
2900            )
2901        }
2902    }
2903    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<RoamResult, D>>
2904        fidl::encoding::Encode<ConnectTransactionOnRoamResultRequest, D> for (T0,)
2905    {
2906        #[inline]
2907        unsafe fn encode(
2908            self,
2909            encoder: &mut fidl::encoding::Encoder<'_, D>,
2910            offset: usize,
2911            depth: fidl::encoding::Depth,
2912        ) -> fidl::Result<()> {
2913            encoder.debug_check_bounds::<ConnectTransactionOnRoamResultRequest>(offset);
2914            // Zero out padding regions. There's no need to apply masks
2915            // because the unmasked parts will be overwritten by fields.
2916            // Write the fields.
2917            self.0.encode(encoder, offset + 0, depth)?;
2918            Ok(())
2919        }
2920    }
2921
2922    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2923        for ConnectTransactionOnRoamResultRequest
2924    {
2925        #[inline(always)]
2926        fn new_empty() -> Self {
2927            Self { result: fidl::new_empty!(RoamResult, D) }
2928        }
2929
2930        #[inline]
2931        unsafe fn decode(
2932            &mut self,
2933            decoder: &mut fidl::encoding::Decoder<'_, D>,
2934            offset: usize,
2935            _depth: fidl::encoding::Depth,
2936        ) -> fidl::Result<()> {
2937            decoder.debug_check_bounds::<Self>(offset);
2938            // Verify that padding bytes are zero.
2939            fidl::decode!(RoamResult, D, &mut self.result, decoder, offset + 0, _depth)?;
2940            Ok(())
2941        }
2942    }
2943
2944    impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnSignalReportRequest {
2945        type Borrowed<'a> = &'a Self;
2946        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2947            value
2948        }
2949    }
2950
2951    unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnSignalReportRequest {
2952        type Owned = Self;
2953
2954        #[inline(always)]
2955        fn inline_align(_context: fidl::encoding::Context) -> usize {
2956            1
2957        }
2958
2959        #[inline(always)]
2960        fn inline_size(_context: fidl::encoding::Context) -> usize {
2961            2
2962        }
2963    }
2964
2965    unsafe impl<D: fidl::encoding::ResourceDialect>
2966        fidl::encoding::Encode<ConnectTransactionOnSignalReportRequest, D>
2967        for &ConnectTransactionOnSignalReportRequest
2968    {
2969        #[inline]
2970        unsafe fn encode(
2971            self,
2972            encoder: &mut fidl::encoding::Encoder<'_, D>,
2973            offset: usize,
2974            _depth: fidl::encoding::Depth,
2975        ) -> fidl::Result<()> {
2976            encoder.debug_check_bounds::<ConnectTransactionOnSignalReportRequest>(offset);
2977            // Delegate to tuple encoding.
2978            fidl::encoding::Encode::<ConnectTransactionOnSignalReportRequest, D>::encode(
2979                (
2980                    <fidl_fuchsia_wlan_internal__common::SignalReportIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),
2981                ),
2982                encoder, offset, _depth
2983            )
2984        }
2985    }
2986    unsafe impl<
2987        D: fidl::encoding::ResourceDialect,
2988        T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal__common::SignalReportIndication, D>,
2989    > fidl::encoding::Encode<ConnectTransactionOnSignalReportRequest, D> for (T0,)
2990    {
2991        #[inline]
2992        unsafe fn encode(
2993            self,
2994            encoder: &mut fidl::encoding::Encoder<'_, D>,
2995            offset: usize,
2996            depth: fidl::encoding::Depth,
2997        ) -> fidl::Result<()> {
2998            encoder.debug_check_bounds::<ConnectTransactionOnSignalReportRequest>(offset);
2999            // Zero out padding regions. There's no need to apply masks
3000            // because the unmasked parts will be overwritten by fields.
3001            // Write the fields.
3002            self.0.encode(encoder, offset + 0, depth)?;
3003            Ok(())
3004        }
3005    }
3006
3007    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3008        for ConnectTransactionOnSignalReportRequest
3009    {
3010        #[inline(always)]
3011        fn new_empty() -> Self {
3012            Self {
3013                ind: fidl::new_empty!(
3014                    fidl_fuchsia_wlan_internal__common::SignalReportIndication,
3015                    D
3016                ),
3017            }
3018        }
3019
3020        #[inline]
3021        unsafe fn decode(
3022            &mut self,
3023            decoder: &mut fidl::encoding::Decoder<'_, D>,
3024            offset: usize,
3025            _depth: fidl::encoding::Depth,
3026        ) -> fidl::Result<()> {
3027            decoder.debug_check_bounds::<Self>(offset);
3028            // Verify that padding bytes are zero.
3029            fidl::decode!(
3030                fidl_fuchsia_wlan_internal__common::SignalReportIndication,
3031                D,
3032                &mut self.ind,
3033                decoder,
3034                offset + 0,
3035                _depth
3036            )?;
3037            Ok(())
3038        }
3039    }
3040
3041    impl fidl::encoding::ValueTypeMarker for DisconnectCause {
3042        type Borrowed<'a> = &'a Self;
3043        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3044            value
3045        }
3046    }
3047
3048    unsafe impl fidl::encoding::TypeMarker for DisconnectCause {
3049        type Owned = Self;
3050
3051        #[inline(always)]
3052        fn inline_align(_context: fidl::encoding::Context) -> usize {
3053            4
3054        }
3055
3056        #[inline(always)]
3057        fn inline_size(_context: fidl::encoding::Context) -> usize {
3058            8
3059        }
3060    }
3061
3062    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisconnectCause, D>
3063        for &DisconnectCause
3064    {
3065        #[inline]
3066        unsafe fn encode(
3067            self,
3068            encoder: &mut fidl::encoding::Encoder<'_, D>,
3069            offset: usize,
3070            _depth: fidl::encoding::Depth,
3071        ) -> fidl::Result<()> {
3072            encoder.debug_check_bounds::<DisconnectCause>(offset);
3073            // Delegate to tuple encoding.
3074            fidl::encoding::Encode::<DisconnectCause, D>::encode(
3075                (
3076                    <DisconnectMlmeEventName as fidl::encoding::ValueTypeMarker>::borrow(&self.mlme_event_name),
3077                    <fidl_fuchsia_wlan_ieee80211__common::ReasonCode as fidl::encoding::ValueTypeMarker>::borrow(&self.reason_code),
3078                ),
3079                encoder, offset, _depth
3080            )
3081        }
3082    }
3083    unsafe impl<
3084        D: fidl::encoding::ResourceDialect,
3085        T0: fidl::encoding::Encode<DisconnectMlmeEventName, D>,
3086        T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211__common::ReasonCode, D>,
3087    > fidl::encoding::Encode<DisconnectCause, D> for (T0, T1)
3088    {
3089        #[inline]
3090        unsafe fn encode(
3091            self,
3092            encoder: &mut fidl::encoding::Encoder<'_, D>,
3093            offset: usize,
3094            depth: fidl::encoding::Depth,
3095        ) -> fidl::Result<()> {
3096            encoder.debug_check_bounds::<DisconnectCause>(offset);
3097            // Zero out padding regions. There's no need to apply masks
3098            // because the unmasked parts will be overwritten by fields.
3099            unsafe {
3100                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
3101                (ptr as *mut u32).write_unaligned(0);
3102            }
3103            // Write the fields.
3104            self.0.encode(encoder, offset + 0, depth)?;
3105            self.1.encode(encoder, offset + 4, depth)?;
3106            Ok(())
3107        }
3108    }
3109
3110    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisconnectCause {
3111        #[inline(always)]
3112        fn new_empty() -> Self {
3113            Self {
3114                mlme_event_name: fidl::new_empty!(DisconnectMlmeEventName, D),
3115                reason_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::ReasonCode, D),
3116            }
3117        }
3118
3119        #[inline]
3120        unsafe fn decode(
3121            &mut self,
3122            decoder: &mut fidl::encoding::Decoder<'_, D>,
3123            offset: usize,
3124            _depth: fidl::encoding::Depth,
3125        ) -> fidl::Result<()> {
3126            decoder.debug_check_bounds::<Self>(offset);
3127            // Verify that padding bytes are zero.
3128            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
3129            let padval = unsafe { (ptr as *const u32).read_unaligned() };
3130            let mask = 0xffff0000u32;
3131            let maskedval = padval & mask;
3132            if maskedval != 0 {
3133                return Err(fidl::Error::NonZeroPadding {
3134                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
3135                });
3136            }
3137            fidl::decode!(
3138                DisconnectMlmeEventName,
3139                D,
3140                &mut self.mlme_event_name,
3141                decoder,
3142                offset + 0,
3143                _depth
3144            )?;
3145            fidl::decode!(
3146                fidl_fuchsia_wlan_ieee80211__common::ReasonCode,
3147                D,
3148                &mut self.reason_code,
3149                decoder,
3150                offset + 4,
3151                _depth
3152            )?;
3153            Ok(())
3154        }
3155    }
3156
3157    impl fidl::encoding::ValueTypeMarker for DisconnectInfo {
3158        type Borrowed<'a> = &'a Self;
3159        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3160            value
3161        }
3162    }
3163
3164    unsafe impl fidl::encoding::TypeMarker for DisconnectInfo {
3165        type Owned = Self;
3166
3167        #[inline(always)]
3168        fn inline_align(_context: fidl::encoding::Context) -> usize {
3169            8
3170        }
3171
3172        #[inline(always)]
3173        fn inline_size(_context: fidl::encoding::Context) -> usize {
3174            24
3175        }
3176    }
3177
3178    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisconnectInfo, D>
3179        for &DisconnectInfo
3180    {
3181        #[inline]
3182        unsafe fn encode(
3183            self,
3184            encoder: &mut fidl::encoding::Encoder<'_, D>,
3185            offset: usize,
3186            _depth: fidl::encoding::Depth,
3187        ) -> fidl::Result<()> {
3188            encoder.debug_check_bounds::<DisconnectInfo>(offset);
3189            // Delegate to tuple encoding.
3190            fidl::encoding::Encode::<DisconnectInfo, D>::encode(
3191                (
3192                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.is_sme_reconnecting),
3193                    <DisconnectSource as fidl::encoding::ValueTypeMarker>::borrow(
3194                        &self.disconnect_source,
3195                    ),
3196                ),
3197                encoder,
3198                offset,
3199                _depth,
3200            )
3201        }
3202    }
3203    unsafe impl<
3204        D: fidl::encoding::ResourceDialect,
3205        T0: fidl::encoding::Encode<bool, D>,
3206        T1: fidl::encoding::Encode<DisconnectSource, D>,
3207    > fidl::encoding::Encode<DisconnectInfo, D> for (T0, T1)
3208    {
3209        #[inline]
3210        unsafe fn encode(
3211            self,
3212            encoder: &mut fidl::encoding::Encoder<'_, D>,
3213            offset: usize,
3214            depth: fidl::encoding::Depth,
3215        ) -> fidl::Result<()> {
3216            encoder.debug_check_bounds::<DisconnectInfo>(offset);
3217            // Zero out padding regions. There's no need to apply masks
3218            // because the unmasked parts will be overwritten by fields.
3219            unsafe {
3220                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
3221                (ptr as *mut u64).write_unaligned(0);
3222            }
3223            // Write the fields.
3224            self.0.encode(encoder, offset + 0, depth)?;
3225            self.1.encode(encoder, offset + 8, depth)?;
3226            Ok(())
3227        }
3228    }
3229
3230    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisconnectInfo {
3231        #[inline(always)]
3232        fn new_empty() -> Self {
3233            Self {
3234                is_sme_reconnecting: fidl::new_empty!(bool, D),
3235                disconnect_source: fidl::new_empty!(DisconnectSource, D),
3236            }
3237        }
3238
3239        #[inline]
3240        unsafe fn decode(
3241            &mut self,
3242            decoder: &mut fidl::encoding::Decoder<'_, D>,
3243            offset: usize,
3244            _depth: fidl::encoding::Depth,
3245        ) -> fidl::Result<()> {
3246            decoder.debug_check_bounds::<Self>(offset);
3247            // Verify that padding bytes are zero.
3248            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
3249            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3250            let mask = 0xffffffffffffff00u64;
3251            let maskedval = padval & mask;
3252            if maskedval != 0 {
3253                return Err(fidl::Error::NonZeroPadding {
3254                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
3255                });
3256            }
3257            fidl::decode!(bool, D, &mut self.is_sme_reconnecting, decoder, offset + 0, _depth)?;
3258            fidl::decode!(
3259                DisconnectSource,
3260                D,
3261                &mut self.disconnect_source,
3262                decoder,
3263                offset + 8,
3264                _depth
3265            )?;
3266            Ok(())
3267        }
3268    }
3269
3270    impl fidl::encoding::ValueTypeMarker for DisjointSecurityProtocol {
3271        type Borrowed<'a> = &'a Self;
3272        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3273            value
3274        }
3275    }
3276
3277    unsafe impl fidl::encoding::TypeMarker for DisjointSecurityProtocol {
3278        type Owned = Self;
3279
3280        #[inline(always)]
3281        fn inline_align(_context: fidl::encoding::Context) -> usize {
3282            4
3283        }
3284
3285        #[inline(always)]
3286        fn inline_size(_context: fidl::encoding::Context) -> usize {
3287            8
3288        }
3289    }
3290
3291    unsafe impl<D: fidl::encoding::ResourceDialect>
3292        fidl::encoding::Encode<DisjointSecurityProtocol, D> for &DisjointSecurityProtocol
3293    {
3294        #[inline]
3295        unsafe fn encode(
3296            self,
3297            encoder: &mut fidl::encoding::Encoder<'_, D>,
3298            offset: usize,
3299            _depth: fidl::encoding::Depth,
3300        ) -> fidl::Result<()> {
3301            encoder.debug_check_bounds::<DisjointSecurityProtocol>(offset);
3302            // Delegate to tuple encoding.
3303            fidl::encoding::Encode::<DisjointSecurityProtocol, D>::encode(
3304                (
3305                    <fidl_fuchsia_wlan_common_security__common::Protocol as fidl::encoding::ValueTypeMarker>::borrow(&self.protocol),
3306                    <fidl_fuchsia_wlan_common__common::WlanMacRole as fidl::encoding::ValueTypeMarker>::borrow(&self.role),
3307                ),
3308                encoder, offset, _depth
3309            )
3310        }
3311    }
3312    unsafe impl<
3313        D: fidl::encoding::ResourceDialect,
3314        T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common_security__common::Protocol, D>,
3315        T1: fidl::encoding::Encode<fidl_fuchsia_wlan_common__common::WlanMacRole, D>,
3316    > fidl::encoding::Encode<DisjointSecurityProtocol, D> for (T0, T1)
3317    {
3318        #[inline]
3319        unsafe fn encode(
3320            self,
3321            encoder: &mut fidl::encoding::Encoder<'_, D>,
3322            offset: usize,
3323            depth: fidl::encoding::Depth,
3324        ) -> fidl::Result<()> {
3325            encoder.debug_check_bounds::<DisjointSecurityProtocol>(offset);
3326            // Zero out padding regions. There's no need to apply masks
3327            // because the unmasked parts will be overwritten by fields.
3328            // Write the fields.
3329            self.0.encode(encoder, offset + 0, depth)?;
3330            self.1.encode(encoder, offset + 4, depth)?;
3331            Ok(())
3332        }
3333    }
3334
3335    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3336        for DisjointSecurityProtocol
3337    {
3338        #[inline(always)]
3339        fn new_empty() -> Self {
3340            Self {
3341                protocol: fidl::new_empty!(fidl_fuchsia_wlan_common_security__common::Protocol, D),
3342                role: fidl::new_empty!(fidl_fuchsia_wlan_common__common::WlanMacRole, D),
3343            }
3344        }
3345
3346        #[inline]
3347        unsafe fn decode(
3348            &mut self,
3349            decoder: &mut fidl::encoding::Decoder<'_, D>,
3350            offset: usize,
3351            _depth: fidl::encoding::Depth,
3352        ) -> fidl::Result<()> {
3353            decoder.debug_check_bounds::<Self>(offset);
3354            // Verify that padding bytes are zero.
3355            fidl::decode!(
3356                fidl_fuchsia_wlan_common_security__common::Protocol,
3357                D,
3358                &mut self.protocol,
3359                decoder,
3360                offset + 0,
3361                _depth
3362            )?;
3363            fidl::decode!(
3364                fidl_fuchsia_wlan_common__common::WlanMacRole,
3365                D,
3366                &mut self.role,
3367                decoder,
3368                offset + 4,
3369                _depth
3370            )?;
3371            Ok(())
3372        }
3373    }
3374
3375    impl fidl::encoding::ValueTypeMarker for Empty {
3376        type Borrowed<'a> = &'a Self;
3377        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3378            value
3379        }
3380    }
3381
3382    unsafe impl fidl::encoding::TypeMarker for Empty {
3383        type Owned = Self;
3384
3385        #[inline(always)]
3386        fn inline_align(_context: fidl::encoding::Context) -> usize {
3387            1
3388        }
3389
3390        #[inline(always)]
3391        fn inline_size(_context: fidl::encoding::Context) -> usize {
3392            1
3393        }
3394    }
3395
3396    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Empty, D> for &Empty {
3397        #[inline]
3398        unsafe fn encode(
3399            self,
3400            encoder: &mut fidl::encoding::Encoder<'_, D>,
3401            offset: usize,
3402            _depth: fidl::encoding::Depth,
3403        ) -> fidl::Result<()> {
3404            encoder.debug_check_bounds::<Empty>(offset);
3405            encoder.write_num(0u8, offset);
3406            Ok(())
3407        }
3408    }
3409
3410    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Empty {
3411        #[inline(always)]
3412        fn new_empty() -> Self {
3413            Self
3414        }
3415
3416        #[inline]
3417        unsafe fn decode(
3418            &mut self,
3419            decoder: &mut fidl::encoding::Decoder<'_, D>,
3420            offset: usize,
3421            _depth: fidl::encoding::Depth,
3422        ) -> fidl::Result<()> {
3423            decoder.debug_check_bounds::<Self>(offset);
3424            match decoder.read_num::<u8>(offset) {
3425                0 => Ok(()),
3426                _ => Err(fidl::Error::Invalid),
3427            }
3428        }
3429    }
3430
3431    impl fidl::encoding::ValueTypeMarker for GenericSmeQuery {
3432        type Borrowed<'a> = &'a Self;
3433        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3434            value
3435        }
3436    }
3437
3438    unsafe impl fidl::encoding::TypeMarker for GenericSmeQuery {
3439        type Owned = Self;
3440
3441        #[inline(always)]
3442        fn inline_align(_context: fidl::encoding::Context) -> usize {
3443            4
3444        }
3445
3446        #[inline(always)]
3447        fn inline_size(_context: fidl::encoding::Context) -> usize {
3448            12
3449        }
3450    }
3451
3452    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GenericSmeQuery, D>
3453        for &GenericSmeQuery
3454    {
3455        #[inline]
3456        unsafe fn encode(
3457            self,
3458            encoder: &mut fidl::encoding::Encoder<'_, D>,
3459            offset: usize,
3460            _depth: fidl::encoding::Depth,
3461        ) -> fidl::Result<()> {
3462            encoder.debug_check_bounds::<GenericSmeQuery>(offset);
3463            // Delegate to tuple encoding.
3464            fidl::encoding::Encode::<GenericSmeQuery, D>::encode(
3465                (
3466                    <fidl_fuchsia_wlan_common__common::WlanMacRole as fidl::encoding::ValueTypeMarker>::borrow(&self.role),
3467                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.sta_addr),
3468                ),
3469                encoder, offset, _depth
3470            )
3471        }
3472    }
3473    unsafe impl<
3474        D: fidl::encoding::ResourceDialect,
3475        T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common__common::WlanMacRole, D>,
3476        T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
3477    > fidl::encoding::Encode<GenericSmeQuery, D> for (T0, T1)
3478    {
3479        #[inline]
3480        unsafe fn encode(
3481            self,
3482            encoder: &mut fidl::encoding::Encoder<'_, D>,
3483            offset: usize,
3484            depth: fidl::encoding::Depth,
3485        ) -> fidl::Result<()> {
3486            encoder.debug_check_bounds::<GenericSmeQuery>(offset);
3487            // Zero out padding regions. There's no need to apply masks
3488            // because the unmasked parts will be overwritten by fields.
3489            unsafe {
3490                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
3491                (ptr as *mut u32).write_unaligned(0);
3492            }
3493            // Write the fields.
3494            self.0.encode(encoder, offset + 0, depth)?;
3495            self.1.encode(encoder, offset + 4, depth)?;
3496            Ok(())
3497        }
3498    }
3499
3500    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GenericSmeQuery {
3501        #[inline(always)]
3502        fn new_empty() -> Self {
3503            Self {
3504                role: fidl::new_empty!(fidl_fuchsia_wlan_common__common::WlanMacRole, D),
3505                sta_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
3506            }
3507        }
3508
3509        #[inline]
3510        unsafe fn decode(
3511            &mut self,
3512            decoder: &mut fidl::encoding::Decoder<'_, D>,
3513            offset: usize,
3514            _depth: fidl::encoding::Depth,
3515        ) -> fidl::Result<()> {
3516            decoder.debug_check_bounds::<Self>(offset);
3517            // Verify that padding bytes are zero.
3518            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
3519            let padval = unsafe { (ptr as *const u32).read_unaligned() };
3520            let mask = 0xffff0000u32;
3521            let maskedval = padval & mask;
3522            if maskedval != 0 {
3523                return Err(fidl::Error::NonZeroPadding {
3524                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
3525                });
3526            }
3527            fidl::decode!(
3528                fidl_fuchsia_wlan_common__common::WlanMacRole,
3529                D,
3530                &mut self.role,
3531                decoder,
3532                offset + 0,
3533                _depth
3534            )?;
3535            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.sta_addr, decoder, offset + 4, _depth)?;
3536            Ok(())
3537        }
3538    }
3539
3540    impl fidl::encoding::ValueTypeMarker for Incompatible {
3541        type Borrowed<'a> = &'a Self;
3542        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3543            value
3544        }
3545    }
3546
3547    unsafe impl fidl::encoding::TypeMarker for Incompatible {
3548        type Owned = Self;
3549
3550        #[inline(always)]
3551        fn inline_align(_context: fidl::encoding::Context) -> usize {
3552            8
3553        }
3554
3555        #[inline(always)]
3556        fn inline_size(_context: fidl::encoding::Context) -> usize {
3557            32
3558        }
3559    }
3560
3561    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Incompatible, D>
3562        for &Incompatible
3563    {
3564        #[inline]
3565        unsafe fn encode(
3566            self,
3567            encoder: &mut fidl::encoding::Encoder<'_, D>,
3568            offset: usize,
3569            _depth: fidl::encoding::Depth,
3570        ) -> fidl::Result<()> {
3571            encoder.debug_check_bounds::<Incompatible>(offset);
3572            // Delegate to tuple encoding.
3573            fidl::encoding::Encode::<Incompatible, D>::encode(
3574                (
3575                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.description),
3576                    <fidl::encoding::Optional<fidl::encoding::Vector<DisjointSecurityProtocol, 32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.disjoint_security_protocols),
3577                ),
3578                encoder, offset, _depth
3579            )
3580        }
3581    }
3582    unsafe impl<
3583        D: fidl::encoding::ResourceDialect,
3584        T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
3585        T1: fidl::encoding::Encode<
3586                fidl::encoding::Optional<fidl::encoding::Vector<DisjointSecurityProtocol, 32>>,
3587                D,
3588            >,
3589    > fidl::encoding::Encode<Incompatible, D> for (T0, T1)
3590    {
3591        #[inline]
3592        unsafe fn encode(
3593            self,
3594            encoder: &mut fidl::encoding::Encoder<'_, D>,
3595            offset: usize,
3596            depth: fidl::encoding::Depth,
3597        ) -> fidl::Result<()> {
3598            encoder.debug_check_bounds::<Incompatible>(offset);
3599            // Zero out padding regions. There's no need to apply masks
3600            // because the unmasked parts will be overwritten by fields.
3601            // Write the fields.
3602            self.0.encode(encoder, offset + 0, depth)?;
3603            self.1.encode(encoder, offset + 16, depth)?;
3604            Ok(())
3605        }
3606    }
3607
3608    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Incompatible {
3609        #[inline(always)]
3610        fn new_empty() -> Self {
3611            Self {
3612                description: fidl::new_empty!(fidl::encoding::UnboundedString, D),
3613                disjoint_security_protocols: fidl::new_empty!(
3614                    fidl::encoding::Optional<fidl::encoding::Vector<DisjointSecurityProtocol, 32>>,
3615                    D
3616                ),
3617            }
3618        }
3619
3620        #[inline]
3621        unsafe fn decode(
3622            &mut self,
3623            decoder: &mut fidl::encoding::Decoder<'_, D>,
3624            offset: usize,
3625            _depth: fidl::encoding::Depth,
3626        ) -> fidl::Result<()> {
3627            decoder.debug_check_bounds::<Self>(offset);
3628            // Verify that padding bytes are zero.
3629            fidl::decode!(
3630                fidl::encoding::UnboundedString,
3631                D,
3632                &mut self.description,
3633                decoder,
3634                offset + 0,
3635                _depth
3636            )?;
3637            fidl::decode!(
3638                fidl::encoding::Optional<fidl::encoding::Vector<DisjointSecurityProtocol, 32>>,
3639                D,
3640                &mut self.disjoint_security_protocols,
3641                decoder,
3642                offset + 16,
3643                _depth
3644            )?;
3645            Ok(())
3646        }
3647    }
3648
3649    impl fidl::encoding::ValueTypeMarker for LegacyPrivacySupport {
3650        type Borrowed<'a> = &'a Self;
3651        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3652            value
3653        }
3654    }
3655
3656    unsafe impl fidl::encoding::TypeMarker for LegacyPrivacySupport {
3657        type Owned = Self;
3658
3659        #[inline(always)]
3660        fn inline_align(_context: fidl::encoding::Context) -> usize {
3661            1
3662        }
3663
3664        #[inline(always)]
3665        fn inline_size(_context: fidl::encoding::Context) -> usize {
3666            2
3667        }
3668    }
3669
3670    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LegacyPrivacySupport, D>
3671        for &LegacyPrivacySupport
3672    {
3673        #[inline]
3674        unsafe fn encode(
3675            self,
3676            encoder: &mut fidl::encoding::Encoder<'_, D>,
3677            offset: usize,
3678            _depth: fidl::encoding::Depth,
3679        ) -> fidl::Result<()> {
3680            encoder.debug_check_bounds::<LegacyPrivacySupport>(offset);
3681            // Delegate to tuple encoding.
3682            fidl::encoding::Encode::<LegacyPrivacySupport, D>::encode(
3683                (
3684                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.wep_supported),
3685                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.wpa1_supported),
3686                ),
3687                encoder,
3688                offset,
3689                _depth,
3690            )
3691        }
3692    }
3693    unsafe impl<
3694        D: fidl::encoding::ResourceDialect,
3695        T0: fidl::encoding::Encode<bool, D>,
3696        T1: fidl::encoding::Encode<bool, D>,
3697    > fidl::encoding::Encode<LegacyPrivacySupport, D> for (T0, T1)
3698    {
3699        #[inline]
3700        unsafe fn encode(
3701            self,
3702            encoder: &mut fidl::encoding::Encoder<'_, D>,
3703            offset: usize,
3704            depth: fidl::encoding::Depth,
3705        ) -> fidl::Result<()> {
3706            encoder.debug_check_bounds::<LegacyPrivacySupport>(offset);
3707            // Zero out padding regions. There's no need to apply masks
3708            // because the unmasked parts will be overwritten by fields.
3709            // Write the fields.
3710            self.0.encode(encoder, offset + 0, depth)?;
3711            self.1.encode(encoder, offset + 1, depth)?;
3712            Ok(())
3713        }
3714    }
3715
3716    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LegacyPrivacySupport {
3717        #[inline(always)]
3718        fn new_empty() -> Self {
3719            Self {
3720                wep_supported: fidl::new_empty!(bool, D),
3721                wpa1_supported: fidl::new_empty!(bool, D),
3722            }
3723        }
3724
3725        #[inline]
3726        unsafe fn decode(
3727            &mut self,
3728            decoder: &mut fidl::encoding::Decoder<'_, D>,
3729            offset: usize,
3730            _depth: fidl::encoding::Depth,
3731        ) -> fidl::Result<()> {
3732            decoder.debug_check_bounds::<Self>(offset);
3733            // Verify that padding bytes are zero.
3734            fidl::decode!(bool, D, &mut self.wep_supported, decoder, offset + 0, _depth)?;
3735            fidl::decode!(bool, D, &mut self.wpa1_supported, decoder, offset + 1, _depth)?;
3736            Ok(())
3737        }
3738    }
3739
3740    impl fidl::encoding::ValueTypeMarker for PassiveScanRequest {
3741        type Borrowed<'a> = &'a Self;
3742        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3743            value
3744        }
3745    }
3746
3747    unsafe impl fidl::encoding::TypeMarker for PassiveScanRequest {
3748        type Owned = Self;
3749
3750        #[inline(always)]
3751        fn inline_align(_context: fidl::encoding::Context) -> usize {
3752            1
3753        }
3754
3755        #[inline(always)]
3756        fn inline_size(_context: fidl::encoding::Context) -> usize {
3757            1
3758        }
3759    }
3760
3761    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PassiveScanRequest, D>
3762        for &PassiveScanRequest
3763    {
3764        #[inline]
3765        unsafe fn encode(
3766            self,
3767            encoder: &mut fidl::encoding::Encoder<'_, D>,
3768            offset: usize,
3769            _depth: fidl::encoding::Depth,
3770        ) -> fidl::Result<()> {
3771            encoder.debug_check_bounds::<PassiveScanRequest>(offset);
3772            encoder.write_num(0u8, offset);
3773            Ok(())
3774        }
3775    }
3776
3777    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PassiveScanRequest {
3778        #[inline(always)]
3779        fn new_empty() -> Self {
3780            Self
3781        }
3782
3783        #[inline]
3784        unsafe fn decode(
3785            &mut self,
3786            decoder: &mut fidl::encoding::Decoder<'_, D>,
3787            offset: usize,
3788            _depth: fidl::encoding::Depth,
3789        ) -> fidl::Result<()> {
3790            decoder.debug_check_bounds::<Self>(offset);
3791            match decoder.read_num::<u8>(offset) {
3792                0 => Ok(()),
3793                _ => Err(fidl::Error::Invalid),
3794            }
3795        }
3796    }
3797
3798    impl fidl::encoding::ValueTypeMarker for RadioConfig {
3799        type Borrowed<'a> = &'a Self;
3800        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3801            value
3802        }
3803    }
3804
3805    unsafe impl fidl::encoding::TypeMarker for RadioConfig {
3806        type Owned = Self;
3807
3808        #[inline(always)]
3809        fn inline_align(_context: fidl::encoding::Context) -> usize {
3810            4
3811        }
3812
3813        #[inline(always)]
3814        fn inline_size(_context: fidl::encoding::Context) -> usize {
3815            16
3816        }
3817    }
3818
3819    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RadioConfig, D>
3820        for &RadioConfig
3821    {
3822        #[inline]
3823        unsafe fn encode(
3824            self,
3825            encoder: &mut fidl::encoding::Encoder<'_, D>,
3826            offset: usize,
3827            _depth: fidl::encoding::Depth,
3828        ) -> fidl::Result<()> {
3829            encoder.debug_check_bounds::<RadioConfig>(offset);
3830            // Delegate to tuple encoding.
3831            fidl::encoding::Encode::<RadioConfig, D>::encode(
3832                (
3833                    <fidl_fuchsia_wlan_common__common::WlanPhyType as fidl::encoding::ValueTypeMarker>::borrow(&self.phy),
3834                    <fidl_fuchsia_wlan_ieee80211__common::WlanChannel as fidl::encoding::ValueTypeMarker>::borrow(&self.channel),
3835                ),
3836                encoder, offset, _depth
3837            )
3838        }
3839    }
3840    unsafe impl<
3841        D: fidl::encoding::ResourceDialect,
3842        T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common__common::WlanPhyType, D>,
3843        T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211__common::WlanChannel, D>,
3844    > fidl::encoding::Encode<RadioConfig, D> for (T0, T1)
3845    {
3846        #[inline]
3847        unsafe fn encode(
3848            self,
3849            encoder: &mut fidl::encoding::Encoder<'_, D>,
3850            offset: usize,
3851            depth: fidl::encoding::Depth,
3852        ) -> fidl::Result<()> {
3853            encoder.debug_check_bounds::<RadioConfig>(offset);
3854            // Zero out padding regions. There's no need to apply masks
3855            // because the unmasked parts will be overwritten by fields.
3856            // Write the fields.
3857            self.0.encode(encoder, offset + 0, depth)?;
3858            self.1.encode(encoder, offset + 4, depth)?;
3859            Ok(())
3860        }
3861    }
3862
3863    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RadioConfig {
3864        #[inline(always)]
3865        fn new_empty() -> Self {
3866            Self {
3867                phy: fidl::new_empty!(fidl_fuchsia_wlan_common__common::WlanPhyType, D),
3868                channel: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::WlanChannel, D),
3869            }
3870        }
3871
3872        #[inline]
3873        unsafe fn decode(
3874            &mut self,
3875            decoder: &mut fidl::encoding::Decoder<'_, D>,
3876            offset: usize,
3877            _depth: fidl::encoding::Depth,
3878        ) -> fidl::Result<()> {
3879            decoder.debug_check_bounds::<Self>(offset);
3880            // Verify that padding bytes are zero.
3881            fidl::decode!(
3882                fidl_fuchsia_wlan_common__common::WlanPhyType,
3883                D,
3884                &mut self.phy,
3885                decoder,
3886                offset + 0,
3887                _depth
3888            )?;
3889            fidl::decode!(
3890                fidl_fuchsia_wlan_ieee80211__common::WlanChannel,
3891                D,
3892                &mut self.channel,
3893                decoder,
3894                offset + 4,
3895                _depth
3896            )?;
3897            Ok(())
3898        }
3899    }
3900
3901    impl fidl::encoding::ValueTypeMarker for RoamRequest {
3902        type Borrowed<'a> = &'a Self;
3903        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3904            value
3905        }
3906    }
3907
3908    unsafe impl fidl::encoding::TypeMarker for RoamRequest {
3909        type Owned = Self;
3910
3911        #[inline(always)]
3912        fn inline_align(_context: fidl::encoding::Context) -> usize {
3913            8
3914        }
3915
3916        #[inline(always)]
3917        fn inline_size(_context: fidl::encoding::Context) -> usize {
3918            48
3919        }
3920    }
3921
3922    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RoamRequest, D>
3923        for &RoamRequest
3924    {
3925        #[inline]
3926        unsafe fn encode(
3927            self,
3928            encoder: &mut fidl::encoding::Encoder<'_, D>,
3929            offset: usize,
3930            _depth: fidl::encoding::Depth,
3931        ) -> fidl::Result<()> {
3932            encoder.debug_check_bounds::<RoamRequest>(offset);
3933            // Delegate to tuple encoding.
3934            fidl::encoding::Encode::<RoamRequest, D>::encode(
3935                (
3936                    <fidl_fuchsia_wlan_common__common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.bss_description),
3937                ),
3938                encoder, offset, _depth
3939            )
3940        }
3941    }
3942    unsafe impl<
3943        D: fidl::encoding::ResourceDialect,
3944        T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common__common::BssDescription, D>,
3945    > fidl::encoding::Encode<RoamRequest, D> for (T0,)
3946    {
3947        #[inline]
3948        unsafe fn encode(
3949            self,
3950            encoder: &mut fidl::encoding::Encoder<'_, D>,
3951            offset: usize,
3952            depth: fidl::encoding::Depth,
3953        ) -> fidl::Result<()> {
3954            encoder.debug_check_bounds::<RoamRequest>(offset);
3955            // Zero out padding regions. There's no need to apply masks
3956            // because the unmasked parts will be overwritten by fields.
3957            // Write the fields.
3958            self.0.encode(encoder, offset + 0, depth)?;
3959            Ok(())
3960        }
3961    }
3962
3963    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RoamRequest {
3964        #[inline(always)]
3965        fn new_empty() -> Self {
3966            Self {
3967                bss_description: fidl::new_empty!(
3968                    fidl_fuchsia_wlan_common__common::BssDescription,
3969                    D
3970                ),
3971            }
3972        }
3973
3974        #[inline]
3975        unsafe fn decode(
3976            &mut self,
3977            decoder: &mut fidl::encoding::Decoder<'_, D>,
3978            offset: usize,
3979            _depth: fidl::encoding::Depth,
3980        ) -> fidl::Result<()> {
3981            decoder.debug_check_bounds::<Self>(offset);
3982            // Verify that padding bytes are zero.
3983            fidl::decode!(
3984                fidl_fuchsia_wlan_common__common::BssDescription,
3985                D,
3986                &mut self.bss_description,
3987                decoder,
3988                offset + 0,
3989                _depth
3990            )?;
3991            Ok(())
3992        }
3993    }
3994
3995    impl fidl::encoding::ValueTypeMarker for RoamResult {
3996        type Borrowed<'a> = &'a Self;
3997        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3998            value
3999        }
4000    }
4001
4002    unsafe impl fidl::encoding::TypeMarker for RoamResult {
4003        type Owned = Self;
4004
4005        #[inline(always)]
4006        fn inline_align(_context: fidl::encoding::Context) -> usize {
4007            8
4008        }
4009
4010        #[inline(always)]
4011        fn inline_size(_context: fidl::encoding::Context) -> usize {
4012            40
4013        }
4014    }
4015
4016    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RoamResult, D>
4017        for &RoamResult
4018    {
4019        #[inline]
4020        unsafe fn encode(
4021            self,
4022            encoder: &mut fidl::encoding::Encoder<'_, D>,
4023            offset: usize,
4024            _depth: fidl::encoding::Depth,
4025        ) -> fidl::Result<()> {
4026            encoder.debug_check_bounds::<RoamResult>(offset);
4027            // Delegate to tuple encoding.
4028            fidl::encoding::Encode::<RoamResult, D>::encode(
4029                (
4030                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.bssid),
4031                    <fidl_fuchsia_wlan_ieee80211__common::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.status_code),
4032                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.original_association_maintained),
4033                    <fidl::encoding::Boxed<fidl_fuchsia_wlan_common__common::BssDescription> as fidl::encoding::ValueTypeMarker>::borrow(&self.bss_description),
4034                    <fidl::encoding::Boxed<DisconnectInfo> as fidl::encoding::ValueTypeMarker>::borrow(&self.disconnect_info),
4035                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.is_credential_rejected),
4036                ),
4037                encoder, offset, _depth
4038            )
4039        }
4040    }
4041    unsafe impl<
4042        D: fidl::encoding::ResourceDialect,
4043        T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
4044        T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211__common::StatusCode, D>,
4045        T2: fidl::encoding::Encode<bool, D>,
4046        T3: fidl::encoding::Encode<
4047                fidl::encoding::Boxed<fidl_fuchsia_wlan_common__common::BssDescription>,
4048                D,
4049            >,
4050        T4: fidl::encoding::Encode<fidl::encoding::Boxed<DisconnectInfo>, D>,
4051        T5: fidl::encoding::Encode<bool, D>,
4052    > fidl::encoding::Encode<RoamResult, D> for (T0, T1, T2, T3, T4, T5)
4053    {
4054        #[inline]
4055        unsafe fn encode(
4056            self,
4057            encoder: &mut fidl::encoding::Encoder<'_, D>,
4058            offset: usize,
4059            depth: fidl::encoding::Depth,
4060        ) -> fidl::Result<()> {
4061            encoder.debug_check_bounds::<RoamResult>(offset);
4062            // Zero out padding regions. There's no need to apply masks
4063            // because the unmasked parts will be overwritten by fields.
4064            unsafe {
4065                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
4066                (ptr as *mut u64).write_unaligned(0);
4067            }
4068            unsafe {
4069                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
4070                (ptr as *mut u64).write_unaligned(0);
4071            }
4072            // Write the fields.
4073            self.0.encode(encoder, offset + 0, depth)?;
4074            self.1.encode(encoder, offset + 6, depth)?;
4075            self.2.encode(encoder, offset + 8, depth)?;
4076            self.3.encode(encoder, offset + 16, depth)?;
4077            self.4.encode(encoder, offset + 24, depth)?;
4078            self.5.encode(encoder, offset + 32, depth)?;
4079            Ok(())
4080        }
4081    }
4082
4083    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RoamResult {
4084        #[inline(always)]
4085        fn new_empty() -> Self {
4086            Self {
4087                bssid: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
4088                status_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::StatusCode, D),
4089                original_association_maintained: fidl::new_empty!(bool, D),
4090                bss_description: fidl::new_empty!(
4091                    fidl::encoding::Boxed<fidl_fuchsia_wlan_common__common::BssDescription>,
4092                    D
4093                ),
4094                disconnect_info: fidl::new_empty!(fidl::encoding::Boxed<DisconnectInfo>, D),
4095                is_credential_rejected: fidl::new_empty!(bool, D),
4096            }
4097        }
4098
4099        #[inline]
4100        unsafe fn decode(
4101            &mut self,
4102            decoder: &mut fidl::encoding::Decoder<'_, D>,
4103            offset: usize,
4104            _depth: fidl::encoding::Depth,
4105        ) -> fidl::Result<()> {
4106            decoder.debug_check_bounds::<Self>(offset);
4107            // Verify that padding bytes are zero.
4108            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
4109            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4110            let mask = 0xffffffffffffff00u64;
4111            let maskedval = padval & mask;
4112            if maskedval != 0 {
4113                return Err(fidl::Error::NonZeroPadding {
4114                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
4115                });
4116            }
4117            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
4118            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4119            let mask = 0xffffffffffffff00u64;
4120            let maskedval = padval & mask;
4121            if maskedval != 0 {
4122                return Err(fidl::Error::NonZeroPadding {
4123                    padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
4124                });
4125            }
4126            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.bssid, decoder, offset + 0, _depth)?;
4127            fidl::decode!(
4128                fidl_fuchsia_wlan_ieee80211__common::StatusCode,
4129                D,
4130                &mut self.status_code,
4131                decoder,
4132                offset + 6,
4133                _depth
4134            )?;
4135            fidl::decode!(
4136                bool,
4137                D,
4138                &mut self.original_association_maintained,
4139                decoder,
4140                offset + 8,
4141                _depth
4142            )?;
4143            fidl::decode!(
4144                fidl::encoding::Boxed<fidl_fuchsia_wlan_common__common::BssDescription>,
4145                D,
4146                &mut self.bss_description,
4147                decoder,
4148                offset + 16,
4149                _depth
4150            )?;
4151            fidl::decode!(
4152                fidl::encoding::Boxed<DisconnectInfo>,
4153                D,
4154                &mut self.disconnect_info,
4155                decoder,
4156                offset + 24,
4157                _depth
4158            )?;
4159            fidl::decode!(bool, D, &mut self.is_credential_rejected, decoder, offset + 32, _depth)?;
4160            Ok(())
4161        }
4162    }
4163
4164    impl fidl::encoding::ValueTypeMarker for ScanResult {
4165        type Borrowed<'a> = &'a Self;
4166        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4167            value
4168        }
4169    }
4170
4171    unsafe impl fidl::encoding::TypeMarker for ScanResult {
4172        type Owned = Self;
4173
4174        #[inline(always)]
4175        fn inline_align(_context: fidl::encoding::Context) -> usize {
4176            8
4177        }
4178
4179        #[inline(always)]
4180        fn inline_size(_context: fidl::encoding::Context) -> usize {
4181            72
4182        }
4183    }
4184
4185    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ScanResult, D>
4186        for &ScanResult
4187    {
4188        #[inline]
4189        unsafe fn encode(
4190            self,
4191            encoder: &mut fidl::encoding::Encoder<'_, D>,
4192            offset: usize,
4193            _depth: fidl::encoding::Depth,
4194        ) -> fidl::Result<()> {
4195            encoder.debug_check_bounds::<ScanResult>(offset);
4196            // Delegate to tuple encoding.
4197            fidl::encoding::Encode::<ScanResult, D>::encode(
4198                (
4199                    <Compatibility as fidl::encoding::ValueTypeMarker>::borrow(&self.compatibility),
4200                    <i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.timestamp_nanos),
4201                    <fidl_fuchsia_wlan_common__common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.bss_description),
4202                ),
4203                encoder, offset, _depth
4204            )
4205        }
4206    }
4207    unsafe impl<
4208        D: fidl::encoding::ResourceDialect,
4209        T0: fidl::encoding::Encode<Compatibility, D>,
4210        T1: fidl::encoding::Encode<i64, D>,
4211        T2: fidl::encoding::Encode<fidl_fuchsia_wlan_common__common::BssDescription, D>,
4212    > fidl::encoding::Encode<ScanResult, D> for (T0, T1, T2)
4213    {
4214        #[inline]
4215        unsafe fn encode(
4216            self,
4217            encoder: &mut fidl::encoding::Encoder<'_, D>,
4218            offset: usize,
4219            depth: fidl::encoding::Depth,
4220        ) -> fidl::Result<()> {
4221            encoder.debug_check_bounds::<ScanResult>(offset);
4222            // Zero out padding regions. There's no need to apply masks
4223            // because the unmasked parts will be overwritten by fields.
4224            // Write the fields.
4225            self.0.encode(encoder, offset + 0, depth)?;
4226            self.1.encode(encoder, offset + 16, depth)?;
4227            self.2.encode(encoder, offset + 24, depth)?;
4228            Ok(())
4229        }
4230    }
4231
4232    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanResult {
4233        #[inline(always)]
4234        fn new_empty() -> Self {
4235            Self {
4236                compatibility: fidl::new_empty!(Compatibility, D),
4237                timestamp_nanos: fidl::new_empty!(i64, D),
4238                bss_description: fidl::new_empty!(
4239                    fidl_fuchsia_wlan_common__common::BssDescription,
4240                    D
4241                ),
4242            }
4243        }
4244
4245        #[inline]
4246        unsafe fn decode(
4247            &mut self,
4248            decoder: &mut fidl::encoding::Decoder<'_, D>,
4249            offset: usize,
4250            _depth: fidl::encoding::Depth,
4251        ) -> fidl::Result<()> {
4252            decoder.debug_check_bounds::<Self>(offset);
4253            // Verify that padding bytes are zero.
4254            fidl::decode!(Compatibility, D, &mut self.compatibility, decoder, offset + 0, _depth)?;
4255            fidl::decode!(i64, D, &mut self.timestamp_nanos, decoder, offset + 16, _depth)?;
4256            fidl::decode!(
4257                fidl_fuchsia_wlan_common__common::BssDescription,
4258                D,
4259                &mut self.bss_description,
4260                decoder,
4261                offset + 24,
4262                _depth
4263            )?;
4264            Ok(())
4265        }
4266    }
4267
4268    impl fidl::encoding::ValueTypeMarker for ScanResultVector {
4269        type Borrowed<'a> = &'a Self;
4270        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4271            value
4272        }
4273    }
4274
4275    unsafe impl fidl::encoding::TypeMarker for ScanResultVector {
4276        type Owned = Self;
4277
4278        #[inline(always)]
4279        fn inline_align(_context: fidl::encoding::Context) -> usize {
4280            8
4281        }
4282
4283        #[inline(always)]
4284        fn inline_size(_context: fidl::encoding::Context) -> usize {
4285            16
4286        }
4287    }
4288
4289    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ScanResultVector, D>
4290        for &ScanResultVector
4291    {
4292        #[inline]
4293        unsafe fn encode(
4294            self,
4295            encoder: &mut fidl::encoding::Encoder<'_, D>,
4296            offset: usize,
4297            _depth: fidl::encoding::Depth,
4298        ) -> fidl::Result<()> {
4299            encoder.debug_check_bounds::<ScanResultVector>(offset);
4300            // Delegate to tuple encoding.
4301            fidl::encoding::Encode::<ScanResultVector, D>::encode(
4302                (
4303                    <fidl::encoding::UnboundedVector<ScanResult> as fidl::encoding::ValueTypeMarker>::borrow(&self.results),
4304                ),
4305                encoder, offset, _depth
4306            )
4307        }
4308    }
4309    unsafe impl<
4310        D: fidl::encoding::ResourceDialect,
4311        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<ScanResult>, D>,
4312    > fidl::encoding::Encode<ScanResultVector, D> for (T0,)
4313    {
4314        #[inline]
4315        unsafe fn encode(
4316            self,
4317            encoder: &mut fidl::encoding::Encoder<'_, D>,
4318            offset: usize,
4319            depth: fidl::encoding::Depth,
4320        ) -> fidl::Result<()> {
4321            encoder.debug_check_bounds::<ScanResultVector>(offset);
4322            // Zero out padding regions. There's no need to apply masks
4323            // because the unmasked parts will be overwritten by fields.
4324            // Write the fields.
4325            self.0.encode(encoder, offset + 0, depth)?;
4326            Ok(())
4327        }
4328    }
4329
4330    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanResultVector {
4331        #[inline(always)]
4332        fn new_empty() -> Self {
4333            Self { results: fidl::new_empty!(fidl::encoding::UnboundedVector<ScanResult>, D) }
4334        }
4335
4336        #[inline]
4337        unsafe fn decode(
4338            &mut self,
4339            decoder: &mut fidl::encoding::Decoder<'_, D>,
4340            offset: usize,
4341            _depth: fidl::encoding::Depth,
4342        ) -> fidl::Result<()> {
4343            decoder.debug_check_bounds::<Self>(offset);
4344            // Verify that padding bytes are zero.
4345            fidl::decode!(
4346                fidl::encoding::UnboundedVector<ScanResult>,
4347                D,
4348                &mut self.results,
4349                decoder,
4350                offset + 0,
4351                _depth
4352            )?;
4353            Ok(())
4354        }
4355    }
4356
4357    impl fidl::encoding::ValueTypeMarker for ServingApInfo {
4358        type Borrowed<'a> = &'a Self;
4359        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4360            value
4361        }
4362    }
4363
4364    unsafe impl fidl::encoding::TypeMarker for ServingApInfo {
4365        type Owned = Self;
4366
4367        #[inline(always)]
4368        fn inline_align(_context: fidl::encoding::Context) -> usize {
4369            8
4370        }
4371
4372        #[inline(always)]
4373        fn inline_size(_context: fidl::encoding::Context) -> usize {
4374            48
4375        }
4376    }
4377
4378    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ServingApInfo, D>
4379        for &ServingApInfo
4380    {
4381        #[inline]
4382        unsafe fn encode(
4383            self,
4384            encoder: &mut fidl::encoding::Encoder<'_, D>,
4385            offset: usize,
4386            _depth: fidl::encoding::Depth,
4387        ) -> fidl::Result<()> {
4388            encoder.debug_check_bounds::<ServingApInfo>(offset);
4389            // Delegate to tuple encoding.
4390            fidl::encoding::Encode::<ServingApInfo, D>::encode(
4391                (
4392                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.bssid),
4393                    <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssid),
4394                    <i8 as fidl::encoding::ValueTypeMarker>::borrow(&self.rssi_dbm),
4395                    <i8 as fidl::encoding::ValueTypeMarker>::borrow(&self.snr_db),
4396                    <fidl_fuchsia_wlan_ieee80211__common::WlanChannel as fidl::encoding::ValueTypeMarker>::borrow(&self.channel),
4397                    <Protection as fidl::encoding::ValueTypeMarker>::borrow(&self.protection),
4398                ),
4399                encoder, offset, _depth
4400            )
4401        }
4402    }
4403    unsafe impl<
4404        D: fidl::encoding::ResourceDialect,
4405        T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
4406        T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
4407        T2: fidl::encoding::Encode<i8, D>,
4408        T3: fidl::encoding::Encode<i8, D>,
4409        T4: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211__common::WlanChannel, D>,
4410        T5: fidl::encoding::Encode<Protection, D>,
4411    > fidl::encoding::Encode<ServingApInfo, D> for (T0, T1, T2, T3, T4, T5)
4412    {
4413        #[inline]
4414        unsafe fn encode(
4415            self,
4416            encoder: &mut fidl::encoding::Encoder<'_, D>,
4417            offset: usize,
4418            depth: fidl::encoding::Depth,
4419        ) -> fidl::Result<()> {
4420            encoder.debug_check_bounds::<ServingApInfo>(offset);
4421            // Zero out padding regions. There's no need to apply masks
4422            // because the unmasked parts will be overwritten by fields.
4423            unsafe {
4424                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
4425                (ptr as *mut u64).write_unaligned(0);
4426            }
4427            unsafe {
4428                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
4429                (ptr as *mut u64).write_unaligned(0);
4430            }
4431            unsafe {
4432                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
4433                (ptr as *mut u64).write_unaligned(0);
4434            }
4435            // Write the fields.
4436            self.0.encode(encoder, offset + 0, depth)?;
4437            self.1.encode(encoder, offset + 8, depth)?;
4438            self.2.encode(encoder, offset + 24, depth)?;
4439            self.3.encode(encoder, offset + 25, depth)?;
4440            self.4.encode(encoder, offset + 28, depth)?;
4441            self.5.encode(encoder, offset + 40, depth)?;
4442            Ok(())
4443        }
4444    }
4445
4446    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ServingApInfo {
4447        #[inline(always)]
4448        fn new_empty() -> Self {
4449            Self {
4450                bssid: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
4451                ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
4452                rssi_dbm: fidl::new_empty!(i8, D),
4453                snr_db: fidl::new_empty!(i8, D),
4454                channel: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::WlanChannel, D),
4455                protection: fidl::new_empty!(Protection, D),
4456            }
4457        }
4458
4459        #[inline]
4460        unsafe fn decode(
4461            &mut self,
4462            decoder: &mut fidl::encoding::Decoder<'_, D>,
4463            offset: usize,
4464            _depth: fidl::encoding::Depth,
4465        ) -> fidl::Result<()> {
4466            decoder.debug_check_bounds::<Self>(offset);
4467            // Verify that padding bytes are zero.
4468            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
4469            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4470            let mask = 0xffff000000000000u64;
4471            let maskedval = padval & mask;
4472            if maskedval != 0 {
4473                return Err(fidl::Error::NonZeroPadding {
4474                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
4475                });
4476            }
4477            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
4478            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4479            let mask = 0xffff0000u64;
4480            let maskedval = padval & mask;
4481            if maskedval != 0 {
4482                return Err(fidl::Error::NonZeroPadding {
4483                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
4484                });
4485            }
4486            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
4487            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4488            let mask = 0xffffffff00000000u64;
4489            let maskedval = padval & mask;
4490            if maskedval != 0 {
4491                return Err(fidl::Error::NonZeroPadding {
4492                    padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
4493                });
4494            }
4495            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.bssid, decoder, offset + 0, _depth)?;
4496            fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 8, _depth)?;
4497            fidl::decode!(i8, D, &mut self.rssi_dbm, decoder, offset + 24, _depth)?;
4498            fidl::decode!(i8, D, &mut self.snr_db, decoder, offset + 25, _depth)?;
4499            fidl::decode!(
4500                fidl_fuchsia_wlan_ieee80211__common::WlanChannel,
4501                D,
4502                &mut self.channel,
4503                decoder,
4504                offset + 28,
4505                _depth
4506            )?;
4507            fidl::decode!(Protection, D, &mut self.protection, decoder, offset + 40, _depth)?;
4508            Ok(())
4509        }
4510    }
4511
4512    impl fidl::encoding::ValueTypeMarker for TelemetryGetHistogramStatsResponse {
4513        type Borrowed<'a> = &'a Self;
4514        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4515            value
4516        }
4517    }
4518
4519    unsafe impl fidl::encoding::TypeMarker for TelemetryGetHistogramStatsResponse {
4520        type Owned = Self;
4521
4522        #[inline(always)]
4523        fn inline_align(_context: fidl::encoding::Context) -> usize {
4524            8
4525        }
4526
4527        #[inline(always)]
4528        fn inline_size(_context: fidl::encoding::Context) -> usize {
4529            16
4530        }
4531    }
4532
4533    unsafe impl<D: fidl::encoding::ResourceDialect>
4534        fidl::encoding::Encode<TelemetryGetHistogramStatsResponse, D>
4535        for &TelemetryGetHistogramStatsResponse
4536    {
4537        #[inline]
4538        unsafe fn encode(
4539            self,
4540            encoder: &mut fidl::encoding::Encoder<'_, D>,
4541            offset: usize,
4542            _depth: fidl::encoding::Depth,
4543        ) -> fidl::Result<()> {
4544            encoder.debug_check_bounds::<TelemetryGetHistogramStatsResponse>(offset);
4545            // Delegate to tuple encoding.
4546            fidl::encoding::Encode::<TelemetryGetHistogramStatsResponse, D>::encode(
4547                (
4548                    <fidl_fuchsia_wlan_stats__common::IfaceHistogramStats as fidl::encoding::ValueTypeMarker>::borrow(&self.stats),
4549                ),
4550                encoder, offset, _depth
4551            )
4552        }
4553    }
4554    unsafe impl<
4555        D: fidl::encoding::ResourceDialect,
4556        T0: fidl::encoding::Encode<fidl_fuchsia_wlan_stats__common::IfaceHistogramStats, D>,
4557    > fidl::encoding::Encode<TelemetryGetHistogramStatsResponse, D> for (T0,)
4558    {
4559        #[inline]
4560        unsafe fn encode(
4561            self,
4562            encoder: &mut fidl::encoding::Encoder<'_, D>,
4563            offset: usize,
4564            depth: fidl::encoding::Depth,
4565        ) -> fidl::Result<()> {
4566            encoder.debug_check_bounds::<TelemetryGetHistogramStatsResponse>(offset);
4567            // Zero out padding regions. There's no need to apply masks
4568            // because the unmasked parts will be overwritten by fields.
4569            // Write the fields.
4570            self.0.encode(encoder, offset + 0, depth)?;
4571            Ok(())
4572        }
4573    }
4574
4575    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4576        for TelemetryGetHistogramStatsResponse
4577    {
4578        #[inline(always)]
4579        fn new_empty() -> Self {
4580            Self {
4581                stats: fidl::new_empty!(fidl_fuchsia_wlan_stats__common::IfaceHistogramStats, D),
4582            }
4583        }
4584
4585        #[inline]
4586        unsafe fn decode(
4587            &mut self,
4588            decoder: &mut fidl::encoding::Decoder<'_, D>,
4589            offset: usize,
4590            _depth: fidl::encoding::Depth,
4591        ) -> fidl::Result<()> {
4592            decoder.debug_check_bounds::<Self>(offset);
4593            // Verify that padding bytes are zero.
4594            fidl::decode!(
4595                fidl_fuchsia_wlan_stats__common::IfaceHistogramStats,
4596                D,
4597                &mut self.stats,
4598                decoder,
4599                offset + 0,
4600                _depth
4601            )?;
4602            Ok(())
4603        }
4604    }
4605
4606    impl fidl::encoding::ValueTypeMarker for TelemetryGetIfaceStatsResponse {
4607        type Borrowed<'a> = &'a Self;
4608        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4609            value
4610        }
4611    }
4612
4613    unsafe impl fidl::encoding::TypeMarker for TelemetryGetIfaceStatsResponse {
4614        type Owned = Self;
4615
4616        #[inline(always)]
4617        fn inline_align(_context: fidl::encoding::Context) -> usize {
4618            8
4619        }
4620
4621        #[inline(always)]
4622        fn inline_size(_context: fidl::encoding::Context) -> usize {
4623            16
4624        }
4625    }
4626
4627    unsafe impl<D: fidl::encoding::ResourceDialect>
4628        fidl::encoding::Encode<TelemetryGetIfaceStatsResponse, D>
4629        for &TelemetryGetIfaceStatsResponse
4630    {
4631        #[inline]
4632        unsafe fn encode(
4633            self,
4634            encoder: &mut fidl::encoding::Encoder<'_, D>,
4635            offset: usize,
4636            _depth: fidl::encoding::Depth,
4637        ) -> fidl::Result<()> {
4638            encoder.debug_check_bounds::<TelemetryGetIfaceStatsResponse>(offset);
4639            // Delegate to tuple encoding.
4640            fidl::encoding::Encode::<TelemetryGetIfaceStatsResponse, D>::encode(
4641                (
4642                    <fidl_fuchsia_wlan_stats__common::IfaceStats as fidl::encoding::ValueTypeMarker>::borrow(&self.stats),
4643                ),
4644                encoder, offset, _depth
4645            )
4646        }
4647    }
4648    unsafe impl<
4649        D: fidl::encoding::ResourceDialect,
4650        T0: fidl::encoding::Encode<fidl_fuchsia_wlan_stats__common::IfaceStats, D>,
4651    > fidl::encoding::Encode<TelemetryGetIfaceStatsResponse, D> for (T0,)
4652    {
4653        #[inline]
4654        unsafe fn encode(
4655            self,
4656            encoder: &mut fidl::encoding::Encoder<'_, D>,
4657            offset: usize,
4658            depth: fidl::encoding::Depth,
4659        ) -> fidl::Result<()> {
4660            encoder.debug_check_bounds::<TelemetryGetIfaceStatsResponse>(offset);
4661            // Zero out padding regions. There's no need to apply masks
4662            // because the unmasked parts will be overwritten by fields.
4663            // Write the fields.
4664            self.0.encode(encoder, offset + 0, depth)?;
4665            Ok(())
4666        }
4667    }
4668
4669    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4670        for TelemetryGetIfaceStatsResponse
4671    {
4672        #[inline(always)]
4673        fn new_empty() -> Self {
4674            Self { stats: fidl::new_empty!(fidl_fuchsia_wlan_stats__common::IfaceStats, D) }
4675        }
4676
4677        #[inline]
4678        unsafe fn decode(
4679            &mut self,
4680            decoder: &mut fidl::encoding::Decoder<'_, D>,
4681            offset: usize,
4682            _depth: fidl::encoding::Depth,
4683        ) -> fidl::Result<()> {
4684            decoder.debug_check_bounds::<Self>(offset);
4685            // Verify that padding bytes are zero.
4686            fidl::decode!(
4687                fidl_fuchsia_wlan_stats__common::IfaceStats,
4688                D,
4689                &mut self.stats,
4690                decoder,
4691                offset + 0,
4692                _depth
4693            )?;
4694            Ok(())
4695        }
4696    }
4697
4698    impl fidl::encoding::ValueTypeMarker for TelemetryGetSignalReportResponse {
4699        type Borrowed<'a> = &'a Self;
4700        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4701            value
4702        }
4703    }
4704
4705    unsafe impl fidl::encoding::TypeMarker for TelemetryGetSignalReportResponse {
4706        type Owned = Self;
4707
4708        #[inline(always)]
4709        fn inline_align(_context: fidl::encoding::Context) -> usize {
4710            8
4711        }
4712
4713        #[inline(always)]
4714        fn inline_size(_context: fidl::encoding::Context) -> usize {
4715            16
4716        }
4717    }
4718
4719    unsafe impl<D: fidl::encoding::ResourceDialect>
4720        fidl::encoding::Encode<TelemetryGetSignalReportResponse, D>
4721        for &TelemetryGetSignalReportResponse
4722    {
4723        #[inline]
4724        unsafe fn encode(
4725            self,
4726            encoder: &mut fidl::encoding::Encoder<'_, D>,
4727            offset: usize,
4728            _depth: fidl::encoding::Depth,
4729        ) -> fidl::Result<()> {
4730            encoder.debug_check_bounds::<TelemetryGetSignalReportResponse>(offset);
4731            // Delegate to tuple encoding.
4732            fidl::encoding::Encode::<TelemetryGetSignalReportResponse, D>::encode(
4733                (
4734                    <fidl_fuchsia_wlan_stats__common::SignalReport as fidl::encoding::ValueTypeMarker>::borrow(&self.stats),
4735                ),
4736                encoder, offset, _depth
4737            )
4738        }
4739    }
4740    unsafe impl<
4741        D: fidl::encoding::ResourceDialect,
4742        T0: fidl::encoding::Encode<fidl_fuchsia_wlan_stats__common::SignalReport, D>,
4743    > fidl::encoding::Encode<TelemetryGetSignalReportResponse, D> for (T0,)
4744    {
4745        #[inline]
4746        unsafe fn encode(
4747            self,
4748            encoder: &mut fidl::encoding::Encoder<'_, D>,
4749            offset: usize,
4750            depth: fidl::encoding::Depth,
4751        ) -> fidl::Result<()> {
4752            encoder.debug_check_bounds::<TelemetryGetSignalReportResponse>(offset);
4753            // Zero out padding regions. There's no need to apply masks
4754            // because the unmasked parts will be overwritten by fields.
4755            // Write the fields.
4756            self.0.encode(encoder, offset + 0, depth)?;
4757            Ok(())
4758        }
4759    }
4760
4761    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4762        for TelemetryGetSignalReportResponse
4763    {
4764        #[inline(always)]
4765        fn new_empty() -> Self {
4766            Self { stats: fidl::new_empty!(fidl_fuchsia_wlan_stats__common::SignalReport, D) }
4767        }
4768
4769        #[inline]
4770        unsafe fn decode(
4771            &mut self,
4772            decoder: &mut fidl::encoding::Decoder<'_, D>,
4773            offset: usize,
4774            _depth: fidl::encoding::Depth,
4775        ) -> fidl::Result<()> {
4776            decoder.debug_check_bounds::<Self>(offset);
4777            // Verify that padding bytes are zero.
4778            fidl::decode!(
4779                fidl_fuchsia_wlan_stats__common::SignalReport,
4780                D,
4781                &mut self.stats,
4782                decoder,
4783                offset + 0,
4784                _depth
4785            )?;
4786            Ok(())
4787        }
4788    }
4789
4790    impl fidl::encoding::ValueTypeMarker for TelemetryQueryTelemetrySupportResponse {
4791        type Borrowed<'a> = &'a Self;
4792        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4793            value
4794        }
4795    }
4796
4797    unsafe impl fidl::encoding::TypeMarker for TelemetryQueryTelemetrySupportResponse {
4798        type Owned = Self;
4799
4800        #[inline(always)]
4801        fn inline_align(_context: fidl::encoding::Context) -> usize {
4802            8
4803        }
4804
4805        #[inline(always)]
4806        fn inline_size(_context: fidl::encoding::Context) -> usize {
4807            16
4808        }
4809    }
4810
4811    unsafe impl<D: fidl::encoding::ResourceDialect>
4812        fidl::encoding::Encode<TelemetryQueryTelemetrySupportResponse, D>
4813        for &TelemetryQueryTelemetrySupportResponse
4814    {
4815        #[inline]
4816        unsafe fn encode(
4817            self,
4818            encoder: &mut fidl::encoding::Encoder<'_, D>,
4819            offset: usize,
4820            _depth: fidl::encoding::Depth,
4821        ) -> fidl::Result<()> {
4822            encoder.debug_check_bounds::<TelemetryQueryTelemetrySupportResponse>(offset);
4823            // Delegate to tuple encoding.
4824            fidl::encoding::Encode::<TelemetryQueryTelemetrySupportResponse, D>::encode(
4825                (
4826                    <fidl_fuchsia_wlan_stats__common::TelemetrySupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
4827                ),
4828                encoder, offset, _depth
4829            )
4830        }
4831    }
4832    unsafe impl<
4833        D: fidl::encoding::ResourceDialect,
4834        T0: fidl::encoding::Encode<fidl_fuchsia_wlan_stats__common::TelemetrySupport, D>,
4835    > fidl::encoding::Encode<TelemetryQueryTelemetrySupportResponse, D> for (T0,)
4836    {
4837        #[inline]
4838        unsafe fn encode(
4839            self,
4840            encoder: &mut fidl::encoding::Encoder<'_, D>,
4841            offset: usize,
4842            depth: fidl::encoding::Depth,
4843        ) -> fidl::Result<()> {
4844            encoder.debug_check_bounds::<TelemetryQueryTelemetrySupportResponse>(offset);
4845            // Zero out padding regions. There's no need to apply masks
4846            // because the unmasked parts will be overwritten by fields.
4847            // Write the fields.
4848            self.0.encode(encoder, offset + 0, depth)?;
4849            Ok(())
4850        }
4851    }
4852
4853    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4854        for TelemetryQueryTelemetrySupportResponse
4855    {
4856        #[inline(always)]
4857        fn new_empty() -> Self {
4858            Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_stats__common::TelemetrySupport, D) }
4859        }
4860
4861        #[inline]
4862        unsafe fn decode(
4863            &mut self,
4864            decoder: &mut fidl::encoding::Decoder<'_, D>,
4865            offset: usize,
4866            _depth: fidl::encoding::Depth,
4867        ) -> fidl::Result<()> {
4868            decoder.debug_check_bounds::<Self>(offset);
4869            // Verify that padding bytes are zero.
4870            fidl::decode!(
4871                fidl_fuchsia_wlan_stats__common::TelemetrySupport,
4872                D,
4873                &mut self.resp,
4874                decoder,
4875                offset + 0,
4876                _depth
4877            )?;
4878            Ok(())
4879        }
4880    }
4881
4882    impl fidl::encoding::ValueTypeMarker for ClientStatusResponse {
4883        type Borrowed<'a> = &'a Self;
4884        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4885            value
4886        }
4887    }
4888
4889    unsafe impl fidl::encoding::TypeMarker for ClientStatusResponse {
4890        type Owned = Self;
4891
4892        #[inline(always)]
4893        fn inline_align(_context: fidl::encoding::Context) -> usize {
4894            8
4895        }
4896
4897        #[inline(always)]
4898        fn inline_size(_context: fidl::encoding::Context) -> usize {
4899            16
4900        }
4901    }
4902
4903    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ClientStatusResponse, D>
4904        for &ClientStatusResponse
4905    {
4906        #[inline]
4907        unsafe fn encode(
4908            self,
4909            encoder: &mut fidl::encoding::Encoder<'_, D>,
4910            offset: usize,
4911            _depth: fidl::encoding::Depth,
4912        ) -> fidl::Result<()> {
4913            encoder.debug_check_bounds::<ClientStatusResponse>(offset);
4914            encoder.write_num::<u64>(self.ordinal(), offset);
4915            match self {
4916                ClientStatusResponse::Connected(ref val) => {
4917                    fidl::encoding::encode_in_envelope::<ServingApInfo, D>(
4918                        <ServingApInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
4919                        encoder,
4920                        offset + 8,
4921                        _depth,
4922                    )
4923                }
4924                ClientStatusResponse::Connecting(ref val) => {
4925                    fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<u8, 32>, D>(
4926                        <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
4927                            val,
4928                        ),
4929                        encoder,
4930                        offset + 8,
4931                        _depth,
4932                    )
4933                }
4934                ClientStatusResponse::Idle(ref val) => {
4935                    fidl::encoding::encode_in_envelope::<Empty, D>(
4936                        <Empty as fidl::encoding::ValueTypeMarker>::borrow(val),
4937                        encoder,
4938                        offset + 8,
4939                        _depth,
4940                    )
4941                }
4942                ClientStatusResponse::Roaming(ref val) => fidl::encoding::encode_in_envelope::<
4943                    fidl::encoding::Array<u8, 6>,
4944                    D,
4945                >(
4946                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(val),
4947                    encoder,
4948                    offset + 8,
4949                    _depth,
4950                ),
4951            }
4952        }
4953    }
4954
4955    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ClientStatusResponse {
4956        #[inline(always)]
4957        fn new_empty() -> Self {
4958            Self::Connected(fidl::new_empty!(ServingApInfo, D))
4959        }
4960
4961        #[inline]
4962        unsafe fn decode(
4963            &mut self,
4964            decoder: &mut fidl::encoding::Decoder<'_, D>,
4965            offset: usize,
4966            mut depth: fidl::encoding::Depth,
4967        ) -> fidl::Result<()> {
4968            decoder.debug_check_bounds::<Self>(offset);
4969            #[allow(unused_variables)]
4970            let next_out_of_line = decoder.next_out_of_line();
4971            let handles_before = decoder.remaining_handles();
4972            let (ordinal, inlined, num_bytes, num_handles) =
4973                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
4974
4975            let member_inline_size = match ordinal {
4976                1 => <ServingApInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4977                2 => <fidl::encoding::Vector<u8, 32> as fidl::encoding::TypeMarker>::inline_size(
4978                    decoder.context,
4979                ),
4980                3 => <Empty as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4981                4 => <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
4982                    decoder.context,
4983                ),
4984                _ => return Err(fidl::Error::UnknownUnionTag),
4985            };
4986
4987            if inlined != (member_inline_size <= 4) {
4988                return Err(fidl::Error::InvalidInlineBitInEnvelope);
4989            }
4990            let _inner_offset;
4991            if inlined {
4992                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
4993                _inner_offset = offset + 8;
4994            } else {
4995                depth.increment()?;
4996                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4997            }
4998            match ordinal {
4999                1 => {
5000                    #[allow(irrefutable_let_patterns)]
5001                    if let ClientStatusResponse::Connected(_) = self {
5002                        // Do nothing, read the value into the object
5003                    } else {
5004                        // Initialize `self` to the right variant
5005                        *self = ClientStatusResponse::Connected(fidl::new_empty!(ServingApInfo, D));
5006                    }
5007                    #[allow(irrefutable_let_patterns)]
5008                    if let ClientStatusResponse::Connected(ref mut val) = self {
5009                        fidl::decode!(ServingApInfo, D, val, decoder, _inner_offset, depth)?;
5010                    } else {
5011                        unreachable!()
5012                    }
5013                }
5014                2 => {
5015                    #[allow(irrefutable_let_patterns)]
5016                    if let ClientStatusResponse::Connecting(_) = self {
5017                        // Do nothing, read the value into the object
5018                    } else {
5019                        // Initialize `self` to the right variant
5020                        *self = ClientStatusResponse::Connecting(
5021                            fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
5022                        );
5023                    }
5024                    #[allow(irrefutable_let_patterns)]
5025                    if let ClientStatusResponse::Connecting(ref mut val) = self {
5026                        fidl::decode!(fidl::encoding::Vector<u8, 32>, D, val, decoder, _inner_offset, depth)?;
5027                    } else {
5028                        unreachable!()
5029                    }
5030                }
5031                3 => {
5032                    #[allow(irrefutable_let_patterns)]
5033                    if let ClientStatusResponse::Idle(_) = self {
5034                        // Do nothing, read the value into the object
5035                    } else {
5036                        // Initialize `self` to the right variant
5037                        *self = ClientStatusResponse::Idle(fidl::new_empty!(Empty, D));
5038                    }
5039                    #[allow(irrefutable_let_patterns)]
5040                    if let ClientStatusResponse::Idle(ref mut val) = self {
5041                        fidl::decode!(Empty, D, val, decoder, _inner_offset, depth)?;
5042                    } else {
5043                        unreachable!()
5044                    }
5045                }
5046                4 => {
5047                    #[allow(irrefutable_let_patterns)]
5048                    if let ClientStatusResponse::Roaming(_) = self {
5049                        // Do nothing, read the value into the object
5050                    } else {
5051                        // Initialize `self` to the right variant
5052                        *self = ClientStatusResponse::Roaming(
5053                            fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
5054                        );
5055                    }
5056                    #[allow(irrefutable_let_patterns)]
5057                    if let ClientStatusResponse::Roaming(ref mut val) = self {
5058                        fidl::decode!(fidl::encoding::Array<u8, 6>, D, val, decoder, _inner_offset, depth)?;
5059                    } else {
5060                        unreachable!()
5061                    }
5062                }
5063                ordinal => panic!("unexpected ordinal {:?}", ordinal),
5064            }
5065            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
5066                return Err(fidl::Error::InvalidNumBytesInEnvelope);
5067            }
5068            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5069                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5070            }
5071            Ok(())
5072        }
5073    }
5074
5075    impl fidl::encoding::ValueTypeMarker for Compatibility {
5076        type Borrowed<'a> = &'a Self;
5077        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5078            value
5079        }
5080    }
5081
5082    unsafe impl fidl::encoding::TypeMarker for Compatibility {
5083        type Owned = Self;
5084
5085        #[inline(always)]
5086        fn inline_align(_context: fidl::encoding::Context) -> usize {
5087            8
5088        }
5089
5090        #[inline(always)]
5091        fn inline_size(_context: fidl::encoding::Context) -> usize {
5092            16
5093        }
5094    }
5095
5096    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Compatibility, D>
5097        for &Compatibility
5098    {
5099        #[inline]
5100        unsafe fn encode(
5101            self,
5102            encoder: &mut fidl::encoding::Encoder<'_, D>,
5103            offset: usize,
5104            _depth: fidl::encoding::Depth,
5105        ) -> fidl::Result<()> {
5106            encoder.debug_check_bounds::<Compatibility>(offset);
5107            encoder.write_num::<u64>(self.ordinal(), offset);
5108            match self {
5109                Compatibility::Compatible(ref val) => {
5110                    fidl::encoding::encode_in_envelope::<Compatible, D>(
5111                        <Compatible as fidl::encoding::ValueTypeMarker>::borrow(val),
5112                        encoder,
5113                        offset + 8,
5114                        _depth,
5115                    )
5116                }
5117                Compatibility::Incompatible(ref val) => {
5118                    fidl::encoding::encode_in_envelope::<Incompatible, D>(
5119                        <Incompatible as fidl::encoding::ValueTypeMarker>::borrow(val),
5120                        encoder,
5121                        offset + 8,
5122                        _depth,
5123                    )
5124                }
5125            }
5126        }
5127    }
5128
5129    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Compatibility {
5130        #[inline(always)]
5131        fn new_empty() -> Self {
5132            Self::Compatible(fidl::new_empty!(Compatible, D))
5133        }
5134
5135        #[inline]
5136        unsafe fn decode(
5137            &mut self,
5138            decoder: &mut fidl::encoding::Decoder<'_, D>,
5139            offset: usize,
5140            mut depth: fidl::encoding::Depth,
5141        ) -> fidl::Result<()> {
5142            decoder.debug_check_bounds::<Self>(offset);
5143            #[allow(unused_variables)]
5144            let next_out_of_line = decoder.next_out_of_line();
5145            let handles_before = decoder.remaining_handles();
5146            let (ordinal, inlined, num_bytes, num_handles) =
5147                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
5148
5149            let member_inline_size = match ordinal {
5150                1 => <Compatible as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5151                2 => <Incompatible as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5152                _ => return Err(fidl::Error::UnknownUnionTag),
5153            };
5154
5155            if inlined != (member_inline_size <= 4) {
5156                return Err(fidl::Error::InvalidInlineBitInEnvelope);
5157            }
5158            let _inner_offset;
5159            if inlined {
5160                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
5161                _inner_offset = offset + 8;
5162            } else {
5163                depth.increment()?;
5164                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5165            }
5166            match ordinal {
5167                1 => {
5168                    #[allow(irrefutable_let_patterns)]
5169                    if let Compatibility::Compatible(_) = self {
5170                        // Do nothing, read the value into the object
5171                    } else {
5172                        // Initialize `self` to the right variant
5173                        *self = Compatibility::Compatible(fidl::new_empty!(Compatible, D));
5174                    }
5175                    #[allow(irrefutable_let_patterns)]
5176                    if let Compatibility::Compatible(ref mut val) = self {
5177                        fidl::decode!(Compatible, D, val, decoder, _inner_offset, depth)?;
5178                    } else {
5179                        unreachable!()
5180                    }
5181                }
5182                2 => {
5183                    #[allow(irrefutable_let_patterns)]
5184                    if let Compatibility::Incompatible(_) = self {
5185                        // Do nothing, read the value into the object
5186                    } else {
5187                        // Initialize `self` to the right variant
5188                        *self = Compatibility::Incompatible(fidl::new_empty!(Incompatible, D));
5189                    }
5190                    #[allow(irrefutable_let_patterns)]
5191                    if let Compatibility::Incompatible(ref mut val) = self {
5192                        fidl::decode!(Incompatible, D, val, decoder, _inner_offset, depth)?;
5193                    } else {
5194                        unreachable!()
5195                    }
5196                }
5197                ordinal => panic!("unexpected ordinal {:?}", ordinal),
5198            }
5199            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
5200                return Err(fidl::Error::InvalidNumBytesInEnvelope);
5201            }
5202            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5203                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5204            }
5205            Ok(())
5206        }
5207    }
5208
5209    impl fidl::encoding::ValueTypeMarker for DisconnectSource {
5210        type Borrowed<'a> = &'a Self;
5211        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5212            value
5213        }
5214    }
5215
5216    unsafe impl fidl::encoding::TypeMarker for DisconnectSource {
5217        type Owned = Self;
5218
5219        #[inline(always)]
5220        fn inline_align(_context: fidl::encoding::Context) -> usize {
5221            8
5222        }
5223
5224        #[inline(always)]
5225        fn inline_size(_context: fidl::encoding::Context) -> usize {
5226            16
5227        }
5228    }
5229
5230    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisconnectSource, D>
5231        for &DisconnectSource
5232    {
5233        #[inline]
5234        unsafe fn encode(
5235            self,
5236            encoder: &mut fidl::encoding::Encoder<'_, D>,
5237            offset: usize,
5238            _depth: fidl::encoding::Depth,
5239        ) -> fidl::Result<()> {
5240            encoder.debug_check_bounds::<DisconnectSource>(offset);
5241            encoder.write_num::<u64>(self.ordinal(), offset);
5242            match self {
5243                DisconnectSource::Ap(ref val) => {
5244                    fidl::encoding::encode_in_envelope::<DisconnectCause, D>(
5245                        <DisconnectCause as fidl::encoding::ValueTypeMarker>::borrow(val),
5246                        encoder,
5247                        offset + 8,
5248                        _depth,
5249                    )
5250                }
5251                DisconnectSource::User(ref val) => {
5252                    fidl::encoding::encode_in_envelope::<UserDisconnectReason, D>(
5253                        <UserDisconnectReason as fidl::encoding::ValueTypeMarker>::borrow(val),
5254                        encoder,
5255                        offset + 8,
5256                        _depth,
5257                    )
5258                }
5259                DisconnectSource::Mlme(ref val) => {
5260                    fidl::encoding::encode_in_envelope::<DisconnectCause, D>(
5261                        <DisconnectCause as fidl::encoding::ValueTypeMarker>::borrow(val),
5262                        encoder,
5263                        offset + 8,
5264                        _depth,
5265                    )
5266                }
5267            }
5268        }
5269    }
5270
5271    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisconnectSource {
5272        #[inline(always)]
5273        fn new_empty() -> Self {
5274            Self::Ap(fidl::new_empty!(DisconnectCause, D))
5275        }
5276
5277        #[inline]
5278        unsafe fn decode(
5279            &mut self,
5280            decoder: &mut fidl::encoding::Decoder<'_, D>,
5281            offset: usize,
5282            mut depth: fidl::encoding::Depth,
5283        ) -> fidl::Result<()> {
5284            decoder.debug_check_bounds::<Self>(offset);
5285            #[allow(unused_variables)]
5286            let next_out_of_line = decoder.next_out_of_line();
5287            let handles_before = decoder.remaining_handles();
5288            let (ordinal, inlined, num_bytes, num_handles) =
5289                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
5290
5291            let member_inline_size = match ordinal {
5292                1 => <DisconnectCause as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5293                2 => <UserDisconnectReason as fidl::encoding::TypeMarker>::inline_size(
5294                    decoder.context,
5295                ),
5296                3 => <DisconnectCause as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5297                _ => return Err(fidl::Error::UnknownUnionTag),
5298            };
5299
5300            if inlined != (member_inline_size <= 4) {
5301                return Err(fidl::Error::InvalidInlineBitInEnvelope);
5302            }
5303            let _inner_offset;
5304            if inlined {
5305                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
5306                _inner_offset = offset + 8;
5307            } else {
5308                depth.increment()?;
5309                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5310            }
5311            match ordinal {
5312                1 => {
5313                    #[allow(irrefutable_let_patterns)]
5314                    if let DisconnectSource::Ap(_) = self {
5315                        // Do nothing, read the value into the object
5316                    } else {
5317                        // Initialize `self` to the right variant
5318                        *self = DisconnectSource::Ap(fidl::new_empty!(DisconnectCause, D));
5319                    }
5320                    #[allow(irrefutable_let_patterns)]
5321                    if let DisconnectSource::Ap(ref mut val) = self {
5322                        fidl::decode!(DisconnectCause, D, val, decoder, _inner_offset, depth)?;
5323                    } else {
5324                        unreachable!()
5325                    }
5326                }
5327                2 => {
5328                    #[allow(irrefutable_let_patterns)]
5329                    if let DisconnectSource::User(_) = self {
5330                        // Do nothing, read the value into the object
5331                    } else {
5332                        // Initialize `self` to the right variant
5333                        *self = DisconnectSource::User(fidl::new_empty!(UserDisconnectReason, D));
5334                    }
5335                    #[allow(irrefutable_let_patterns)]
5336                    if let DisconnectSource::User(ref mut val) = self {
5337                        fidl::decode!(UserDisconnectReason, D, val, decoder, _inner_offset, depth)?;
5338                    } else {
5339                        unreachable!()
5340                    }
5341                }
5342                3 => {
5343                    #[allow(irrefutable_let_patterns)]
5344                    if let DisconnectSource::Mlme(_) = self {
5345                        // Do nothing, read the value into the object
5346                    } else {
5347                        // Initialize `self` to the right variant
5348                        *self = DisconnectSource::Mlme(fidl::new_empty!(DisconnectCause, D));
5349                    }
5350                    #[allow(irrefutable_let_patterns)]
5351                    if let DisconnectSource::Mlme(ref mut val) = self {
5352                        fidl::decode!(DisconnectCause, D, val, decoder, _inner_offset, depth)?;
5353                    } else {
5354                        unreachable!()
5355                    }
5356                }
5357                ordinal => panic!("unexpected ordinal {:?}", ordinal),
5358            }
5359            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
5360                return Err(fidl::Error::InvalidNumBytesInEnvelope);
5361            }
5362            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5363                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5364            }
5365            Ok(())
5366        }
5367    }
5368
5369    impl fidl::encoding::ValueTypeMarker for ScanRequest {
5370        type Borrowed<'a> = &'a Self;
5371        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5372            value
5373        }
5374    }
5375
5376    unsafe impl fidl::encoding::TypeMarker for ScanRequest {
5377        type Owned = Self;
5378
5379        #[inline(always)]
5380        fn inline_align(_context: fidl::encoding::Context) -> usize {
5381            8
5382        }
5383
5384        #[inline(always)]
5385        fn inline_size(_context: fidl::encoding::Context) -> usize {
5386            16
5387        }
5388    }
5389
5390    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ScanRequest, D>
5391        for &ScanRequest
5392    {
5393        #[inline]
5394        unsafe fn encode(
5395            self,
5396            encoder: &mut fidl::encoding::Encoder<'_, D>,
5397            offset: usize,
5398            _depth: fidl::encoding::Depth,
5399        ) -> fidl::Result<()> {
5400            encoder.debug_check_bounds::<ScanRequest>(offset);
5401            encoder.write_num::<u64>(self.ordinal(), offset);
5402            match self {
5403                ScanRequest::Active(ref val) => {
5404                    fidl::encoding::encode_in_envelope::<ActiveScanRequest, D>(
5405                        <ActiveScanRequest as fidl::encoding::ValueTypeMarker>::borrow(val),
5406                        encoder,
5407                        offset + 8,
5408                        _depth,
5409                    )
5410                }
5411                ScanRequest::Passive(ref val) => {
5412                    fidl::encoding::encode_in_envelope::<PassiveScanRequest, D>(
5413                        <PassiveScanRequest as fidl::encoding::ValueTypeMarker>::borrow(val),
5414                        encoder,
5415                        offset + 8,
5416                        _depth,
5417                    )
5418                }
5419            }
5420        }
5421    }
5422
5423    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanRequest {
5424        #[inline(always)]
5425        fn new_empty() -> Self {
5426            Self::Active(fidl::new_empty!(ActiveScanRequest, D))
5427        }
5428
5429        #[inline]
5430        unsafe fn decode(
5431            &mut self,
5432            decoder: &mut fidl::encoding::Decoder<'_, D>,
5433            offset: usize,
5434            mut depth: fidl::encoding::Depth,
5435        ) -> fidl::Result<()> {
5436            decoder.debug_check_bounds::<Self>(offset);
5437            #[allow(unused_variables)]
5438            let next_out_of_line = decoder.next_out_of_line();
5439            let handles_before = decoder.remaining_handles();
5440            let (ordinal, inlined, num_bytes, num_handles) =
5441                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
5442
5443            let member_inline_size = match ordinal {
5444                1 => {
5445                    <ActiveScanRequest as fidl::encoding::TypeMarker>::inline_size(decoder.context)
5446                }
5447                2 => {
5448                    <PassiveScanRequest as fidl::encoding::TypeMarker>::inline_size(decoder.context)
5449                }
5450                _ => return Err(fidl::Error::UnknownUnionTag),
5451            };
5452
5453            if inlined != (member_inline_size <= 4) {
5454                return Err(fidl::Error::InvalidInlineBitInEnvelope);
5455            }
5456            let _inner_offset;
5457            if inlined {
5458                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
5459                _inner_offset = offset + 8;
5460            } else {
5461                depth.increment()?;
5462                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5463            }
5464            match ordinal {
5465                1 => {
5466                    #[allow(irrefutable_let_patterns)]
5467                    if let ScanRequest::Active(_) = self {
5468                        // Do nothing, read the value into the object
5469                    } else {
5470                        // Initialize `self` to the right variant
5471                        *self = ScanRequest::Active(fidl::new_empty!(ActiveScanRequest, D));
5472                    }
5473                    #[allow(irrefutable_let_patterns)]
5474                    if let ScanRequest::Active(ref mut val) = self {
5475                        fidl::decode!(ActiveScanRequest, D, val, decoder, _inner_offset, depth)?;
5476                    } else {
5477                        unreachable!()
5478                    }
5479                }
5480                2 => {
5481                    #[allow(irrefutable_let_patterns)]
5482                    if let ScanRequest::Passive(_) = self {
5483                        // Do nothing, read the value into the object
5484                    } else {
5485                        // Initialize `self` to the right variant
5486                        *self = ScanRequest::Passive(fidl::new_empty!(PassiveScanRequest, D));
5487                    }
5488                    #[allow(irrefutable_let_patterns)]
5489                    if let ScanRequest::Passive(ref mut val) = self {
5490                        fidl::decode!(PassiveScanRequest, D, val, decoder, _inner_offset, depth)?;
5491                    } else {
5492                        unreachable!()
5493                    }
5494                }
5495                ordinal => panic!("unexpected ordinal {:?}", ordinal),
5496            }
5497            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
5498                return Err(fidl::Error::InvalidNumBytesInEnvelope);
5499            }
5500            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5501                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5502            }
5503            Ok(())
5504        }
5505    }
5506}