Skip to main content

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