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