fidl_fuchsia_wlan_mlme_common/
fidl_fuchsia_wlan_mlme_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/// WFA WMM v1.2, 2.2.1
12pub type QosInfo = u8;
13
14pub const MAX_SSIDS_PER_SCAN_REQUEST: u32 = 32;
15
16/// WFA WMM v1.2, 2.2.2 Table 5
17/// Length of the WMM Parameter Element body. This does not include IE and vendor IE headers,
18/// and only includes the QoS Info, reserved, and AC parameters fields.
19pub const WMM_PARAM_LEN: u8 = 18;
20
21pub const COUNTRY_ENVIRON_ALL: u8 = 32;
22
23pub const COUNTRY_ENVIRON_INDOOR: u8 = 73;
24
25pub const COUNTRY_ENVIRON_NON_COUNTRY: u8 = 88;
26
27pub const COUNTRY_ENVIRON_OUTDOOR: u8 = 79;
28
29bitflags! {
30    /// Bits used to request management frame subtypes to be captured. Also used in
31    /// StartCaptureFramesResponse to indicate what management frames are supported.
32    ///
33    /// These values are set at `1 << MgmtFrameSubtypeValue`
34    /// See IEEE Std 802.11-2016, 9.2.4.1.3, for value of each management frame subtype
35    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
36    pub struct MgmtFrameCaptureFlags: u32 {
37        const ASSOC_REQ = 1;
38        const ASSOC_RESP = 2;
39        const REASSOC_REQ = 4;
40        const REASSOC_RESP = 8;
41        const PROBE_REQ = 16;
42        const PROBE_RESP = 32;
43        const TIMING_AD = 64;
44        const BEACON = 256;
45        const ATIM = 512;
46        const DISASSOC = 1024;
47        const AUTH = 2048;
48        const DEAUTH = 4096;
49        const ACTION = 8192;
50        const ACTION_NO_ACK = 16384;
51    }
52}
53
54impl MgmtFrameCaptureFlags {}
55
56#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
57#[repr(u32)]
58pub enum AssociateResultCode {
59    Success = 0,
60    RefusedReasonUnspecified = 1,
61    RefusedNotAuthenticated = 2,
62    RefusedCapabilitiesMismatch = 3,
63    RefusedExternalReason = 4,
64    RefusedApOutOfMemory = 5,
65    RefusedBasicRatesMismatch = 6,
66    RejectedEmergencyServicesNotSupported = 7,
67    RefusedTemporarily = 8,
68}
69
70impl AssociateResultCode {
71    #[inline]
72    pub fn from_primitive(prim: u32) -> Option<Self> {
73        match prim {
74            0 => Some(Self::Success),
75            1 => Some(Self::RefusedReasonUnspecified),
76            2 => Some(Self::RefusedNotAuthenticated),
77            3 => Some(Self::RefusedCapabilitiesMismatch),
78            4 => Some(Self::RefusedExternalReason),
79            5 => Some(Self::RefusedApOutOfMemory),
80            6 => Some(Self::RefusedBasicRatesMismatch),
81            7 => Some(Self::RejectedEmergencyServicesNotSupported),
82            8 => Some(Self::RefusedTemporarily),
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 AuthenticateResultCode {
96    Success = 0,
97    Refused = 1,
98    AntiCloggingTokenRequired = 2,
99    FiniteCyclicGroupNotSupported = 3,
100    AuthenticationRejected = 4,
101    AuthFailureTimeout = 5,
102}
103
104impl AuthenticateResultCode {
105    #[inline]
106    pub fn from_primitive(prim: u32) -> Option<Self> {
107        match prim {
108            0 => Some(Self::Success),
109            1 => Some(Self::Refused),
110            2 => Some(Self::AntiCloggingTokenRequired),
111            3 => Some(Self::FiniteCyclicGroupNotSupported),
112            4 => Some(Self::AuthenticationRejected),
113            5 => Some(Self::AuthFailureTimeout),
114            _ => None,
115        }
116    }
117
118    #[inline]
119    pub const fn into_primitive(self) -> u32 {
120        self as u32
121    }
122}
123
124#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
125#[repr(u32)]
126pub enum AuthenticationTypes {
127    OpenSystem = 1,
128    SharedKey = 2,
129    FastBssTransition = 3,
130    Sae = 4,
131}
132
133impl AuthenticationTypes {
134    #[inline]
135    pub fn from_primitive(prim: u32) -> Option<Self> {
136        match prim {
137            1 => Some(Self::OpenSystem),
138            2 => Some(Self::SharedKey),
139            3 => Some(Self::FastBssTransition),
140            4 => Some(Self::Sae),
141            _ => None,
142        }
143    }
144
145    #[inline]
146    pub const fn into_primitive(self) -> u32 {
147        self as u32
148    }
149}
150
151#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
152#[repr(u32)]
153pub enum ControlledPortState {
154    Closed = 0,
155    Open = 1,
156}
157
158impl ControlledPortState {
159    #[inline]
160    pub fn from_primitive(prim: u32) -> Option<Self> {
161        match prim {
162            0 => Some(Self::Closed),
163            1 => Some(Self::Open),
164            _ => None,
165        }
166    }
167
168    #[inline]
169    pub const fn into_primitive(self) -> u32 {
170        self as u32
171    }
172}
173
174#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
175#[repr(u32)]
176pub enum EapolResultCode {
177    Success = 0,
178    TransmissionFailure = 1,
179}
180
181impl EapolResultCode {
182    #[inline]
183    pub fn from_primitive(prim: u32) -> Option<Self> {
184        match prim {
185            0 => Some(Self::Success),
186            1 => Some(Self::TransmissionFailure),
187            _ => None,
188        }
189    }
190
191    #[inline]
192    pub const fn into_primitive(self) -> u32 {
193        self as u32
194    }
195}
196
197#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
198#[repr(u32)]
199pub enum KeyType {
200    Group = 1,
201    Pairwise = 2,
202    PeerKey = 3,
203    Igtk = 4,
204}
205
206impl KeyType {
207    #[inline]
208    pub fn from_primitive(prim: u32) -> Option<Self> {
209        match prim {
210            1 => Some(Self::Group),
211            2 => Some(Self::Pairwise),
212            3 => Some(Self::PeerKey),
213            4 => Some(Self::Igtk),
214            _ => None,
215        }
216    }
217
218    #[inline]
219    pub const fn into_primitive(self) -> u32 {
220        self as u32
221    }
222}
223
224#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
225#[repr(u32)]
226pub enum ScanResultCode {
227    Success = 0,
228    NotSupported = 1,
229    InvalidArgs = 2,
230    InternalError = 3,
231    ShouldWait = 4,
232    CanceledByDriverOrFirmware = 5,
233}
234
235impl ScanResultCode {
236    #[inline]
237    pub fn from_primitive(prim: u32) -> Option<Self> {
238        match prim {
239            0 => Some(Self::Success),
240            1 => Some(Self::NotSupported),
241            2 => Some(Self::InvalidArgs),
242            3 => Some(Self::InternalError),
243            4 => Some(Self::ShouldWait),
244            5 => Some(Self::CanceledByDriverOrFirmware),
245            _ => None,
246        }
247    }
248
249    #[inline]
250    pub const fn into_primitive(self) -> u32 {
251        self as u32
252    }
253}
254
255#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
256#[repr(u32)]
257pub enum ScanTypes {
258    Active = 1,
259    Passive = 2,
260}
261
262impl ScanTypes {
263    #[inline]
264    pub fn from_primitive(prim: u32) -> Option<Self> {
265        match prim {
266            1 => Some(Self::Active),
267            2 => Some(Self::Passive),
268            _ => None,
269        }
270    }
271
272    #[inline]
273    pub const fn into_primitive(self) -> u32 {
274        self as u32
275    }
276}
277
278#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
279#[repr(u32)]
280pub enum StartResultCode {
281    Success = 0,
282    BssAlreadyStartedOrJoined = 1,
283    ResetRequiredBeforeStart = 2,
284    NotSupported = 3,
285    InternalError = 4,
286}
287
288impl StartResultCode {
289    #[inline]
290    pub fn from_primitive(prim: u32) -> Option<Self> {
291        match prim {
292            0 => Some(Self::Success),
293            1 => Some(Self::BssAlreadyStartedOrJoined),
294            2 => Some(Self::ResetRequiredBeforeStart),
295            3 => Some(Self::NotSupported),
296            4 => Some(Self::InternalError),
297            _ => None,
298        }
299    }
300
301    #[inline]
302    pub const fn into_primitive(self) -> u32 {
303        self as u32
304    }
305}
306
307#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
308#[repr(u32)]
309pub enum StopResultCode {
310    Success = 0,
311    BssAlreadyStopped = 1,
312    InternalError = 2,
313}
314
315impl StopResultCode {
316    #[inline]
317    pub fn from_primitive(prim: u32) -> Option<Self> {
318        match prim {
319            0 => Some(Self::Success),
320            1 => Some(Self::BssAlreadyStopped),
321            2 => Some(Self::InternalError),
322            _ => None,
323        }
324    }
325
326    #[inline]
327    pub const fn into_primitive(self) -> u32 {
328        self as u32
329    }
330}
331
332#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
333pub struct AssociateIndication {
334    pub peer_sta_address: [u8; 6],
335    pub capability_info: u16,
336    pub listen_interval: u16,
337    pub ssid: Option<Vec<u8>>,
338    pub rates: Vec<u8>,
339    pub rsne: Option<Vec<u8>>,
340}
341
342impl fidl::Persistable for AssociateIndication {}
343
344#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
345pub struct AssociateResponse {
346    pub peer_sta_address: [u8; 6],
347    pub result_code: AssociateResultCode,
348    pub association_id: u16,
349    pub capability_info: u16,
350    pub rates: Vec<u8>,
351}
352
353impl fidl::Persistable for AssociateResponse {}
354
355#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
356pub struct AuthenticateIndication {
357    pub peer_sta_address: [u8; 6],
358    pub auth_type: AuthenticationTypes,
359}
360
361impl fidl::Persistable for AuthenticateIndication {}
362
363#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
364pub struct AuthenticateResponse {
365    pub peer_sta_address: [u8; 6],
366    pub result_code: AuthenticateResultCode,
367}
368
369impl fidl::Persistable for AuthenticateResponse {}
370
371#[derive(Clone, Debug, PartialEq)]
372pub struct BandCapability {
373    /// The values of this struct apply to the band indicated in this field.
374    pub band: fidl_fuchsia_wlan_ieee80211::WlanBand,
375    /// Basic rates supported in units of 500 kbit/s (as defined in
376    /// IEEE Std 802.11-2016, 9.4.2.3), e.g., 0x02 represents 1 Mbps.
377    /// The value returned by this type indicates all the non-HT rates
378    /// the device supports transmitting and receiving.
379    pub basic_rates: Vec<u8>,
380    pub ht_cap: Option<Box<fidl_fuchsia_wlan_ieee80211::HtCapabilities>>,
381    pub vht_cap: Option<Box<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>>,
382    /// A list of operating channels considered valid by hardware, in the context of
383    /// regulatory information known to the device driver, at the time of its
384    /// construction during iface creation. In this context, an operating channel
385    /// means a channel which APs may transmit Beacon frames on in the current
386    /// regulatory domain.
387    ///
388    /// This list should be used to determine efficacy of subsequent requests to
389    /// scan a subset of channels using the iface, or to determine which operating
390    /// channel to use when starting an AP.
391    pub operating_channels: Vec<u8>,
392}
393
394impl fidl::Persistable for BandCapability {}
395
396#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
397pub struct CapturedFrameResult {
398    pub frame: Vec<u8>,
399}
400
401impl fidl::Persistable for CapturedFrameResult {}
402
403#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
404pub struct ConnectConfirm {
405    pub peer_sta_address: [u8; 6],
406    pub result_code: fidl_fuchsia_wlan_ieee80211::StatusCode,
407    pub association_id: u16,
408    pub association_ies: Vec<u8>,
409}
410
411impl fidl::Persistable for ConnectConfirm {}
412
413#[derive(Clone, Debug, PartialEq)]
414pub struct ConnectRequest {
415    pub selected_bss: fidl_fuchsia_wlan_common::BssDescription,
416    pub connect_failure_timeout: u32,
417    /// Additional parameters specific to the authentication exchange.
418    pub auth_type: AuthenticationTypes,
419    pub sae_password: Vec<u8>,
420    /// WEP key used in the authentication exchange. Only included for WEP security type.
421    pub wep_key: Option<Box<SetKeyDescriptor>>,
422    /// Additional parameters specific to the association exchange.
423    pub security_ie: Vec<u8>,
424}
425
426impl fidl::Persistable for ConnectRequest {}
427
428#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
429#[repr(C)]
430pub struct Country {
431    pub alpha2: [u8; 2],
432    pub suffix: u8,
433}
434
435impl fidl::Persistable for Country {}
436
437#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
438#[repr(C)]
439pub struct DeauthenticateConfirm {
440    pub peer_sta_address: [u8; 6],
441}
442
443impl fidl::Persistable for DeauthenticateConfirm {}
444
445#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
446pub struct DeauthenticateIndication {
447    pub peer_sta_address: [u8; 6],
448    pub reason_code: fidl_fuchsia_wlan_ieee80211::ReasonCode,
449    /// locally_initiated is true if deauth is initiated from the device,
450    /// and is false if it's initiated remotely (e.g. due to deauth frame)
451    pub locally_initiated: bool,
452}
453
454impl fidl::Persistable for DeauthenticateIndication {}
455
456#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
457pub struct DeauthenticateRequest {
458    pub peer_sta_address: [u8; 6],
459    pub reason_code: fidl_fuchsia_wlan_ieee80211::ReasonCode,
460}
461
462impl fidl::Persistable for DeauthenticateRequest {}
463
464#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
465pub struct DeleteKeyDescriptor {
466    pub key_id: u16,
467    pub key_type: KeyType,
468    pub address: [u8; 6],
469}
470
471impl fidl::Persistable for DeleteKeyDescriptor {}
472
473#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
474pub struct DeleteKeysRequest {
475    pub keylist: Vec<DeleteKeyDescriptor>,
476}
477
478impl fidl::Persistable for DeleteKeysRequest {}
479
480#[derive(Clone, Debug, PartialEq)]
481pub struct DeviceInfo {
482    pub sta_addr: [u8; 6],
483    pub role: fidl_fuchsia_wlan_common::WlanMacRole,
484    pub bands: Vec<BandCapability>,
485    pub softmac_hardware_capability: u32,
486    pub qos_capable: bool,
487}
488
489impl fidl::Persistable for DeviceInfo {}
490
491#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
492#[repr(C)]
493pub struct DisassociateConfirm {
494    pub status: i32,
495}
496
497impl fidl::Persistable for DisassociateConfirm {}
498
499#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
500pub struct DisassociateIndication {
501    pub peer_sta_address: [u8; 6],
502    pub reason_code: fidl_fuchsia_wlan_ieee80211::ReasonCode,
503    /// locally_initiated is true if diassoc is initiated from the device,
504    /// and is false if it's initiated remotely (e.g. due to disassoc frame)
505    pub locally_initiated: bool,
506}
507
508impl fidl::Persistable for DisassociateIndication {}
509
510#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
511pub struct DisassociateRequest {
512    pub peer_sta_address: [u8; 6],
513    pub reason_code: fidl_fuchsia_wlan_ieee80211::ReasonCode,
514}
515
516impl fidl::Persistable for DisassociateRequest {}
517
518#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
519pub struct EapolConfirm {
520    pub result_code: EapolResultCode,
521    /// This value corresponds to the dst_addr in the EapolRequest we're confirming.
522    /// IEEE 802.11-2016 does not include this field, but we need it to disambiguate
523    /// if multiple EAPoL handshakes are ongoing.
524    pub dst_addr: [u8; 6],
525}
526
527impl fidl::Persistable for EapolConfirm {}
528
529#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
530pub struct EapolIndication {
531    pub src_addr: [u8; 6],
532    pub dst_addr: [u8; 6],
533    pub data: Vec<u8>,
534}
535
536impl fidl::Persistable for EapolIndication {}
537
538#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
539pub struct EapolRequest {
540    pub src_addr: [u8; 6],
541    pub dst_addr: [u8; 6],
542    pub data: Vec<u8>,
543}
544
545impl fidl::Persistable for EapolRequest {}
546
547#[derive(Clone, Debug, PartialEq)]
548pub struct MlmeQueryTelemetrySupportResponse {
549    pub resp: fidl_fuchsia_wlan_stats::TelemetrySupport,
550}
551
552impl fidl::Persistable for MlmeQueryTelemetrySupportResponse {}
553
554#[derive(Clone, Debug, PartialEq)]
555pub struct MinstrelListResponse {
556    pub peers: fidl_fuchsia_wlan_minstrel::Peers,
557}
558
559impl fidl::Persistable for MinstrelListResponse {}
560
561#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
562#[repr(C)]
563pub struct MinstrelStatsRequest {
564    pub peer_addr: [u8; 6],
565}
566
567impl fidl::Persistable for MinstrelStatsRequest {}
568
569#[derive(Clone, Debug, PartialEq)]
570pub struct MinstrelStatsResponse {
571    pub peer: Option<Box<fidl_fuchsia_wlan_minstrel::Peer>>,
572}
573
574impl fidl::Persistable for MinstrelStatsResponse {}
575
576#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
577pub struct MlmeAssociateIndRequest {
578    pub ind: AssociateIndication,
579}
580
581impl fidl::Persistable for MlmeAssociateIndRequest {}
582
583#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
584pub struct MlmeAssociateRespRequest {
585    pub resp: AssociateResponse,
586}
587
588impl fidl::Persistable for MlmeAssociateRespRequest {}
589
590#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
591pub struct MlmeAuthenticateIndRequest {
592    pub ind: AuthenticateIndication,
593}
594
595impl fidl::Persistable for MlmeAuthenticateIndRequest {}
596
597#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
598pub struct MlmeAuthenticateRespRequest {
599    pub resp: AuthenticateResponse,
600}
601
602impl fidl::Persistable for MlmeAuthenticateRespRequest {}
603
604#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
605pub struct MlmeConnectConfRequest {
606    pub resp: ConnectConfirm,
607}
608
609impl fidl::Persistable for MlmeConnectConfRequest {}
610
611#[derive(Clone, Debug, PartialEq)]
612pub struct MlmeConnectReqRequest {
613    pub req: ConnectRequest,
614}
615
616impl fidl::Persistable for MlmeConnectReqRequest {}
617
618#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
619#[repr(C)]
620pub struct MlmeDeauthenticateConfRequest {
621    pub resp: DeauthenticateConfirm,
622}
623
624impl fidl::Persistable for MlmeDeauthenticateConfRequest {}
625
626#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
627pub struct MlmeDeauthenticateIndRequest {
628    pub ind: DeauthenticateIndication,
629}
630
631impl fidl::Persistable for MlmeDeauthenticateIndRequest {}
632
633#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
634pub struct MlmeDeauthenticateReqRequest {
635    pub req: DeauthenticateRequest,
636}
637
638impl fidl::Persistable for MlmeDeauthenticateReqRequest {}
639
640#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
641pub struct MlmeDeleteKeysReqRequest {
642    pub req: DeleteKeysRequest,
643}
644
645impl fidl::Persistable for MlmeDeleteKeysReqRequest {}
646
647#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
648#[repr(C)]
649pub struct MlmeDisassociateConfRequest {
650    pub resp: DisassociateConfirm,
651}
652
653impl fidl::Persistable for MlmeDisassociateConfRequest {}
654
655#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
656pub struct MlmeDisassociateIndRequest {
657    pub ind: DisassociateIndication,
658}
659
660impl fidl::Persistable for MlmeDisassociateIndRequest {}
661
662#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
663pub struct MlmeDisassociateReqRequest {
664    pub req: DisassociateRequest,
665}
666
667impl fidl::Persistable for MlmeDisassociateReqRequest {}
668
669#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
670pub struct MlmeEapolConfRequest {
671    pub resp: EapolConfirm,
672}
673
674impl fidl::Persistable for MlmeEapolConfRequest {}
675
676#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
677pub struct MlmeEapolIndRequest {
678    pub ind: EapolIndication,
679}
680
681impl fidl::Persistable for MlmeEapolIndRequest {}
682
683#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
684pub struct MlmeEapolReqRequest {
685    pub req: EapolRequest,
686}
687
688impl fidl::Persistable for MlmeEapolReqRequest {}
689
690#[derive(Clone, Debug, PartialEq)]
691pub struct MlmeFinalizeAssociationReqRequest {
692    pub negotiated_capabilities: NegotiatedCapabilities,
693}
694
695impl fidl::Persistable for MlmeFinalizeAssociationReqRequest {}
696
697#[derive(Clone, Debug, PartialEq)]
698pub struct MlmeGetIfaceHistogramStatsResponse {
699    pub resp: GetIfaceHistogramStatsResponse,
700}
701
702impl fidl::Persistable for MlmeGetIfaceHistogramStatsResponse {}
703
704#[derive(Clone, Debug, PartialEq)]
705pub struct MlmeGetIfaceStatsResponse {
706    pub resp: GetIfaceStatsResponse,
707}
708
709impl fidl::Persistable for MlmeGetIfaceStatsResponse {}
710
711#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
712#[repr(C)]
713pub struct MlmeGetMinstrelStatsRequest {
714    pub req: MinstrelStatsRequest,
715}
716
717impl fidl::Persistable for MlmeGetMinstrelStatsRequest {}
718
719#[derive(Clone, Debug, PartialEq)]
720pub struct MlmeGetMinstrelStatsResponse {
721    pub resp: MinstrelStatsResponse,
722}
723
724impl fidl::Persistable for MlmeGetMinstrelStatsResponse {}
725
726#[derive(Clone, Debug, PartialEq)]
727pub struct MlmeListMinstrelPeersResponse {
728    pub resp: MinstrelListResponse,
729}
730
731impl fidl::Persistable for MlmeListMinstrelPeersResponse {}
732
733#[derive(Clone, Debug, PartialEq)]
734pub struct MlmeOnChannelSwitchedRequest {
735    pub info: fidl_fuchsia_wlan_internal::ChannelSwitchInfo,
736}
737
738impl fidl::Persistable for MlmeOnChannelSwitchedRequest {}
739
740#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
741pub struct MlmeOnPmkAvailableRequest {
742    pub info: PmkInfo,
743}
744
745impl fidl::Persistable for MlmeOnPmkAvailableRequest {}
746
747#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
748pub struct MlmeOnSaeFrameRxRequest {
749    pub frame: SaeFrame,
750}
751
752impl fidl::Persistable for MlmeOnSaeFrameRxRequest {}
753
754#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
755#[repr(C)]
756pub struct MlmeOnSaeHandshakeIndRequest {
757    pub ind: SaeHandshakeIndication,
758}
759
760impl fidl::Persistable for MlmeOnSaeHandshakeIndRequest {}
761
762#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
763pub struct MlmeOnScanEndRequest {
764    pub end: ScanEnd,
765}
766
767impl fidl::Persistable for MlmeOnScanEndRequest {}
768
769#[derive(Clone, Debug, PartialEq)]
770pub struct MlmeOnScanResultRequest {
771    pub result: ScanResult,
772}
773
774impl fidl::Persistable for MlmeOnScanResultRequest {}
775
776#[derive(Clone, Debug, PartialEq)]
777pub struct MlmeOnWmmStatusRespRequest {
778    pub status: i32,
779    pub resp: fidl_fuchsia_wlan_internal::WmmStatusResponse,
780}
781
782impl fidl::Persistable for MlmeOnWmmStatusRespRequest {}
783
784#[derive(Clone, Debug, PartialEq)]
785pub struct MlmeQueryDeviceInfoResponse {
786    pub info: DeviceInfo,
787}
788
789impl fidl::Persistable for MlmeQueryDeviceInfoResponse {}
790
791#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
792#[repr(C)]
793pub struct MlmeReconnectReqRequest {
794    pub req: ReconnectRequest,
795}
796
797impl fidl::Persistable for MlmeReconnectReqRequest {}
798
799#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
800pub struct MlmeRelayCapturedFrameRequest {
801    pub result: CapturedFrameResult,
802}
803
804impl fidl::Persistable for MlmeRelayCapturedFrameRequest {}
805
806#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
807pub struct MlmeResetReqRequest {
808    pub req: ResetRequest,
809}
810
811impl fidl::Persistable for MlmeResetReqRequest {}
812
813#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
814pub struct MlmeRoamConfRequest {
815    pub conf: RoamConfirm,
816}
817
818impl fidl::Persistable for MlmeRoamConfRequest {}
819
820#[derive(Clone, Debug, PartialEq)]
821pub struct MlmeRoamReqRequest {
822    pub req: RoamRequest,
823}
824
825impl fidl::Persistable for MlmeRoamReqRequest {}
826
827#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
828pub struct MlmeRoamResultIndRequest {
829    pub ind: RoamResultIndication,
830}
831
832impl fidl::Persistable for MlmeRoamResultIndRequest {}
833
834#[derive(Clone, Debug, PartialEq)]
835pub struct MlmeRoamStartIndRequest {
836    pub ind: RoamStartIndication,
837}
838
839impl fidl::Persistable for MlmeRoamStartIndRequest {}
840
841#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
842pub struct MlmeSaeFrameTxRequest {
843    pub frame: SaeFrame,
844}
845
846impl fidl::Persistable for MlmeSaeFrameTxRequest {}
847
848#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
849pub struct MlmeSaeHandshakeRespRequest {
850    pub resp: SaeHandshakeResponse,
851}
852
853impl fidl::Persistable for MlmeSaeHandshakeRespRequest {}
854
855#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
856pub struct MlmeSetControlledPortRequest {
857    pub req: SetControlledPortRequest,
858}
859
860impl fidl::Persistable for MlmeSetControlledPortRequest {}
861
862#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
863pub struct MlmeSetKeysConfRequest {
864    pub conf: SetKeysConfirm,
865}
866
867impl fidl::Persistable for MlmeSetKeysConfRequest {}
868
869#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
870pub struct MlmeSetKeysReqRequest {
871    pub req: SetKeysRequest,
872}
873
874impl fidl::Persistable for MlmeSetKeysReqRequest {}
875
876#[derive(Clone, Debug, PartialEq)]
877pub struct MlmeSignalReportRequest {
878    pub ind: fidl_fuchsia_wlan_internal::SignalReportIndication,
879}
880
881impl fidl::Persistable for MlmeSignalReportRequest {}
882
883#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
884pub struct MlmeStartCaptureFramesRequest {
885    pub req: StartCaptureFramesRequest,
886}
887
888impl fidl::Persistable for MlmeStartCaptureFramesRequest {}
889
890#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
891pub struct MlmeStartCaptureFramesResponse {
892    pub resp: StartCaptureFramesResponse,
893}
894
895impl fidl::Persistable for MlmeStartCaptureFramesResponse {}
896
897#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
898pub struct MlmeStartConfRequest {
899    pub resp: StartConfirm,
900}
901
902impl fidl::Persistable for MlmeStartConfRequest {}
903
904#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
905pub struct MlmeStartReqRequest {
906    pub req: StartRequest,
907}
908
909impl fidl::Persistable for MlmeStartReqRequest {}
910
911#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
912pub struct MlmeStartScanRequest {
913    pub req: ScanRequest,
914}
915
916impl fidl::Persistable for MlmeStartScanRequest {}
917
918#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
919pub struct MlmeStopConfRequest {
920    pub resp: StopConfirm,
921}
922
923impl fidl::Persistable for MlmeStopConfRequest {}
924
925#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
926pub struct MlmeStopReqRequest {
927    pub req: StopRequest,
928}
929
930impl fidl::Persistable for MlmeStopReqRequest {}
931
932/// Non-IEEE custom structure to inform a SoftMAC device about the association negotiation outcome.
933#[derive(Clone, Debug, PartialEq)]
934pub struct NegotiatedCapabilities {
935    pub channel: fidl_fuchsia_wlan_common::WlanChannel,
936    pub capability_info: u16,
937    pub rates: Vec<u8>,
938    pub wmm_param: Option<Box<WmmParameter>>,
939    pub ht_cap: Option<Box<fidl_fuchsia_wlan_ieee80211::HtCapabilities>>,
940    pub vht_cap: Option<Box<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>>,
941}
942
943impl fidl::Persistable for NegotiatedCapabilities {}
944
945#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
946pub struct PmkInfo {
947    pub pmk: Vec<u8>,
948    pub pmkid: Vec<u8>,
949}
950
951impl fidl::Persistable for PmkInfo {}
952
953#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
954#[repr(C)]
955pub struct ReconnectRequest {
956    pub peer_sta_address: [u8; 6],
957}
958
959impl fidl::Persistable for ReconnectRequest {}
960
961#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
962pub struct ResetRequest {
963    pub sta_address: [u8; 6],
964    pub set_default_mib: bool,
965}
966
967impl fidl::Persistable for ResetRequest {}
968
969/// Result of an SME-initiated roam attempt.
970#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
971pub struct RoamConfirm {
972    pub selected_bssid: [u8; 6],
973    pub status_code: fidl_fuchsia_wlan_ieee80211::StatusCode,
974    /// Whether the original BSS association has been maintained through the roam attempt.
975    /// A successful roam always incurs disassociation from the original BSS, so if `status_code` is
976    /// success then this field must be set to false; a roam failure typically incurs disassociation
977    /// from the original BSS, but may not in some cases (e.g. in some Fast BSS Transition scenarios).
978    pub original_association_maintained: bool,
979    /// Whether the client is authenticated with the target BSS. If `status_code` is success, then
980    /// this field must be set to true; if the roam attempt failed, this field may be true or false.
981    /// This allows higher layers to decide how to clean up connection state after a failed roam
982    /// attempt.
983    pub target_bss_authenticated: bool,
984    pub association_id: u16,
985    pub association_ies: Vec<u8>,
986}
987
988impl fidl::Persistable for RoamConfirm {}
989
990#[derive(Clone, Debug, PartialEq)]
991pub struct RoamRequest {
992    pub selected_bss: fidl_fuchsia_wlan_common::BssDescription,
993}
994
995impl fidl::Persistable for RoamRequest {}
996
997/// Result of a fullmac-initiated roam attempt.
998#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
999pub struct RoamResultIndication {
1000    pub selected_bssid: [u8; 6],
1001    pub status_code: fidl_fuchsia_wlan_ieee80211::StatusCode,
1002    /// Whether the original BSS association has been maintained through the roam attempt.
1003    /// A successful roam always incurs disassociation from the original BSS, so if `status_code` is
1004    /// success then this field must be set to false; a roam failure typically incurs disassociation
1005    /// from the original BSS, but may not in some cases (e.g. in some Fast BSS Transition scenarios).
1006    pub original_association_maintained: bool,
1007    /// Whether the client is authenticated with the target BSS. If `status_code` is success, then
1008    /// this field must be set to true; if the roam attempt failed, this field may be true or false.
1009    /// This allows higher layers to decide how to clean up connection state after a failed roam
1010    /// attempt.
1011    pub target_bss_authenticated: bool,
1012    pub association_id: u16,
1013    pub association_ies: Vec<u8>,
1014}
1015
1016impl fidl::Persistable for RoamResultIndication {}
1017
1018/// In-progress fullmac-initiated roam attempt details.
1019#[derive(Clone, Debug, PartialEq)]
1020pub struct RoamStartIndication {
1021    pub selected_bssid: [u8; 6],
1022    pub selected_bss: fidl_fuchsia_wlan_common::BssDescription,
1023    /// Whether the original BSS association has been maintained at the start of a roam attempt.
1024    /// 802.11 dictates that a STA can only be associated with a single BSS, so a roam attempt
1025    /// typically incurs disassociation at the start of the roam attempt. However, 802.11 also
1026    /// provides a mechanism (i.e. Fast BSS Transition) that allows a device to maintain
1027    /// association with the original BSS while establishing authentication with the target BSS, in
1028    /// order to avoid losing the original association if authentication with the target BSS fails.
1029    pub original_association_maintained: bool,
1030}
1031
1032impl fidl::Persistable for RoamStartIndication {}
1033
1034#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1035pub struct SaeFrame {
1036    pub peer_sta_address: [u8; 6],
1037    pub status_code: fidl_fuchsia_wlan_ieee80211::StatusCode,
1038    pub seq_num: u16,
1039    pub sae_fields: Vec<u8>,
1040}
1041
1042impl fidl::Persistable for SaeFrame {}
1043
1044#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1045#[repr(C)]
1046pub struct SaeHandshakeIndication {
1047    pub peer_sta_address: [u8; 6],
1048}
1049
1050impl fidl::Persistable for SaeHandshakeIndication {}
1051
1052#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1053pub struct SaeHandshakeResponse {
1054    pub peer_sta_address: [u8; 6],
1055    pub status_code: fidl_fuchsia_wlan_ieee80211::StatusCode,
1056}
1057
1058impl fidl::Persistable for SaeHandshakeResponse {}
1059
1060#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1061pub struct ScanEnd {
1062    pub txn_id: u64,
1063    pub code: ScanResultCode,
1064}
1065
1066impl fidl::Persistable for ScanEnd {}
1067
1068#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1069pub struct ScanRequest {
1070    pub txn_id: u64,
1071    pub scan_type: ScanTypes,
1072    /// List of channels to scan on. An empty list of channels will cause a
1073    /// scan request to immediately return a ScanEnd with code INVALID_ARGS.
1074    ///
1075    /// Invalid channel numbers will be silently ignored. The validity of a channel
1076    /// number depends on the current regulatory region, and MLME does not control
1077    /// or know this setting.
1078    pub channel_list: Vec<u8>,
1079    /// List of SSIDs to scan for. An empty list of ssids is the same as specifying
1080    /// a list containing only the wildcard SSID.
1081    ///
1082    /// There is no limit on the number of SSIDs specified. A large number of
1083    /// SSIDs may result in extended scan times because of hardware limitations on
1084    /// the number of SSIDs permitted per scan request and the technical limitation
1085    /// in IEEE 802.11-2016 that limits the number of SSIDs in a single Probe Request
1086    /// frame to ieee80211.SSID_LIST_MAX SSIDs.
1087    pub ssid_list: Vec<Vec<u8>>,
1088    pub probe_delay: u32,
1089    pub min_channel_time: u32,
1090    pub max_channel_time: u32,
1091}
1092
1093impl fidl::Persistable for ScanRequest {}
1094
1095#[derive(Clone, Debug, PartialEq)]
1096pub struct ScanResult {
1097    pub txn_id: u64,
1098    pub timestamp_nanos: i64,
1099    pub bss: fidl_fuchsia_wlan_common::BssDescription,
1100}
1101
1102impl fidl::Persistable for ScanResult {}
1103
1104#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1105pub struct SetControlledPortRequest {
1106    pub peer_sta_address: [u8; 6],
1107    pub state: ControlledPortState,
1108}
1109
1110impl fidl::Persistable for SetControlledPortRequest {}
1111
1112#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1113pub struct SetKeyDescriptor {
1114    pub key: Vec<u8>,
1115    pub key_id: u16,
1116    pub key_type: KeyType,
1117    pub address: [u8; 6],
1118    pub rsc: u64,
1119    pub cipher_suite_oui: [u8; 3],
1120    pub cipher_suite_type: fidl_fuchsia_wlan_ieee80211::CipherSuiteType,
1121}
1122
1123impl fidl::Persistable for SetKeyDescriptor {}
1124
1125#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1126#[repr(C)]
1127pub struct SetKeyResult {
1128    pub key_id: u16,
1129    pub status: i32,
1130}
1131
1132impl fidl::Persistable for SetKeyResult {}
1133
1134#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1135pub struct SetKeysConfirm {
1136    pub results: Vec<SetKeyResult>,
1137}
1138
1139impl fidl::Persistable for SetKeysConfirm {}
1140
1141#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1142pub struct SetKeysRequest {
1143    pub keylist: Vec<SetKeyDescriptor>,
1144}
1145
1146impl fidl::Persistable for SetKeysRequest {}
1147
1148#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1149pub struct StartCaptureFramesRequest {
1150    pub mgmt_frame_flags: MgmtFrameCaptureFlags,
1151}
1152
1153impl fidl::Persistable for StartCaptureFramesRequest {}
1154
1155#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1156pub struct StartCaptureFramesResponse {
1157    pub status: i32,
1158    pub supported_mgmt_frames: MgmtFrameCaptureFlags,
1159}
1160
1161impl fidl::Persistable for StartCaptureFramesResponse {}
1162
1163#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1164pub struct StartConfirm {
1165    pub result_code: StartResultCode,
1166}
1167
1168impl fidl::Persistable for StartConfirm {}
1169
1170#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1171pub struct StartRequest {
1172    pub ssid: Vec<u8>,
1173    pub bss_type: fidl_fuchsia_wlan_common::BssType,
1174    pub beacon_period: u16,
1175    pub dtim_period: u8,
1176    pub channel: u8,
1177    pub capability_info: u16,
1178    pub rates: Vec<u8>,
1179    pub country: Country,
1180    pub mesh_id: Vec<u8>,
1181    pub rsne: Option<Vec<u8>>,
1182    pub phy: fidl_fuchsia_wlan_common::WlanPhyType,
1183    pub channel_bandwidth: fidl_fuchsia_wlan_common::ChannelBandwidth,
1184}
1185
1186impl fidl::Persistable for StartRequest {}
1187
1188#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1189pub struct StopConfirm {
1190    pub result_code: StopResultCode,
1191}
1192
1193impl fidl::Persistable for StopConfirm {}
1194
1195#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1196pub struct StopRequest {
1197    pub ssid: Vec<u8>,
1198}
1199
1200impl fidl::Persistable for StopRequest {}
1201
1202#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1203#[repr(C)]
1204pub struct WmmParameter {
1205    pub bytes: [u8; 18],
1206}
1207
1208impl fidl::Persistable for WmmParameter {}
1209
1210#[derive(Clone, Debug, PartialEq)]
1211pub enum GetIfaceHistogramStatsResponse {
1212    Stats(fidl_fuchsia_wlan_stats::IfaceHistogramStats),
1213    ErrorStatus(i32),
1214}
1215
1216impl GetIfaceHistogramStatsResponse {
1217    #[inline]
1218    pub fn ordinal(&self) -> u64 {
1219        match *self {
1220            Self::Stats(_) => 1,
1221            Self::ErrorStatus(_) => 2,
1222        }
1223    }
1224}
1225
1226impl fidl::Persistable for GetIfaceHistogramStatsResponse {}
1227
1228#[derive(Clone, Debug, PartialEq)]
1229pub enum GetIfaceStatsResponse {
1230    Stats(fidl_fuchsia_wlan_stats::IfaceStats),
1231    ErrorStatus(i32),
1232}
1233
1234impl GetIfaceStatsResponse {
1235    #[inline]
1236    pub fn ordinal(&self) -> u64 {
1237        match *self {
1238            Self::Stats(_) => 1,
1239            Self::ErrorStatus(_) => 2,
1240        }
1241    }
1242}
1243
1244impl fidl::Persistable for GetIfaceStatsResponse {}
1245
1246mod internal {
1247    use super::*;
1248    unsafe impl fidl::encoding::TypeMarker for MgmtFrameCaptureFlags {
1249        type Owned = Self;
1250
1251        #[inline(always)]
1252        fn inline_align(_context: fidl::encoding::Context) -> usize {
1253            4
1254        }
1255
1256        #[inline(always)]
1257        fn inline_size(_context: fidl::encoding::Context) -> usize {
1258            4
1259        }
1260    }
1261
1262    impl fidl::encoding::ValueTypeMarker for MgmtFrameCaptureFlags {
1263        type Borrowed<'a> = Self;
1264        #[inline(always)]
1265        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1266            *value
1267        }
1268    }
1269
1270    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1271        for MgmtFrameCaptureFlags
1272    {
1273        #[inline]
1274        unsafe fn encode(
1275            self,
1276            encoder: &mut fidl::encoding::Encoder<'_, D>,
1277            offset: usize,
1278            _depth: fidl::encoding::Depth,
1279        ) -> fidl::Result<()> {
1280            encoder.debug_check_bounds::<Self>(offset);
1281            if self.bits() & Self::all().bits() != self.bits() {
1282                return Err(fidl::Error::InvalidBitsValue);
1283            }
1284            encoder.write_num(self.bits(), offset);
1285            Ok(())
1286        }
1287    }
1288
1289    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MgmtFrameCaptureFlags {
1290        #[inline(always)]
1291        fn new_empty() -> Self {
1292            Self::empty()
1293        }
1294
1295        #[inline]
1296        unsafe fn decode(
1297            &mut self,
1298            decoder: &mut fidl::encoding::Decoder<'_, D>,
1299            offset: usize,
1300            _depth: fidl::encoding::Depth,
1301        ) -> fidl::Result<()> {
1302            decoder.debug_check_bounds::<Self>(offset);
1303            let prim = decoder.read_num::<u32>(offset);
1304            *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
1305            Ok(())
1306        }
1307    }
1308    unsafe impl fidl::encoding::TypeMarker for AssociateResultCode {
1309        type Owned = Self;
1310
1311        #[inline(always)]
1312        fn inline_align(_context: fidl::encoding::Context) -> usize {
1313            std::mem::align_of::<u32>()
1314        }
1315
1316        #[inline(always)]
1317        fn inline_size(_context: fidl::encoding::Context) -> usize {
1318            std::mem::size_of::<u32>()
1319        }
1320
1321        #[inline(always)]
1322        fn encode_is_copy() -> bool {
1323            true
1324        }
1325
1326        #[inline(always)]
1327        fn decode_is_copy() -> bool {
1328            false
1329        }
1330    }
1331
1332    impl fidl::encoding::ValueTypeMarker for AssociateResultCode {
1333        type Borrowed<'a> = Self;
1334        #[inline(always)]
1335        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1336            *value
1337        }
1338    }
1339
1340    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1341        for AssociateResultCode
1342    {
1343        #[inline]
1344        unsafe fn encode(
1345            self,
1346            encoder: &mut fidl::encoding::Encoder<'_, D>,
1347            offset: usize,
1348            _depth: fidl::encoding::Depth,
1349        ) -> fidl::Result<()> {
1350            encoder.debug_check_bounds::<Self>(offset);
1351            encoder.write_num(self.into_primitive(), offset);
1352            Ok(())
1353        }
1354    }
1355
1356    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AssociateResultCode {
1357        #[inline(always)]
1358        fn new_empty() -> Self {
1359            Self::Success
1360        }
1361
1362        #[inline]
1363        unsafe fn decode(
1364            &mut self,
1365            decoder: &mut fidl::encoding::Decoder<'_, D>,
1366            offset: usize,
1367            _depth: fidl::encoding::Depth,
1368        ) -> fidl::Result<()> {
1369            decoder.debug_check_bounds::<Self>(offset);
1370            let prim = decoder.read_num::<u32>(offset);
1371
1372            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1373            Ok(())
1374        }
1375    }
1376    unsafe impl fidl::encoding::TypeMarker for AuthenticateResultCode {
1377        type Owned = Self;
1378
1379        #[inline(always)]
1380        fn inline_align(_context: fidl::encoding::Context) -> usize {
1381            std::mem::align_of::<u32>()
1382        }
1383
1384        #[inline(always)]
1385        fn inline_size(_context: fidl::encoding::Context) -> usize {
1386            std::mem::size_of::<u32>()
1387        }
1388
1389        #[inline(always)]
1390        fn encode_is_copy() -> bool {
1391            true
1392        }
1393
1394        #[inline(always)]
1395        fn decode_is_copy() -> bool {
1396            false
1397        }
1398    }
1399
1400    impl fidl::encoding::ValueTypeMarker for AuthenticateResultCode {
1401        type Borrowed<'a> = Self;
1402        #[inline(always)]
1403        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1404            *value
1405        }
1406    }
1407
1408    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1409        for AuthenticateResultCode
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::<Self>(offset);
1419            encoder.write_num(self.into_primitive(), offset);
1420            Ok(())
1421        }
1422    }
1423
1424    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1425        for AuthenticateResultCode
1426    {
1427        #[inline(always)]
1428        fn new_empty() -> Self {
1429            Self::Success
1430        }
1431
1432        #[inline]
1433        unsafe fn decode(
1434            &mut self,
1435            decoder: &mut fidl::encoding::Decoder<'_, D>,
1436            offset: usize,
1437            _depth: fidl::encoding::Depth,
1438        ) -> fidl::Result<()> {
1439            decoder.debug_check_bounds::<Self>(offset);
1440            let prim = decoder.read_num::<u32>(offset);
1441
1442            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1443            Ok(())
1444        }
1445    }
1446    unsafe impl fidl::encoding::TypeMarker for AuthenticationTypes {
1447        type Owned = Self;
1448
1449        #[inline(always)]
1450        fn inline_align(_context: fidl::encoding::Context) -> usize {
1451            std::mem::align_of::<u32>()
1452        }
1453
1454        #[inline(always)]
1455        fn inline_size(_context: fidl::encoding::Context) -> usize {
1456            std::mem::size_of::<u32>()
1457        }
1458
1459        #[inline(always)]
1460        fn encode_is_copy() -> bool {
1461            true
1462        }
1463
1464        #[inline(always)]
1465        fn decode_is_copy() -> bool {
1466            false
1467        }
1468    }
1469
1470    impl fidl::encoding::ValueTypeMarker for AuthenticationTypes {
1471        type Borrowed<'a> = Self;
1472        #[inline(always)]
1473        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1474            *value
1475        }
1476    }
1477
1478    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1479        for AuthenticationTypes
1480    {
1481        #[inline]
1482        unsafe fn encode(
1483            self,
1484            encoder: &mut fidl::encoding::Encoder<'_, D>,
1485            offset: usize,
1486            _depth: fidl::encoding::Depth,
1487        ) -> fidl::Result<()> {
1488            encoder.debug_check_bounds::<Self>(offset);
1489            encoder.write_num(self.into_primitive(), offset);
1490            Ok(())
1491        }
1492    }
1493
1494    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AuthenticationTypes {
1495        #[inline(always)]
1496        fn new_empty() -> Self {
1497            Self::OpenSystem
1498        }
1499
1500        #[inline]
1501        unsafe fn decode(
1502            &mut self,
1503            decoder: &mut fidl::encoding::Decoder<'_, D>,
1504            offset: usize,
1505            _depth: fidl::encoding::Depth,
1506        ) -> fidl::Result<()> {
1507            decoder.debug_check_bounds::<Self>(offset);
1508            let prim = decoder.read_num::<u32>(offset);
1509
1510            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1511            Ok(())
1512        }
1513    }
1514    unsafe impl fidl::encoding::TypeMarker for ControlledPortState {
1515        type Owned = Self;
1516
1517        #[inline(always)]
1518        fn inline_align(_context: fidl::encoding::Context) -> usize {
1519            std::mem::align_of::<u32>()
1520        }
1521
1522        #[inline(always)]
1523        fn inline_size(_context: fidl::encoding::Context) -> usize {
1524            std::mem::size_of::<u32>()
1525        }
1526
1527        #[inline(always)]
1528        fn encode_is_copy() -> bool {
1529            true
1530        }
1531
1532        #[inline(always)]
1533        fn decode_is_copy() -> bool {
1534            false
1535        }
1536    }
1537
1538    impl fidl::encoding::ValueTypeMarker for ControlledPortState {
1539        type Borrowed<'a> = Self;
1540        #[inline(always)]
1541        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1542            *value
1543        }
1544    }
1545
1546    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1547        for ControlledPortState
1548    {
1549        #[inline]
1550        unsafe fn encode(
1551            self,
1552            encoder: &mut fidl::encoding::Encoder<'_, D>,
1553            offset: usize,
1554            _depth: fidl::encoding::Depth,
1555        ) -> fidl::Result<()> {
1556            encoder.debug_check_bounds::<Self>(offset);
1557            encoder.write_num(self.into_primitive(), offset);
1558            Ok(())
1559        }
1560    }
1561
1562    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ControlledPortState {
1563        #[inline(always)]
1564        fn new_empty() -> Self {
1565            Self::Closed
1566        }
1567
1568        #[inline]
1569        unsafe fn decode(
1570            &mut self,
1571            decoder: &mut fidl::encoding::Decoder<'_, D>,
1572            offset: usize,
1573            _depth: fidl::encoding::Depth,
1574        ) -> fidl::Result<()> {
1575            decoder.debug_check_bounds::<Self>(offset);
1576            let prim = decoder.read_num::<u32>(offset);
1577
1578            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1579            Ok(())
1580        }
1581    }
1582    unsafe impl fidl::encoding::TypeMarker for EapolResultCode {
1583        type Owned = Self;
1584
1585        #[inline(always)]
1586        fn inline_align(_context: fidl::encoding::Context) -> usize {
1587            std::mem::align_of::<u32>()
1588        }
1589
1590        #[inline(always)]
1591        fn inline_size(_context: fidl::encoding::Context) -> usize {
1592            std::mem::size_of::<u32>()
1593        }
1594
1595        #[inline(always)]
1596        fn encode_is_copy() -> bool {
1597            true
1598        }
1599
1600        #[inline(always)]
1601        fn decode_is_copy() -> bool {
1602            false
1603        }
1604    }
1605
1606    impl fidl::encoding::ValueTypeMarker for EapolResultCode {
1607        type Borrowed<'a> = Self;
1608        #[inline(always)]
1609        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1610            *value
1611        }
1612    }
1613
1614    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1615        for EapolResultCode
1616    {
1617        #[inline]
1618        unsafe fn encode(
1619            self,
1620            encoder: &mut fidl::encoding::Encoder<'_, D>,
1621            offset: usize,
1622            _depth: fidl::encoding::Depth,
1623        ) -> fidl::Result<()> {
1624            encoder.debug_check_bounds::<Self>(offset);
1625            encoder.write_num(self.into_primitive(), offset);
1626            Ok(())
1627        }
1628    }
1629
1630    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EapolResultCode {
1631        #[inline(always)]
1632        fn new_empty() -> Self {
1633            Self::Success
1634        }
1635
1636        #[inline]
1637        unsafe fn decode(
1638            &mut self,
1639            decoder: &mut fidl::encoding::Decoder<'_, D>,
1640            offset: usize,
1641            _depth: fidl::encoding::Depth,
1642        ) -> fidl::Result<()> {
1643            decoder.debug_check_bounds::<Self>(offset);
1644            let prim = decoder.read_num::<u32>(offset);
1645
1646            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1647            Ok(())
1648        }
1649    }
1650    unsafe impl fidl::encoding::TypeMarker for KeyType {
1651        type Owned = Self;
1652
1653        #[inline(always)]
1654        fn inline_align(_context: fidl::encoding::Context) -> usize {
1655            std::mem::align_of::<u32>()
1656        }
1657
1658        #[inline(always)]
1659        fn inline_size(_context: fidl::encoding::Context) -> usize {
1660            std::mem::size_of::<u32>()
1661        }
1662
1663        #[inline(always)]
1664        fn encode_is_copy() -> bool {
1665            true
1666        }
1667
1668        #[inline(always)]
1669        fn decode_is_copy() -> bool {
1670            false
1671        }
1672    }
1673
1674    impl fidl::encoding::ValueTypeMarker for KeyType {
1675        type Borrowed<'a> = Self;
1676        #[inline(always)]
1677        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1678            *value
1679        }
1680    }
1681
1682    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for KeyType {
1683        #[inline]
1684        unsafe fn encode(
1685            self,
1686            encoder: &mut fidl::encoding::Encoder<'_, D>,
1687            offset: usize,
1688            _depth: fidl::encoding::Depth,
1689        ) -> fidl::Result<()> {
1690            encoder.debug_check_bounds::<Self>(offset);
1691            encoder.write_num(self.into_primitive(), offset);
1692            Ok(())
1693        }
1694    }
1695
1696    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for KeyType {
1697        #[inline(always)]
1698        fn new_empty() -> Self {
1699            Self::Group
1700        }
1701
1702        #[inline]
1703        unsafe fn decode(
1704            &mut self,
1705            decoder: &mut fidl::encoding::Decoder<'_, D>,
1706            offset: usize,
1707            _depth: fidl::encoding::Depth,
1708        ) -> fidl::Result<()> {
1709            decoder.debug_check_bounds::<Self>(offset);
1710            let prim = decoder.read_num::<u32>(offset);
1711
1712            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1713            Ok(())
1714        }
1715    }
1716    unsafe impl fidl::encoding::TypeMarker for ScanResultCode {
1717        type Owned = Self;
1718
1719        #[inline(always)]
1720        fn inline_align(_context: fidl::encoding::Context) -> usize {
1721            std::mem::align_of::<u32>()
1722        }
1723
1724        #[inline(always)]
1725        fn inline_size(_context: fidl::encoding::Context) -> usize {
1726            std::mem::size_of::<u32>()
1727        }
1728
1729        #[inline(always)]
1730        fn encode_is_copy() -> bool {
1731            true
1732        }
1733
1734        #[inline(always)]
1735        fn decode_is_copy() -> bool {
1736            false
1737        }
1738    }
1739
1740    impl fidl::encoding::ValueTypeMarker for ScanResultCode {
1741        type Borrowed<'a> = Self;
1742        #[inline(always)]
1743        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1744            *value
1745        }
1746    }
1747
1748    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ScanResultCode {
1749        #[inline]
1750        unsafe fn encode(
1751            self,
1752            encoder: &mut fidl::encoding::Encoder<'_, D>,
1753            offset: usize,
1754            _depth: fidl::encoding::Depth,
1755        ) -> fidl::Result<()> {
1756            encoder.debug_check_bounds::<Self>(offset);
1757            encoder.write_num(self.into_primitive(), offset);
1758            Ok(())
1759        }
1760    }
1761
1762    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanResultCode {
1763        #[inline(always)]
1764        fn new_empty() -> Self {
1765            Self::Success
1766        }
1767
1768        #[inline]
1769        unsafe fn decode(
1770            &mut self,
1771            decoder: &mut fidl::encoding::Decoder<'_, D>,
1772            offset: usize,
1773            _depth: fidl::encoding::Depth,
1774        ) -> fidl::Result<()> {
1775            decoder.debug_check_bounds::<Self>(offset);
1776            let prim = decoder.read_num::<u32>(offset);
1777
1778            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1779            Ok(())
1780        }
1781    }
1782    unsafe impl fidl::encoding::TypeMarker for ScanTypes {
1783        type Owned = Self;
1784
1785        #[inline(always)]
1786        fn inline_align(_context: fidl::encoding::Context) -> usize {
1787            std::mem::align_of::<u32>()
1788        }
1789
1790        #[inline(always)]
1791        fn inline_size(_context: fidl::encoding::Context) -> usize {
1792            std::mem::size_of::<u32>()
1793        }
1794
1795        #[inline(always)]
1796        fn encode_is_copy() -> bool {
1797            true
1798        }
1799
1800        #[inline(always)]
1801        fn decode_is_copy() -> bool {
1802            false
1803        }
1804    }
1805
1806    impl fidl::encoding::ValueTypeMarker for ScanTypes {
1807        type Borrowed<'a> = Self;
1808        #[inline(always)]
1809        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1810            *value
1811        }
1812    }
1813
1814    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ScanTypes {
1815        #[inline]
1816        unsafe fn encode(
1817            self,
1818            encoder: &mut fidl::encoding::Encoder<'_, D>,
1819            offset: usize,
1820            _depth: fidl::encoding::Depth,
1821        ) -> fidl::Result<()> {
1822            encoder.debug_check_bounds::<Self>(offset);
1823            encoder.write_num(self.into_primitive(), offset);
1824            Ok(())
1825        }
1826    }
1827
1828    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanTypes {
1829        #[inline(always)]
1830        fn new_empty() -> Self {
1831            Self::Active
1832        }
1833
1834        #[inline]
1835        unsafe fn decode(
1836            &mut self,
1837            decoder: &mut fidl::encoding::Decoder<'_, D>,
1838            offset: usize,
1839            _depth: fidl::encoding::Depth,
1840        ) -> fidl::Result<()> {
1841            decoder.debug_check_bounds::<Self>(offset);
1842            let prim = decoder.read_num::<u32>(offset);
1843
1844            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1845            Ok(())
1846        }
1847    }
1848    unsafe impl fidl::encoding::TypeMarker for StartResultCode {
1849        type Owned = Self;
1850
1851        #[inline(always)]
1852        fn inline_align(_context: fidl::encoding::Context) -> usize {
1853            std::mem::align_of::<u32>()
1854        }
1855
1856        #[inline(always)]
1857        fn inline_size(_context: fidl::encoding::Context) -> usize {
1858            std::mem::size_of::<u32>()
1859        }
1860
1861        #[inline(always)]
1862        fn encode_is_copy() -> bool {
1863            true
1864        }
1865
1866        #[inline(always)]
1867        fn decode_is_copy() -> bool {
1868            false
1869        }
1870    }
1871
1872    impl fidl::encoding::ValueTypeMarker for StartResultCode {
1873        type Borrowed<'a> = Self;
1874        #[inline(always)]
1875        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1876            *value
1877        }
1878    }
1879
1880    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1881        for StartResultCode
1882    {
1883        #[inline]
1884        unsafe fn encode(
1885            self,
1886            encoder: &mut fidl::encoding::Encoder<'_, D>,
1887            offset: usize,
1888            _depth: fidl::encoding::Depth,
1889        ) -> fidl::Result<()> {
1890            encoder.debug_check_bounds::<Self>(offset);
1891            encoder.write_num(self.into_primitive(), offset);
1892            Ok(())
1893        }
1894    }
1895
1896    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StartResultCode {
1897        #[inline(always)]
1898        fn new_empty() -> Self {
1899            Self::Success
1900        }
1901
1902        #[inline]
1903        unsafe fn decode(
1904            &mut self,
1905            decoder: &mut fidl::encoding::Decoder<'_, D>,
1906            offset: usize,
1907            _depth: fidl::encoding::Depth,
1908        ) -> fidl::Result<()> {
1909            decoder.debug_check_bounds::<Self>(offset);
1910            let prim = decoder.read_num::<u32>(offset);
1911
1912            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1913            Ok(())
1914        }
1915    }
1916    unsafe impl fidl::encoding::TypeMarker for StopResultCode {
1917        type Owned = Self;
1918
1919        #[inline(always)]
1920        fn inline_align(_context: fidl::encoding::Context) -> usize {
1921            std::mem::align_of::<u32>()
1922        }
1923
1924        #[inline(always)]
1925        fn inline_size(_context: fidl::encoding::Context) -> usize {
1926            std::mem::size_of::<u32>()
1927        }
1928
1929        #[inline(always)]
1930        fn encode_is_copy() -> bool {
1931            true
1932        }
1933
1934        #[inline(always)]
1935        fn decode_is_copy() -> bool {
1936            false
1937        }
1938    }
1939
1940    impl fidl::encoding::ValueTypeMarker for StopResultCode {
1941        type Borrowed<'a> = Self;
1942        #[inline(always)]
1943        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1944            *value
1945        }
1946    }
1947
1948    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for StopResultCode {
1949        #[inline]
1950        unsafe fn encode(
1951            self,
1952            encoder: &mut fidl::encoding::Encoder<'_, D>,
1953            offset: usize,
1954            _depth: fidl::encoding::Depth,
1955        ) -> fidl::Result<()> {
1956            encoder.debug_check_bounds::<Self>(offset);
1957            encoder.write_num(self.into_primitive(), offset);
1958            Ok(())
1959        }
1960    }
1961
1962    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StopResultCode {
1963        #[inline(always)]
1964        fn new_empty() -> Self {
1965            Self::Success
1966        }
1967
1968        #[inline]
1969        unsafe fn decode(
1970            &mut self,
1971            decoder: &mut fidl::encoding::Decoder<'_, D>,
1972            offset: usize,
1973            _depth: fidl::encoding::Depth,
1974        ) -> fidl::Result<()> {
1975            decoder.debug_check_bounds::<Self>(offset);
1976            let prim = decoder.read_num::<u32>(offset);
1977
1978            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1979            Ok(())
1980        }
1981    }
1982
1983    impl fidl::encoding::ValueTypeMarker for AssociateIndication {
1984        type Borrowed<'a> = &'a Self;
1985        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1986            value
1987        }
1988    }
1989
1990    unsafe impl fidl::encoding::TypeMarker for AssociateIndication {
1991        type Owned = Self;
1992
1993        #[inline(always)]
1994        fn inline_align(_context: fidl::encoding::Context) -> usize {
1995            8
1996        }
1997
1998        #[inline(always)]
1999        fn inline_size(_context: fidl::encoding::Context) -> usize {
2000            64
2001        }
2002    }
2003
2004    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AssociateIndication, D>
2005        for &AssociateIndication
2006    {
2007        #[inline]
2008        unsafe fn encode(
2009            self,
2010            encoder: &mut fidl::encoding::Encoder<'_, D>,
2011            offset: usize,
2012            _depth: fidl::encoding::Depth,
2013        ) -> fidl::Result<()> {
2014            encoder.debug_check_bounds::<AssociateIndication>(offset);
2015            // Delegate to tuple encoding.
2016            fidl::encoding::Encode::<AssociateIndication, D>::encode(
2017                (
2018                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
2019                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.capability_info),
2020                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.listen_interval),
2021                    <fidl::encoding::Optional<fidl::encoding::Vector<u8, 32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssid),
2022                    <fidl::encoding::Vector<u8, 14> as fidl::encoding::ValueTypeMarker>::borrow(&self.rates),
2023                    <fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>> as fidl::encoding::ValueTypeMarker>::borrow(&self.rsne),
2024                ),
2025                encoder, offset, _depth
2026            )
2027        }
2028    }
2029    unsafe impl<
2030            D: fidl::encoding::ResourceDialect,
2031            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
2032            T1: fidl::encoding::Encode<u16, D>,
2033            T2: fidl::encoding::Encode<u16, D>,
2034            T3: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u8, 32>>, D>,
2035            T4: fidl::encoding::Encode<fidl::encoding::Vector<u8, 14>, D>,
2036            T5: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>>, D>,
2037        > fidl::encoding::Encode<AssociateIndication, D> for (T0, T1, T2, T3, T4, T5)
2038    {
2039        #[inline]
2040        unsafe fn encode(
2041            self,
2042            encoder: &mut fidl::encoding::Encoder<'_, D>,
2043            offset: usize,
2044            depth: fidl::encoding::Depth,
2045        ) -> fidl::Result<()> {
2046            encoder.debug_check_bounds::<AssociateIndication>(offset);
2047            // Zero out padding regions. There's no need to apply masks
2048            // because the unmasked parts will be overwritten by fields.
2049            unsafe {
2050                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
2051                (ptr as *mut u64).write_unaligned(0);
2052            }
2053            // Write the fields.
2054            self.0.encode(encoder, offset + 0, depth)?;
2055            self.1.encode(encoder, offset + 6, depth)?;
2056            self.2.encode(encoder, offset + 8, depth)?;
2057            self.3.encode(encoder, offset + 16, depth)?;
2058            self.4.encode(encoder, offset + 32, depth)?;
2059            self.5.encode(encoder, offset + 48, depth)?;
2060            Ok(())
2061        }
2062    }
2063
2064    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AssociateIndication {
2065        #[inline(always)]
2066        fn new_empty() -> Self {
2067            Self {
2068                peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
2069                capability_info: fidl::new_empty!(u16, D),
2070                listen_interval: fidl::new_empty!(u16, D),
2071                ssid: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::Vector<u8, 32>>, D),
2072                rates: fidl::new_empty!(fidl::encoding::Vector<u8, 14>, D),
2073                rsne: fidl::new_empty!(
2074                    fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>>,
2075                    D
2076                ),
2077            }
2078        }
2079
2080        #[inline]
2081        unsafe fn decode(
2082            &mut self,
2083            decoder: &mut fidl::encoding::Decoder<'_, D>,
2084            offset: usize,
2085            _depth: fidl::encoding::Depth,
2086        ) -> fidl::Result<()> {
2087            decoder.debug_check_bounds::<Self>(offset);
2088            // Verify that padding bytes are zero.
2089            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
2090            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2091            let mask = 0xffffffffffff0000u64;
2092            let maskedval = padval & mask;
2093            if maskedval != 0 {
2094                return Err(fidl::Error::NonZeroPadding {
2095                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
2096                });
2097            }
2098            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
2099            fidl::decode!(u16, D, &mut self.capability_info, decoder, offset + 6, _depth)?;
2100            fidl::decode!(u16, D, &mut self.listen_interval, decoder, offset + 8, _depth)?;
2101            fidl::decode!(
2102                fidl::encoding::Optional<fidl::encoding::Vector<u8, 32>>,
2103                D,
2104                &mut self.ssid,
2105                decoder,
2106                offset + 16,
2107                _depth
2108            )?;
2109            fidl::decode!(fidl::encoding::Vector<u8, 14>, D, &mut self.rates, decoder, offset + 32, _depth)?;
2110            fidl::decode!(
2111                fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>>,
2112                D,
2113                &mut self.rsne,
2114                decoder,
2115                offset + 48,
2116                _depth
2117            )?;
2118            Ok(())
2119        }
2120    }
2121
2122    impl fidl::encoding::ValueTypeMarker for AssociateResponse {
2123        type Borrowed<'a> = &'a Self;
2124        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2125            value
2126        }
2127    }
2128
2129    unsafe impl fidl::encoding::TypeMarker for AssociateResponse {
2130        type Owned = Self;
2131
2132        #[inline(always)]
2133        fn inline_align(_context: fidl::encoding::Context) -> usize {
2134            8
2135        }
2136
2137        #[inline(always)]
2138        fn inline_size(_context: fidl::encoding::Context) -> usize {
2139            32
2140        }
2141    }
2142
2143    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AssociateResponse, D>
2144        for &AssociateResponse
2145    {
2146        #[inline]
2147        unsafe fn encode(
2148            self,
2149            encoder: &mut fidl::encoding::Encoder<'_, D>,
2150            offset: usize,
2151            _depth: fidl::encoding::Depth,
2152        ) -> fidl::Result<()> {
2153            encoder.debug_check_bounds::<AssociateResponse>(offset);
2154            // Delegate to tuple encoding.
2155            fidl::encoding::Encode::<AssociateResponse, D>::encode(
2156                (
2157                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(
2158                        &self.peer_sta_address,
2159                    ),
2160                    <AssociateResultCode as fidl::encoding::ValueTypeMarker>::borrow(
2161                        &self.result_code,
2162                    ),
2163                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.association_id),
2164                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.capability_info),
2165                    <fidl::encoding::Vector<u8, 14> as fidl::encoding::ValueTypeMarker>::borrow(
2166                        &self.rates,
2167                    ),
2168                ),
2169                encoder,
2170                offset,
2171                _depth,
2172            )
2173        }
2174    }
2175    unsafe impl<
2176            D: fidl::encoding::ResourceDialect,
2177            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
2178            T1: fidl::encoding::Encode<AssociateResultCode, D>,
2179            T2: fidl::encoding::Encode<u16, D>,
2180            T3: fidl::encoding::Encode<u16, D>,
2181            T4: fidl::encoding::Encode<fidl::encoding::Vector<u8, 14>, D>,
2182        > fidl::encoding::Encode<AssociateResponse, D> for (T0, T1, T2, T3, T4)
2183    {
2184        #[inline]
2185        unsafe fn encode(
2186            self,
2187            encoder: &mut fidl::encoding::Encoder<'_, D>,
2188            offset: usize,
2189            depth: fidl::encoding::Depth,
2190        ) -> fidl::Result<()> {
2191            encoder.debug_check_bounds::<AssociateResponse>(offset);
2192            // Zero out padding regions. There's no need to apply masks
2193            // because the unmasked parts will be overwritten by fields.
2194            unsafe {
2195                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
2196                (ptr as *mut u64).write_unaligned(0);
2197            }
2198            // Write the fields.
2199            self.0.encode(encoder, offset + 0, depth)?;
2200            self.1.encode(encoder, offset + 8, depth)?;
2201            self.2.encode(encoder, offset + 12, depth)?;
2202            self.3.encode(encoder, offset + 14, depth)?;
2203            self.4.encode(encoder, offset + 16, depth)?;
2204            Ok(())
2205        }
2206    }
2207
2208    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AssociateResponse {
2209        #[inline(always)]
2210        fn new_empty() -> Self {
2211            Self {
2212                peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
2213                result_code: fidl::new_empty!(AssociateResultCode, D),
2214                association_id: fidl::new_empty!(u16, D),
2215                capability_info: fidl::new_empty!(u16, D),
2216                rates: fidl::new_empty!(fidl::encoding::Vector<u8, 14>, D),
2217            }
2218        }
2219
2220        #[inline]
2221        unsafe fn decode(
2222            &mut self,
2223            decoder: &mut fidl::encoding::Decoder<'_, D>,
2224            offset: usize,
2225            _depth: fidl::encoding::Depth,
2226        ) -> fidl::Result<()> {
2227            decoder.debug_check_bounds::<Self>(offset);
2228            // Verify that padding bytes are zero.
2229            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
2230            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2231            let mask = 0xffff000000000000u64;
2232            let maskedval = padval & mask;
2233            if maskedval != 0 {
2234                return Err(fidl::Error::NonZeroPadding {
2235                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
2236                });
2237            }
2238            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
2239            fidl::decode!(
2240                AssociateResultCode,
2241                D,
2242                &mut self.result_code,
2243                decoder,
2244                offset + 8,
2245                _depth
2246            )?;
2247            fidl::decode!(u16, D, &mut self.association_id, decoder, offset + 12, _depth)?;
2248            fidl::decode!(u16, D, &mut self.capability_info, decoder, offset + 14, _depth)?;
2249            fidl::decode!(fidl::encoding::Vector<u8, 14>, D, &mut self.rates, decoder, offset + 16, _depth)?;
2250            Ok(())
2251        }
2252    }
2253
2254    impl fidl::encoding::ValueTypeMarker for AuthenticateIndication {
2255        type Borrowed<'a> = &'a Self;
2256        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2257            value
2258        }
2259    }
2260
2261    unsafe impl fidl::encoding::TypeMarker for AuthenticateIndication {
2262        type Owned = Self;
2263
2264        #[inline(always)]
2265        fn inline_align(_context: fidl::encoding::Context) -> usize {
2266            4
2267        }
2268
2269        #[inline(always)]
2270        fn inline_size(_context: fidl::encoding::Context) -> usize {
2271            12
2272        }
2273    }
2274
2275    unsafe impl<D: fidl::encoding::ResourceDialect>
2276        fidl::encoding::Encode<AuthenticateIndication, D> for &AuthenticateIndication
2277    {
2278        #[inline]
2279        unsafe fn encode(
2280            self,
2281            encoder: &mut fidl::encoding::Encoder<'_, D>,
2282            offset: usize,
2283            _depth: fidl::encoding::Depth,
2284        ) -> fidl::Result<()> {
2285            encoder.debug_check_bounds::<AuthenticateIndication>(offset);
2286            // Delegate to tuple encoding.
2287            fidl::encoding::Encode::<AuthenticateIndication, D>::encode(
2288                (
2289                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(
2290                        &self.peer_sta_address,
2291                    ),
2292                    <AuthenticationTypes as fidl::encoding::ValueTypeMarker>::borrow(
2293                        &self.auth_type,
2294                    ),
2295                ),
2296                encoder,
2297                offset,
2298                _depth,
2299            )
2300        }
2301    }
2302    unsafe impl<
2303            D: fidl::encoding::ResourceDialect,
2304            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
2305            T1: fidl::encoding::Encode<AuthenticationTypes, D>,
2306        > fidl::encoding::Encode<AuthenticateIndication, D> for (T0, T1)
2307    {
2308        #[inline]
2309        unsafe fn encode(
2310            self,
2311            encoder: &mut fidl::encoding::Encoder<'_, D>,
2312            offset: usize,
2313            depth: fidl::encoding::Depth,
2314        ) -> fidl::Result<()> {
2315            encoder.debug_check_bounds::<AuthenticateIndication>(offset);
2316            // Zero out padding regions. There's no need to apply masks
2317            // because the unmasked parts will be overwritten by fields.
2318            unsafe {
2319                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
2320                (ptr as *mut u32).write_unaligned(0);
2321            }
2322            // Write the fields.
2323            self.0.encode(encoder, offset + 0, depth)?;
2324            self.1.encode(encoder, offset + 8, depth)?;
2325            Ok(())
2326        }
2327    }
2328
2329    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2330        for AuthenticateIndication
2331    {
2332        #[inline(always)]
2333        fn new_empty() -> Self {
2334            Self {
2335                peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
2336                auth_type: fidl::new_empty!(AuthenticationTypes, D),
2337            }
2338        }
2339
2340        #[inline]
2341        unsafe fn decode(
2342            &mut self,
2343            decoder: &mut fidl::encoding::Decoder<'_, D>,
2344            offset: usize,
2345            _depth: fidl::encoding::Depth,
2346        ) -> fidl::Result<()> {
2347            decoder.debug_check_bounds::<Self>(offset);
2348            // Verify that padding bytes are zero.
2349            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
2350            let padval = unsafe { (ptr as *const u32).read_unaligned() };
2351            let mask = 0xffff0000u32;
2352            let maskedval = padval & mask;
2353            if maskedval != 0 {
2354                return Err(fidl::Error::NonZeroPadding {
2355                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
2356                });
2357            }
2358            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
2359            fidl::decode!(
2360                AuthenticationTypes,
2361                D,
2362                &mut self.auth_type,
2363                decoder,
2364                offset + 8,
2365                _depth
2366            )?;
2367            Ok(())
2368        }
2369    }
2370
2371    impl fidl::encoding::ValueTypeMarker for AuthenticateResponse {
2372        type Borrowed<'a> = &'a Self;
2373        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2374            value
2375        }
2376    }
2377
2378    unsafe impl fidl::encoding::TypeMarker for AuthenticateResponse {
2379        type Owned = Self;
2380
2381        #[inline(always)]
2382        fn inline_align(_context: fidl::encoding::Context) -> usize {
2383            4
2384        }
2385
2386        #[inline(always)]
2387        fn inline_size(_context: fidl::encoding::Context) -> usize {
2388            12
2389        }
2390    }
2391
2392    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AuthenticateResponse, D>
2393        for &AuthenticateResponse
2394    {
2395        #[inline]
2396        unsafe fn encode(
2397            self,
2398            encoder: &mut fidl::encoding::Encoder<'_, D>,
2399            offset: usize,
2400            _depth: fidl::encoding::Depth,
2401        ) -> fidl::Result<()> {
2402            encoder.debug_check_bounds::<AuthenticateResponse>(offset);
2403            // Delegate to tuple encoding.
2404            fidl::encoding::Encode::<AuthenticateResponse, D>::encode(
2405                (
2406                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(
2407                        &self.peer_sta_address,
2408                    ),
2409                    <AuthenticateResultCode as fidl::encoding::ValueTypeMarker>::borrow(
2410                        &self.result_code,
2411                    ),
2412                ),
2413                encoder,
2414                offset,
2415                _depth,
2416            )
2417        }
2418    }
2419    unsafe impl<
2420            D: fidl::encoding::ResourceDialect,
2421            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
2422            T1: fidl::encoding::Encode<AuthenticateResultCode, D>,
2423        > fidl::encoding::Encode<AuthenticateResponse, D> for (T0, T1)
2424    {
2425        #[inline]
2426        unsafe fn encode(
2427            self,
2428            encoder: &mut fidl::encoding::Encoder<'_, D>,
2429            offset: usize,
2430            depth: fidl::encoding::Depth,
2431        ) -> fidl::Result<()> {
2432            encoder.debug_check_bounds::<AuthenticateResponse>(offset);
2433            // Zero out padding regions. There's no need to apply masks
2434            // because the unmasked parts will be overwritten by fields.
2435            unsafe {
2436                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
2437                (ptr as *mut u32).write_unaligned(0);
2438            }
2439            // Write the fields.
2440            self.0.encode(encoder, offset + 0, depth)?;
2441            self.1.encode(encoder, offset + 8, depth)?;
2442            Ok(())
2443        }
2444    }
2445
2446    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AuthenticateResponse {
2447        #[inline(always)]
2448        fn new_empty() -> Self {
2449            Self {
2450                peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
2451                result_code: fidl::new_empty!(AuthenticateResultCode, D),
2452            }
2453        }
2454
2455        #[inline]
2456        unsafe fn decode(
2457            &mut self,
2458            decoder: &mut fidl::encoding::Decoder<'_, D>,
2459            offset: usize,
2460            _depth: fidl::encoding::Depth,
2461        ) -> fidl::Result<()> {
2462            decoder.debug_check_bounds::<Self>(offset);
2463            // Verify that padding bytes are zero.
2464            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
2465            let padval = unsafe { (ptr as *const u32).read_unaligned() };
2466            let mask = 0xffff0000u32;
2467            let maskedval = padval & mask;
2468            if maskedval != 0 {
2469                return Err(fidl::Error::NonZeroPadding {
2470                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
2471                });
2472            }
2473            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
2474            fidl::decode!(
2475                AuthenticateResultCode,
2476                D,
2477                &mut self.result_code,
2478                decoder,
2479                offset + 8,
2480                _depth
2481            )?;
2482            Ok(())
2483        }
2484    }
2485
2486    impl fidl::encoding::ValueTypeMarker for BandCapability {
2487        type Borrowed<'a> = &'a Self;
2488        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2489            value
2490        }
2491    }
2492
2493    unsafe impl fidl::encoding::TypeMarker for BandCapability {
2494        type Owned = Self;
2495
2496        #[inline(always)]
2497        fn inline_align(_context: fidl::encoding::Context) -> usize {
2498            8
2499        }
2500
2501        #[inline(always)]
2502        fn inline_size(_context: fidl::encoding::Context) -> usize {
2503            56
2504        }
2505    }
2506
2507    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BandCapability, D>
2508        for &BandCapability
2509    {
2510        #[inline]
2511        unsafe fn encode(
2512            self,
2513            encoder: &mut fidl::encoding::Encoder<'_, D>,
2514            offset: usize,
2515            _depth: fidl::encoding::Depth,
2516        ) -> fidl::Result<()> {
2517            encoder.debug_check_bounds::<BandCapability>(offset);
2518            // Delegate to tuple encoding.
2519            fidl::encoding::Encode::<BandCapability, D>::encode(
2520                (
2521                    <fidl_fuchsia_wlan_ieee80211::WlanBand as fidl::encoding::ValueTypeMarker>::borrow(&self.band),
2522                    <fidl::encoding::Vector<u8, 12> as fidl::encoding::ValueTypeMarker>::borrow(&self.basic_rates),
2523                    <fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities> as fidl::encoding::ValueTypeMarker>::borrow(&self.ht_cap),
2524                    <fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities> as fidl::encoding::ValueTypeMarker>::borrow(&self.vht_cap),
2525                    <fidl::encoding::Vector<u8, 256> as fidl::encoding::ValueTypeMarker>::borrow(&self.operating_channels),
2526                ),
2527                encoder, offset, _depth
2528            )
2529        }
2530    }
2531    unsafe impl<
2532            D: fidl::encoding::ResourceDialect,
2533            T0: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::WlanBand, D>,
2534            T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 12>, D>,
2535            T2: fidl::encoding::Encode<
2536                fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities>,
2537                D,
2538            >,
2539            T3: fidl::encoding::Encode<
2540                fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>,
2541                D,
2542            >,
2543            T4: fidl::encoding::Encode<fidl::encoding::Vector<u8, 256>, D>,
2544        > fidl::encoding::Encode<BandCapability, D> for (T0, T1, T2, T3, T4)
2545    {
2546        #[inline]
2547        unsafe fn encode(
2548            self,
2549            encoder: &mut fidl::encoding::Encoder<'_, D>,
2550            offset: usize,
2551            depth: fidl::encoding::Depth,
2552        ) -> fidl::Result<()> {
2553            encoder.debug_check_bounds::<BandCapability>(offset);
2554            // Zero out padding regions. There's no need to apply masks
2555            // because the unmasked parts will be overwritten by fields.
2556            unsafe {
2557                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
2558                (ptr as *mut u64).write_unaligned(0);
2559            }
2560            // Write the fields.
2561            self.0.encode(encoder, offset + 0, depth)?;
2562            self.1.encode(encoder, offset + 8, depth)?;
2563            self.2.encode(encoder, offset + 24, depth)?;
2564            self.3.encode(encoder, offset + 32, depth)?;
2565            self.4.encode(encoder, offset + 40, depth)?;
2566            Ok(())
2567        }
2568    }
2569
2570    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BandCapability {
2571        #[inline(always)]
2572        fn new_empty() -> Self {
2573            Self {
2574                band: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::WlanBand, D),
2575                basic_rates: fidl::new_empty!(fidl::encoding::Vector<u8, 12>, D),
2576                ht_cap: fidl::new_empty!(
2577                    fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities>,
2578                    D
2579                ),
2580                vht_cap: fidl::new_empty!(
2581                    fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>,
2582                    D
2583                ),
2584                operating_channels: fidl::new_empty!(fidl::encoding::Vector<u8, 256>, D),
2585            }
2586        }
2587
2588        #[inline]
2589        unsafe fn decode(
2590            &mut self,
2591            decoder: &mut fidl::encoding::Decoder<'_, D>,
2592            offset: usize,
2593            _depth: fidl::encoding::Depth,
2594        ) -> fidl::Result<()> {
2595            decoder.debug_check_bounds::<Self>(offset);
2596            // Verify that padding bytes are zero.
2597            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
2598            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2599            let mask = 0xffffffffffffff00u64;
2600            let maskedval = padval & mask;
2601            if maskedval != 0 {
2602                return Err(fidl::Error::NonZeroPadding {
2603                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
2604                });
2605            }
2606            fidl::decode!(
2607                fidl_fuchsia_wlan_ieee80211::WlanBand,
2608                D,
2609                &mut self.band,
2610                decoder,
2611                offset + 0,
2612                _depth
2613            )?;
2614            fidl::decode!(fidl::encoding::Vector<u8, 12>, D, &mut self.basic_rates, decoder, offset + 8, _depth)?;
2615            fidl::decode!(
2616                fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities>,
2617                D,
2618                &mut self.ht_cap,
2619                decoder,
2620                offset + 24,
2621                _depth
2622            )?;
2623            fidl::decode!(
2624                fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>,
2625                D,
2626                &mut self.vht_cap,
2627                decoder,
2628                offset + 32,
2629                _depth
2630            )?;
2631            fidl::decode!(fidl::encoding::Vector<u8, 256>, D, &mut self.operating_channels, decoder, offset + 40, _depth)?;
2632            Ok(())
2633        }
2634    }
2635
2636    impl fidl::encoding::ValueTypeMarker for CapturedFrameResult {
2637        type Borrowed<'a> = &'a Self;
2638        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2639            value
2640        }
2641    }
2642
2643    unsafe impl fidl::encoding::TypeMarker for CapturedFrameResult {
2644        type Owned = Self;
2645
2646        #[inline(always)]
2647        fn inline_align(_context: fidl::encoding::Context) -> usize {
2648            8
2649        }
2650
2651        #[inline(always)]
2652        fn inline_size(_context: fidl::encoding::Context) -> usize {
2653            16
2654        }
2655    }
2656
2657    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CapturedFrameResult, D>
2658        for &CapturedFrameResult
2659    {
2660        #[inline]
2661        unsafe fn encode(
2662            self,
2663            encoder: &mut fidl::encoding::Encoder<'_, D>,
2664            offset: usize,
2665            _depth: fidl::encoding::Depth,
2666        ) -> fidl::Result<()> {
2667            encoder.debug_check_bounds::<CapturedFrameResult>(offset);
2668            // Delegate to tuple encoding.
2669            fidl::encoding::Encode::<CapturedFrameResult, D>::encode(
2670                (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
2671                    &self.frame,
2672                ),),
2673                encoder,
2674                offset,
2675                _depth,
2676            )
2677        }
2678    }
2679    unsafe impl<
2680            D: fidl::encoding::ResourceDialect,
2681            T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
2682        > fidl::encoding::Encode<CapturedFrameResult, D> for (T0,)
2683    {
2684        #[inline]
2685        unsafe fn encode(
2686            self,
2687            encoder: &mut fidl::encoding::Encoder<'_, D>,
2688            offset: usize,
2689            depth: fidl::encoding::Depth,
2690        ) -> fidl::Result<()> {
2691            encoder.debug_check_bounds::<CapturedFrameResult>(offset);
2692            // Zero out padding regions. There's no need to apply masks
2693            // because the unmasked parts will be overwritten by fields.
2694            // Write the fields.
2695            self.0.encode(encoder, offset + 0, depth)?;
2696            Ok(())
2697        }
2698    }
2699
2700    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CapturedFrameResult {
2701        #[inline(always)]
2702        fn new_empty() -> Self {
2703            Self { frame: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
2704        }
2705
2706        #[inline]
2707        unsafe fn decode(
2708            &mut self,
2709            decoder: &mut fidl::encoding::Decoder<'_, D>,
2710            offset: usize,
2711            _depth: fidl::encoding::Depth,
2712        ) -> fidl::Result<()> {
2713            decoder.debug_check_bounds::<Self>(offset);
2714            // Verify that padding bytes are zero.
2715            fidl::decode!(
2716                fidl::encoding::UnboundedVector<u8>,
2717                D,
2718                &mut self.frame,
2719                decoder,
2720                offset + 0,
2721                _depth
2722            )?;
2723            Ok(())
2724        }
2725    }
2726
2727    impl fidl::encoding::ValueTypeMarker for ConnectConfirm {
2728        type Borrowed<'a> = &'a Self;
2729        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2730            value
2731        }
2732    }
2733
2734    unsafe impl fidl::encoding::TypeMarker for ConnectConfirm {
2735        type Owned = Self;
2736
2737        #[inline(always)]
2738        fn inline_align(_context: fidl::encoding::Context) -> usize {
2739            8
2740        }
2741
2742        #[inline(always)]
2743        fn inline_size(_context: fidl::encoding::Context) -> usize {
2744            32
2745        }
2746    }
2747
2748    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ConnectConfirm, D>
2749        for &ConnectConfirm
2750    {
2751        #[inline]
2752        unsafe fn encode(
2753            self,
2754            encoder: &mut fidl::encoding::Encoder<'_, D>,
2755            offset: usize,
2756            _depth: fidl::encoding::Depth,
2757        ) -> fidl::Result<()> {
2758            encoder.debug_check_bounds::<ConnectConfirm>(offset);
2759            // Delegate to tuple encoding.
2760            fidl::encoding::Encode::<ConnectConfirm, D>::encode(
2761                (
2762                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
2763                    <fidl_fuchsia_wlan_ieee80211::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.result_code),
2764                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.association_id),
2765                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.association_ies),
2766                ),
2767                encoder, offset, _depth
2768            )
2769        }
2770    }
2771    unsafe impl<
2772            D: fidl::encoding::ResourceDialect,
2773            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
2774            T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::StatusCode, D>,
2775            T2: fidl::encoding::Encode<u16, D>,
2776            T3: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
2777        > fidl::encoding::Encode<ConnectConfirm, D> for (T0, T1, T2, T3)
2778    {
2779        #[inline]
2780        unsafe fn encode(
2781            self,
2782            encoder: &mut fidl::encoding::Encoder<'_, D>,
2783            offset: usize,
2784            depth: fidl::encoding::Depth,
2785        ) -> fidl::Result<()> {
2786            encoder.debug_check_bounds::<ConnectConfirm>(offset);
2787            // Zero out padding regions. There's no need to apply masks
2788            // because the unmasked parts will be overwritten by fields.
2789            unsafe {
2790                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
2791                (ptr as *mut u64).write_unaligned(0);
2792            }
2793            // Write the fields.
2794            self.0.encode(encoder, offset + 0, depth)?;
2795            self.1.encode(encoder, offset + 6, depth)?;
2796            self.2.encode(encoder, offset + 8, depth)?;
2797            self.3.encode(encoder, offset + 16, depth)?;
2798            Ok(())
2799        }
2800    }
2801
2802    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ConnectConfirm {
2803        #[inline(always)]
2804        fn new_empty() -> Self {
2805            Self {
2806                peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
2807                result_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::StatusCode, D),
2808                association_id: fidl::new_empty!(u16, D),
2809                association_ies: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
2810            }
2811        }
2812
2813        #[inline]
2814        unsafe fn decode(
2815            &mut self,
2816            decoder: &mut fidl::encoding::Decoder<'_, D>,
2817            offset: usize,
2818            _depth: fidl::encoding::Depth,
2819        ) -> fidl::Result<()> {
2820            decoder.debug_check_bounds::<Self>(offset);
2821            // Verify that padding bytes are zero.
2822            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
2823            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2824            let mask = 0xffffffffffff0000u64;
2825            let maskedval = padval & mask;
2826            if maskedval != 0 {
2827                return Err(fidl::Error::NonZeroPadding {
2828                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
2829                });
2830            }
2831            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
2832            fidl::decode!(
2833                fidl_fuchsia_wlan_ieee80211::StatusCode,
2834                D,
2835                &mut self.result_code,
2836                decoder,
2837                offset + 6,
2838                _depth
2839            )?;
2840            fidl::decode!(u16, D, &mut self.association_id, decoder, offset + 8, _depth)?;
2841            fidl::decode!(
2842                fidl::encoding::UnboundedVector<u8>,
2843                D,
2844                &mut self.association_ies,
2845                decoder,
2846                offset + 16,
2847                _depth
2848            )?;
2849            Ok(())
2850        }
2851    }
2852
2853    impl fidl::encoding::ValueTypeMarker for ConnectRequest {
2854        type Borrowed<'a> = &'a Self;
2855        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2856            value
2857        }
2858    }
2859
2860    unsafe impl fidl::encoding::TypeMarker for ConnectRequest {
2861        type Owned = Self;
2862
2863        #[inline(always)]
2864        fn inline_align(_context: fidl::encoding::Context) -> usize {
2865            8
2866        }
2867
2868        #[inline(always)]
2869        fn inline_size(_context: fidl::encoding::Context) -> usize {
2870            96
2871        }
2872    }
2873
2874    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ConnectRequest, D>
2875        for &ConnectRequest
2876    {
2877        #[inline]
2878        unsafe fn encode(
2879            self,
2880            encoder: &mut fidl::encoding::Encoder<'_, D>,
2881            offset: usize,
2882            _depth: fidl::encoding::Depth,
2883        ) -> fidl::Result<()> {
2884            encoder.debug_check_bounds::<ConnectRequest>(offset);
2885            // Delegate to tuple encoding.
2886            fidl::encoding::Encode::<ConnectRequest, D>::encode(
2887                (
2888                    <fidl_fuchsia_wlan_common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.selected_bss),
2889                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.connect_failure_timeout),
2890                    <AuthenticationTypes as fidl::encoding::ValueTypeMarker>::borrow(&self.auth_type),
2891                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.sae_password),
2892                    <fidl::encoding::Boxed<SetKeyDescriptor> as fidl::encoding::ValueTypeMarker>::borrow(&self.wep_key),
2893                    <fidl::encoding::Vector<u8, 257> as fidl::encoding::ValueTypeMarker>::borrow(&self.security_ie),
2894                ),
2895                encoder, offset, _depth
2896            )
2897        }
2898    }
2899    unsafe impl<
2900            D: fidl::encoding::ResourceDialect,
2901            T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::BssDescription, D>,
2902            T1: fidl::encoding::Encode<u32, D>,
2903            T2: fidl::encoding::Encode<AuthenticationTypes, D>,
2904            T3: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
2905            T4: fidl::encoding::Encode<fidl::encoding::Boxed<SetKeyDescriptor>, D>,
2906            T5: fidl::encoding::Encode<fidl::encoding::Vector<u8, 257>, D>,
2907        > fidl::encoding::Encode<ConnectRequest, D> for (T0, T1, T2, T3, T4, T5)
2908    {
2909        #[inline]
2910        unsafe fn encode(
2911            self,
2912            encoder: &mut fidl::encoding::Encoder<'_, D>,
2913            offset: usize,
2914            depth: fidl::encoding::Depth,
2915        ) -> fidl::Result<()> {
2916            encoder.debug_check_bounds::<ConnectRequest>(offset);
2917            // Zero out padding regions. There's no need to apply masks
2918            // because the unmasked parts will be overwritten by fields.
2919            // Write the fields.
2920            self.0.encode(encoder, offset + 0, depth)?;
2921            self.1.encode(encoder, offset + 48, depth)?;
2922            self.2.encode(encoder, offset + 52, depth)?;
2923            self.3.encode(encoder, offset + 56, depth)?;
2924            self.4.encode(encoder, offset + 72, depth)?;
2925            self.5.encode(encoder, offset + 80, depth)?;
2926            Ok(())
2927        }
2928    }
2929
2930    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ConnectRequest {
2931        #[inline(always)]
2932        fn new_empty() -> Self {
2933            Self {
2934                selected_bss: fidl::new_empty!(fidl_fuchsia_wlan_common::BssDescription, D),
2935                connect_failure_timeout: fidl::new_empty!(u32, D),
2936                auth_type: fidl::new_empty!(AuthenticationTypes, D),
2937                sae_password: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
2938                wep_key: fidl::new_empty!(fidl::encoding::Boxed<SetKeyDescriptor>, D),
2939                security_ie: fidl::new_empty!(fidl::encoding::Vector<u8, 257>, D),
2940            }
2941        }
2942
2943        #[inline]
2944        unsafe fn decode(
2945            &mut self,
2946            decoder: &mut fidl::encoding::Decoder<'_, D>,
2947            offset: usize,
2948            _depth: fidl::encoding::Depth,
2949        ) -> fidl::Result<()> {
2950            decoder.debug_check_bounds::<Self>(offset);
2951            // Verify that padding bytes are zero.
2952            fidl::decode!(
2953                fidl_fuchsia_wlan_common::BssDescription,
2954                D,
2955                &mut self.selected_bss,
2956                decoder,
2957                offset + 0,
2958                _depth
2959            )?;
2960            fidl::decode!(u32, D, &mut self.connect_failure_timeout, decoder, offset + 48, _depth)?;
2961            fidl::decode!(
2962                AuthenticationTypes,
2963                D,
2964                &mut self.auth_type,
2965                decoder,
2966                offset + 52,
2967                _depth
2968            )?;
2969            fidl::decode!(
2970                fidl::encoding::UnboundedVector<u8>,
2971                D,
2972                &mut self.sae_password,
2973                decoder,
2974                offset + 56,
2975                _depth
2976            )?;
2977            fidl::decode!(
2978                fidl::encoding::Boxed<SetKeyDescriptor>,
2979                D,
2980                &mut self.wep_key,
2981                decoder,
2982                offset + 72,
2983                _depth
2984            )?;
2985            fidl::decode!(fidl::encoding::Vector<u8, 257>, D, &mut self.security_ie, decoder, offset + 80, _depth)?;
2986            Ok(())
2987        }
2988    }
2989
2990    impl fidl::encoding::ValueTypeMarker for Country {
2991        type Borrowed<'a> = &'a Self;
2992        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2993            value
2994        }
2995    }
2996
2997    unsafe impl fidl::encoding::TypeMarker for Country {
2998        type Owned = Self;
2999
3000        #[inline(always)]
3001        fn inline_align(_context: fidl::encoding::Context) -> usize {
3002            1
3003        }
3004
3005        #[inline(always)]
3006        fn inline_size(_context: fidl::encoding::Context) -> usize {
3007            3
3008        }
3009        #[inline(always)]
3010        fn encode_is_copy() -> bool {
3011            true
3012        }
3013
3014        #[inline(always)]
3015        fn decode_is_copy() -> bool {
3016            true
3017        }
3018    }
3019
3020    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Country, D> for &Country {
3021        #[inline]
3022        unsafe fn encode(
3023            self,
3024            encoder: &mut fidl::encoding::Encoder<'_, D>,
3025            offset: usize,
3026            _depth: fidl::encoding::Depth,
3027        ) -> fidl::Result<()> {
3028            encoder.debug_check_bounds::<Country>(offset);
3029            unsafe {
3030                // Copy the object into the buffer.
3031                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3032                (buf_ptr as *mut Country).write_unaligned((self as *const Country).read());
3033                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3034                // done second because the memcpy will write garbage to these bytes.
3035            }
3036            Ok(())
3037        }
3038    }
3039    unsafe impl<
3040            D: fidl::encoding::ResourceDialect,
3041            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 2>, D>,
3042            T1: fidl::encoding::Encode<u8, D>,
3043        > fidl::encoding::Encode<Country, D> for (T0, T1)
3044    {
3045        #[inline]
3046        unsafe fn encode(
3047            self,
3048            encoder: &mut fidl::encoding::Encoder<'_, D>,
3049            offset: usize,
3050            depth: fidl::encoding::Depth,
3051        ) -> fidl::Result<()> {
3052            encoder.debug_check_bounds::<Country>(offset);
3053            // Zero out padding regions. There's no need to apply masks
3054            // because the unmasked parts will be overwritten by fields.
3055            // Write the fields.
3056            self.0.encode(encoder, offset + 0, depth)?;
3057            self.1.encode(encoder, offset + 2, depth)?;
3058            Ok(())
3059        }
3060    }
3061
3062    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Country {
3063        #[inline(always)]
3064        fn new_empty() -> Self {
3065            Self {
3066                alpha2: fidl::new_empty!(fidl::encoding::Array<u8, 2>, D),
3067                suffix: fidl::new_empty!(u8, D),
3068            }
3069        }
3070
3071        #[inline]
3072        unsafe fn decode(
3073            &mut self,
3074            decoder: &mut fidl::encoding::Decoder<'_, D>,
3075            offset: usize,
3076            _depth: fidl::encoding::Depth,
3077        ) -> fidl::Result<()> {
3078            decoder.debug_check_bounds::<Self>(offset);
3079            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3080            // Verify that padding bytes are zero.
3081            // Copy from the buffer into the object.
3082            unsafe {
3083                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 3);
3084            }
3085            Ok(())
3086        }
3087    }
3088
3089    impl fidl::encoding::ValueTypeMarker for DeauthenticateConfirm {
3090        type Borrowed<'a> = &'a Self;
3091        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3092            value
3093        }
3094    }
3095
3096    unsafe impl fidl::encoding::TypeMarker for DeauthenticateConfirm {
3097        type Owned = Self;
3098
3099        #[inline(always)]
3100        fn inline_align(_context: fidl::encoding::Context) -> usize {
3101            1
3102        }
3103
3104        #[inline(always)]
3105        fn inline_size(_context: fidl::encoding::Context) -> usize {
3106            6
3107        }
3108        #[inline(always)]
3109        fn encode_is_copy() -> bool {
3110            true
3111        }
3112
3113        #[inline(always)]
3114        fn decode_is_copy() -> bool {
3115            true
3116        }
3117    }
3118
3119    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DeauthenticateConfirm, D>
3120        for &DeauthenticateConfirm
3121    {
3122        #[inline]
3123        unsafe fn encode(
3124            self,
3125            encoder: &mut fidl::encoding::Encoder<'_, D>,
3126            offset: usize,
3127            _depth: fidl::encoding::Depth,
3128        ) -> fidl::Result<()> {
3129            encoder.debug_check_bounds::<DeauthenticateConfirm>(offset);
3130            unsafe {
3131                // Copy the object into the buffer.
3132                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3133                (buf_ptr as *mut DeauthenticateConfirm)
3134                    .write_unaligned((self as *const DeauthenticateConfirm).read());
3135                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3136                // done second because the memcpy will write garbage to these bytes.
3137            }
3138            Ok(())
3139        }
3140    }
3141    unsafe impl<
3142            D: fidl::encoding::ResourceDialect,
3143            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
3144        > fidl::encoding::Encode<DeauthenticateConfirm, 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::<DeauthenticateConfirm>(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> for DeauthenticateConfirm {
3163        #[inline(always)]
3164        fn new_empty() -> Self {
3165            Self { peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D) }
3166        }
3167
3168        #[inline]
3169        unsafe fn decode(
3170            &mut self,
3171            decoder: &mut fidl::encoding::Decoder<'_, D>,
3172            offset: usize,
3173            _depth: fidl::encoding::Depth,
3174        ) -> fidl::Result<()> {
3175            decoder.debug_check_bounds::<Self>(offset);
3176            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3177            // Verify that padding bytes are zero.
3178            // Copy from the buffer into the object.
3179            unsafe {
3180                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
3181            }
3182            Ok(())
3183        }
3184    }
3185
3186    impl fidl::encoding::ValueTypeMarker for DeauthenticateIndication {
3187        type Borrowed<'a> = &'a Self;
3188        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3189            value
3190        }
3191    }
3192
3193    unsafe impl fidl::encoding::TypeMarker for DeauthenticateIndication {
3194        type Owned = Self;
3195
3196        #[inline(always)]
3197        fn inline_align(_context: fidl::encoding::Context) -> usize {
3198            2
3199        }
3200
3201        #[inline(always)]
3202        fn inline_size(_context: fidl::encoding::Context) -> usize {
3203            10
3204        }
3205    }
3206
3207    unsafe impl<D: fidl::encoding::ResourceDialect>
3208        fidl::encoding::Encode<DeauthenticateIndication, D> for &DeauthenticateIndication
3209    {
3210        #[inline]
3211        unsafe fn encode(
3212            self,
3213            encoder: &mut fidl::encoding::Encoder<'_, D>,
3214            offset: usize,
3215            _depth: fidl::encoding::Depth,
3216        ) -> fidl::Result<()> {
3217            encoder.debug_check_bounds::<DeauthenticateIndication>(offset);
3218            // Delegate to tuple encoding.
3219            fidl::encoding::Encode::<DeauthenticateIndication, D>::encode(
3220                (
3221                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
3222                    <fidl_fuchsia_wlan_ieee80211::ReasonCode as fidl::encoding::ValueTypeMarker>::borrow(&self.reason_code),
3223                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.locally_initiated),
3224                ),
3225                encoder, offset, _depth
3226            )
3227        }
3228    }
3229    unsafe impl<
3230            D: fidl::encoding::ResourceDialect,
3231            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
3232            T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::ReasonCode, D>,
3233            T2: fidl::encoding::Encode<bool, D>,
3234        > fidl::encoding::Encode<DeauthenticateIndication, D> for (T0, T1, T2)
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::<DeauthenticateIndication>(offset);
3244            // Zero out padding regions. There's no need to apply masks
3245            // because the unmasked parts will be overwritten by fields.
3246            unsafe {
3247                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
3248                (ptr as *mut u16).write_unaligned(0);
3249            }
3250            // Write the fields.
3251            self.0.encode(encoder, offset + 0, depth)?;
3252            self.1.encode(encoder, offset + 6, depth)?;
3253            self.2.encode(encoder, offset + 8, depth)?;
3254            Ok(())
3255        }
3256    }
3257
3258    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3259        for DeauthenticateIndication
3260    {
3261        #[inline(always)]
3262        fn new_empty() -> Self {
3263            Self {
3264                peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
3265                reason_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::ReasonCode, D),
3266                locally_initiated: fidl::new_empty!(bool, D),
3267            }
3268        }
3269
3270        #[inline]
3271        unsafe fn decode(
3272            &mut self,
3273            decoder: &mut fidl::encoding::Decoder<'_, D>,
3274            offset: usize,
3275            _depth: fidl::encoding::Depth,
3276        ) -> fidl::Result<()> {
3277            decoder.debug_check_bounds::<Self>(offset);
3278            // Verify that padding bytes are zero.
3279            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
3280            let padval = unsafe { (ptr as *const u16).read_unaligned() };
3281            let mask = 0xff00u16;
3282            let maskedval = padval & mask;
3283            if maskedval != 0 {
3284                return Err(fidl::Error::NonZeroPadding {
3285                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
3286                });
3287            }
3288            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
3289            fidl::decode!(
3290                fidl_fuchsia_wlan_ieee80211::ReasonCode,
3291                D,
3292                &mut self.reason_code,
3293                decoder,
3294                offset + 6,
3295                _depth
3296            )?;
3297            fidl::decode!(bool, D, &mut self.locally_initiated, decoder, offset + 8, _depth)?;
3298            Ok(())
3299        }
3300    }
3301
3302    impl fidl::encoding::ValueTypeMarker for DeauthenticateRequest {
3303        type Borrowed<'a> = &'a Self;
3304        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3305            value
3306        }
3307    }
3308
3309    unsafe impl fidl::encoding::TypeMarker for DeauthenticateRequest {
3310        type Owned = Self;
3311
3312        #[inline(always)]
3313        fn inline_align(_context: fidl::encoding::Context) -> usize {
3314            2
3315        }
3316
3317        #[inline(always)]
3318        fn inline_size(_context: fidl::encoding::Context) -> usize {
3319            8
3320        }
3321    }
3322
3323    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DeauthenticateRequest, D>
3324        for &DeauthenticateRequest
3325    {
3326        #[inline]
3327        unsafe fn encode(
3328            self,
3329            encoder: &mut fidl::encoding::Encoder<'_, D>,
3330            offset: usize,
3331            _depth: fidl::encoding::Depth,
3332        ) -> fidl::Result<()> {
3333            encoder.debug_check_bounds::<DeauthenticateRequest>(offset);
3334            // Delegate to tuple encoding.
3335            fidl::encoding::Encode::<DeauthenticateRequest, D>::encode(
3336                (
3337                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
3338                    <fidl_fuchsia_wlan_ieee80211::ReasonCode as fidl::encoding::ValueTypeMarker>::borrow(&self.reason_code),
3339                ),
3340                encoder, offset, _depth
3341            )
3342        }
3343    }
3344    unsafe impl<
3345            D: fidl::encoding::ResourceDialect,
3346            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
3347            T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::ReasonCode, D>,
3348        > fidl::encoding::Encode<DeauthenticateRequest, D> for (T0, T1)
3349    {
3350        #[inline]
3351        unsafe fn encode(
3352            self,
3353            encoder: &mut fidl::encoding::Encoder<'_, D>,
3354            offset: usize,
3355            depth: fidl::encoding::Depth,
3356        ) -> fidl::Result<()> {
3357            encoder.debug_check_bounds::<DeauthenticateRequest>(offset);
3358            // Zero out padding regions. There's no need to apply masks
3359            // because the unmasked parts will be overwritten by fields.
3360            // Write the fields.
3361            self.0.encode(encoder, offset + 0, depth)?;
3362            self.1.encode(encoder, offset + 6, depth)?;
3363            Ok(())
3364        }
3365    }
3366
3367    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeauthenticateRequest {
3368        #[inline(always)]
3369        fn new_empty() -> Self {
3370            Self {
3371                peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
3372                reason_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::ReasonCode, D),
3373            }
3374        }
3375
3376        #[inline]
3377        unsafe fn decode(
3378            &mut self,
3379            decoder: &mut fidl::encoding::Decoder<'_, D>,
3380            offset: usize,
3381            _depth: fidl::encoding::Depth,
3382        ) -> fidl::Result<()> {
3383            decoder.debug_check_bounds::<Self>(offset);
3384            // Verify that padding bytes are zero.
3385            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
3386            fidl::decode!(
3387                fidl_fuchsia_wlan_ieee80211::ReasonCode,
3388                D,
3389                &mut self.reason_code,
3390                decoder,
3391                offset + 6,
3392                _depth
3393            )?;
3394            Ok(())
3395        }
3396    }
3397
3398    impl fidl::encoding::ValueTypeMarker for DeleteKeyDescriptor {
3399        type Borrowed<'a> = &'a Self;
3400        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3401            value
3402        }
3403    }
3404
3405    unsafe impl fidl::encoding::TypeMarker for DeleteKeyDescriptor {
3406        type Owned = Self;
3407
3408        #[inline(always)]
3409        fn inline_align(_context: fidl::encoding::Context) -> usize {
3410            4
3411        }
3412
3413        #[inline(always)]
3414        fn inline_size(_context: fidl::encoding::Context) -> usize {
3415            16
3416        }
3417    }
3418
3419    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DeleteKeyDescriptor, D>
3420        for &DeleteKeyDescriptor
3421    {
3422        #[inline]
3423        unsafe fn encode(
3424            self,
3425            encoder: &mut fidl::encoding::Encoder<'_, D>,
3426            offset: usize,
3427            _depth: fidl::encoding::Depth,
3428        ) -> fidl::Result<()> {
3429            encoder.debug_check_bounds::<DeleteKeyDescriptor>(offset);
3430            // Delegate to tuple encoding.
3431            fidl::encoding::Encode::<DeleteKeyDescriptor, D>::encode(
3432                (
3433                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.key_id),
3434                    <KeyType as fidl::encoding::ValueTypeMarker>::borrow(&self.key_type),
3435                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(
3436                        &self.address,
3437                    ),
3438                ),
3439                encoder,
3440                offset,
3441                _depth,
3442            )
3443        }
3444    }
3445    unsafe impl<
3446            D: fidl::encoding::ResourceDialect,
3447            T0: fidl::encoding::Encode<u16, D>,
3448            T1: fidl::encoding::Encode<KeyType, D>,
3449            T2: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
3450        > fidl::encoding::Encode<DeleteKeyDescriptor, D> for (T0, T1, T2)
3451    {
3452        #[inline]
3453        unsafe fn encode(
3454            self,
3455            encoder: &mut fidl::encoding::Encoder<'_, D>,
3456            offset: usize,
3457            depth: fidl::encoding::Depth,
3458        ) -> fidl::Result<()> {
3459            encoder.debug_check_bounds::<DeleteKeyDescriptor>(offset);
3460            // Zero out padding regions. There's no need to apply masks
3461            // because the unmasked parts will be overwritten by fields.
3462            unsafe {
3463                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
3464                (ptr as *mut u32).write_unaligned(0);
3465            }
3466            unsafe {
3467                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(12);
3468                (ptr as *mut u32).write_unaligned(0);
3469            }
3470            // Write the fields.
3471            self.0.encode(encoder, offset + 0, depth)?;
3472            self.1.encode(encoder, offset + 4, depth)?;
3473            self.2.encode(encoder, offset + 8, depth)?;
3474            Ok(())
3475        }
3476    }
3477
3478    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeleteKeyDescriptor {
3479        #[inline(always)]
3480        fn new_empty() -> Self {
3481            Self {
3482                key_id: fidl::new_empty!(u16, D),
3483                key_type: fidl::new_empty!(KeyType, D),
3484                address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
3485            }
3486        }
3487
3488        #[inline]
3489        unsafe fn decode(
3490            &mut self,
3491            decoder: &mut fidl::encoding::Decoder<'_, D>,
3492            offset: usize,
3493            _depth: fidl::encoding::Depth,
3494        ) -> fidl::Result<()> {
3495            decoder.debug_check_bounds::<Self>(offset);
3496            // Verify that padding bytes are zero.
3497            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
3498            let padval = unsafe { (ptr as *const u32).read_unaligned() };
3499            let mask = 0xffff0000u32;
3500            let maskedval = padval & mask;
3501            if maskedval != 0 {
3502                return Err(fidl::Error::NonZeroPadding {
3503                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
3504                });
3505            }
3506            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(12) };
3507            let padval = unsafe { (ptr as *const u32).read_unaligned() };
3508            let mask = 0xffff0000u32;
3509            let maskedval = padval & mask;
3510            if maskedval != 0 {
3511                return Err(fidl::Error::NonZeroPadding {
3512                    padding_start: offset + 12 + ((mask as u64).trailing_zeros() / 8) as usize,
3513                });
3514            }
3515            fidl::decode!(u16, D, &mut self.key_id, decoder, offset + 0, _depth)?;
3516            fidl::decode!(KeyType, D, &mut self.key_type, decoder, offset + 4, _depth)?;
3517            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.address, decoder, offset + 8, _depth)?;
3518            Ok(())
3519        }
3520    }
3521
3522    impl fidl::encoding::ValueTypeMarker for DeleteKeysRequest {
3523        type Borrowed<'a> = &'a Self;
3524        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3525            value
3526        }
3527    }
3528
3529    unsafe impl fidl::encoding::TypeMarker for DeleteKeysRequest {
3530        type Owned = Self;
3531
3532        #[inline(always)]
3533        fn inline_align(_context: fidl::encoding::Context) -> usize {
3534            8
3535        }
3536
3537        #[inline(always)]
3538        fn inline_size(_context: fidl::encoding::Context) -> usize {
3539            16
3540        }
3541    }
3542
3543    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DeleteKeysRequest, D>
3544        for &DeleteKeysRequest
3545    {
3546        #[inline]
3547        unsafe fn encode(
3548            self,
3549            encoder: &mut fidl::encoding::Encoder<'_, D>,
3550            offset: usize,
3551            _depth: fidl::encoding::Depth,
3552        ) -> fidl::Result<()> {
3553            encoder.debug_check_bounds::<DeleteKeysRequest>(offset);
3554            // Delegate to tuple encoding.
3555            fidl::encoding::Encode::<DeleteKeysRequest, D>::encode(
3556                (
3557                    <fidl::encoding::UnboundedVector<DeleteKeyDescriptor> as fidl::encoding::ValueTypeMarker>::borrow(&self.keylist),
3558                ),
3559                encoder, offset, _depth
3560            )
3561        }
3562    }
3563    unsafe impl<
3564            D: fidl::encoding::ResourceDialect,
3565            T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<DeleteKeyDescriptor>, D>,
3566        > fidl::encoding::Encode<DeleteKeysRequest, D> for (T0,)
3567    {
3568        #[inline]
3569        unsafe fn encode(
3570            self,
3571            encoder: &mut fidl::encoding::Encoder<'_, D>,
3572            offset: usize,
3573            depth: fidl::encoding::Depth,
3574        ) -> fidl::Result<()> {
3575            encoder.debug_check_bounds::<DeleteKeysRequest>(offset);
3576            // Zero out padding regions. There's no need to apply masks
3577            // because the unmasked parts will be overwritten by fields.
3578            // Write the fields.
3579            self.0.encode(encoder, offset + 0, depth)?;
3580            Ok(())
3581        }
3582    }
3583
3584    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeleteKeysRequest {
3585        #[inline(always)]
3586        fn new_empty() -> Self {
3587            Self {
3588                keylist: fidl::new_empty!(fidl::encoding::UnboundedVector<DeleteKeyDescriptor>, D),
3589            }
3590        }
3591
3592        #[inline]
3593        unsafe fn decode(
3594            &mut self,
3595            decoder: &mut fidl::encoding::Decoder<'_, D>,
3596            offset: usize,
3597            _depth: fidl::encoding::Depth,
3598        ) -> fidl::Result<()> {
3599            decoder.debug_check_bounds::<Self>(offset);
3600            // Verify that padding bytes are zero.
3601            fidl::decode!(
3602                fidl::encoding::UnboundedVector<DeleteKeyDescriptor>,
3603                D,
3604                &mut self.keylist,
3605                decoder,
3606                offset + 0,
3607                _depth
3608            )?;
3609            Ok(())
3610        }
3611    }
3612
3613    impl fidl::encoding::ValueTypeMarker for DeviceInfo {
3614        type Borrowed<'a> = &'a Self;
3615        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3616            value
3617        }
3618    }
3619
3620    unsafe impl fidl::encoding::TypeMarker for DeviceInfo {
3621        type Owned = Self;
3622
3623        #[inline(always)]
3624        fn inline_align(_context: fidl::encoding::Context) -> usize {
3625            8
3626        }
3627
3628        #[inline(always)]
3629        fn inline_size(_context: fidl::encoding::Context) -> usize {
3630            40
3631        }
3632    }
3633
3634    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DeviceInfo, D>
3635        for &DeviceInfo
3636    {
3637        #[inline]
3638        unsafe fn encode(
3639            self,
3640            encoder: &mut fidl::encoding::Encoder<'_, D>,
3641            offset: usize,
3642            _depth: fidl::encoding::Depth,
3643        ) -> fidl::Result<()> {
3644            encoder.debug_check_bounds::<DeviceInfo>(offset);
3645            // Delegate to tuple encoding.
3646            fidl::encoding::Encode::<DeviceInfo, D>::encode(
3647                (
3648                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.sta_addr),
3649                    <fidl_fuchsia_wlan_common::WlanMacRole as fidl::encoding::ValueTypeMarker>::borrow(&self.role),
3650                    <fidl::encoding::Vector<BandCapability, 16> as fidl::encoding::ValueTypeMarker>::borrow(&self.bands),
3651                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.softmac_hardware_capability),
3652                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.qos_capable),
3653                ),
3654                encoder, offset, _depth
3655            )
3656        }
3657    }
3658    unsafe impl<
3659            D: fidl::encoding::ResourceDialect,
3660            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
3661            T1: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanMacRole, D>,
3662            T2: fidl::encoding::Encode<fidl::encoding::Vector<BandCapability, 16>, D>,
3663            T3: fidl::encoding::Encode<u32, D>,
3664            T4: fidl::encoding::Encode<bool, D>,
3665        > fidl::encoding::Encode<DeviceInfo, D> for (T0, T1, T2, T3, T4)
3666    {
3667        #[inline]
3668        unsafe fn encode(
3669            self,
3670            encoder: &mut fidl::encoding::Encoder<'_, D>,
3671            offset: usize,
3672            depth: fidl::encoding::Depth,
3673        ) -> fidl::Result<()> {
3674            encoder.debug_check_bounds::<DeviceInfo>(offset);
3675            // Zero out padding regions. There's no need to apply masks
3676            // because the unmasked parts will be overwritten by fields.
3677            unsafe {
3678                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
3679                (ptr as *mut u64).write_unaligned(0);
3680            }
3681            unsafe {
3682                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
3683                (ptr as *mut u64).write_unaligned(0);
3684            }
3685            unsafe {
3686                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
3687                (ptr as *mut u64).write_unaligned(0);
3688            }
3689            // Write the fields.
3690            self.0.encode(encoder, offset + 0, depth)?;
3691            self.1.encode(encoder, offset + 8, depth)?;
3692            self.2.encode(encoder, offset + 16, depth)?;
3693            self.3.encode(encoder, offset + 32, depth)?;
3694            self.4.encode(encoder, offset + 36, depth)?;
3695            Ok(())
3696        }
3697    }
3698
3699    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeviceInfo {
3700        #[inline(always)]
3701        fn new_empty() -> Self {
3702            Self {
3703                sta_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
3704                role: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanMacRole, D),
3705                bands: fidl::new_empty!(fidl::encoding::Vector<BandCapability, 16>, D),
3706                softmac_hardware_capability: fidl::new_empty!(u32, D),
3707                qos_capable: fidl::new_empty!(bool, D),
3708            }
3709        }
3710
3711        #[inline]
3712        unsafe fn decode(
3713            &mut self,
3714            decoder: &mut fidl::encoding::Decoder<'_, D>,
3715            offset: usize,
3716            _depth: fidl::encoding::Depth,
3717        ) -> fidl::Result<()> {
3718            decoder.debug_check_bounds::<Self>(offset);
3719            // Verify that padding bytes are zero.
3720            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
3721            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3722            let mask = 0xffff000000000000u64;
3723            let maskedval = padval & mask;
3724            if maskedval != 0 {
3725                return Err(fidl::Error::NonZeroPadding {
3726                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
3727                });
3728            }
3729            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
3730            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3731            let mask = 0xffffffff00000000u64;
3732            let maskedval = padval & mask;
3733            if maskedval != 0 {
3734                return Err(fidl::Error::NonZeroPadding {
3735                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
3736                });
3737            }
3738            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
3739            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3740            let mask = 0xffffff0000000000u64;
3741            let maskedval = padval & mask;
3742            if maskedval != 0 {
3743                return Err(fidl::Error::NonZeroPadding {
3744                    padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
3745                });
3746            }
3747            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.sta_addr, decoder, offset + 0, _depth)?;
3748            fidl::decode!(
3749                fidl_fuchsia_wlan_common::WlanMacRole,
3750                D,
3751                &mut self.role,
3752                decoder,
3753                offset + 8,
3754                _depth
3755            )?;
3756            fidl::decode!(fidl::encoding::Vector<BandCapability, 16>, D, &mut self.bands, decoder, offset + 16, _depth)?;
3757            fidl::decode!(
3758                u32,
3759                D,
3760                &mut self.softmac_hardware_capability,
3761                decoder,
3762                offset + 32,
3763                _depth
3764            )?;
3765            fidl::decode!(bool, D, &mut self.qos_capable, decoder, offset + 36, _depth)?;
3766            Ok(())
3767        }
3768    }
3769
3770    impl fidl::encoding::ValueTypeMarker for DisassociateConfirm {
3771        type Borrowed<'a> = &'a Self;
3772        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3773            value
3774        }
3775    }
3776
3777    unsafe impl fidl::encoding::TypeMarker for DisassociateConfirm {
3778        type Owned = Self;
3779
3780        #[inline(always)]
3781        fn inline_align(_context: fidl::encoding::Context) -> usize {
3782            4
3783        }
3784
3785        #[inline(always)]
3786        fn inline_size(_context: fidl::encoding::Context) -> usize {
3787            4
3788        }
3789        #[inline(always)]
3790        fn encode_is_copy() -> bool {
3791            true
3792        }
3793
3794        #[inline(always)]
3795        fn decode_is_copy() -> bool {
3796            true
3797        }
3798    }
3799
3800    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisassociateConfirm, D>
3801        for &DisassociateConfirm
3802    {
3803        #[inline]
3804        unsafe fn encode(
3805            self,
3806            encoder: &mut fidl::encoding::Encoder<'_, D>,
3807            offset: usize,
3808            _depth: fidl::encoding::Depth,
3809        ) -> fidl::Result<()> {
3810            encoder.debug_check_bounds::<DisassociateConfirm>(offset);
3811            unsafe {
3812                // Copy the object into the buffer.
3813                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3814                (buf_ptr as *mut DisassociateConfirm)
3815                    .write_unaligned((self as *const DisassociateConfirm).read());
3816                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3817                // done second because the memcpy will write garbage to these bytes.
3818            }
3819            Ok(())
3820        }
3821    }
3822    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
3823        fidl::encoding::Encode<DisassociateConfirm, D> for (T0,)
3824    {
3825        #[inline]
3826        unsafe fn encode(
3827            self,
3828            encoder: &mut fidl::encoding::Encoder<'_, D>,
3829            offset: usize,
3830            depth: fidl::encoding::Depth,
3831        ) -> fidl::Result<()> {
3832            encoder.debug_check_bounds::<DisassociateConfirm>(offset);
3833            // Zero out padding regions. There's no need to apply masks
3834            // because the unmasked parts will be overwritten by fields.
3835            // Write the fields.
3836            self.0.encode(encoder, offset + 0, depth)?;
3837            Ok(())
3838        }
3839    }
3840
3841    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisassociateConfirm {
3842        #[inline(always)]
3843        fn new_empty() -> Self {
3844            Self { status: fidl::new_empty!(i32, D) }
3845        }
3846
3847        #[inline]
3848        unsafe fn decode(
3849            &mut self,
3850            decoder: &mut fidl::encoding::Decoder<'_, D>,
3851            offset: usize,
3852            _depth: fidl::encoding::Depth,
3853        ) -> fidl::Result<()> {
3854            decoder.debug_check_bounds::<Self>(offset);
3855            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3856            // Verify that padding bytes are zero.
3857            // Copy from the buffer into the object.
3858            unsafe {
3859                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
3860            }
3861            Ok(())
3862        }
3863    }
3864
3865    impl fidl::encoding::ValueTypeMarker for DisassociateIndication {
3866        type Borrowed<'a> = &'a Self;
3867        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3868            value
3869        }
3870    }
3871
3872    unsafe impl fidl::encoding::TypeMarker for DisassociateIndication {
3873        type Owned = Self;
3874
3875        #[inline(always)]
3876        fn inline_align(_context: fidl::encoding::Context) -> usize {
3877            2
3878        }
3879
3880        #[inline(always)]
3881        fn inline_size(_context: fidl::encoding::Context) -> usize {
3882            10
3883        }
3884    }
3885
3886    unsafe impl<D: fidl::encoding::ResourceDialect>
3887        fidl::encoding::Encode<DisassociateIndication, D> for &DisassociateIndication
3888    {
3889        #[inline]
3890        unsafe fn encode(
3891            self,
3892            encoder: &mut fidl::encoding::Encoder<'_, D>,
3893            offset: usize,
3894            _depth: fidl::encoding::Depth,
3895        ) -> fidl::Result<()> {
3896            encoder.debug_check_bounds::<DisassociateIndication>(offset);
3897            // Delegate to tuple encoding.
3898            fidl::encoding::Encode::<DisassociateIndication, D>::encode(
3899                (
3900                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
3901                    <fidl_fuchsia_wlan_ieee80211::ReasonCode as fidl::encoding::ValueTypeMarker>::borrow(&self.reason_code),
3902                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.locally_initiated),
3903                ),
3904                encoder, offset, _depth
3905            )
3906        }
3907    }
3908    unsafe impl<
3909            D: fidl::encoding::ResourceDialect,
3910            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
3911            T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::ReasonCode, D>,
3912            T2: fidl::encoding::Encode<bool, D>,
3913        > fidl::encoding::Encode<DisassociateIndication, D> for (T0, T1, T2)
3914    {
3915        #[inline]
3916        unsafe fn encode(
3917            self,
3918            encoder: &mut fidl::encoding::Encoder<'_, D>,
3919            offset: usize,
3920            depth: fidl::encoding::Depth,
3921        ) -> fidl::Result<()> {
3922            encoder.debug_check_bounds::<DisassociateIndication>(offset);
3923            // Zero out padding regions. There's no need to apply masks
3924            // because the unmasked parts will be overwritten by fields.
3925            unsafe {
3926                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
3927                (ptr as *mut u16).write_unaligned(0);
3928            }
3929            // Write the fields.
3930            self.0.encode(encoder, offset + 0, depth)?;
3931            self.1.encode(encoder, offset + 6, depth)?;
3932            self.2.encode(encoder, offset + 8, depth)?;
3933            Ok(())
3934        }
3935    }
3936
3937    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3938        for DisassociateIndication
3939    {
3940        #[inline(always)]
3941        fn new_empty() -> Self {
3942            Self {
3943                peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
3944                reason_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::ReasonCode, D),
3945                locally_initiated: fidl::new_empty!(bool, D),
3946            }
3947        }
3948
3949        #[inline]
3950        unsafe fn decode(
3951            &mut self,
3952            decoder: &mut fidl::encoding::Decoder<'_, D>,
3953            offset: usize,
3954            _depth: fidl::encoding::Depth,
3955        ) -> fidl::Result<()> {
3956            decoder.debug_check_bounds::<Self>(offset);
3957            // Verify that padding bytes are zero.
3958            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
3959            let padval = unsafe { (ptr as *const u16).read_unaligned() };
3960            let mask = 0xff00u16;
3961            let maskedval = padval & mask;
3962            if maskedval != 0 {
3963                return Err(fidl::Error::NonZeroPadding {
3964                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
3965                });
3966            }
3967            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
3968            fidl::decode!(
3969                fidl_fuchsia_wlan_ieee80211::ReasonCode,
3970                D,
3971                &mut self.reason_code,
3972                decoder,
3973                offset + 6,
3974                _depth
3975            )?;
3976            fidl::decode!(bool, D, &mut self.locally_initiated, decoder, offset + 8, _depth)?;
3977            Ok(())
3978        }
3979    }
3980
3981    impl fidl::encoding::ValueTypeMarker for DisassociateRequest {
3982        type Borrowed<'a> = &'a Self;
3983        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3984            value
3985        }
3986    }
3987
3988    unsafe impl fidl::encoding::TypeMarker for DisassociateRequest {
3989        type Owned = Self;
3990
3991        #[inline(always)]
3992        fn inline_align(_context: fidl::encoding::Context) -> usize {
3993            2
3994        }
3995
3996        #[inline(always)]
3997        fn inline_size(_context: fidl::encoding::Context) -> usize {
3998            8
3999        }
4000    }
4001
4002    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisassociateRequest, D>
4003        for &DisassociateRequest
4004    {
4005        #[inline]
4006        unsafe fn encode(
4007            self,
4008            encoder: &mut fidl::encoding::Encoder<'_, D>,
4009            offset: usize,
4010            _depth: fidl::encoding::Depth,
4011        ) -> fidl::Result<()> {
4012            encoder.debug_check_bounds::<DisassociateRequest>(offset);
4013            // Delegate to tuple encoding.
4014            fidl::encoding::Encode::<DisassociateRequest, D>::encode(
4015                (
4016                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
4017                    <fidl_fuchsia_wlan_ieee80211::ReasonCode as fidl::encoding::ValueTypeMarker>::borrow(&self.reason_code),
4018                ),
4019                encoder, offset, _depth
4020            )
4021        }
4022    }
4023    unsafe impl<
4024            D: fidl::encoding::ResourceDialect,
4025            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
4026            T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::ReasonCode, D>,
4027        > fidl::encoding::Encode<DisassociateRequest, D> for (T0, T1)
4028    {
4029        #[inline]
4030        unsafe fn encode(
4031            self,
4032            encoder: &mut fidl::encoding::Encoder<'_, D>,
4033            offset: usize,
4034            depth: fidl::encoding::Depth,
4035        ) -> fidl::Result<()> {
4036            encoder.debug_check_bounds::<DisassociateRequest>(offset);
4037            // Zero out padding regions. There's no need to apply masks
4038            // because the unmasked parts will be overwritten by fields.
4039            // Write the fields.
4040            self.0.encode(encoder, offset + 0, depth)?;
4041            self.1.encode(encoder, offset + 6, depth)?;
4042            Ok(())
4043        }
4044    }
4045
4046    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisassociateRequest {
4047        #[inline(always)]
4048        fn new_empty() -> Self {
4049            Self {
4050                peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
4051                reason_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::ReasonCode, D),
4052            }
4053        }
4054
4055        #[inline]
4056        unsafe fn decode(
4057            &mut self,
4058            decoder: &mut fidl::encoding::Decoder<'_, D>,
4059            offset: usize,
4060            _depth: fidl::encoding::Depth,
4061        ) -> fidl::Result<()> {
4062            decoder.debug_check_bounds::<Self>(offset);
4063            // Verify that padding bytes are zero.
4064            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
4065            fidl::decode!(
4066                fidl_fuchsia_wlan_ieee80211::ReasonCode,
4067                D,
4068                &mut self.reason_code,
4069                decoder,
4070                offset + 6,
4071                _depth
4072            )?;
4073            Ok(())
4074        }
4075    }
4076
4077    impl fidl::encoding::ValueTypeMarker for EapolConfirm {
4078        type Borrowed<'a> = &'a Self;
4079        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4080            value
4081        }
4082    }
4083
4084    unsafe impl fidl::encoding::TypeMarker for EapolConfirm {
4085        type Owned = Self;
4086
4087        #[inline(always)]
4088        fn inline_align(_context: fidl::encoding::Context) -> usize {
4089            4
4090        }
4091
4092        #[inline(always)]
4093        fn inline_size(_context: fidl::encoding::Context) -> usize {
4094            12
4095        }
4096    }
4097
4098    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EapolConfirm, D>
4099        for &EapolConfirm
4100    {
4101        #[inline]
4102        unsafe fn encode(
4103            self,
4104            encoder: &mut fidl::encoding::Encoder<'_, D>,
4105            offset: usize,
4106            _depth: fidl::encoding::Depth,
4107        ) -> fidl::Result<()> {
4108            encoder.debug_check_bounds::<EapolConfirm>(offset);
4109            // Delegate to tuple encoding.
4110            fidl::encoding::Encode::<EapolConfirm, D>::encode(
4111                (
4112                    <EapolResultCode as fidl::encoding::ValueTypeMarker>::borrow(&self.result_code),
4113                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(
4114                        &self.dst_addr,
4115                    ),
4116                ),
4117                encoder,
4118                offset,
4119                _depth,
4120            )
4121        }
4122    }
4123    unsafe impl<
4124            D: fidl::encoding::ResourceDialect,
4125            T0: fidl::encoding::Encode<EapolResultCode, D>,
4126            T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
4127        > fidl::encoding::Encode<EapolConfirm, D> for (T0, T1)
4128    {
4129        #[inline]
4130        unsafe fn encode(
4131            self,
4132            encoder: &mut fidl::encoding::Encoder<'_, D>,
4133            offset: usize,
4134            depth: fidl::encoding::Depth,
4135        ) -> fidl::Result<()> {
4136            encoder.debug_check_bounds::<EapolConfirm>(offset);
4137            // Zero out padding regions. There's no need to apply masks
4138            // because the unmasked parts will be overwritten by fields.
4139            unsafe {
4140                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
4141                (ptr as *mut u32).write_unaligned(0);
4142            }
4143            // Write the fields.
4144            self.0.encode(encoder, offset + 0, depth)?;
4145            self.1.encode(encoder, offset + 4, depth)?;
4146            Ok(())
4147        }
4148    }
4149
4150    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EapolConfirm {
4151        #[inline(always)]
4152        fn new_empty() -> Self {
4153            Self {
4154                result_code: fidl::new_empty!(EapolResultCode, D),
4155                dst_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
4156            }
4157        }
4158
4159        #[inline]
4160        unsafe fn decode(
4161            &mut self,
4162            decoder: &mut fidl::encoding::Decoder<'_, D>,
4163            offset: usize,
4164            _depth: fidl::encoding::Depth,
4165        ) -> fidl::Result<()> {
4166            decoder.debug_check_bounds::<Self>(offset);
4167            // Verify that padding bytes are zero.
4168            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
4169            let padval = unsafe { (ptr as *const u32).read_unaligned() };
4170            let mask = 0xffff0000u32;
4171            let maskedval = padval & mask;
4172            if maskedval != 0 {
4173                return Err(fidl::Error::NonZeroPadding {
4174                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
4175                });
4176            }
4177            fidl::decode!(EapolResultCode, D, &mut self.result_code, decoder, offset + 0, _depth)?;
4178            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.dst_addr, decoder, offset + 4, _depth)?;
4179            Ok(())
4180        }
4181    }
4182
4183    impl fidl::encoding::ValueTypeMarker for EapolIndication {
4184        type Borrowed<'a> = &'a Self;
4185        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4186            value
4187        }
4188    }
4189
4190    unsafe impl fidl::encoding::TypeMarker for EapolIndication {
4191        type Owned = Self;
4192
4193        #[inline(always)]
4194        fn inline_align(_context: fidl::encoding::Context) -> usize {
4195            8
4196        }
4197
4198        #[inline(always)]
4199        fn inline_size(_context: fidl::encoding::Context) -> usize {
4200            32
4201        }
4202    }
4203
4204    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EapolIndication, D>
4205        for &EapolIndication
4206    {
4207        #[inline]
4208        unsafe fn encode(
4209            self,
4210            encoder: &mut fidl::encoding::Encoder<'_, D>,
4211            offset: usize,
4212            _depth: fidl::encoding::Depth,
4213        ) -> fidl::Result<()> {
4214            encoder.debug_check_bounds::<EapolIndication>(offset);
4215            // Delegate to tuple encoding.
4216            fidl::encoding::Encode::<EapolIndication, D>::encode(
4217                (
4218                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.src_addr),
4219                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.dst_addr),
4220                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.data),
4221                ),
4222                encoder, offset, _depth
4223            )
4224        }
4225    }
4226    unsafe impl<
4227            D: fidl::encoding::ResourceDialect,
4228            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
4229            T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
4230            T2: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
4231        > fidl::encoding::Encode<EapolIndication, D> for (T0, T1, T2)
4232    {
4233        #[inline]
4234        unsafe fn encode(
4235            self,
4236            encoder: &mut fidl::encoding::Encoder<'_, D>,
4237            offset: usize,
4238            depth: fidl::encoding::Depth,
4239        ) -> fidl::Result<()> {
4240            encoder.debug_check_bounds::<EapolIndication>(offset);
4241            // Zero out padding regions. There's no need to apply masks
4242            // because the unmasked parts will be overwritten by fields.
4243            unsafe {
4244                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
4245                (ptr as *mut u64).write_unaligned(0);
4246            }
4247            // Write the fields.
4248            self.0.encode(encoder, offset + 0, depth)?;
4249            self.1.encode(encoder, offset + 6, depth)?;
4250            self.2.encode(encoder, offset + 16, depth)?;
4251            Ok(())
4252        }
4253    }
4254
4255    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EapolIndication {
4256        #[inline(always)]
4257        fn new_empty() -> Self {
4258            Self {
4259                src_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
4260                dst_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
4261                data: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
4262            }
4263        }
4264
4265        #[inline]
4266        unsafe fn decode(
4267            &mut self,
4268            decoder: &mut fidl::encoding::Decoder<'_, D>,
4269            offset: usize,
4270            _depth: fidl::encoding::Depth,
4271        ) -> fidl::Result<()> {
4272            decoder.debug_check_bounds::<Self>(offset);
4273            // Verify that padding bytes are zero.
4274            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
4275            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4276            let mask = 0xffffffff00000000u64;
4277            let maskedval = padval & mask;
4278            if maskedval != 0 {
4279                return Err(fidl::Error::NonZeroPadding {
4280                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
4281                });
4282            }
4283            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.src_addr, decoder, offset + 0, _depth)?;
4284            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.dst_addr, decoder, offset + 6, _depth)?;
4285            fidl::decode!(
4286                fidl::encoding::UnboundedVector<u8>,
4287                D,
4288                &mut self.data,
4289                decoder,
4290                offset + 16,
4291                _depth
4292            )?;
4293            Ok(())
4294        }
4295    }
4296
4297    impl fidl::encoding::ValueTypeMarker for EapolRequest {
4298        type Borrowed<'a> = &'a Self;
4299        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4300            value
4301        }
4302    }
4303
4304    unsafe impl fidl::encoding::TypeMarker for EapolRequest {
4305        type Owned = Self;
4306
4307        #[inline(always)]
4308        fn inline_align(_context: fidl::encoding::Context) -> usize {
4309            8
4310        }
4311
4312        #[inline(always)]
4313        fn inline_size(_context: fidl::encoding::Context) -> usize {
4314            32
4315        }
4316    }
4317
4318    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EapolRequest, D>
4319        for &EapolRequest
4320    {
4321        #[inline]
4322        unsafe fn encode(
4323            self,
4324            encoder: &mut fidl::encoding::Encoder<'_, D>,
4325            offset: usize,
4326            _depth: fidl::encoding::Depth,
4327        ) -> fidl::Result<()> {
4328            encoder.debug_check_bounds::<EapolRequest>(offset);
4329            // Delegate to tuple encoding.
4330            fidl::encoding::Encode::<EapolRequest, D>::encode(
4331                (
4332                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.src_addr),
4333                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.dst_addr),
4334                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.data),
4335                ),
4336                encoder, offset, _depth
4337            )
4338        }
4339    }
4340    unsafe impl<
4341            D: fidl::encoding::ResourceDialect,
4342            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
4343            T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
4344            T2: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
4345        > fidl::encoding::Encode<EapolRequest, D> for (T0, T1, T2)
4346    {
4347        #[inline]
4348        unsafe fn encode(
4349            self,
4350            encoder: &mut fidl::encoding::Encoder<'_, D>,
4351            offset: usize,
4352            depth: fidl::encoding::Depth,
4353        ) -> fidl::Result<()> {
4354            encoder.debug_check_bounds::<EapolRequest>(offset);
4355            // Zero out padding regions. There's no need to apply masks
4356            // because the unmasked parts will be overwritten by fields.
4357            unsafe {
4358                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
4359                (ptr as *mut u64).write_unaligned(0);
4360            }
4361            // Write the fields.
4362            self.0.encode(encoder, offset + 0, depth)?;
4363            self.1.encode(encoder, offset + 6, depth)?;
4364            self.2.encode(encoder, offset + 16, depth)?;
4365            Ok(())
4366        }
4367    }
4368
4369    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EapolRequest {
4370        #[inline(always)]
4371        fn new_empty() -> Self {
4372            Self {
4373                src_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
4374                dst_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
4375                data: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
4376            }
4377        }
4378
4379        #[inline]
4380        unsafe fn decode(
4381            &mut self,
4382            decoder: &mut fidl::encoding::Decoder<'_, D>,
4383            offset: usize,
4384            _depth: fidl::encoding::Depth,
4385        ) -> fidl::Result<()> {
4386            decoder.debug_check_bounds::<Self>(offset);
4387            // Verify that padding bytes are zero.
4388            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
4389            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4390            let mask = 0xffffffff00000000u64;
4391            let maskedval = padval & mask;
4392            if maskedval != 0 {
4393                return Err(fidl::Error::NonZeroPadding {
4394                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
4395                });
4396            }
4397            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.src_addr, decoder, offset + 0, _depth)?;
4398            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.dst_addr, decoder, offset + 6, _depth)?;
4399            fidl::decode!(
4400                fidl::encoding::UnboundedVector<u8>,
4401                D,
4402                &mut self.data,
4403                decoder,
4404                offset + 16,
4405                _depth
4406            )?;
4407            Ok(())
4408        }
4409    }
4410
4411    impl fidl::encoding::ValueTypeMarker for MlmeQueryTelemetrySupportResponse {
4412        type Borrowed<'a> = &'a Self;
4413        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4414            value
4415        }
4416    }
4417
4418    unsafe impl fidl::encoding::TypeMarker for MlmeQueryTelemetrySupportResponse {
4419        type Owned = Self;
4420
4421        #[inline(always)]
4422        fn inline_align(_context: fidl::encoding::Context) -> usize {
4423            8
4424        }
4425
4426        #[inline(always)]
4427        fn inline_size(_context: fidl::encoding::Context) -> usize {
4428            16
4429        }
4430    }
4431
4432    unsafe impl<D: fidl::encoding::ResourceDialect>
4433        fidl::encoding::Encode<MlmeQueryTelemetrySupportResponse, D>
4434        for &MlmeQueryTelemetrySupportResponse
4435    {
4436        #[inline]
4437        unsafe fn encode(
4438            self,
4439            encoder: &mut fidl::encoding::Encoder<'_, D>,
4440            offset: usize,
4441            _depth: fidl::encoding::Depth,
4442        ) -> fidl::Result<()> {
4443            encoder.debug_check_bounds::<MlmeQueryTelemetrySupportResponse>(offset);
4444            // Delegate to tuple encoding.
4445            fidl::encoding::Encode::<MlmeQueryTelemetrySupportResponse, D>::encode(
4446                (
4447                    <fidl_fuchsia_wlan_stats::TelemetrySupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
4448                ),
4449                encoder, offset, _depth
4450            )
4451        }
4452    }
4453    unsafe impl<
4454            D: fidl::encoding::ResourceDialect,
4455            T0: fidl::encoding::Encode<fidl_fuchsia_wlan_stats::TelemetrySupport, D>,
4456        > fidl::encoding::Encode<MlmeQueryTelemetrySupportResponse, D> for (T0,)
4457    {
4458        #[inline]
4459        unsafe fn encode(
4460            self,
4461            encoder: &mut fidl::encoding::Encoder<'_, D>,
4462            offset: usize,
4463            depth: fidl::encoding::Depth,
4464        ) -> fidl::Result<()> {
4465            encoder.debug_check_bounds::<MlmeQueryTelemetrySupportResponse>(offset);
4466            // Zero out padding regions. There's no need to apply masks
4467            // because the unmasked parts will be overwritten by fields.
4468            // Write the fields.
4469            self.0.encode(encoder, offset + 0, depth)?;
4470            Ok(())
4471        }
4472    }
4473
4474    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4475        for MlmeQueryTelemetrySupportResponse
4476    {
4477        #[inline(always)]
4478        fn new_empty() -> Self {
4479            Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_stats::TelemetrySupport, D) }
4480        }
4481
4482        #[inline]
4483        unsafe fn decode(
4484            &mut self,
4485            decoder: &mut fidl::encoding::Decoder<'_, D>,
4486            offset: usize,
4487            _depth: fidl::encoding::Depth,
4488        ) -> fidl::Result<()> {
4489            decoder.debug_check_bounds::<Self>(offset);
4490            // Verify that padding bytes are zero.
4491            fidl::decode!(
4492                fidl_fuchsia_wlan_stats::TelemetrySupport,
4493                D,
4494                &mut self.resp,
4495                decoder,
4496                offset + 0,
4497                _depth
4498            )?;
4499            Ok(())
4500        }
4501    }
4502
4503    impl fidl::encoding::ValueTypeMarker for MinstrelListResponse {
4504        type Borrowed<'a> = &'a Self;
4505        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4506            value
4507        }
4508    }
4509
4510    unsafe impl fidl::encoding::TypeMarker for MinstrelListResponse {
4511        type Owned = Self;
4512
4513        #[inline(always)]
4514        fn inline_align(_context: fidl::encoding::Context) -> usize {
4515            8
4516        }
4517
4518        #[inline(always)]
4519        fn inline_size(_context: fidl::encoding::Context) -> usize {
4520            16
4521        }
4522    }
4523
4524    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MinstrelListResponse, D>
4525        for &MinstrelListResponse
4526    {
4527        #[inline]
4528        unsafe fn encode(
4529            self,
4530            encoder: &mut fidl::encoding::Encoder<'_, D>,
4531            offset: usize,
4532            _depth: fidl::encoding::Depth,
4533        ) -> fidl::Result<()> {
4534            encoder.debug_check_bounds::<MinstrelListResponse>(offset);
4535            // Delegate to tuple encoding.
4536            fidl::encoding::Encode::<MinstrelListResponse, D>::encode(
4537                (<fidl_fuchsia_wlan_minstrel::Peers as fidl::encoding::ValueTypeMarker>::borrow(
4538                    &self.peers,
4539                ),),
4540                encoder,
4541                offset,
4542                _depth,
4543            )
4544        }
4545    }
4546    unsafe impl<
4547            D: fidl::encoding::ResourceDialect,
4548            T0: fidl::encoding::Encode<fidl_fuchsia_wlan_minstrel::Peers, D>,
4549        > fidl::encoding::Encode<MinstrelListResponse, D> for (T0,)
4550    {
4551        #[inline]
4552        unsafe fn encode(
4553            self,
4554            encoder: &mut fidl::encoding::Encoder<'_, D>,
4555            offset: usize,
4556            depth: fidl::encoding::Depth,
4557        ) -> fidl::Result<()> {
4558            encoder.debug_check_bounds::<MinstrelListResponse>(offset);
4559            // Zero out padding regions. There's no need to apply masks
4560            // because the unmasked parts will be overwritten by fields.
4561            // Write the fields.
4562            self.0.encode(encoder, offset + 0, depth)?;
4563            Ok(())
4564        }
4565    }
4566
4567    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MinstrelListResponse {
4568        #[inline(always)]
4569        fn new_empty() -> Self {
4570            Self { peers: fidl::new_empty!(fidl_fuchsia_wlan_minstrel::Peers, D) }
4571        }
4572
4573        #[inline]
4574        unsafe fn decode(
4575            &mut self,
4576            decoder: &mut fidl::encoding::Decoder<'_, D>,
4577            offset: usize,
4578            _depth: fidl::encoding::Depth,
4579        ) -> fidl::Result<()> {
4580            decoder.debug_check_bounds::<Self>(offset);
4581            // Verify that padding bytes are zero.
4582            fidl::decode!(
4583                fidl_fuchsia_wlan_minstrel::Peers,
4584                D,
4585                &mut self.peers,
4586                decoder,
4587                offset + 0,
4588                _depth
4589            )?;
4590            Ok(())
4591        }
4592    }
4593
4594    impl fidl::encoding::ValueTypeMarker for MinstrelStatsRequest {
4595        type Borrowed<'a> = &'a Self;
4596        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4597            value
4598        }
4599    }
4600
4601    unsafe impl fidl::encoding::TypeMarker for MinstrelStatsRequest {
4602        type Owned = Self;
4603
4604        #[inline(always)]
4605        fn inline_align(_context: fidl::encoding::Context) -> usize {
4606            1
4607        }
4608
4609        #[inline(always)]
4610        fn inline_size(_context: fidl::encoding::Context) -> usize {
4611            6
4612        }
4613        #[inline(always)]
4614        fn encode_is_copy() -> bool {
4615            true
4616        }
4617
4618        #[inline(always)]
4619        fn decode_is_copy() -> bool {
4620            true
4621        }
4622    }
4623
4624    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MinstrelStatsRequest, D>
4625        for &MinstrelStatsRequest
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::<MinstrelStatsRequest>(offset);
4635            unsafe {
4636                // Copy the object into the buffer.
4637                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4638                (buf_ptr as *mut MinstrelStatsRequest)
4639                    .write_unaligned((self as *const MinstrelStatsRequest).read());
4640                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4641                // done second because the memcpy will write garbage to these bytes.
4642            }
4643            Ok(())
4644        }
4645    }
4646    unsafe impl<
4647            D: fidl::encoding::ResourceDialect,
4648            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
4649        > fidl::encoding::Encode<MinstrelStatsRequest, D> for (T0,)
4650    {
4651        #[inline]
4652        unsafe fn encode(
4653            self,
4654            encoder: &mut fidl::encoding::Encoder<'_, D>,
4655            offset: usize,
4656            depth: fidl::encoding::Depth,
4657        ) -> fidl::Result<()> {
4658            encoder.debug_check_bounds::<MinstrelStatsRequest>(offset);
4659            // Zero out padding regions. There's no need to apply masks
4660            // because the unmasked parts will be overwritten by fields.
4661            // Write the fields.
4662            self.0.encode(encoder, offset + 0, depth)?;
4663            Ok(())
4664        }
4665    }
4666
4667    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MinstrelStatsRequest {
4668        #[inline(always)]
4669        fn new_empty() -> Self {
4670            Self { peer_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D) }
4671        }
4672
4673        #[inline]
4674        unsafe fn decode(
4675            &mut self,
4676            decoder: &mut fidl::encoding::Decoder<'_, D>,
4677            offset: usize,
4678            _depth: fidl::encoding::Depth,
4679        ) -> fidl::Result<()> {
4680            decoder.debug_check_bounds::<Self>(offset);
4681            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4682            // Verify that padding bytes are zero.
4683            // Copy from the buffer into the object.
4684            unsafe {
4685                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
4686            }
4687            Ok(())
4688        }
4689    }
4690
4691    impl fidl::encoding::ValueTypeMarker for MinstrelStatsResponse {
4692        type Borrowed<'a> = &'a Self;
4693        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4694            value
4695        }
4696    }
4697
4698    unsafe impl fidl::encoding::TypeMarker for MinstrelStatsResponse {
4699        type Owned = Self;
4700
4701        #[inline(always)]
4702        fn inline_align(_context: fidl::encoding::Context) -> usize {
4703            8
4704        }
4705
4706        #[inline(always)]
4707        fn inline_size(_context: fidl::encoding::Context) -> usize {
4708            8
4709        }
4710    }
4711
4712    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MinstrelStatsResponse, D>
4713        for &MinstrelStatsResponse
4714    {
4715        #[inline]
4716        unsafe fn encode(
4717            self,
4718            encoder: &mut fidl::encoding::Encoder<'_, D>,
4719            offset: usize,
4720            _depth: fidl::encoding::Depth,
4721        ) -> fidl::Result<()> {
4722            encoder.debug_check_bounds::<MinstrelStatsResponse>(offset);
4723            // Delegate to tuple encoding.
4724            fidl::encoding::Encode::<MinstrelStatsResponse, D>::encode(
4725                (
4726                    <fidl::encoding::Boxed<fidl_fuchsia_wlan_minstrel::Peer> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer),
4727                ),
4728                encoder, offset, _depth
4729            )
4730        }
4731    }
4732    unsafe impl<
4733            D: fidl::encoding::ResourceDialect,
4734            T0: fidl::encoding::Encode<fidl::encoding::Boxed<fidl_fuchsia_wlan_minstrel::Peer>, D>,
4735        > fidl::encoding::Encode<MinstrelStatsResponse, D> for (T0,)
4736    {
4737        #[inline]
4738        unsafe fn encode(
4739            self,
4740            encoder: &mut fidl::encoding::Encoder<'_, D>,
4741            offset: usize,
4742            depth: fidl::encoding::Depth,
4743        ) -> fidl::Result<()> {
4744            encoder.debug_check_bounds::<MinstrelStatsResponse>(offset);
4745            // Zero out padding regions. There's no need to apply masks
4746            // because the unmasked parts will be overwritten by fields.
4747            // Write the fields.
4748            self.0.encode(encoder, offset + 0, depth)?;
4749            Ok(())
4750        }
4751    }
4752
4753    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MinstrelStatsResponse {
4754        #[inline(always)]
4755        fn new_empty() -> Self {
4756            Self {
4757                peer: fidl::new_empty!(fidl::encoding::Boxed<fidl_fuchsia_wlan_minstrel::Peer>, D),
4758            }
4759        }
4760
4761        #[inline]
4762        unsafe fn decode(
4763            &mut self,
4764            decoder: &mut fidl::encoding::Decoder<'_, D>,
4765            offset: usize,
4766            _depth: fidl::encoding::Depth,
4767        ) -> fidl::Result<()> {
4768            decoder.debug_check_bounds::<Self>(offset);
4769            // Verify that padding bytes are zero.
4770            fidl::decode!(
4771                fidl::encoding::Boxed<fidl_fuchsia_wlan_minstrel::Peer>,
4772                D,
4773                &mut self.peer,
4774                decoder,
4775                offset + 0,
4776                _depth
4777            )?;
4778            Ok(())
4779        }
4780    }
4781
4782    impl fidl::encoding::ValueTypeMarker for MlmeAssociateIndRequest {
4783        type Borrowed<'a> = &'a Self;
4784        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4785            value
4786        }
4787    }
4788
4789    unsafe impl fidl::encoding::TypeMarker for MlmeAssociateIndRequest {
4790        type Owned = Self;
4791
4792        #[inline(always)]
4793        fn inline_align(_context: fidl::encoding::Context) -> usize {
4794            8
4795        }
4796
4797        #[inline(always)]
4798        fn inline_size(_context: fidl::encoding::Context) -> usize {
4799            64
4800        }
4801    }
4802
4803    unsafe impl<D: fidl::encoding::ResourceDialect>
4804        fidl::encoding::Encode<MlmeAssociateIndRequest, D> for &MlmeAssociateIndRequest
4805    {
4806        #[inline]
4807        unsafe fn encode(
4808            self,
4809            encoder: &mut fidl::encoding::Encoder<'_, D>,
4810            offset: usize,
4811            _depth: fidl::encoding::Depth,
4812        ) -> fidl::Result<()> {
4813            encoder.debug_check_bounds::<MlmeAssociateIndRequest>(offset);
4814            // Delegate to tuple encoding.
4815            fidl::encoding::Encode::<MlmeAssociateIndRequest, D>::encode(
4816                (<AssociateIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),),
4817                encoder,
4818                offset,
4819                _depth,
4820            )
4821        }
4822    }
4823    unsafe impl<
4824            D: fidl::encoding::ResourceDialect,
4825            T0: fidl::encoding::Encode<AssociateIndication, D>,
4826        > fidl::encoding::Encode<MlmeAssociateIndRequest, D> for (T0,)
4827    {
4828        #[inline]
4829        unsafe fn encode(
4830            self,
4831            encoder: &mut fidl::encoding::Encoder<'_, D>,
4832            offset: usize,
4833            depth: fidl::encoding::Depth,
4834        ) -> fidl::Result<()> {
4835            encoder.debug_check_bounds::<MlmeAssociateIndRequest>(offset);
4836            // Zero out padding regions. There's no need to apply masks
4837            // because the unmasked parts will be overwritten by fields.
4838            // Write the fields.
4839            self.0.encode(encoder, offset + 0, depth)?;
4840            Ok(())
4841        }
4842    }
4843
4844    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4845        for MlmeAssociateIndRequest
4846    {
4847        #[inline(always)]
4848        fn new_empty() -> Self {
4849            Self { ind: fidl::new_empty!(AssociateIndication, D) }
4850        }
4851
4852        #[inline]
4853        unsafe fn decode(
4854            &mut self,
4855            decoder: &mut fidl::encoding::Decoder<'_, D>,
4856            offset: usize,
4857            _depth: fidl::encoding::Depth,
4858        ) -> fidl::Result<()> {
4859            decoder.debug_check_bounds::<Self>(offset);
4860            // Verify that padding bytes are zero.
4861            fidl::decode!(AssociateIndication, D, &mut self.ind, decoder, offset + 0, _depth)?;
4862            Ok(())
4863        }
4864    }
4865
4866    impl fidl::encoding::ValueTypeMarker for MlmeAssociateRespRequest {
4867        type Borrowed<'a> = &'a Self;
4868        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4869            value
4870        }
4871    }
4872
4873    unsafe impl fidl::encoding::TypeMarker for MlmeAssociateRespRequest {
4874        type Owned = Self;
4875
4876        #[inline(always)]
4877        fn inline_align(_context: fidl::encoding::Context) -> usize {
4878            8
4879        }
4880
4881        #[inline(always)]
4882        fn inline_size(_context: fidl::encoding::Context) -> usize {
4883            32
4884        }
4885    }
4886
4887    unsafe impl<D: fidl::encoding::ResourceDialect>
4888        fidl::encoding::Encode<MlmeAssociateRespRequest, D> for &MlmeAssociateRespRequest
4889    {
4890        #[inline]
4891        unsafe fn encode(
4892            self,
4893            encoder: &mut fidl::encoding::Encoder<'_, D>,
4894            offset: usize,
4895            _depth: fidl::encoding::Depth,
4896        ) -> fidl::Result<()> {
4897            encoder.debug_check_bounds::<MlmeAssociateRespRequest>(offset);
4898            // Delegate to tuple encoding.
4899            fidl::encoding::Encode::<MlmeAssociateRespRequest, D>::encode(
4900                (<AssociateResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
4901                encoder,
4902                offset,
4903                _depth,
4904            )
4905        }
4906    }
4907    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<AssociateResponse, D>>
4908        fidl::encoding::Encode<MlmeAssociateRespRequest, D> for (T0,)
4909    {
4910        #[inline]
4911        unsafe fn encode(
4912            self,
4913            encoder: &mut fidl::encoding::Encoder<'_, D>,
4914            offset: usize,
4915            depth: fidl::encoding::Depth,
4916        ) -> fidl::Result<()> {
4917            encoder.debug_check_bounds::<MlmeAssociateRespRequest>(offset);
4918            // Zero out padding regions. There's no need to apply masks
4919            // because the unmasked parts will be overwritten by fields.
4920            // Write the fields.
4921            self.0.encode(encoder, offset + 0, depth)?;
4922            Ok(())
4923        }
4924    }
4925
4926    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4927        for MlmeAssociateRespRequest
4928    {
4929        #[inline(always)]
4930        fn new_empty() -> Self {
4931            Self { resp: fidl::new_empty!(AssociateResponse, D) }
4932        }
4933
4934        #[inline]
4935        unsafe fn decode(
4936            &mut self,
4937            decoder: &mut fidl::encoding::Decoder<'_, D>,
4938            offset: usize,
4939            _depth: fidl::encoding::Depth,
4940        ) -> fidl::Result<()> {
4941            decoder.debug_check_bounds::<Self>(offset);
4942            // Verify that padding bytes are zero.
4943            fidl::decode!(AssociateResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
4944            Ok(())
4945        }
4946    }
4947
4948    impl fidl::encoding::ValueTypeMarker for MlmeAuthenticateIndRequest {
4949        type Borrowed<'a> = &'a Self;
4950        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4951            value
4952        }
4953    }
4954
4955    unsafe impl fidl::encoding::TypeMarker for MlmeAuthenticateIndRequest {
4956        type Owned = Self;
4957
4958        #[inline(always)]
4959        fn inline_align(_context: fidl::encoding::Context) -> usize {
4960            4
4961        }
4962
4963        #[inline(always)]
4964        fn inline_size(_context: fidl::encoding::Context) -> usize {
4965            12
4966        }
4967    }
4968
4969    unsafe impl<D: fidl::encoding::ResourceDialect>
4970        fidl::encoding::Encode<MlmeAuthenticateIndRequest, D> for &MlmeAuthenticateIndRequest
4971    {
4972        #[inline]
4973        unsafe fn encode(
4974            self,
4975            encoder: &mut fidl::encoding::Encoder<'_, D>,
4976            offset: usize,
4977            _depth: fidl::encoding::Depth,
4978        ) -> fidl::Result<()> {
4979            encoder.debug_check_bounds::<MlmeAuthenticateIndRequest>(offset);
4980            // Delegate to tuple encoding.
4981            fidl::encoding::Encode::<MlmeAuthenticateIndRequest, D>::encode(
4982                (<AuthenticateIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),),
4983                encoder,
4984                offset,
4985                _depth,
4986            )
4987        }
4988    }
4989    unsafe impl<
4990            D: fidl::encoding::ResourceDialect,
4991            T0: fidl::encoding::Encode<AuthenticateIndication, D>,
4992        > fidl::encoding::Encode<MlmeAuthenticateIndRequest, D> for (T0,)
4993    {
4994        #[inline]
4995        unsafe fn encode(
4996            self,
4997            encoder: &mut fidl::encoding::Encoder<'_, D>,
4998            offset: usize,
4999            depth: fidl::encoding::Depth,
5000        ) -> fidl::Result<()> {
5001            encoder.debug_check_bounds::<MlmeAuthenticateIndRequest>(offset);
5002            // Zero out padding regions. There's no need to apply masks
5003            // because the unmasked parts will be overwritten by fields.
5004            // Write the fields.
5005            self.0.encode(encoder, offset + 0, depth)?;
5006            Ok(())
5007        }
5008    }
5009
5010    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5011        for MlmeAuthenticateIndRequest
5012    {
5013        #[inline(always)]
5014        fn new_empty() -> Self {
5015            Self { ind: fidl::new_empty!(AuthenticateIndication, D) }
5016        }
5017
5018        #[inline]
5019        unsafe fn decode(
5020            &mut self,
5021            decoder: &mut fidl::encoding::Decoder<'_, D>,
5022            offset: usize,
5023            _depth: fidl::encoding::Depth,
5024        ) -> fidl::Result<()> {
5025            decoder.debug_check_bounds::<Self>(offset);
5026            // Verify that padding bytes are zero.
5027            fidl::decode!(AuthenticateIndication, D, &mut self.ind, decoder, offset + 0, _depth)?;
5028            Ok(())
5029        }
5030    }
5031
5032    impl fidl::encoding::ValueTypeMarker for MlmeAuthenticateRespRequest {
5033        type Borrowed<'a> = &'a Self;
5034        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5035            value
5036        }
5037    }
5038
5039    unsafe impl fidl::encoding::TypeMarker for MlmeAuthenticateRespRequest {
5040        type Owned = Self;
5041
5042        #[inline(always)]
5043        fn inline_align(_context: fidl::encoding::Context) -> usize {
5044            4
5045        }
5046
5047        #[inline(always)]
5048        fn inline_size(_context: fidl::encoding::Context) -> usize {
5049            12
5050        }
5051    }
5052
5053    unsafe impl<D: fidl::encoding::ResourceDialect>
5054        fidl::encoding::Encode<MlmeAuthenticateRespRequest, D> for &MlmeAuthenticateRespRequest
5055    {
5056        #[inline]
5057        unsafe fn encode(
5058            self,
5059            encoder: &mut fidl::encoding::Encoder<'_, D>,
5060            offset: usize,
5061            _depth: fidl::encoding::Depth,
5062        ) -> fidl::Result<()> {
5063            encoder.debug_check_bounds::<MlmeAuthenticateRespRequest>(offset);
5064            // Delegate to tuple encoding.
5065            fidl::encoding::Encode::<MlmeAuthenticateRespRequest, D>::encode(
5066                (<AuthenticateResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
5067                encoder,
5068                offset,
5069                _depth,
5070            )
5071        }
5072    }
5073    unsafe impl<
5074            D: fidl::encoding::ResourceDialect,
5075            T0: fidl::encoding::Encode<AuthenticateResponse, D>,
5076        > fidl::encoding::Encode<MlmeAuthenticateRespRequest, D> for (T0,)
5077    {
5078        #[inline]
5079        unsafe fn encode(
5080            self,
5081            encoder: &mut fidl::encoding::Encoder<'_, D>,
5082            offset: usize,
5083            depth: fidl::encoding::Depth,
5084        ) -> fidl::Result<()> {
5085            encoder.debug_check_bounds::<MlmeAuthenticateRespRequest>(offset);
5086            // Zero out padding regions. There's no need to apply masks
5087            // because the unmasked parts will be overwritten by fields.
5088            // Write the fields.
5089            self.0.encode(encoder, offset + 0, depth)?;
5090            Ok(())
5091        }
5092    }
5093
5094    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5095        for MlmeAuthenticateRespRequest
5096    {
5097        #[inline(always)]
5098        fn new_empty() -> Self {
5099            Self { resp: fidl::new_empty!(AuthenticateResponse, D) }
5100        }
5101
5102        #[inline]
5103        unsafe fn decode(
5104            &mut self,
5105            decoder: &mut fidl::encoding::Decoder<'_, D>,
5106            offset: usize,
5107            _depth: fidl::encoding::Depth,
5108        ) -> fidl::Result<()> {
5109            decoder.debug_check_bounds::<Self>(offset);
5110            // Verify that padding bytes are zero.
5111            fidl::decode!(AuthenticateResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
5112            Ok(())
5113        }
5114    }
5115
5116    impl fidl::encoding::ValueTypeMarker for MlmeConnectConfRequest {
5117        type Borrowed<'a> = &'a Self;
5118        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5119            value
5120        }
5121    }
5122
5123    unsafe impl fidl::encoding::TypeMarker for MlmeConnectConfRequest {
5124        type Owned = Self;
5125
5126        #[inline(always)]
5127        fn inline_align(_context: fidl::encoding::Context) -> usize {
5128            8
5129        }
5130
5131        #[inline(always)]
5132        fn inline_size(_context: fidl::encoding::Context) -> usize {
5133            32
5134        }
5135    }
5136
5137    unsafe impl<D: fidl::encoding::ResourceDialect>
5138        fidl::encoding::Encode<MlmeConnectConfRequest, D> for &MlmeConnectConfRequest
5139    {
5140        #[inline]
5141        unsafe fn encode(
5142            self,
5143            encoder: &mut fidl::encoding::Encoder<'_, D>,
5144            offset: usize,
5145            _depth: fidl::encoding::Depth,
5146        ) -> fidl::Result<()> {
5147            encoder.debug_check_bounds::<MlmeConnectConfRequest>(offset);
5148            // Delegate to tuple encoding.
5149            fidl::encoding::Encode::<MlmeConnectConfRequest, D>::encode(
5150                (<ConnectConfirm as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
5151                encoder,
5152                offset,
5153                _depth,
5154            )
5155        }
5156    }
5157    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ConnectConfirm, D>>
5158        fidl::encoding::Encode<MlmeConnectConfRequest, D> for (T0,)
5159    {
5160        #[inline]
5161        unsafe fn encode(
5162            self,
5163            encoder: &mut fidl::encoding::Encoder<'_, D>,
5164            offset: usize,
5165            depth: fidl::encoding::Depth,
5166        ) -> fidl::Result<()> {
5167            encoder.debug_check_bounds::<MlmeConnectConfRequest>(offset);
5168            // Zero out padding regions. There's no need to apply masks
5169            // because the unmasked parts will be overwritten by fields.
5170            // Write the fields.
5171            self.0.encode(encoder, offset + 0, depth)?;
5172            Ok(())
5173        }
5174    }
5175
5176    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5177        for MlmeConnectConfRequest
5178    {
5179        #[inline(always)]
5180        fn new_empty() -> Self {
5181            Self { resp: fidl::new_empty!(ConnectConfirm, D) }
5182        }
5183
5184        #[inline]
5185        unsafe fn decode(
5186            &mut self,
5187            decoder: &mut fidl::encoding::Decoder<'_, D>,
5188            offset: usize,
5189            _depth: fidl::encoding::Depth,
5190        ) -> fidl::Result<()> {
5191            decoder.debug_check_bounds::<Self>(offset);
5192            // Verify that padding bytes are zero.
5193            fidl::decode!(ConnectConfirm, D, &mut self.resp, decoder, offset + 0, _depth)?;
5194            Ok(())
5195        }
5196    }
5197
5198    impl fidl::encoding::ValueTypeMarker for MlmeConnectReqRequest {
5199        type Borrowed<'a> = &'a Self;
5200        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5201            value
5202        }
5203    }
5204
5205    unsafe impl fidl::encoding::TypeMarker for MlmeConnectReqRequest {
5206        type Owned = Self;
5207
5208        #[inline(always)]
5209        fn inline_align(_context: fidl::encoding::Context) -> usize {
5210            8
5211        }
5212
5213        #[inline(always)]
5214        fn inline_size(_context: fidl::encoding::Context) -> usize {
5215            96
5216        }
5217    }
5218
5219    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeConnectReqRequest, D>
5220        for &MlmeConnectReqRequest
5221    {
5222        #[inline]
5223        unsafe fn encode(
5224            self,
5225            encoder: &mut fidl::encoding::Encoder<'_, D>,
5226            offset: usize,
5227            _depth: fidl::encoding::Depth,
5228        ) -> fidl::Result<()> {
5229            encoder.debug_check_bounds::<MlmeConnectReqRequest>(offset);
5230            // Delegate to tuple encoding.
5231            fidl::encoding::Encode::<MlmeConnectReqRequest, D>::encode(
5232                (<ConnectRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
5233                encoder,
5234                offset,
5235                _depth,
5236            )
5237        }
5238    }
5239    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ConnectRequest, D>>
5240        fidl::encoding::Encode<MlmeConnectReqRequest, D> for (T0,)
5241    {
5242        #[inline]
5243        unsafe fn encode(
5244            self,
5245            encoder: &mut fidl::encoding::Encoder<'_, D>,
5246            offset: usize,
5247            depth: fidl::encoding::Depth,
5248        ) -> fidl::Result<()> {
5249            encoder.debug_check_bounds::<MlmeConnectReqRequest>(offset);
5250            // Zero out padding regions. There's no need to apply masks
5251            // because the unmasked parts will be overwritten by fields.
5252            // Write the fields.
5253            self.0.encode(encoder, offset + 0, depth)?;
5254            Ok(())
5255        }
5256    }
5257
5258    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeConnectReqRequest {
5259        #[inline(always)]
5260        fn new_empty() -> Self {
5261            Self { req: fidl::new_empty!(ConnectRequest, D) }
5262        }
5263
5264        #[inline]
5265        unsafe fn decode(
5266            &mut self,
5267            decoder: &mut fidl::encoding::Decoder<'_, D>,
5268            offset: usize,
5269            _depth: fidl::encoding::Depth,
5270        ) -> fidl::Result<()> {
5271            decoder.debug_check_bounds::<Self>(offset);
5272            // Verify that padding bytes are zero.
5273            fidl::decode!(ConnectRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
5274            Ok(())
5275        }
5276    }
5277
5278    impl fidl::encoding::ValueTypeMarker for MlmeDeauthenticateConfRequest {
5279        type Borrowed<'a> = &'a Self;
5280        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5281            value
5282        }
5283    }
5284
5285    unsafe impl fidl::encoding::TypeMarker for MlmeDeauthenticateConfRequest {
5286        type Owned = Self;
5287
5288        #[inline(always)]
5289        fn inline_align(_context: fidl::encoding::Context) -> usize {
5290            1
5291        }
5292
5293        #[inline(always)]
5294        fn inline_size(_context: fidl::encoding::Context) -> usize {
5295            6
5296        }
5297        #[inline(always)]
5298        fn encode_is_copy() -> bool {
5299            true
5300        }
5301
5302        #[inline(always)]
5303        fn decode_is_copy() -> bool {
5304            true
5305        }
5306    }
5307
5308    unsafe impl<D: fidl::encoding::ResourceDialect>
5309        fidl::encoding::Encode<MlmeDeauthenticateConfRequest, D>
5310        for &MlmeDeauthenticateConfRequest
5311    {
5312        #[inline]
5313        unsafe fn encode(
5314            self,
5315            encoder: &mut fidl::encoding::Encoder<'_, D>,
5316            offset: usize,
5317            _depth: fidl::encoding::Depth,
5318        ) -> fidl::Result<()> {
5319            encoder.debug_check_bounds::<MlmeDeauthenticateConfRequest>(offset);
5320            unsafe {
5321                // Copy the object into the buffer.
5322                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5323                (buf_ptr as *mut MlmeDeauthenticateConfRequest)
5324                    .write_unaligned((self as *const MlmeDeauthenticateConfRequest).read());
5325                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
5326                // done second because the memcpy will write garbage to these bytes.
5327            }
5328            Ok(())
5329        }
5330    }
5331    unsafe impl<
5332            D: fidl::encoding::ResourceDialect,
5333            T0: fidl::encoding::Encode<DeauthenticateConfirm, D>,
5334        > fidl::encoding::Encode<MlmeDeauthenticateConfRequest, D> for (T0,)
5335    {
5336        #[inline]
5337        unsafe fn encode(
5338            self,
5339            encoder: &mut fidl::encoding::Encoder<'_, D>,
5340            offset: usize,
5341            depth: fidl::encoding::Depth,
5342        ) -> fidl::Result<()> {
5343            encoder.debug_check_bounds::<MlmeDeauthenticateConfRequest>(offset);
5344            // Zero out padding regions. There's no need to apply masks
5345            // because the unmasked parts will be overwritten by fields.
5346            // Write the fields.
5347            self.0.encode(encoder, offset + 0, depth)?;
5348            Ok(())
5349        }
5350    }
5351
5352    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5353        for MlmeDeauthenticateConfRequest
5354    {
5355        #[inline(always)]
5356        fn new_empty() -> Self {
5357            Self { resp: fidl::new_empty!(DeauthenticateConfirm, D) }
5358        }
5359
5360        #[inline]
5361        unsafe fn decode(
5362            &mut self,
5363            decoder: &mut fidl::encoding::Decoder<'_, D>,
5364            offset: usize,
5365            _depth: fidl::encoding::Depth,
5366        ) -> fidl::Result<()> {
5367            decoder.debug_check_bounds::<Self>(offset);
5368            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5369            // Verify that padding bytes are zero.
5370            // Copy from the buffer into the object.
5371            unsafe {
5372                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
5373            }
5374            Ok(())
5375        }
5376    }
5377
5378    impl fidl::encoding::ValueTypeMarker for MlmeDeauthenticateIndRequest {
5379        type Borrowed<'a> = &'a Self;
5380        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5381            value
5382        }
5383    }
5384
5385    unsafe impl fidl::encoding::TypeMarker for MlmeDeauthenticateIndRequest {
5386        type Owned = Self;
5387
5388        #[inline(always)]
5389        fn inline_align(_context: fidl::encoding::Context) -> usize {
5390            2
5391        }
5392
5393        #[inline(always)]
5394        fn inline_size(_context: fidl::encoding::Context) -> usize {
5395            10
5396        }
5397    }
5398
5399    unsafe impl<D: fidl::encoding::ResourceDialect>
5400        fidl::encoding::Encode<MlmeDeauthenticateIndRequest, D> for &MlmeDeauthenticateIndRequest
5401    {
5402        #[inline]
5403        unsafe fn encode(
5404            self,
5405            encoder: &mut fidl::encoding::Encoder<'_, D>,
5406            offset: usize,
5407            _depth: fidl::encoding::Depth,
5408        ) -> fidl::Result<()> {
5409            encoder.debug_check_bounds::<MlmeDeauthenticateIndRequest>(offset);
5410            // Delegate to tuple encoding.
5411            fidl::encoding::Encode::<MlmeDeauthenticateIndRequest, D>::encode(
5412                (<DeauthenticateIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),),
5413                encoder,
5414                offset,
5415                _depth,
5416            )
5417        }
5418    }
5419    unsafe impl<
5420            D: fidl::encoding::ResourceDialect,
5421            T0: fidl::encoding::Encode<DeauthenticateIndication, D>,
5422        > fidl::encoding::Encode<MlmeDeauthenticateIndRequest, D> for (T0,)
5423    {
5424        #[inline]
5425        unsafe fn encode(
5426            self,
5427            encoder: &mut fidl::encoding::Encoder<'_, D>,
5428            offset: usize,
5429            depth: fidl::encoding::Depth,
5430        ) -> fidl::Result<()> {
5431            encoder.debug_check_bounds::<MlmeDeauthenticateIndRequest>(offset);
5432            // Zero out padding regions. There's no need to apply masks
5433            // because the unmasked parts will be overwritten by fields.
5434            // Write the fields.
5435            self.0.encode(encoder, offset + 0, depth)?;
5436            Ok(())
5437        }
5438    }
5439
5440    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5441        for MlmeDeauthenticateIndRequest
5442    {
5443        #[inline(always)]
5444        fn new_empty() -> Self {
5445            Self { ind: fidl::new_empty!(DeauthenticateIndication, D) }
5446        }
5447
5448        #[inline]
5449        unsafe fn decode(
5450            &mut self,
5451            decoder: &mut fidl::encoding::Decoder<'_, D>,
5452            offset: usize,
5453            _depth: fidl::encoding::Depth,
5454        ) -> fidl::Result<()> {
5455            decoder.debug_check_bounds::<Self>(offset);
5456            // Verify that padding bytes are zero.
5457            fidl::decode!(DeauthenticateIndication, D, &mut self.ind, decoder, offset + 0, _depth)?;
5458            Ok(())
5459        }
5460    }
5461
5462    impl fidl::encoding::ValueTypeMarker for MlmeDeauthenticateReqRequest {
5463        type Borrowed<'a> = &'a Self;
5464        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5465            value
5466        }
5467    }
5468
5469    unsafe impl fidl::encoding::TypeMarker for MlmeDeauthenticateReqRequest {
5470        type Owned = Self;
5471
5472        #[inline(always)]
5473        fn inline_align(_context: fidl::encoding::Context) -> usize {
5474            2
5475        }
5476
5477        #[inline(always)]
5478        fn inline_size(_context: fidl::encoding::Context) -> usize {
5479            8
5480        }
5481    }
5482
5483    unsafe impl<D: fidl::encoding::ResourceDialect>
5484        fidl::encoding::Encode<MlmeDeauthenticateReqRequest, D> for &MlmeDeauthenticateReqRequest
5485    {
5486        #[inline]
5487        unsafe fn encode(
5488            self,
5489            encoder: &mut fidl::encoding::Encoder<'_, D>,
5490            offset: usize,
5491            _depth: fidl::encoding::Depth,
5492        ) -> fidl::Result<()> {
5493            encoder.debug_check_bounds::<MlmeDeauthenticateReqRequest>(offset);
5494            // Delegate to tuple encoding.
5495            fidl::encoding::Encode::<MlmeDeauthenticateReqRequest, D>::encode(
5496                (<DeauthenticateRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
5497                encoder,
5498                offset,
5499                _depth,
5500            )
5501        }
5502    }
5503    unsafe impl<
5504            D: fidl::encoding::ResourceDialect,
5505            T0: fidl::encoding::Encode<DeauthenticateRequest, D>,
5506        > fidl::encoding::Encode<MlmeDeauthenticateReqRequest, D> for (T0,)
5507    {
5508        #[inline]
5509        unsafe fn encode(
5510            self,
5511            encoder: &mut fidl::encoding::Encoder<'_, D>,
5512            offset: usize,
5513            depth: fidl::encoding::Depth,
5514        ) -> fidl::Result<()> {
5515            encoder.debug_check_bounds::<MlmeDeauthenticateReqRequest>(offset);
5516            // Zero out padding regions. There's no need to apply masks
5517            // because the unmasked parts will be overwritten by fields.
5518            // Write the fields.
5519            self.0.encode(encoder, offset + 0, depth)?;
5520            Ok(())
5521        }
5522    }
5523
5524    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5525        for MlmeDeauthenticateReqRequest
5526    {
5527        #[inline(always)]
5528        fn new_empty() -> Self {
5529            Self { req: fidl::new_empty!(DeauthenticateRequest, D) }
5530        }
5531
5532        #[inline]
5533        unsafe fn decode(
5534            &mut self,
5535            decoder: &mut fidl::encoding::Decoder<'_, D>,
5536            offset: usize,
5537            _depth: fidl::encoding::Depth,
5538        ) -> fidl::Result<()> {
5539            decoder.debug_check_bounds::<Self>(offset);
5540            // Verify that padding bytes are zero.
5541            fidl::decode!(DeauthenticateRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
5542            Ok(())
5543        }
5544    }
5545
5546    impl fidl::encoding::ValueTypeMarker for MlmeDeleteKeysReqRequest {
5547        type Borrowed<'a> = &'a Self;
5548        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5549            value
5550        }
5551    }
5552
5553    unsafe impl fidl::encoding::TypeMarker for MlmeDeleteKeysReqRequest {
5554        type Owned = Self;
5555
5556        #[inline(always)]
5557        fn inline_align(_context: fidl::encoding::Context) -> usize {
5558            8
5559        }
5560
5561        #[inline(always)]
5562        fn inline_size(_context: fidl::encoding::Context) -> usize {
5563            16
5564        }
5565    }
5566
5567    unsafe impl<D: fidl::encoding::ResourceDialect>
5568        fidl::encoding::Encode<MlmeDeleteKeysReqRequest, D> for &MlmeDeleteKeysReqRequest
5569    {
5570        #[inline]
5571        unsafe fn encode(
5572            self,
5573            encoder: &mut fidl::encoding::Encoder<'_, D>,
5574            offset: usize,
5575            _depth: fidl::encoding::Depth,
5576        ) -> fidl::Result<()> {
5577            encoder.debug_check_bounds::<MlmeDeleteKeysReqRequest>(offset);
5578            // Delegate to tuple encoding.
5579            fidl::encoding::Encode::<MlmeDeleteKeysReqRequest, D>::encode(
5580                (<DeleteKeysRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
5581                encoder,
5582                offset,
5583                _depth,
5584            )
5585        }
5586    }
5587    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<DeleteKeysRequest, D>>
5588        fidl::encoding::Encode<MlmeDeleteKeysReqRequest, D> for (T0,)
5589    {
5590        #[inline]
5591        unsafe fn encode(
5592            self,
5593            encoder: &mut fidl::encoding::Encoder<'_, D>,
5594            offset: usize,
5595            depth: fidl::encoding::Depth,
5596        ) -> fidl::Result<()> {
5597            encoder.debug_check_bounds::<MlmeDeleteKeysReqRequest>(offset);
5598            // Zero out padding regions. There's no need to apply masks
5599            // because the unmasked parts will be overwritten by fields.
5600            // Write the fields.
5601            self.0.encode(encoder, offset + 0, depth)?;
5602            Ok(())
5603        }
5604    }
5605
5606    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5607        for MlmeDeleteKeysReqRequest
5608    {
5609        #[inline(always)]
5610        fn new_empty() -> Self {
5611            Self { req: fidl::new_empty!(DeleteKeysRequest, D) }
5612        }
5613
5614        #[inline]
5615        unsafe fn decode(
5616            &mut self,
5617            decoder: &mut fidl::encoding::Decoder<'_, D>,
5618            offset: usize,
5619            _depth: fidl::encoding::Depth,
5620        ) -> fidl::Result<()> {
5621            decoder.debug_check_bounds::<Self>(offset);
5622            // Verify that padding bytes are zero.
5623            fidl::decode!(DeleteKeysRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
5624            Ok(())
5625        }
5626    }
5627
5628    impl fidl::encoding::ValueTypeMarker for MlmeDisassociateConfRequest {
5629        type Borrowed<'a> = &'a Self;
5630        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5631            value
5632        }
5633    }
5634
5635    unsafe impl fidl::encoding::TypeMarker for MlmeDisassociateConfRequest {
5636        type Owned = Self;
5637
5638        #[inline(always)]
5639        fn inline_align(_context: fidl::encoding::Context) -> usize {
5640            4
5641        }
5642
5643        #[inline(always)]
5644        fn inline_size(_context: fidl::encoding::Context) -> usize {
5645            4
5646        }
5647        #[inline(always)]
5648        fn encode_is_copy() -> bool {
5649            true
5650        }
5651
5652        #[inline(always)]
5653        fn decode_is_copy() -> bool {
5654            true
5655        }
5656    }
5657
5658    unsafe impl<D: fidl::encoding::ResourceDialect>
5659        fidl::encoding::Encode<MlmeDisassociateConfRequest, D> for &MlmeDisassociateConfRequest
5660    {
5661        #[inline]
5662        unsafe fn encode(
5663            self,
5664            encoder: &mut fidl::encoding::Encoder<'_, D>,
5665            offset: usize,
5666            _depth: fidl::encoding::Depth,
5667        ) -> fidl::Result<()> {
5668            encoder.debug_check_bounds::<MlmeDisassociateConfRequest>(offset);
5669            unsafe {
5670                // Copy the object into the buffer.
5671                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5672                (buf_ptr as *mut MlmeDisassociateConfRequest)
5673                    .write_unaligned((self as *const MlmeDisassociateConfRequest).read());
5674                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
5675                // done second because the memcpy will write garbage to these bytes.
5676            }
5677            Ok(())
5678        }
5679    }
5680    unsafe impl<
5681            D: fidl::encoding::ResourceDialect,
5682            T0: fidl::encoding::Encode<DisassociateConfirm, D>,
5683        > fidl::encoding::Encode<MlmeDisassociateConfRequest, D> for (T0,)
5684    {
5685        #[inline]
5686        unsafe fn encode(
5687            self,
5688            encoder: &mut fidl::encoding::Encoder<'_, D>,
5689            offset: usize,
5690            depth: fidl::encoding::Depth,
5691        ) -> fidl::Result<()> {
5692            encoder.debug_check_bounds::<MlmeDisassociateConfRequest>(offset);
5693            // Zero out padding regions. There's no need to apply masks
5694            // because the unmasked parts will be overwritten by fields.
5695            // Write the fields.
5696            self.0.encode(encoder, offset + 0, depth)?;
5697            Ok(())
5698        }
5699    }
5700
5701    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5702        for MlmeDisassociateConfRequest
5703    {
5704        #[inline(always)]
5705        fn new_empty() -> Self {
5706            Self { resp: fidl::new_empty!(DisassociateConfirm, D) }
5707        }
5708
5709        #[inline]
5710        unsafe fn decode(
5711            &mut self,
5712            decoder: &mut fidl::encoding::Decoder<'_, D>,
5713            offset: usize,
5714            _depth: fidl::encoding::Depth,
5715        ) -> fidl::Result<()> {
5716            decoder.debug_check_bounds::<Self>(offset);
5717            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5718            // Verify that padding bytes are zero.
5719            // Copy from the buffer into the object.
5720            unsafe {
5721                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
5722            }
5723            Ok(())
5724        }
5725    }
5726
5727    impl fidl::encoding::ValueTypeMarker for MlmeDisassociateIndRequest {
5728        type Borrowed<'a> = &'a Self;
5729        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5730            value
5731        }
5732    }
5733
5734    unsafe impl fidl::encoding::TypeMarker for MlmeDisassociateIndRequest {
5735        type Owned = Self;
5736
5737        #[inline(always)]
5738        fn inline_align(_context: fidl::encoding::Context) -> usize {
5739            2
5740        }
5741
5742        #[inline(always)]
5743        fn inline_size(_context: fidl::encoding::Context) -> usize {
5744            10
5745        }
5746    }
5747
5748    unsafe impl<D: fidl::encoding::ResourceDialect>
5749        fidl::encoding::Encode<MlmeDisassociateIndRequest, D> for &MlmeDisassociateIndRequest
5750    {
5751        #[inline]
5752        unsafe fn encode(
5753            self,
5754            encoder: &mut fidl::encoding::Encoder<'_, D>,
5755            offset: usize,
5756            _depth: fidl::encoding::Depth,
5757        ) -> fidl::Result<()> {
5758            encoder.debug_check_bounds::<MlmeDisassociateIndRequest>(offset);
5759            // Delegate to tuple encoding.
5760            fidl::encoding::Encode::<MlmeDisassociateIndRequest, D>::encode(
5761                (<DisassociateIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),),
5762                encoder,
5763                offset,
5764                _depth,
5765            )
5766        }
5767    }
5768    unsafe impl<
5769            D: fidl::encoding::ResourceDialect,
5770            T0: fidl::encoding::Encode<DisassociateIndication, D>,
5771        > fidl::encoding::Encode<MlmeDisassociateIndRequest, D> for (T0,)
5772    {
5773        #[inline]
5774        unsafe fn encode(
5775            self,
5776            encoder: &mut fidl::encoding::Encoder<'_, D>,
5777            offset: usize,
5778            depth: fidl::encoding::Depth,
5779        ) -> fidl::Result<()> {
5780            encoder.debug_check_bounds::<MlmeDisassociateIndRequest>(offset);
5781            // Zero out padding regions. There's no need to apply masks
5782            // because the unmasked parts will be overwritten by fields.
5783            // Write the fields.
5784            self.0.encode(encoder, offset + 0, depth)?;
5785            Ok(())
5786        }
5787    }
5788
5789    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5790        for MlmeDisassociateIndRequest
5791    {
5792        #[inline(always)]
5793        fn new_empty() -> Self {
5794            Self { ind: fidl::new_empty!(DisassociateIndication, D) }
5795        }
5796
5797        #[inline]
5798        unsafe fn decode(
5799            &mut self,
5800            decoder: &mut fidl::encoding::Decoder<'_, D>,
5801            offset: usize,
5802            _depth: fidl::encoding::Depth,
5803        ) -> fidl::Result<()> {
5804            decoder.debug_check_bounds::<Self>(offset);
5805            // Verify that padding bytes are zero.
5806            fidl::decode!(DisassociateIndication, D, &mut self.ind, decoder, offset + 0, _depth)?;
5807            Ok(())
5808        }
5809    }
5810
5811    impl fidl::encoding::ValueTypeMarker for MlmeDisassociateReqRequest {
5812        type Borrowed<'a> = &'a Self;
5813        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5814            value
5815        }
5816    }
5817
5818    unsafe impl fidl::encoding::TypeMarker for MlmeDisassociateReqRequest {
5819        type Owned = Self;
5820
5821        #[inline(always)]
5822        fn inline_align(_context: fidl::encoding::Context) -> usize {
5823            2
5824        }
5825
5826        #[inline(always)]
5827        fn inline_size(_context: fidl::encoding::Context) -> usize {
5828            8
5829        }
5830    }
5831
5832    unsafe impl<D: fidl::encoding::ResourceDialect>
5833        fidl::encoding::Encode<MlmeDisassociateReqRequest, D> for &MlmeDisassociateReqRequest
5834    {
5835        #[inline]
5836        unsafe fn encode(
5837            self,
5838            encoder: &mut fidl::encoding::Encoder<'_, D>,
5839            offset: usize,
5840            _depth: fidl::encoding::Depth,
5841        ) -> fidl::Result<()> {
5842            encoder.debug_check_bounds::<MlmeDisassociateReqRequest>(offset);
5843            // Delegate to tuple encoding.
5844            fidl::encoding::Encode::<MlmeDisassociateReqRequest, D>::encode(
5845                (<DisassociateRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
5846                encoder,
5847                offset,
5848                _depth,
5849            )
5850        }
5851    }
5852    unsafe impl<
5853            D: fidl::encoding::ResourceDialect,
5854            T0: fidl::encoding::Encode<DisassociateRequest, D>,
5855        > fidl::encoding::Encode<MlmeDisassociateReqRequest, D> for (T0,)
5856    {
5857        #[inline]
5858        unsafe fn encode(
5859            self,
5860            encoder: &mut fidl::encoding::Encoder<'_, D>,
5861            offset: usize,
5862            depth: fidl::encoding::Depth,
5863        ) -> fidl::Result<()> {
5864            encoder.debug_check_bounds::<MlmeDisassociateReqRequest>(offset);
5865            // Zero out padding regions. There's no need to apply masks
5866            // because the unmasked parts will be overwritten by fields.
5867            // Write the fields.
5868            self.0.encode(encoder, offset + 0, depth)?;
5869            Ok(())
5870        }
5871    }
5872
5873    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5874        for MlmeDisassociateReqRequest
5875    {
5876        #[inline(always)]
5877        fn new_empty() -> Self {
5878            Self { req: fidl::new_empty!(DisassociateRequest, D) }
5879        }
5880
5881        #[inline]
5882        unsafe fn decode(
5883            &mut self,
5884            decoder: &mut fidl::encoding::Decoder<'_, D>,
5885            offset: usize,
5886            _depth: fidl::encoding::Depth,
5887        ) -> fidl::Result<()> {
5888            decoder.debug_check_bounds::<Self>(offset);
5889            // Verify that padding bytes are zero.
5890            fidl::decode!(DisassociateRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
5891            Ok(())
5892        }
5893    }
5894
5895    impl fidl::encoding::ValueTypeMarker for MlmeEapolConfRequest {
5896        type Borrowed<'a> = &'a Self;
5897        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5898            value
5899        }
5900    }
5901
5902    unsafe impl fidl::encoding::TypeMarker for MlmeEapolConfRequest {
5903        type Owned = Self;
5904
5905        #[inline(always)]
5906        fn inline_align(_context: fidl::encoding::Context) -> usize {
5907            4
5908        }
5909
5910        #[inline(always)]
5911        fn inline_size(_context: fidl::encoding::Context) -> usize {
5912            12
5913        }
5914    }
5915
5916    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeEapolConfRequest, D>
5917        for &MlmeEapolConfRequest
5918    {
5919        #[inline]
5920        unsafe fn encode(
5921            self,
5922            encoder: &mut fidl::encoding::Encoder<'_, D>,
5923            offset: usize,
5924            _depth: fidl::encoding::Depth,
5925        ) -> fidl::Result<()> {
5926            encoder.debug_check_bounds::<MlmeEapolConfRequest>(offset);
5927            // Delegate to tuple encoding.
5928            fidl::encoding::Encode::<MlmeEapolConfRequest, D>::encode(
5929                (<EapolConfirm as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
5930                encoder,
5931                offset,
5932                _depth,
5933            )
5934        }
5935    }
5936    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EapolConfirm, D>>
5937        fidl::encoding::Encode<MlmeEapolConfRequest, D> for (T0,)
5938    {
5939        #[inline]
5940        unsafe fn encode(
5941            self,
5942            encoder: &mut fidl::encoding::Encoder<'_, D>,
5943            offset: usize,
5944            depth: fidl::encoding::Depth,
5945        ) -> fidl::Result<()> {
5946            encoder.debug_check_bounds::<MlmeEapolConfRequest>(offset);
5947            // Zero out padding regions. There's no need to apply masks
5948            // because the unmasked parts will be overwritten by fields.
5949            // Write the fields.
5950            self.0.encode(encoder, offset + 0, depth)?;
5951            Ok(())
5952        }
5953    }
5954
5955    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeEapolConfRequest {
5956        #[inline(always)]
5957        fn new_empty() -> Self {
5958            Self { resp: fidl::new_empty!(EapolConfirm, D) }
5959        }
5960
5961        #[inline]
5962        unsafe fn decode(
5963            &mut self,
5964            decoder: &mut fidl::encoding::Decoder<'_, D>,
5965            offset: usize,
5966            _depth: fidl::encoding::Depth,
5967        ) -> fidl::Result<()> {
5968            decoder.debug_check_bounds::<Self>(offset);
5969            // Verify that padding bytes are zero.
5970            fidl::decode!(EapolConfirm, D, &mut self.resp, decoder, offset + 0, _depth)?;
5971            Ok(())
5972        }
5973    }
5974
5975    impl fidl::encoding::ValueTypeMarker for MlmeEapolIndRequest {
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 MlmeEapolIndRequest {
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            32
5993        }
5994    }
5995
5996    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeEapolIndRequest, D>
5997        for &MlmeEapolIndRequest
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::<MlmeEapolIndRequest>(offset);
6007            // Delegate to tuple encoding.
6008            fidl::encoding::Encode::<MlmeEapolIndRequest, D>::encode(
6009                (<EapolIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),),
6010                encoder,
6011                offset,
6012                _depth,
6013            )
6014        }
6015    }
6016    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EapolIndication, D>>
6017        fidl::encoding::Encode<MlmeEapolIndRequest, D> for (T0,)
6018    {
6019        #[inline]
6020        unsafe fn encode(
6021            self,
6022            encoder: &mut fidl::encoding::Encoder<'_, D>,
6023            offset: usize,
6024            depth: fidl::encoding::Depth,
6025        ) -> fidl::Result<()> {
6026            encoder.debug_check_bounds::<MlmeEapolIndRequest>(offset);
6027            // Zero out padding regions. There's no need to apply masks
6028            // because the unmasked parts will be overwritten by fields.
6029            // Write the fields.
6030            self.0.encode(encoder, offset + 0, depth)?;
6031            Ok(())
6032        }
6033    }
6034
6035    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeEapolIndRequest {
6036        #[inline(always)]
6037        fn new_empty() -> Self {
6038            Self { ind: fidl::new_empty!(EapolIndication, D) }
6039        }
6040
6041        #[inline]
6042        unsafe fn decode(
6043            &mut self,
6044            decoder: &mut fidl::encoding::Decoder<'_, D>,
6045            offset: usize,
6046            _depth: fidl::encoding::Depth,
6047        ) -> fidl::Result<()> {
6048            decoder.debug_check_bounds::<Self>(offset);
6049            // Verify that padding bytes are zero.
6050            fidl::decode!(EapolIndication, D, &mut self.ind, decoder, offset + 0, _depth)?;
6051            Ok(())
6052        }
6053    }
6054
6055    impl fidl::encoding::ValueTypeMarker for MlmeEapolReqRequest {
6056        type Borrowed<'a> = &'a Self;
6057        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6058            value
6059        }
6060    }
6061
6062    unsafe impl fidl::encoding::TypeMarker for MlmeEapolReqRequest {
6063        type Owned = Self;
6064
6065        #[inline(always)]
6066        fn inline_align(_context: fidl::encoding::Context) -> usize {
6067            8
6068        }
6069
6070        #[inline(always)]
6071        fn inline_size(_context: fidl::encoding::Context) -> usize {
6072            32
6073        }
6074    }
6075
6076    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeEapolReqRequest, D>
6077        for &MlmeEapolReqRequest
6078    {
6079        #[inline]
6080        unsafe fn encode(
6081            self,
6082            encoder: &mut fidl::encoding::Encoder<'_, D>,
6083            offset: usize,
6084            _depth: fidl::encoding::Depth,
6085        ) -> fidl::Result<()> {
6086            encoder.debug_check_bounds::<MlmeEapolReqRequest>(offset);
6087            // Delegate to tuple encoding.
6088            fidl::encoding::Encode::<MlmeEapolReqRequest, D>::encode(
6089                (<EapolRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
6090                encoder,
6091                offset,
6092                _depth,
6093            )
6094        }
6095    }
6096    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EapolRequest, D>>
6097        fidl::encoding::Encode<MlmeEapolReqRequest, D> for (T0,)
6098    {
6099        #[inline]
6100        unsafe fn encode(
6101            self,
6102            encoder: &mut fidl::encoding::Encoder<'_, D>,
6103            offset: usize,
6104            depth: fidl::encoding::Depth,
6105        ) -> fidl::Result<()> {
6106            encoder.debug_check_bounds::<MlmeEapolReqRequest>(offset);
6107            // Zero out padding regions. There's no need to apply masks
6108            // because the unmasked parts will be overwritten by fields.
6109            // Write the fields.
6110            self.0.encode(encoder, offset + 0, depth)?;
6111            Ok(())
6112        }
6113    }
6114
6115    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeEapolReqRequest {
6116        #[inline(always)]
6117        fn new_empty() -> Self {
6118            Self { req: fidl::new_empty!(EapolRequest, D) }
6119        }
6120
6121        #[inline]
6122        unsafe fn decode(
6123            &mut self,
6124            decoder: &mut fidl::encoding::Decoder<'_, D>,
6125            offset: usize,
6126            _depth: fidl::encoding::Depth,
6127        ) -> fidl::Result<()> {
6128            decoder.debug_check_bounds::<Self>(offset);
6129            // Verify that padding bytes are zero.
6130            fidl::decode!(EapolRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
6131            Ok(())
6132        }
6133    }
6134
6135    impl fidl::encoding::ValueTypeMarker for MlmeFinalizeAssociationReqRequest {
6136        type Borrowed<'a> = &'a Self;
6137        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6138            value
6139        }
6140    }
6141
6142    unsafe impl fidl::encoding::TypeMarker for MlmeFinalizeAssociationReqRequest {
6143        type Owned = Self;
6144
6145        #[inline(always)]
6146        fn inline_align(_context: fidl::encoding::Context) -> usize {
6147            8
6148        }
6149
6150        #[inline(always)]
6151        fn inline_size(_context: fidl::encoding::Context) -> usize {
6152            56
6153        }
6154    }
6155
6156    unsafe impl<D: fidl::encoding::ResourceDialect>
6157        fidl::encoding::Encode<MlmeFinalizeAssociationReqRequest, D>
6158        for &MlmeFinalizeAssociationReqRequest
6159    {
6160        #[inline]
6161        unsafe fn encode(
6162            self,
6163            encoder: &mut fidl::encoding::Encoder<'_, D>,
6164            offset: usize,
6165            _depth: fidl::encoding::Depth,
6166        ) -> fidl::Result<()> {
6167            encoder.debug_check_bounds::<MlmeFinalizeAssociationReqRequest>(offset);
6168            // Delegate to tuple encoding.
6169            fidl::encoding::Encode::<MlmeFinalizeAssociationReqRequest, D>::encode(
6170                (<NegotiatedCapabilities as fidl::encoding::ValueTypeMarker>::borrow(
6171                    &self.negotiated_capabilities,
6172                ),),
6173                encoder,
6174                offset,
6175                _depth,
6176            )
6177        }
6178    }
6179    unsafe impl<
6180            D: fidl::encoding::ResourceDialect,
6181            T0: fidl::encoding::Encode<NegotiatedCapabilities, D>,
6182        > fidl::encoding::Encode<MlmeFinalizeAssociationReqRequest, D> for (T0,)
6183    {
6184        #[inline]
6185        unsafe fn encode(
6186            self,
6187            encoder: &mut fidl::encoding::Encoder<'_, D>,
6188            offset: usize,
6189            depth: fidl::encoding::Depth,
6190        ) -> fidl::Result<()> {
6191            encoder.debug_check_bounds::<MlmeFinalizeAssociationReqRequest>(offset);
6192            // Zero out padding regions. There's no need to apply masks
6193            // because the unmasked parts will be overwritten by fields.
6194            // Write the fields.
6195            self.0.encode(encoder, offset + 0, depth)?;
6196            Ok(())
6197        }
6198    }
6199
6200    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6201        for MlmeFinalizeAssociationReqRequest
6202    {
6203        #[inline(always)]
6204        fn new_empty() -> Self {
6205            Self { negotiated_capabilities: fidl::new_empty!(NegotiatedCapabilities, D) }
6206        }
6207
6208        #[inline]
6209        unsafe fn decode(
6210            &mut self,
6211            decoder: &mut fidl::encoding::Decoder<'_, D>,
6212            offset: usize,
6213            _depth: fidl::encoding::Depth,
6214        ) -> fidl::Result<()> {
6215            decoder.debug_check_bounds::<Self>(offset);
6216            // Verify that padding bytes are zero.
6217            fidl::decode!(
6218                NegotiatedCapabilities,
6219                D,
6220                &mut self.negotiated_capabilities,
6221                decoder,
6222                offset + 0,
6223                _depth
6224            )?;
6225            Ok(())
6226        }
6227    }
6228
6229    impl fidl::encoding::ValueTypeMarker for MlmeGetIfaceHistogramStatsResponse {
6230        type Borrowed<'a> = &'a Self;
6231        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6232            value
6233        }
6234    }
6235
6236    unsafe impl fidl::encoding::TypeMarker for MlmeGetIfaceHistogramStatsResponse {
6237        type Owned = Self;
6238
6239        #[inline(always)]
6240        fn inline_align(_context: fidl::encoding::Context) -> usize {
6241            8
6242        }
6243
6244        #[inline(always)]
6245        fn inline_size(_context: fidl::encoding::Context) -> usize {
6246            16
6247        }
6248    }
6249
6250    unsafe impl<D: fidl::encoding::ResourceDialect>
6251        fidl::encoding::Encode<MlmeGetIfaceHistogramStatsResponse, D>
6252        for &MlmeGetIfaceHistogramStatsResponse
6253    {
6254        #[inline]
6255        unsafe fn encode(
6256            self,
6257            encoder: &mut fidl::encoding::Encoder<'_, D>,
6258            offset: usize,
6259            _depth: fidl::encoding::Depth,
6260        ) -> fidl::Result<()> {
6261            encoder.debug_check_bounds::<MlmeGetIfaceHistogramStatsResponse>(offset);
6262            // Delegate to tuple encoding.
6263            fidl::encoding::Encode::<MlmeGetIfaceHistogramStatsResponse, D>::encode(
6264                (<GetIfaceHistogramStatsResponse as fidl::encoding::ValueTypeMarker>::borrow(
6265                    &self.resp,
6266                ),),
6267                encoder,
6268                offset,
6269                _depth,
6270            )
6271        }
6272    }
6273    unsafe impl<
6274            D: fidl::encoding::ResourceDialect,
6275            T0: fidl::encoding::Encode<GetIfaceHistogramStatsResponse, D>,
6276        > fidl::encoding::Encode<MlmeGetIfaceHistogramStatsResponse, D> for (T0,)
6277    {
6278        #[inline]
6279        unsafe fn encode(
6280            self,
6281            encoder: &mut fidl::encoding::Encoder<'_, D>,
6282            offset: usize,
6283            depth: fidl::encoding::Depth,
6284        ) -> fidl::Result<()> {
6285            encoder.debug_check_bounds::<MlmeGetIfaceHistogramStatsResponse>(offset);
6286            // Zero out padding regions. There's no need to apply masks
6287            // because the unmasked parts will be overwritten by fields.
6288            // Write the fields.
6289            self.0.encode(encoder, offset + 0, depth)?;
6290            Ok(())
6291        }
6292    }
6293
6294    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6295        for MlmeGetIfaceHistogramStatsResponse
6296    {
6297        #[inline(always)]
6298        fn new_empty() -> Self {
6299            Self { resp: fidl::new_empty!(GetIfaceHistogramStatsResponse, D) }
6300        }
6301
6302        #[inline]
6303        unsafe fn decode(
6304            &mut self,
6305            decoder: &mut fidl::encoding::Decoder<'_, D>,
6306            offset: usize,
6307            _depth: fidl::encoding::Depth,
6308        ) -> fidl::Result<()> {
6309            decoder.debug_check_bounds::<Self>(offset);
6310            // Verify that padding bytes are zero.
6311            fidl::decode!(
6312                GetIfaceHistogramStatsResponse,
6313                D,
6314                &mut self.resp,
6315                decoder,
6316                offset + 0,
6317                _depth
6318            )?;
6319            Ok(())
6320        }
6321    }
6322
6323    impl fidl::encoding::ValueTypeMarker for MlmeGetIfaceStatsResponse {
6324        type Borrowed<'a> = &'a Self;
6325        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6326            value
6327        }
6328    }
6329
6330    unsafe impl fidl::encoding::TypeMarker for MlmeGetIfaceStatsResponse {
6331        type Owned = Self;
6332
6333        #[inline(always)]
6334        fn inline_align(_context: fidl::encoding::Context) -> usize {
6335            8
6336        }
6337
6338        #[inline(always)]
6339        fn inline_size(_context: fidl::encoding::Context) -> usize {
6340            16
6341        }
6342    }
6343
6344    unsafe impl<D: fidl::encoding::ResourceDialect>
6345        fidl::encoding::Encode<MlmeGetIfaceStatsResponse, D> for &MlmeGetIfaceStatsResponse
6346    {
6347        #[inline]
6348        unsafe fn encode(
6349            self,
6350            encoder: &mut fidl::encoding::Encoder<'_, D>,
6351            offset: usize,
6352            _depth: fidl::encoding::Depth,
6353        ) -> fidl::Result<()> {
6354            encoder.debug_check_bounds::<MlmeGetIfaceStatsResponse>(offset);
6355            // Delegate to tuple encoding.
6356            fidl::encoding::Encode::<MlmeGetIfaceStatsResponse, D>::encode(
6357                (<GetIfaceStatsResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
6358                encoder,
6359                offset,
6360                _depth,
6361            )
6362        }
6363    }
6364    unsafe impl<
6365            D: fidl::encoding::ResourceDialect,
6366            T0: fidl::encoding::Encode<GetIfaceStatsResponse, D>,
6367        > fidl::encoding::Encode<MlmeGetIfaceStatsResponse, D> for (T0,)
6368    {
6369        #[inline]
6370        unsafe fn encode(
6371            self,
6372            encoder: &mut fidl::encoding::Encoder<'_, D>,
6373            offset: usize,
6374            depth: fidl::encoding::Depth,
6375        ) -> fidl::Result<()> {
6376            encoder.debug_check_bounds::<MlmeGetIfaceStatsResponse>(offset);
6377            // Zero out padding regions. There's no need to apply masks
6378            // because the unmasked parts will be overwritten by fields.
6379            // Write the fields.
6380            self.0.encode(encoder, offset + 0, depth)?;
6381            Ok(())
6382        }
6383    }
6384
6385    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6386        for MlmeGetIfaceStatsResponse
6387    {
6388        #[inline(always)]
6389        fn new_empty() -> Self {
6390            Self { resp: fidl::new_empty!(GetIfaceStatsResponse, D) }
6391        }
6392
6393        #[inline]
6394        unsafe fn decode(
6395            &mut self,
6396            decoder: &mut fidl::encoding::Decoder<'_, D>,
6397            offset: usize,
6398            _depth: fidl::encoding::Depth,
6399        ) -> fidl::Result<()> {
6400            decoder.debug_check_bounds::<Self>(offset);
6401            // Verify that padding bytes are zero.
6402            fidl::decode!(GetIfaceStatsResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
6403            Ok(())
6404        }
6405    }
6406
6407    impl fidl::encoding::ValueTypeMarker for MlmeGetMinstrelStatsRequest {
6408        type Borrowed<'a> = &'a Self;
6409        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6410            value
6411        }
6412    }
6413
6414    unsafe impl fidl::encoding::TypeMarker for MlmeGetMinstrelStatsRequest {
6415        type Owned = Self;
6416
6417        #[inline(always)]
6418        fn inline_align(_context: fidl::encoding::Context) -> usize {
6419            1
6420        }
6421
6422        #[inline(always)]
6423        fn inline_size(_context: fidl::encoding::Context) -> usize {
6424            6
6425        }
6426        #[inline(always)]
6427        fn encode_is_copy() -> bool {
6428            true
6429        }
6430
6431        #[inline(always)]
6432        fn decode_is_copy() -> bool {
6433            true
6434        }
6435    }
6436
6437    unsafe impl<D: fidl::encoding::ResourceDialect>
6438        fidl::encoding::Encode<MlmeGetMinstrelStatsRequest, D> for &MlmeGetMinstrelStatsRequest
6439    {
6440        #[inline]
6441        unsafe fn encode(
6442            self,
6443            encoder: &mut fidl::encoding::Encoder<'_, D>,
6444            offset: usize,
6445            _depth: fidl::encoding::Depth,
6446        ) -> fidl::Result<()> {
6447            encoder.debug_check_bounds::<MlmeGetMinstrelStatsRequest>(offset);
6448            unsafe {
6449                // Copy the object into the buffer.
6450                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6451                (buf_ptr as *mut MlmeGetMinstrelStatsRequest)
6452                    .write_unaligned((self as *const MlmeGetMinstrelStatsRequest).read());
6453                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6454                // done second because the memcpy will write garbage to these bytes.
6455            }
6456            Ok(())
6457        }
6458    }
6459    unsafe impl<
6460            D: fidl::encoding::ResourceDialect,
6461            T0: fidl::encoding::Encode<MinstrelStatsRequest, D>,
6462        > fidl::encoding::Encode<MlmeGetMinstrelStatsRequest, D> for (T0,)
6463    {
6464        #[inline]
6465        unsafe fn encode(
6466            self,
6467            encoder: &mut fidl::encoding::Encoder<'_, D>,
6468            offset: usize,
6469            depth: fidl::encoding::Depth,
6470        ) -> fidl::Result<()> {
6471            encoder.debug_check_bounds::<MlmeGetMinstrelStatsRequest>(offset);
6472            // Zero out padding regions. There's no need to apply masks
6473            // because the unmasked parts will be overwritten by fields.
6474            // Write the fields.
6475            self.0.encode(encoder, offset + 0, depth)?;
6476            Ok(())
6477        }
6478    }
6479
6480    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6481        for MlmeGetMinstrelStatsRequest
6482    {
6483        #[inline(always)]
6484        fn new_empty() -> Self {
6485            Self { req: fidl::new_empty!(MinstrelStatsRequest, D) }
6486        }
6487
6488        #[inline]
6489        unsafe fn decode(
6490            &mut self,
6491            decoder: &mut fidl::encoding::Decoder<'_, D>,
6492            offset: usize,
6493            _depth: fidl::encoding::Depth,
6494        ) -> fidl::Result<()> {
6495            decoder.debug_check_bounds::<Self>(offset);
6496            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6497            // Verify that padding bytes are zero.
6498            // Copy from the buffer into the object.
6499            unsafe {
6500                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
6501            }
6502            Ok(())
6503        }
6504    }
6505
6506    impl fidl::encoding::ValueTypeMarker for MlmeGetMinstrelStatsResponse {
6507        type Borrowed<'a> = &'a Self;
6508        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6509            value
6510        }
6511    }
6512
6513    unsafe impl fidl::encoding::TypeMarker for MlmeGetMinstrelStatsResponse {
6514        type Owned = Self;
6515
6516        #[inline(always)]
6517        fn inline_align(_context: fidl::encoding::Context) -> usize {
6518            8
6519        }
6520
6521        #[inline(always)]
6522        fn inline_size(_context: fidl::encoding::Context) -> usize {
6523            8
6524        }
6525    }
6526
6527    unsafe impl<D: fidl::encoding::ResourceDialect>
6528        fidl::encoding::Encode<MlmeGetMinstrelStatsResponse, D> for &MlmeGetMinstrelStatsResponse
6529    {
6530        #[inline]
6531        unsafe fn encode(
6532            self,
6533            encoder: &mut fidl::encoding::Encoder<'_, D>,
6534            offset: usize,
6535            _depth: fidl::encoding::Depth,
6536        ) -> fidl::Result<()> {
6537            encoder.debug_check_bounds::<MlmeGetMinstrelStatsResponse>(offset);
6538            // Delegate to tuple encoding.
6539            fidl::encoding::Encode::<MlmeGetMinstrelStatsResponse, D>::encode(
6540                (<MinstrelStatsResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
6541                encoder,
6542                offset,
6543                _depth,
6544            )
6545        }
6546    }
6547    unsafe impl<
6548            D: fidl::encoding::ResourceDialect,
6549            T0: fidl::encoding::Encode<MinstrelStatsResponse, D>,
6550        > fidl::encoding::Encode<MlmeGetMinstrelStatsResponse, D> for (T0,)
6551    {
6552        #[inline]
6553        unsafe fn encode(
6554            self,
6555            encoder: &mut fidl::encoding::Encoder<'_, D>,
6556            offset: usize,
6557            depth: fidl::encoding::Depth,
6558        ) -> fidl::Result<()> {
6559            encoder.debug_check_bounds::<MlmeGetMinstrelStatsResponse>(offset);
6560            // Zero out padding regions. There's no need to apply masks
6561            // because the unmasked parts will be overwritten by fields.
6562            // Write the fields.
6563            self.0.encode(encoder, offset + 0, depth)?;
6564            Ok(())
6565        }
6566    }
6567
6568    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6569        for MlmeGetMinstrelStatsResponse
6570    {
6571        #[inline(always)]
6572        fn new_empty() -> Self {
6573            Self { resp: fidl::new_empty!(MinstrelStatsResponse, D) }
6574        }
6575
6576        #[inline]
6577        unsafe fn decode(
6578            &mut self,
6579            decoder: &mut fidl::encoding::Decoder<'_, D>,
6580            offset: usize,
6581            _depth: fidl::encoding::Depth,
6582        ) -> fidl::Result<()> {
6583            decoder.debug_check_bounds::<Self>(offset);
6584            // Verify that padding bytes are zero.
6585            fidl::decode!(MinstrelStatsResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
6586            Ok(())
6587        }
6588    }
6589
6590    impl fidl::encoding::ValueTypeMarker for MlmeListMinstrelPeersResponse {
6591        type Borrowed<'a> = &'a Self;
6592        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6593            value
6594        }
6595    }
6596
6597    unsafe impl fidl::encoding::TypeMarker for MlmeListMinstrelPeersResponse {
6598        type Owned = Self;
6599
6600        #[inline(always)]
6601        fn inline_align(_context: fidl::encoding::Context) -> usize {
6602            8
6603        }
6604
6605        #[inline(always)]
6606        fn inline_size(_context: fidl::encoding::Context) -> usize {
6607            16
6608        }
6609    }
6610
6611    unsafe impl<D: fidl::encoding::ResourceDialect>
6612        fidl::encoding::Encode<MlmeListMinstrelPeersResponse, D>
6613        for &MlmeListMinstrelPeersResponse
6614    {
6615        #[inline]
6616        unsafe fn encode(
6617            self,
6618            encoder: &mut fidl::encoding::Encoder<'_, D>,
6619            offset: usize,
6620            _depth: fidl::encoding::Depth,
6621        ) -> fidl::Result<()> {
6622            encoder.debug_check_bounds::<MlmeListMinstrelPeersResponse>(offset);
6623            // Delegate to tuple encoding.
6624            fidl::encoding::Encode::<MlmeListMinstrelPeersResponse, D>::encode(
6625                (<MinstrelListResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
6626                encoder,
6627                offset,
6628                _depth,
6629            )
6630        }
6631    }
6632    unsafe impl<
6633            D: fidl::encoding::ResourceDialect,
6634            T0: fidl::encoding::Encode<MinstrelListResponse, D>,
6635        > fidl::encoding::Encode<MlmeListMinstrelPeersResponse, D> for (T0,)
6636    {
6637        #[inline]
6638        unsafe fn encode(
6639            self,
6640            encoder: &mut fidl::encoding::Encoder<'_, D>,
6641            offset: usize,
6642            depth: fidl::encoding::Depth,
6643        ) -> fidl::Result<()> {
6644            encoder.debug_check_bounds::<MlmeListMinstrelPeersResponse>(offset);
6645            // Zero out padding regions. There's no need to apply masks
6646            // because the unmasked parts will be overwritten by fields.
6647            // Write the fields.
6648            self.0.encode(encoder, offset + 0, depth)?;
6649            Ok(())
6650        }
6651    }
6652
6653    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6654        for MlmeListMinstrelPeersResponse
6655    {
6656        #[inline(always)]
6657        fn new_empty() -> Self {
6658            Self { resp: fidl::new_empty!(MinstrelListResponse, D) }
6659        }
6660
6661        #[inline]
6662        unsafe fn decode(
6663            &mut self,
6664            decoder: &mut fidl::encoding::Decoder<'_, D>,
6665            offset: usize,
6666            _depth: fidl::encoding::Depth,
6667        ) -> fidl::Result<()> {
6668            decoder.debug_check_bounds::<Self>(offset);
6669            // Verify that padding bytes are zero.
6670            fidl::decode!(MinstrelListResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
6671            Ok(())
6672        }
6673    }
6674
6675    impl fidl::encoding::ValueTypeMarker for MlmeOnChannelSwitchedRequest {
6676        type Borrowed<'a> = &'a Self;
6677        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6678            value
6679        }
6680    }
6681
6682    unsafe impl fidl::encoding::TypeMarker for MlmeOnChannelSwitchedRequest {
6683        type Owned = Self;
6684
6685        #[inline(always)]
6686        fn inline_align(_context: fidl::encoding::Context) -> usize {
6687            1
6688        }
6689
6690        #[inline(always)]
6691        fn inline_size(_context: fidl::encoding::Context) -> usize {
6692            1
6693        }
6694    }
6695
6696    unsafe impl<D: fidl::encoding::ResourceDialect>
6697        fidl::encoding::Encode<MlmeOnChannelSwitchedRequest, D> for &MlmeOnChannelSwitchedRequest
6698    {
6699        #[inline]
6700        unsafe fn encode(
6701            self,
6702            encoder: &mut fidl::encoding::Encoder<'_, D>,
6703            offset: usize,
6704            _depth: fidl::encoding::Depth,
6705        ) -> fidl::Result<()> {
6706            encoder.debug_check_bounds::<MlmeOnChannelSwitchedRequest>(offset);
6707            // Delegate to tuple encoding.
6708            fidl::encoding::Encode::<MlmeOnChannelSwitchedRequest, D>::encode(
6709                (
6710                    <fidl_fuchsia_wlan_internal::ChannelSwitchInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),
6711                ),
6712                encoder, offset, _depth
6713            )
6714        }
6715    }
6716    unsafe impl<
6717            D: fidl::encoding::ResourceDialect,
6718            T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal::ChannelSwitchInfo, D>,
6719        > fidl::encoding::Encode<MlmeOnChannelSwitchedRequest, D> for (T0,)
6720    {
6721        #[inline]
6722        unsafe fn encode(
6723            self,
6724            encoder: &mut fidl::encoding::Encoder<'_, D>,
6725            offset: usize,
6726            depth: fidl::encoding::Depth,
6727        ) -> fidl::Result<()> {
6728            encoder.debug_check_bounds::<MlmeOnChannelSwitchedRequest>(offset);
6729            // Zero out padding regions. There's no need to apply masks
6730            // because the unmasked parts will be overwritten by fields.
6731            // Write the fields.
6732            self.0.encode(encoder, offset + 0, depth)?;
6733            Ok(())
6734        }
6735    }
6736
6737    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6738        for MlmeOnChannelSwitchedRequest
6739    {
6740        #[inline(always)]
6741        fn new_empty() -> Self {
6742            Self { info: fidl::new_empty!(fidl_fuchsia_wlan_internal::ChannelSwitchInfo, D) }
6743        }
6744
6745        #[inline]
6746        unsafe fn decode(
6747            &mut self,
6748            decoder: &mut fidl::encoding::Decoder<'_, D>,
6749            offset: usize,
6750            _depth: fidl::encoding::Depth,
6751        ) -> fidl::Result<()> {
6752            decoder.debug_check_bounds::<Self>(offset);
6753            // Verify that padding bytes are zero.
6754            fidl::decode!(
6755                fidl_fuchsia_wlan_internal::ChannelSwitchInfo,
6756                D,
6757                &mut self.info,
6758                decoder,
6759                offset + 0,
6760                _depth
6761            )?;
6762            Ok(())
6763        }
6764    }
6765
6766    impl fidl::encoding::ValueTypeMarker for MlmeOnPmkAvailableRequest {
6767        type Borrowed<'a> = &'a Self;
6768        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6769            value
6770        }
6771    }
6772
6773    unsafe impl fidl::encoding::TypeMarker for MlmeOnPmkAvailableRequest {
6774        type Owned = Self;
6775
6776        #[inline(always)]
6777        fn inline_align(_context: fidl::encoding::Context) -> usize {
6778            8
6779        }
6780
6781        #[inline(always)]
6782        fn inline_size(_context: fidl::encoding::Context) -> usize {
6783            32
6784        }
6785    }
6786
6787    unsafe impl<D: fidl::encoding::ResourceDialect>
6788        fidl::encoding::Encode<MlmeOnPmkAvailableRequest, D> for &MlmeOnPmkAvailableRequest
6789    {
6790        #[inline]
6791        unsafe fn encode(
6792            self,
6793            encoder: &mut fidl::encoding::Encoder<'_, D>,
6794            offset: usize,
6795            _depth: fidl::encoding::Depth,
6796        ) -> fidl::Result<()> {
6797            encoder.debug_check_bounds::<MlmeOnPmkAvailableRequest>(offset);
6798            // Delegate to tuple encoding.
6799            fidl::encoding::Encode::<MlmeOnPmkAvailableRequest, D>::encode(
6800                (<PmkInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),),
6801                encoder,
6802                offset,
6803                _depth,
6804            )
6805        }
6806    }
6807    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<PmkInfo, D>>
6808        fidl::encoding::Encode<MlmeOnPmkAvailableRequest, D> for (T0,)
6809    {
6810        #[inline]
6811        unsafe fn encode(
6812            self,
6813            encoder: &mut fidl::encoding::Encoder<'_, D>,
6814            offset: usize,
6815            depth: fidl::encoding::Depth,
6816        ) -> fidl::Result<()> {
6817            encoder.debug_check_bounds::<MlmeOnPmkAvailableRequest>(offset);
6818            // Zero out padding regions. There's no need to apply masks
6819            // because the unmasked parts will be overwritten by fields.
6820            // Write the fields.
6821            self.0.encode(encoder, offset + 0, depth)?;
6822            Ok(())
6823        }
6824    }
6825
6826    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6827        for MlmeOnPmkAvailableRequest
6828    {
6829        #[inline(always)]
6830        fn new_empty() -> Self {
6831            Self { info: fidl::new_empty!(PmkInfo, D) }
6832        }
6833
6834        #[inline]
6835        unsafe fn decode(
6836            &mut self,
6837            decoder: &mut fidl::encoding::Decoder<'_, D>,
6838            offset: usize,
6839            _depth: fidl::encoding::Depth,
6840        ) -> fidl::Result<()> {
6841            decoder.debug_check_bounds::<Self>(offset);
6842            // Verify that padding bytes are zero.
6843            fidl::decode!(PmkInfo, D, &mut self.info, decoder, offset + 0, _depth)?;
6844            Ok(())
6845        }
6846    }
6847
6848    impl fidl::encoding::ValueTypeMarker for MlmeOnSaeFrameRxRequest {
6849        type Borrowed<'a> = &'a Self;
6850        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6851            value
6852        }
6853    }
6854
6855    unsafe impl fidl::encoding::TypeMarker for MlmeOnSaeFrameRxRequest {
6856        type Owned = Self;
6857
6858        #[inline(always)]
6859        fn inline_align(_context: fidl::encoding::Context) -> usize {
6860            8
6861        }
6862
6863        #[inline(always)]
6864        fn inline_size(_context: fidl::encoding::Context) -> usize {
6865            32
6866        }
6867    }
6868
6869    unsafe impl<D: fidl::encoding::ResourceDialect>
6870        fidl::encoding::Encode<MlmeOnSaeFrameRxRequest, D> for &MlmeOnSaeFrameRxRequest
6871    {
6872        #[inline]
6873        unsafe fn encode(
6874            self,
6875            encoder: &mut fidl::encoding::Encoder<'_, D>,
6876            offset: usize,
6877            _depth: fidl::encoding::Depth,
6878        ) -> fidl::Result<()> {
6879            encoder.debug_check_bounds::<MlmeOnSaeFrameRxRequest>(offset);
6880            // Delegate to tuple encoding.
6881            fidl::encoding::Encode::<MlmeOnSaeFrameRxRequest, D>::encode(
6882                (<SaeFrame as fidl::encoding::ValueTypeMarker>::borrow(&self.frame),),
6883                encoder,
6884                offset,
6885                _depth,
6886            )
6887        }
6888    }
6889    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SaeFrame, D>>
6890        fidl::encoding::Encode<MlmeOnSaeFrameRxRequest, D> for (T0,)
6891    {
6892        #[inline]
6893        unsafe fn encode(
6894            self,
6895            encoder: &mut fidl::encoding::Encoder<'_, D>,
6896            offset: usize,
6897            depth: fidl::encoding::Depth,
6898        ) -> fidl::Result<()> {
6899            encoder.debug_check_bounds::<MlmeOnSaeFrameRxRequest>(offset);
6900            // Zero out padding regions. There's no need to apply masks
6901            // because the unmasked parts will be overwritten by fields.
6902            // Write the fields.
6903            self.0.encode(encoder, offset + 0, depth)?;
6904            Ok(())
6905        }
6906    }
6907
6908    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6909        for MlmeOnSaeFrameRxRequest
6910    {
6911        #[inline(always)]
6912        fn new_empty() -> Self {
6913            Self { frame: fidl::new_empty!(SaeFrame, D) }
6914        }
6915
6916        #[inline]
6917        unsafe fn decode(
6918            &mut self,
6919            decoder: &mut fidl::encoding::Decoder<'_, D>,
6920            offset: usize,
6921            _depth: fidl::encoding::Depth,
6922        ) -> fidl::Result<()> {
6923            decoder.debug_check_bounds::<Self>(offset);
6924            // Verify that padding bytes are zero.
6925            fidl::decode!(SaeFrame, D, &mut self.frame, decoder, offset + 0, _depth)?;
6926            Ok(())
6927        }
6928    }
6929
6930    impl fidl::encoding::ValueTypeMarker for MlmeOnSaeHandshakeIndRequest {
6931        type Borrowed<'a> = &'a Self;
6932        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6933            value
6934        }
6935    }
6936
6937    unsafe impl fidl::encoding::TypeMarker for MlmeOnSaeHandshakeIndRequest {
6938        type Owned = Self;
6939
6940        #[inline(always)]
6941        fn inline_align(_context: fidl::encoding::Context) -> usize {
6942            1
6943        }
6944
6945        #[inline(always)]
6946        fn inline_size(_context: fidl::encoding::Context) -> usize {
6947            6
6948        }
6949        #[inline(always)]
6950        fn encode_is_copy() -> bool {
6951            true
6952        }
6953
6954        #[inline(always)]
6955        fn decode_is_copy() -> bool {
6956            true
6957        }
6958    }
6959
6960    unsafe impl<D: fidl::encoding::ResourceDialect>
6961        fidl::encoding::Encode<MlmeOnSaeHandshakeIndRequest, D> for &MlmeOnSaeHandshakeIndRequest
6962    {
6963        #[inline]
6964        unsafe fn encode(
6965            self,
6966            encoder: &mut fidl::encoding::Encoder<'_, D>,
6967            offset: usize,
6968            _depth: fidl::encoding::Depth,
6969        ) -> fidl::Result<()> {
6970            encoder.debug_check_bounds::<MlmeOnSaeHandshakeIndRequest>(offset);
6971            unsafe {
6972                // Copy the object into the buffer.
6973                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6974                (buf_ptr as *mut MlmeOnSaeHandshakeIndRequest)
6975                    .write_unaligned((self as *const MlmeOnSaeHandshakeIndRequest).read());
6976                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6977                // done second because the memcpy will write garbage to these bytes.
6978            }
6979            Ok(())
6980        }
6981    }
6982    unsafe impl<
6983            D: fidl::encoding::ResourceDialect,
6984            T0: fidl::encoding::Encode<SaeHandshakeIndication, D>,
6985        > fidl::encoding::Encode<MlmeOnSaeHandshakeIndRequest, D> for (T0,)
6986    {
6987        #[inline]
6988        unsafe fn encode(
6989            self,
6990            encoder: &mut fidl::encoding::Encoder<'_, D>,
6991            offset: usize,
6992            depth: fidl::encoding::Depth,
6993        ) -> fidl::Result<()> {
6994            encoder.debug_check_bounds::<MlmeOnSaeHandshakeIndRequest>(offset);
6995            // Zero out padding regions. There's no need to apply masks
6996            // because the unmasked parts will be overwritten by fields.
6997            // Write the fields.
6998            self.0.encode(encoder, offset + 0, depth)?;
6999            Ok(())
7000        }
7001    }
7002
7003    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7004        for MlmeOnSaeHandshakeIndRequest
7005    {
7006        #[inline(always)]
7007        fn new_empty() -> Self {
7008            Self { ind: fidl::new_empty!(SaeHandshakeIndication, D) }
7009        }
7010
7011        #[inline]
7012        unsafe fn decode(
7013            &mut self,
7014            decoder: &mut fidl::encoding::Decoder<'_, D>,
7015            offset: usize,
7016            _depth: fidl::encoding::Depth,
7017        ) -> fidl::Result<()> {
7018            decoder.debug_check_bounds::<Self>(offset);
7019            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7020            // Verify that padding bytes are zero.
7021            // Copy from the buffer into the object.
7022            unsafe {
7023                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
7024            }
7025            Ok(())
7026        }
7027    }
7028
7029    impl fidl::encoding::ValueTypeMarker for MlmeOnScanEndRequest {
7030        type Borrowed<'a> = &'a Self;
7031        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7032            value
7033        }
7034    }
7035
7036    unsafe impl fidl::encoding::TypeMarker for MlmeOnScanEndRequest {
7037        type Owned = Self;
7038
7039        #[inline(always)]
7040        fn inline_align(_context: fidl::encoding::Context) -> usize {
7041            8
7042        }
7043
7044        #[inline(always)]
7045        fn inline_size(_context: fidl::encoding::Context) -> usize {
7046            16
7047        }
7048    }
7049
7050    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeOnScanEndRequest, D>
7051        for &MlmeOnScanEndRequest
7052    {
7053        #[inline]
7054        unsafe fn encode(
7055            self,
7056            encoder: &mut fidl::encoding::Encoder<'_, D>,
7057            offset: usize,
7058            _depth: fidl::encoding::Depth,
7059        ) -> fidl::Result<()> {
7060            encoder.debug_check_bounds::<MlmeOnScanEndRequest>(offset);
7061            // Delegate to tuple encoding.
7062            fidl::encoding::Encode::<MlmeOnScanEndRequest, D>::encode(
7063                (<ScanEnd as fidl::encoding::ValueTypeMarker>::borrow(&self.end),),
7064                encoder,
7065                offset,
7066                _depth,
7067            )
7068        }
7069    }
7070    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ScanEnd, D>>
7071        fidl::encoding::Encode<MlmeOnScanEndRequest, D> for (T0,)
7072    {
7073        #[inline]
7074        unsafe fn encode(
7075            self,
7076            encoder: &mut fidl::encoding::Encoder<'_, D>,
7077            offset: usize,
7078            depth: fidl::encoding::Depth,
7079        ) -> fidl::Result<()> {
7080            encoder.debug_check_bounds::<MlmeOnScanEndRequest>(offset);
7081            // Zero out padding regions. There's no need to apply masks
7082            // because the unmasked parts will be overwritten by fields.
7083            // Write the fields.
7084            self.0.encode(encoder, offset + 0, depth)?;
7085            Ok(())
7086        }
7087    }
7088
7089    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeOnScanEndRequest {
7090        #[inline(always)]
7091        fn new_empty() -> Self {
7092            Self { end: fidl::new_empty!(ScanEnd, D) }
7093        }
7094
7095        #[inline]
7096        unsafe fn decode(
7097            &mut self,
7098            decoder: &mut fidl::encoding::Decoder<'_, D>,
7099            offset: usize,
7100            _depth: fidl::encoding::Depth,
7101        ) -> fidl::Result<()> {
7102            decoder.debug_check_bounds::<Self>(offset);
7103            // Verify that padding bytes are zero.
7104            fidl::decode!(ScanEnd, D, &mut self.end, decoder, offset + 0, _depth)?;
7105            Ok(())
7106        }
7107    }
7108
7109    impl fidl::encoding::ValueTypeMarker for MlmeOnScanResultRequest {
7110        type Borrowed<'a> = &'a Self;
7111        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7112            value
7113        }
7114    }
7115
7116    unsafe impl fidl::encoding::TypeMarker for MlmeOnScanResultRequest {
7117        type Owned = Self;
7118
7119        #[inline(always)]
7120        fn inline_align(_context: fidl::encoding::Context) -> usize {
7121            8
7122        }
7123
7124        #[inline(always)]
7125        fn inline_size(_context: fidl::encoding::Context) -> usize {
7126            64
7127        }
7128    }
7129
7130    unsafe impl<D: fidl::encoding::ResourceDialect>
7131        fidl::encoding::Encode<MlmeOnScanResultRequest, D> for &MlmeOnScanResultRequest
7132    {
7133        #[inline]
7134        unsafe fn encode(
7135            self,
7136            encoder: &mut fidl::encoding::Encoder<'_, D>,
7137            offset: usize,
7138            _depth: fidl::encoding::Depth,
7139        ) -> fidl::Result<()> {
7140            encoder.debug_check_bounds::<MlmeOnScanResultRequest>(offset);
7141            // Delegate to tuple encoding.
7142            fidl::encoding::Encode::<MlmeOnScanResultRequest, D>::encode(
7143                (<ScanResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
7144                encoder,
7145                offset,
7146                _depth,
7147            )
7148        }
7149    }
7150    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ScanResult, D>>
7151        fidl::encoding::Encode<MlmeOnScanResultRequest, D> for (T0,)
7152    {
7153        #[inline]
7154        unsafe fn encode(
7155            self,
7156            encoder: &mut fidl::encoding::Encoder<'_, D>,
7157            offset: usize,
7158            depth: fidl::encoding::Depth,
7159        ) -> fidl::Result<()> {
7160            encoder.debug_check_bounds::<MlmeOnScanResultRequest>(offset);
7161            // Zero out padding regions. There's no need to apply masks
7162            // because the unmasked parts will be overwritten by fields.
7163            // Write the fields.
7164            self.0.encode(encoder, offset + 0, depth)?;
7165            Ok(())
7166        }
7167    }
7168
7169    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7170        for MlmeOnScanResultRequest
7171    {
7172        #[inline(always)]
7173        fn new_empty() -> Self {
7174            Self { result: fidl::new_empty!(ScanResult, D) }
7175        }
7176
7177        #[inline]
7178        unsafe fn decode(
7179            &mut self,
7180            decoder: &mut fidl::encoding::Decoder<'_, D>,
7181            offset: usize,
7182            _depth: fidl::encoding::Depth,
7183        ) -> fidl::Result<()> {
7184            decoder.debug_check_bounds::<Self>(offset);
7185            // Verify that padding bytes are zero.
7186            fidl::decode!(ScanResult, D, &mut self.result, decoder, offset + 0, _depth)?;
7187            Ok(())
7188        }
7189    }
7190
7191    impl fidl::encoding::ValueTypeMarker for MlmeOnWmmStatusRespRequest {
7192        type Borrowed<'a> = &'a Self;
7193        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7194            value
7195        }
7196    }
7197
7198    unsafe impl fidl::encoding::TypeMarker for MlmeOnWmmStatusRespRequest {
7199        type Owned = Self;
7200
7201        #[inline(always)]
7202        fn inline_align(_context: fidl::encoding::Context) -> usize {
7203            4
7204        }
7205
7206        #[inline(always)]
7207        fn inline_size(_context: fidl::encoding::Context) -> usize {
7208            40
7209        }
7210    }
7211
7212    unsafe impl<D: fidl::encoding::ResourceDialect>
7213        fidl::encoding::Encode<MlmeOnWmmStatusRespRequest, D> for &MlmeOnWmmStatusRespRequest
7214    {
7215        #[inline]
7216        unsafe fn encode(
7217            self,
7218            encoder: &mut fidl::encoding::Encoder<'_, D>,
7219            offset: usize,
7220            _depth: fidl::encoding::Depth,
7221        ) -> fidl::Result<()> {
7222            encoder.debug_check_bounds::<MlmeOnWmmStatusRespRequest>(offset);
7223            // Delegate to tuple encoding.
7224            fidl::encoding::Encode::<MlmeOnWmmStatusRespRequest, D>::encode(
7225                (
7226                    <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.status),
7227                    <fidl_fuchsia_wlan_internal::WmmStatusResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
7228                ),
7229                encoder, offset, _depth
7230            )
7231        }
7232    }
7233    unsafe impl<
7234            D: fidl::encoding::ResourceDialect,
7235            T0: fidl::encoding::Encode<i32, D>,
7236            T1: fidl::encoding::Encode<fidl_fuchsia_wlan_internal::WmmStatusResponse, D>,
7237        > fidl::encoding::Encode<MlmeOnWmmStatusRespRequest, D> for (T0, T1)
7238    {
7239        #[inline]
7240        unsafe fn encode(
7241            self,
7242            encoder: &mut fidl::encoding::Encoder<'_, D>,
7243            offset: usize,
7244            depth: fidl::encoding::Depth,
7245        ) -> fidl::Result<()> {
7246            encoder.debug_check_bounds::<MlmeOnWmmStatusRespRequest>(offset);
7247            // Zero out padding regions. There's no need to apply masks
7248            // because the unmasked parts will be overwritten by fields.
7249            unsafe {
7250                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(36);
7251                (ptr as *mut u32).write_unaligned(0);
7252            }
7253            // Write the fields.
7254            self.0.encode(encoder, offset + 0, depth)?;
7255            self.1.encode(encoder, offset + 4, depth)?;
7256            Ok(())
7257        }
7258    }
7259
7260    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7261        for MlmeOnWmmStatusRespRequest
7262    {
7263        #[inline(always)]
7264        fn new_empty() -> Self {
7265            Self {
7266                status: fidl::new_empty!(i32, D),
7267                resp: fidl::new_empty!(fidl_fuchsia_wlan_internal::WmmStatusResponse, D),
7268            }
7269        }
7270
7271        #[inline]
7272        unsafe fn decode(
7273            &mut self,
7274            decoder: &mut fidl::encoding::Decoder<'_, D>,
7275            offset: usize,
7276            _depth: fidl::encoding::Depth,
7277        ) -> fidl::Result<()> {
7278            decoder.debug_check_bounds::<Self>(offset);
7279            // Verify that padding bytes are zero.
7280            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(36) };
7281            let padval = unsafe { (ptr as *const u32).read_unaligned() };
7282            let mask = 0xffff0000u32;
7283            let maskedval = padval & mask;
7284            if maskedval != 0 {
7285                return Err(fidl::Error::NonZeroPadding {
7286                    padding_start: offset + 36 + ((mask as u64).trailing_zeros() / 8) as usize,
7287                });
7288            }
7289            fidl::decode!(i32, D, &mut self.status, decoder, offset + 0, _depth)?;
7290            fidl::decode!(
7291                fidl_fuchsia_wlan_internal::WmmStatusResponse,
7292                D,
7293                &mut self.resp,
7294                decoder,
7295                offset + 4,
7296                _depth
7297            )?;
7298            Ok(())
7299        }
7300    }
7301
7302    impl fidl::encoding::ValueTypeMarker for MlmeQueryDeviceInfoResponse {
7303        type Borrowed<'a> = &'a Self;
7304        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7305            value
7306        }
7307    }
7308
7309    unsafe impl fidl::encoding::TypeMarker for MlmeQueryDeviceInfoResponse {
7310        type Owned = Self;
7311
7312        #[inline(always)]
7313        fn inline_align(_context: fidl::encoding::Context) -> usize {
7314            8
7315        }
7316
7317        #[inline(always)]
7318        fn inline_size(_context: fidl::encoding::Context) -> usize {
7319            40
7320        }
7321    }
7322
7323    unsafe impl<D: fidl::encoding::ResourceDialect>
7324        fidl::encoding::Encode<MlmeQueryDeviceInfoResponse, D> for &MlmeQueryDeviceInfoResponse
7325    {
7326        #[inline]
7327        unsafe fn encode(
7328            self,
7329            encoder: &mut fidl::encoding::Encoder<'_, D>,
7330            offset: usize,
7331            _depth: fidl::encoding::Depth,
7332        ) -> fidl::Result<()> {
7333            encoder.debug_check_bounds::<MlmeQueryDeviceInfoResponse>(offset);
7334            // Delegate to tuple encoding.
7335            fidl::encoding::Encode::<MlmeQueryDeviceInfoResponse, D>::encode(
7336                (<DeviceInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),),
7337                encoder,
7338                offset,
7339                _depth,
7340            )
7341        }
7342    }
7343    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<DeviceInfo, D>>
7344        fidl::encoding::Encode<MlmeQueryDeviceInfoResponse, D> for (T0,)
7345    {
7346        #[inline]
7347        unsafe fn encode(
7348            self,
7349            encoder: &mut fidl::encoding::Encoder<'_, D>,
7350            offset: usize,
7351            depth: fidl::encoding::Depth,
7352        ) -> fidl::Result<()> {
7353            encoder.debug_check_bounds::<MlmeQueryDeviceInfoResponse>(offset);
7354            // Zero out padding regions. There's no need to apply masks
7355            // because the unmasked parts will be overwritten by fields.
7356            // Write the fields.
7357            self.0.encode(encoder, offset + 0, depth)?;
7358            Ok(())
7359        }
7360    }
7361
7362    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7363        for MlmeQueryDeviceInfoResponse
7364    {
7365        #[inline(always)]
7366        fn new_empty() -> Self {
7367            Self { info: fidl::new_empty!(DeviceInfo, D) }
7368        }
7369
7370        #[inline]
7371        unsafe fn decode(
7372            &mut self,
7373            decoder: &mut fidl::encoding::Decoder<'_, D>,
7374            offset: usize,
7375            _depth: fidl::encoding::Depth,
7376        ) -> fidl::Result<()> {
7377            decoder.debug_check_bounds::<Self>(offset);
7378            // Verify that padding bytes are zero.
7379            fidl::decode!(DeviceInfo, D, &mut self.info, decoder, offset + 0, _depth)?;
7380            Ok(())
7381        }
7382    }
7383
7384    impl fidl::encoding::ValueTypeMarker for MlmeReconnectReqRequest {
7385        type Borrowed<'a> = &'a Self;
7386        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7387            value
7388        }
7389    }
7390
7391    unsafe impl fidl::encoding::TypeMarker for MlmeReconnectReqRequest {
7392        type Owned = Self;
7393
7394        #[inline(always)]
7395        fn inline_align(_context: fidl::encoding::Context) -> usize {
7396            1
7397        }
7398
7399        #[inline(always)]
7400        fn inline_size(_context: fidl::encoding::Context) -> usize {
7401            6
7402        }
7403        #[inline(always)]
7404        fn encode_is_copy() -> bool {
7405            true
7406        }
7407
7408        #[inline(always)]
7409        fn decode_is_copy() -> bool {
7410            true
7411        }
7412    }
7413
7414    unsafe impl<D: fidl::encoding::ResourceDialect>
7415        fidl::encoding::Encode<MlmeReconnectReqRequest, D> for &MlmeReconnectReqRequest
7416    {
7417        #[inline]
7418        unsafe fn encode(
7419            self,
7420            encoder: &mut fidl::encoding::Encoder<'_, D>,
7421            offset: usize,
7422            _depth: fidl::encoding::Depth,
7423        ) -> fidl::Result<()> {
7424            encoder.debug_check_bounds::<MlmeReconnectReqRequest>(offset);
7425            unsafe {
7426                // Copy the object into the buffer.
7427                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7428                (buf_ptr as *mut MlmeReconnectReqRequest)
7429                    .write_unaligned((self as *const MlmeReconnectReqRequest).read());
7430                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
7431                // done second because the memcpy will write garbage to these bytes.
7432            }
7433            Ok(())
7434        }
7435    }
7436    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ReconnectRequest, D>>
7437        fidl::encoding::Encode<MlmeReconnectReqRequest, D> for (T0,)
7438    {
7439        #[inline]
7440        unsafe fn encode(
7441            self,
7442            encoder: &mut fidl::encoding::Encoder<'_, D>,
7443            offset: usize,
7444            depth: fidl::encoding::Depth,
7445        ) -> fidl::Result<()> {
7446            encoder.debug_check_bounds::<MlmeReconnectReqRequest>(offset);
7447            // Zero out padding regions. There's no need to apply masks
7448            // because the unmasked parts will be overwritten by fields.
7449            // Write the fields.
7450            self.0.encode(encoder, offset + 0, depth)?;
7451            Ok(())
7452        }
7453    }
7454
7455    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7456        for MlmeReconnectReqRequest
7457    {
7458        #[inline(always)]
7459        fn new_empty() -> Self {
7460            Self { req: fidl::new_empty!(ReconnectRequest, D) }
7461        }
7462
7463        #[inline]
7464        unsafe fn decode(
7465            &mut self,
7466            decoder: &mut fidl::encoding::Decoder<'_, D>,
7467            offset: usize,
7468            _depth: fidl::encoding::Depth,
7469        ) -> fidl::Result<()> {
7470            decoder.debug_check_bounds::<Self>(offset);
7471            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7472            // Verify that padding bytes are zero.
7473            // Copy from the buffer into the object.
7474            unsafe {
7475                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
7476            }
7477            Ok(())
7478        }
7479    }
7480
7481    impl fidl::encoding::ValueTypeMarker for MlmeRelayCapturedFrameRequest {
7482        type Borrowed<'a> = &'a Self;
7483        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7484            value
7485        }
7486    }
7487
7488    unsafe impl fidl::encoding::TypeMarker for MlmeRelayCapturedFrameRequest {
7489        type Owned = Self;
7490
7491        #[inline(always)]
7492        fn inline_align(_context: fidl::encoding::Context) -> usize {
7493            8
7494        }
7495
7496        #[inline(always)]
7497        fn inline_size(_context: fidl::encoding::Context) -> usize {
7498            16
7499        }
7500    }
7501
7502    unsafe impl<D: fidl::encoding::ResourceDialect>
7503        fidl::encoding::Encode<MlmeRelayCapturedFrameRequest, D>
7504        for &MlmeRelayCapturedFrameRequest
7505    {
7506        #[inline]
7507        unsafe fn encode(
7508            self,
7509            encoder: &mut fidl::encoding::Encoder<'_, D>,
7510            offset: usize,
7511            _depth: fidl::encoding::Depth,
7512        ) -> fidl::Result<()> {
7513            encoder.debug_check_bounds::<MlmeRelayCapturedFrameRequest>(offset);
7514            // Delegate to tuple encoding.
7515            fidl::encoding::Encode::<MlmeRelayCapturedFrameRequest, D>::encode(
7516                (<CapturedFrameResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
7517                encoder,
7518                offset,
7519                _depth,
7520            )
7521        }
7522    }
7523    unsafe impl<
7524            D: fidl::encoding::ResourceDialect,
7525            T0: fidl::encoding::Encode<CapturedFrameResult, D>,
7526        > fidl::encoding::Encode<MlmeRelayCapturedFrameRequest, D> for (T0,)
7527    {
7528        #[inline]
7529        unsafe fn encode(
7530            self,
7531            encoder: &mut fidl::encoding::Encoder<'_, D>,
7532            offset: usize,
7533            depth: fidl::encoding::Depth,
7534        ) -> fidl::Result<()> {
7535            encoder.debug_check_bounds::<MlmeRelayCapturedFrameRequest>(offset);
7536            // Zero out padding regions. There's no need to apply masks
7537            // because the unmasked parts will be overwritten by fields.
7538            // Write the fields.
7539            self.0.encode(encoder, offset + 0, depth)?;
7540            Ok(())
7541        }
7542    }
7543
7544    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7545        for MlmeRelayCapturedFrameRequest
7546    {
7547        #[inline(always)]
7548        fn new_empty() -> Self {
7549            Self { result: fidl::new_empty!(CapturedFrameResult, D) }
7550        }
7551
7552        #[inline]
7553        unsafe fn decode(
7554            &mut self,
7555            decoder: &mut fidl::encoding::Decoder<'_, D>,
7556            offset: usize,
7557            _depth: fidl::encoding::Depth,
7558        ) -> fidl::Result<()> {
7559            decoder.debug_check_bounds::<Self>(offset);
7560            // Verify that padding bytes are zero.
7561            fidl::decode!(CapturedFrameResult, D, &mut self.result, decoder, offset + 0, _depth)?;
7562            Ok(())
7563        }
7564    }
7565
7566    impl fidl::encoding::ValueTypeMarker for MlmeResetReqRequest {
7567        type Borrowed<'a> = &'a Self;
7568        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7569            value
7570        }
7571    }
7572
7573    unsafe impl fidl::encoding::TypeMarker for MlmeResetReqRequest {
7574        type Owned = Self;
7575
7576        #[inline(always)]
7577        fn inline_align(_context: fidl::encoding::Context) -> usize {
7578            1
7579        }
7580
7581        #[inline(always)]
7582        fn inline_size(_context: fidl::encoding::Context) -> usize {
7583            7
7584        }
7585    }
7586
7587    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeResetReqRequest, D>
7588        for &MlmeResetReqRequest
7589    {
7590        #[inline]
7591        unsafe fn encode(
7592            self,
7593            encoder: &mut fidl::encoding::Encoder<'_, D>,
7594            offset: usize,
7595            _depth: fidl::encoding::Depth,
7596        ) -> fidl::Result<()> {
7597            encoder.debug_check_bounds::<MlmeResetReqRequest>(offset);
7598            // Delegate to tuple encoding.
7599            fidl::encoding::Encode::<MlmeResetReqRequest, D>::encode(
7600                (<ResetRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
7601                encoder,
7602                offset,
7603                _depth,
7604            )
7605        }
7606    }
7607    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ResetRequest, D>>
7608        fidl::encoding::Encode<MlmeResetReqRequest, D> for (T0,)
7609    {
7610        #[inline]
7611        unsafe fn encode(
7612            self,
7613            encoder: &mut fidl::encoding::Encoder<'_, D>,
7614            offset: usize,
7615            depth: fidl::encoding::Depth,
7616        ) -> fidl::Result<()> {
7617            encoder.debug_check_bounds::<MlmeResetReqRequest>(offset);
7618            // Zero out padding regions. There's no need to apply masks
7619            // because the unmasked parts will be overwritten by fields.
7620            // Write the fields.
7621            self.0.encode(encoder, offset + 0, depth)?;
7622            Ok(())
7623        }
7624    }
7625
7626    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeResetReqRequest {
7627        #[inline(always)]
7628        fn new_empty() -> Self {
7629            Self { req: fidl::new_empty!(ResetRequest, D) }
7630        }
7631
7632        #[inline]
7633        unsafe fn decode(
7634            &mut self,
7635            decoder: &mut fidl::encoding::Decoder<'_, D>,
7636            offset: usize,
7637            _depth: fidl::encoding::Depth,
7638        ) -> fidl::Result<()> {
7639            decoder.debug_check_bounds::<Self>(offset);
7640            // Verify that padding bytes are zero.
7641            fidl::decode!(ResetRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
7642            Ok(())
7643        }
7644    }
7645
7646    impl fidl::encoding::ValueTypeMarker for MlmeRoamConfRequest {
7647        type Borrowed<'a> = &'a Self;
7648        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7649            value
7650        }
7651    }
7652
7653    unsafe impl fidl::encoding::TypeMarker for MlmeRoamConfRequest {
7654        type Owned = Self;
7655
7656        #[inline(always)]
7657        fn inline_align(_context: fidl::encoding::Context) -> usize {
7658            8
7659        }
7660
7661        #[inline(always)]
7662        fn inline_size(_context: fidl::encoding::Context) -> usize {
7663            32
7664        }
7665    }
7666
7667    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeRoamConfRequest, D>
7668        for &MlmeRoamConfRequest
7669    {
7670        #[inline]
7671        unsafe fn encode(
7672            self,
7673            encoder: &mut fidl::encoding::Encoder<'_, D>,
7674            offset: usize,
7675            _depth: fidl::encoding::Depth,
7676        ) -> fidl::Result<()> {
7677            encoder.debug_check_bounds::<MlmeRoamConfRequest>(offset);
7678            // Delegate to tuple encoding.
7679            fidl::encoding::Encode::<MlmeRoamConfRequest, D>::encode(
7680                (<RoamConfirm as fidl::encoding::ValueTypeMarker>::borrow(&self.conf),),
7681                encoder,
7682                offset,
7683                _depth,
7684            )
7685        }
7686    }
7687    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<RoamConfirm, D>>
7688        fidl::encoding::Encode<MlmeRoamConfRequest, D> for (T0,)
7689    {
7690        #[inline]
7691        unsafe fn encode(
7692            self,
7693            encoder: &mut fidl::encoding::Encoder<'_, D>,
7694            offset: usize,
7695            depth: fidl::encoding::Depth,
7696        ) -> fidl::Result<()> {
7697            encoder.debug_check_bounds::<MlmeRoamConfRequest>(offset);
7698            // Zero out padding regions. There's no need to apply masks
7699            // because the unmasked parts will be overwritten by fields.
7700            // Write the fields.
7701            self.0.encode(encoder, offset + 0, depth)?;
7702            Ok(())
7703        }
7704    }
7705
7706    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeRoamConfRequest {
7707        #[inline(always)]
7708        fn new_empty() -> Self {
7709            Self { conf: fidl::new_empty!(RoamConfirm, D) }
7710        }
7711
7712        #[inline]
7713        unsafe fn decode(
7714            &mut self,
7715            decoder: &mut fidl::encoding::Decoder<'_, D>,
7716            offset: usize,
7717            _depth: fidl::encoding::Depth,
7718        ) -> fidl::Result<()> {
7719            decoder.debug_check_bounds::<Self>(offset);
7720            // Verify that padding bytes are zero.
7721            fidl::decode!(RoamConfirm, D, &mut self.conf, decoder, offset + 0, _depth)?;
7722            Ok(())
7723        }
7724    }
7725
7726    impl fidl::encoding::ValueTypeMarker for MlmeRoamReqRequest {
7727        type Borrowed<'a> = &'a Self;
7728        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7729            value
7730        }
7731    }
7732
7733    unsafe impl fidl::encoding::TypeMarker for MlmeRoamReqRequest {
7734        type Owned = Self;
7735
7736        #[inline(always)]
7737        fn inline_align(_context: fidl::encoding::Context) -> usize {
7738            8
7739        }
7740
7741        #[inline(always)]
7742        fn inline_size(_context: fidl::encoding::Context) -> usize {
7743            48
7744        }
7745    }
7746
7747    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeRoamReqRequest, D>
7748        for &MlmeRoamReqRequest
7749    {
7750        #[inline]
7751        unsafe fn encode(
7752            self,
7753            encoder: &mut fidl::encoding::Encoder<'_, D>,
7754            offset: usize,
7755            _depth: fidl::encoding::Depth,
7756        ) -> fidl::Result<()> {
7757            encoder.debug_check_bounds::<MlmeRoamReqRequest>(offset);
7758            // Delegate to tuple encoding.
7759            fidl::encoding::Encode::<MlmeRoamReqRequest, D>::encode(
7760                (<RoamRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
7761                encoder,
7762                offset,
7763                _depth,
7764            )
7765        }
7766    }
7767    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<RoamRequest, D>>
7768        fidl::encoding::Encode<MlmeRoamReqRequest, D> for (T0,)
7769    {
7770        #[inline]
7771        unsafe fn encode(
7772            self,
7773            encoder: &mut fidl::encoding::Encoder<'_, D>,
7774            offset: usize,
7775            depth: fidl::encoding::Depth,
7776        ) -> fidl::Result<()> {
7777            encoder.debug_check_bounds::<MlmeRoamReqRequest>(offset);
7778            // Zero out padding regions. There's no need to apply masks
7779            // because the unmasked parts will be overwritten by fields.
7780            // Write the fields.
7781            self.0.encode(encoder, offset + 0, depth)?;
7782            Ok(())
7783        }
7784    }
7785
7786    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeRoamReqRequest {
7787        #[inline(always)]
7788        fn new_empty() -> Self {
7789            Self { req: fidl::new_empty!(RoamRequest, D) }
7790        }
7791
7792        #[inline]
7793        unsafe fn decode(
7794            &mut self,
7795            decoder: &mut fidl::encoding::Decoder<'_, D>,
7796            offset: usize,
7797            _depth: fidl::encoding::Depth,
7798        ) -> fidl::Result<()> {
7799            decoder.debug_check_bounds::<Self>(offset);
7800            // Verify that padding bytes are zero.
7801            fidl::decode!(RoamRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
7802            Ok(())
7803        }
7804    }
7805
7806    impl fidl::encoding::ValueTypeMarker for MlmeRoamResultIndRequest {
7807        type Borrowed<'a> = &'a Self;
7808        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7809            value
7810        }
7811    }
7812
7813    unsafe impl fidl::encoding::TypeMarker for MlmeRoamResultIndRequest {
7814        type Owned = Self;
7815
7816        #[inline(always)]
7817        fn inline_align(_context: fidl::encoding::Context) -> usize {
7818            8
7819        }
7820
7821        #[inline(always)]
7822        fn inline_size(_context: fidl::encoding::Context) -> usize {
7823            32
7824        }
7825    }
7826
7827    unsafe impl<D: fidl::encoding::ResourceDialect>
7828        fidl::encoding::Encode<MlmeRoamResultIndRequest, D> for &MlmeRoamResultIndRequest
7829    {
7830        #[inline]
7831        unsafe fn encode(
7832            self,
7833            encoder: &mut fidl::encoding::Encoder<'_, D>,
7834            offset: usize,
7835            _depth: fidl::encoding::Depth,
7836        ) -> fidl::Result<()> {
7837            encoder.debug_check_bounds::<MlmeRoamResultIndRequest>(offset);
7838            // Delegate to tuple encoding.
7839            fidl::encoding::Encode::<MlmeRoamResultIndRequest, D>::encode(
7840                (<RoamResultIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),),
7841                encoder,
7842                offset,
7843                _depth,
7844            )
7845        }
7846    }
7847    unsafe impl<
7848            D: fidl::encoding::ResourceDialect,
7849            T0: fidl::encoding::Encode<RoamResultIndication, D>,
7850        > fidl::encoding::Encode<MlmeRoamResultIndRequest, D> for (T0,)
7851    {
7852        #[inline]
7853        unsafe fn encode(
7854            self,
7855            encoder: &mut fidl::encoding::Encoder<'_, D>,
7856            offset: usize,
7857            depth: fidl::encoding::Depth,
7858        ) -> fidl::Result<()> {
7859            encoder.debug_check_bounds::<MlmeRoamResultIndRequest>(offset);
7860            // Zero out padding regions. There's no need to apply masks
7861            // because the unmasked parts will be overwritten by fields.
7862            // Write the fields.
7863            self.0.encode(encoder, offset + 0, depth)?;
7864            Ok(())
7865        }
7866    }
7867
7868    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7869        for MlmeRoamResultIndRequest
7870    {
7871        #[inline(always)]
7872        fn new_empty() -> Self {
7873            Self { ind: fidl::new_empty!(RoamResultIndication, D) }
7874        }
7875
7876        #[inline]
7877        unsafe fn decode(
7878            &mut self,
7879            decoder: &mut fidl::encoding::Decoder<'_, D>,
7880            offset: usize,
7881            _depth: fidl::encoding::Depth,
7882        ) -> fidl::Result<()> {
7883            decoder.debug_check_bounds::<Self>(offset);
7884            // Verify that padding bytes are zero.
7885            fidl::decode!(RoamResultIndication, D, &mut self.ind, decoder, offset + 0, _depth)?;
7886            Ok(())
7887        }
7888    }
7889
7890    impl fidl::encoding::ValueTypeMarker for MlmeRoamStartIndRequest {
7891        type Borrowed<'a> = &'a Self;
7892        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7893            value
7894        }
7895    }
7896
7897    unsafe impl fidl::encoding::TypeMarker for MlmeRoamStartIndRequest {
7898        type Owned = Self;
7899
7900        #[inline(always)]
7901        fn inline_align(_context: fidl::encoding::Context) -> usize {
7902            8
7903        }
7904
7905        #[inline(always)]
7906        fn inline_size(_context: fidl::encoding::Context) -> usize {
7907            64
7908        }
7909    }
7910
7911    unsafe impl<D: fidl::encoding::ResourceDialect>
7912        fidl::encoding::Encode<MlmeRoamStartIndRequest, D> for &MlmeRoamStartIndRequest
7913    {
7914        #[inline]
7915        unsafe fn encode(
7916            self,
7917            encoder: &mut fidl::encoding::Encoder<'_, D>,
7918            offset: usize,
7919            _depth: fidl::encoding::Depth,
7920        ) -> fidl::Result<()> {
7921            encoder.debug_check_bounds::<MlmeRoamStartIndRequest>(offset);
7922            // Delegate to tuple encoding.
7923            fidl::encoding::Encode::<MlmeRoamStartIndRequest, D>::encode(
7924                (<RoamStartIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),),
7925                encoder,
7926                offset,
7927                _depth,
7928            )
7929        }
7930    }
7931    unsafe impl<
7932            D: fidl::encoding::ResourceDialect,
7933            T0: fidl::encoding::Encode<RoamStartIndication, D>,
7934        > fidl::encoding::Encode<MlmeRoamStartIndRequest, D> for (T0,)
7935    {
7936        #[inline]
7937        unsafe fn encode(
7938            self,
7939            encoder: &mut fidl::encoding::Encoder<'_, D>,
7940            offset: usize,
7941            depth: fidl::encoding::Depth,
7942        ) -> fidl::Result<()> {
7943            encoder.debug_check_bounds::<MlmeRoamStartIndRequest>(offset);
7944            // Zero out padding regions. There's no need to apply masks
7945            // because the unmasked parts will be overwritten by fields.
7946            // Write the fields.
7947            self.0.encode(encoder, offset + 0, depth)?;
7948            Ok(())
7949        }
7950    }
7951
7952    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7953        for MlmeRoamStartIndRequest
7954    {
7955        #[inline(always)]
7956        fn new_empty() -> Self {
7957            Self { ind: fidl::new_empty!(RoamStartIndication, D) }
7958        }
7959
7960        #[inline]
7961        unsafe fn decode(
7962            &mut self,
7963            decoder: &mut fidl::encoding::Decoder<'_, D>,
7964            offset: usize,
7965            _depth: fidl::encoding::Depth,
7966        ) -> fidl::Result<()> {
7967            decoder.debug_check_bounds::<Self>(offset);
7968            // Verify that padding bytes are zero.
7969            fidl::decode!(RoamStartIndication, D, &mut self.ind, decoder, offset + 0, _depth)?;
7970            Ok(())
7971        }
7972    }
7973
7974    impl fidl::encoding::ValueTypeMarker for MlmeSaeFrameTxRequest {
7975        type Borrowed<'a> = &'a Self;
7976        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7977            value
7978        }
7979    }
7980
7981    unsafe impl fidl::encoding::TypeMarker for MlmeSaeFrameTxRequest {
7982        type Owned = Self;
7983
7984        #[inline(always)]
7985        fn inline_align(_context: fidl::encoding::Context) -> usize {
7986            8
7987        }
7988
7989        #[inline(always)]
7990        fn inline_size(_context: fidl::encoding::Context) -> usize {
7991            32
7992        }
7993    }
7994
7995    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeSaeFrameTxRequest, D>
7996        for &MlmeSaeFrameTxRequest
7997    {
7998        #[inline]
7999        unsafe fn encode(
8000            self,
8001            encoder: &mut fidl::encoding::Encoder<'_, D>,
8002            offset: usize,
8003            _depth: fidl::encoding::Depth,
8004        ) -> fidl::Result<()> {
8005            encoder.debug_check_bounds::<MlmeSaeFrameTxRequest>(offset);
8006            // Delegate to tuple encoding.
8007            fidl::encoding::Encode::<MlmeSaeFrameTxRequest, D>::encode(
8008                (<SaeFrame as fidl::encoding::ValueTypeMarker>::borrow(&self.frame),),
8009                encoder,
8010                offset,
8011                _depth,
8012            )
8013        }
8014    }
8015    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SaeFrame, D>>
8016        fidl::encoding::Encode<MlmeSaeFrameTxRequest, D> for (T0,)
8017    {
8018        #[inline]
8019        unsafe fn encode(
8020            self,
8021            encoder: &mut fidl::encoding::Encoder<'_, D>,
8022            offset: usize,
8023            depth: fidl::encoding::Depth,
8024        ) -> fidl::Result<()> {
8025            encoder.debug_check_bounds::<MlmeSaeFrameTxRequest>(offset);
8026            // Zero out padding regions. There's no need to apply masks
8027            // because the unmasked parts will be overwritten by fields.
8028            // Write the fields.
8029            self.0.encode(encoder, offset + 0, depth)?;
8030            Ok(())
8031        }
8032    }
8033
8034    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeSaeFrameTxRequest {
8035        #[inline(always)]
8036        fn new_empty() -> Self {
8037            Self { frame: fidl::new_empty!(SaeFrame, D) }
8038        }
8039
8040        #[inline]
8041        unsafe fn decode(
8042            &mut self,
8043            decoder: &mut fidl::encoding::Decoder<'_, D>,
8044            offset: usize,
8045            _depth: fidl::encoding::Depth,
8046        ) -> fidl::Result<()> {
8047            decoder.debug_check_bounds::<Self>(offset);
8048            // Verify that padding bytes are zero.
8049            fidl::decode!(SaeFrame, D, &mut self.frame, decoder, offset + 0, _depth)?;
8050            Ok(())
8051        }
8052    }
8053
8054    impl fidl::encoding::ValueTypeMarker for MlmeSaeHandshakeRespRequest {
8055        type Borrowed<'a> = &'a Self;
8056        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8057            value
8058        }
8059    }
8060
8061    unsafe impl fidl::encoding::TypeMarker for MlmeSaeHandshakeRespRequest {
8062        type Owned = Self;
8063
8064        #[inline(always)]
8065        fn inline_align(_context: fidl::encoding::Context) -> usize {
8066            2
8067        }
8068
8069        #[inline(always)]
8070        fn inline_size(_context: fidl::encoding::Context) -> usize {
8071            8
8072        }
8073    }
8074
8075    unsafe impl<D: fidl::encoding::ResourceDialect>
8076        fidl::encoding::Encode<MlmeSaeHandshakeRespRequest, D> for &MlmeSaeHandshakeRespRequest
8077    {
8078        #[inline]
8079        unsafe fn encode(
8080            self,
8081            encoder: &mut fidl::encoding::Encoder<'_, D>,
8082            offset: usize,
8083            _depth: fidl::encoding::Depth,
8084        ) -> fidl::Result<()> {
8085            encoder.debug_check_bounds::<MlmeSaeHandshakeRespRequest>(offset);
8086            // Delegate to tuple encoding.
8087            fidl::encoding::Encode::<MlmeSaeHandshakeRespRequest, D>::encode(
8088                (<SaeHandshakeResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
8089                encoder,
8090                offset,
8091                _depth,
8092            )
8093        }
8094    }
8095    unsafe impl<
8096            D: fidl::encoding::ResourceDialect,
8097            T0: fidl::encoding::Encode<SaeHandshakeResponse, D>,
8098        > fidl::encoding::Encode<MlmeSaeHandshakeRespRequest, D> for (T0,)
8099    {
8100        #[inline]
8101        unsafe fn encode(
8102            self,
8103            encoder: &mut fidl::encoding::Encoder<'_, D>,
8104            offset: usize,
8105            depth: fidl::encoding::Depth,
8106        ) -> fidl::Result<()> {
8107            encoder.debug_check_bounds::<MlmeSaeHandshakeRespRequest>(offset);
8108            // Zero out padding regions. There's no need to apply masks
8109            // because the unmasked parts will be overwritten by fields.
8110            // Write the fields.
8111            self.0.encode(encoder, offset + 0, depth)?;
8112            Ok(())
8113        }
8114    }
8115
8116    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8117        for MlmeSaeHandshakeRespRequest
8118    {
8119        #[inline(always)]
8120        fn new_empty() -> Self {
8121            Self { resp: fidl::new_empty!(SaeHandshakeResponse, D) }
8122        }
8123
8124        #[inline]
8125        unsafe fn decode(
8126            &mut self,
8127            decoder: &mut fidl::encoding::Decoder<'_, D>,
8128            offset: usize,
8129            _depth: fidl::encoding::Depth,
8130        ) -> fidl::Result<()> {
8131            decoder.debug_check_bounds::<Self>(offset);
8132            // Verify that padding bytes are zero.
8133            fidl::decode!(SaeHandshakeResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
8134            Ok(())
8135        }
8136    }
8137
8138    impl fidl::encoding::ValueTypeMarker for MlmeSetControlledPortRequest {
8139        type Borrowed<'a> = &'a Self;
8140        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8141            value
8142        }
8143    }
8144
8145    unsafe impl fidl::encoding::TypeMarker for MlmeSetControlledPortRequest {
8146        type Owned = Self;
8147
8148        #[inline(always)]
8149        fn inline_align(_context: fidl::encoding::Context) -> usize {
8150            4
8151        }
8152
8153        #[inline(always)]
8154        fn inline_size(_context: fidl::encoding::Context) -> usize {
8155            12
8156        }
8157    }
8158
8159    unsafe impl<D: fidl::encoding::ResourceDialect>
8160        fidl::encoding::Encode<MlmeSetControlledPortRequest, D> for &MlmeSetControlledPortRequest
8161    {
8162        #[inline]
8163        unsafe fn encode(
8164            self,
8165            encoder: &mut fidl::encoding::Encoder<'_, D>,
8166            offset: usize,
8167            _depth: fidl::encoding::Depth,
8168        ) -> fidl::Result<()> {
8169            encoder.debug_check_bounds::<MlmeSetControlledPortRequest>(offset);
8170            // Delegate to tuple encoding.
8171            fidl::encoding::Encode::<MlmeSetControlledPortRequest, D>::encode(
8172                (<SetControlledPortRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
8173                encoder,
8174                offset,
8175                _depth,
8176            )
8177        }
8178    }
8179    unsafe impl<
8180            D: fidl::encoding::ResourceDialect,
8181            T0: fidl::encoding::Encode<SetControlledPortRequest, D>,
8182        > fidl::encoding::Encode<MlmeSetControlledPortRequest, D> for (T0,)
8183    {
8184        #[inline]
8185        unsafe fn encode(
8186            self,
8187            encoder: &mut fidl::encoding::Encoder<'_, D>,
8188            offset: usize,
8189            depth: fidl::encoding::Depth,
8190        ) -> fidl::Result<()> {
8191            encoder.debug_check_bounds::<MlmeSetControlledPortRequest>(offset);
8192            // Zero out padding regions. There's no need to apply masks
8193            // because the unmasked parts will be overwritten by fields.
8194            // Write the fields.
8195            self.0.encode(encoder, offset + 0, depth)?;
8196            Ok(())
8197        }
8198    }
8199
8200    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8201        for MlmeSetControlledPortRequest
8202    {
8203        #[inline(always)]
8204        fn new_empty() -> Self {
8205            Self { req: fidl::new_empty!(SetControlledPortRequest, D) }
8206        }
8207
8208        #[inline]
8209        unsafe fn decode(
8210            &mut self,
8211            decoder: &mut fidl::encoding::Decoder<'_, D>,
8212            offset: usize,
8213            _depth: fidl::encoding::Depth,
8214        ) -> fidl::Result<()> {
8215            decoder.debug_check_bounds::<Self>(offset);
8216            // Verify that padding bytes are zero.
8217            fidl::decode!(SetControlledPortRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
8218            Ok(())
8219        }
8220    }
8221
8222    impl fidl::encoding::ValueTypeMarker for MlmeSetKeysConfRequest {
8223        type Borrowed<'a> = &'a Self;
8224        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8225            value
8226        }
8227    }
8228
8229    unsafe impl fidl::encoding::TypeMarker for MlmeSetKeysConfRequest {
8230        type Owned = Self;
8231
8232        #[inline(always)]
8233        fn inline_align(_context: fidl::encoding::Context) -> usize {
8234            8
8235        }
8236
8237        #[inline(always)]
8238        fn inline_size(_context: fidl::encoding::Context) -> usize {
8239            16
8240        }
8241    }
8242
8243    unsafe impl<D: fidl::encoding::ResourceDialect>
8244        fidl::encoding::Encode<MlmeSetKeysConfRequest, D> for &MlmeSetKeysConfRequest
8245    {
8246        #[inline]
8247        unsafe fn encode(
8248            self,
8249            encoder: &mut fidl::encoding::Encoder<'_, D>,
8250            offset: usize,
8251            _depth: fidl::encoding::Depth,
8252        ) -> fidl::Result<()> {
8253            encoder.debug_check_bounds::<MlmeSetKeysConfRequest>(offset);
8254            // Delegate to tuple encoding.
8255            fidl::encoding::Encode::<MlmeSetKeysConfRequest, D>::encode(
8256                (<SetKeysConfirm as fidl::encoding::ValueTypeMarker>::borrow(&self.conf),),
8257                encoder,
8258                offset,
8259                _depth,
8260            )
8261        }
8262    }
8263    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SetKeysConfirm, D>>
8264        fidl::encoding::Encode<MlmeSetKeysConfRequest, D> for (T0,)
8265    {
8266        #[inline]
8267        unsafe fn encode(
8268            self,
8269            encoder: &mut fidl::encoding::Encoder<'_, D>,
8270            offset: usize,
8271            depth: fidl::encoding::Depth,
8272        ) -> fidl::Result<()> {
8273            encoder.debug_check_bounds::<MlmeSetKeysConfRequest>(offset);
8274            // Zero out padding regions. There's no need to apply masks
8275            // because the unmasked parts will be overwritten by fields.
8276            // Write the fields.
8277            self.0.encode(encoder, offset + 0, depth)?;
8278            Ok(())
8279        }
8280    }
8281
8282    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8283        for MlmeSetKeysConfRequest
8284    {
8285        #[inline(always)]
8286        fn new_empty() -> Self {
8287            Self { conf: fidl::new_empty!(SetKeysConfirm, D) }
8288        }
8289
8290        #[inline]
8291        unsafe fn decode(
8292            &mut self,
8293            decoder: &mut fidl::encoding::Decoder<'_, D>,
8294            offset: usize,
8295            _depth: fidl::encoding::Depth,
8296        ) -> fidl::Result<()> {
8297            decoder.debug_check_bounds::<Self>(offset);
8298            // Verify that padding bytes are zero.
8299            fidl::decode!(SetKeysConfirm, D, &mut self.conf, decoder, offset + 0, _depth)?;
8300            Ok(())
8301        }
8302    }
8303
8304    impl fidl::encoding::ValueTypeMarker for MlmeSetKeysReqRequest {
8305        type Borrowed<'a> = &'a Self;
8306        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8307            value
8308        }
8309    }
8310
8311    unsafe impl fidl::encoding::TypeMarker for MlmeSetKeysReqRequest {
8312        type Owned = Self;
8313
8314        #[inline(always)]
8315        fn inline_align(_context: fidl::encoding::Context) -> usize {
8316            8
8317        }
8318
8319        #[inline(always)]
8320        fn inline_size(_context: fidl::encoding::Context) -> usize {
8321            16
8322        }
8323    }
8324
8325    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeSetKeysReqRequest, D>
8326        for &MlmeSetKeysReqRequest
8327    {
8328        #[inline]
8329        unsafe fn encode(
8330            self,
8331            encoder: &mut fidl::encoding::Encoder<'_, D>,
8332            offset: usize,
8333            _depth: fidl::encoding::Depth,
8334        ) -> fidl::Result<()> {
8335            encoder.debug_check_bounds::<MlmeSetKeysReqRequest>(offset);
8336            // Delegate to tuple encoding.
8337            fidl::encoding::Encode::<MlmeSetKeysReqRequest, D>::encode(
8338                (<SetKeysRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
8339                encoder,
8340                offset,
8341                _depth,
8342            )
8343        }
8344    }
8345    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SetKeysRequest, D>>
8346        fidl::encoding::Encode<MlmeSetKeysReqRequest, D> for (T0,)
8347    {
8348        #[inline]
8349        unsafe fn encode(
8350            self,
8351            encoder: &mut fidl::encoding::Encoder<'_, D>,
8352            offset: usize,
8353            depth: fidl::encoding::Depth,
8354        ) -> fidl::Result<()> {
8355            encoder.debug_check_bounds::<MlmeSetKeysReqRequest>(offset);
8356            // Zero out padding regions. There's no need to apply masks
8357            // because the unmasked parts will be overwritten by fields.
8358            // Write the fields.
8359            self.0.encode(encoder, offset + 0, depth)?;
8360            Ok(())
8361        }
8362    }
8363
8364    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeSetKeysReqRequest {
8365        #[inline(always)]
8366        fn new_empty() -> Self {
8367            Self { req: fidl::new_empty!(SetKeysRequest, D) }
8368        }
8369
8370        #[inline]
8371        unsafe fn decode(
8372            &mut self,
8373            decoder: &mut fidl::encoding::Decoder<'_, D>,
8374            offset: usize,
8375            _depth: fidl::encoding::Depth,
8376        ) -> fidl::Result<()> {
8377            decoder.debug_check_bounds::<Self>(offset);
8378            // Verify that padding bytes are zero.
8379            fidl::decode!(SetKeysRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
8380            Ok(())
8381        }
8382    }
8383
8384    impl fidl::encoding::ValueTypeMarker for MlmeSignalReportRequest {
8385        type Borrowed<'a> = &'a Self;
8386        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8387            value
8388        }
8389    }
8390
8391    unsafe impl fidl::encoding::TypeMarker for MlmeSignalReportRequest {
8392        type Owned = Self;
8393
8394        #[inline(always)]
8395        fn inline_align(_context: fidl::encoding::Context) -> usize {
8396            1
8397        }
8398
8399        #[inline(always)]
8400        fn inline_size(_context: fidl::encoding::Context) -> usize {
8401            2
8402        }
8403    }
8404
8405    unsafe impl<D: fidl::encoding::ResourceDialect>
8406        fidl::encoding::Encode<MlmeSignalReportRequest, D> for &MlmeSignalReportRequest
8407    {
8408        #[inline]
8409        unsafe fn encode(
8410            self,
8411            encoder: &mut fidl::encoding::Encoder<'_, D>,
8412            offset: usize,
8413            _depth: fidl::encoding::Depth,
8414        ) -> fidl::Result<()> {
8415            encoder.debug_check_bounds::<MlmeSignalReportRequest>(offset);
8416            // Delegate to tuple encoding.
8417            fidl::encoding::Encode::<MlmeSignalReportRequest, D>::encode(
8418                (
8419                    <fidl_fuchsia_wlan_internal::SignalReportIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),
8420                ),
8421                encoder, offset, _depth
8422            )
8423        }
8424    }
8425    unsafe impl<
8426            D: fidl::encoding::ResourceDialect,
8427            T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal::SignalReportIndication, D>,
8428        > fidl::encoding::Encode<MlmeSignalReportRequest, D> for (T0,)
8429    {
8430        #[inline]
8431        unsafe fn encode(
8432            self,
8433            encoder: &mut fidl::encoding::Encoder<'_, D>,
8434            offset: usize,
8435            depth: fidl::encoding::Depth,
8436        ) -> fidl::Result<()> {
8437            encoder.debug_check_bounds::<MlmeSignalReportRequest>(offset);
8438            // Zero out padding regions. There's no need to apply masks
8439            // because the unmasked parts will be overwritten by fields.
8440            // Write the fields.
8441            self.0.encode(encoder, offset + 0, depth)?;
8442            Ok(())
8443        }
8444    }
8445
8446    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8447        for MlmeSignalReportRequest
8448    {
8449        #[inline(always)]
8450        fn new_empty() -> Self {
8451            Self { ind: fidl::new_empty!(fidl_fuchsia_wlan_internal::SignalReportIndication, D) }
8452        }
8453
8454        #[inline]
8455        unsafe fn decode(
8456            &mut self,
8457            decoder: &mut fidl::encoding::Decoder<'_, D>,
8458            offset: usize,
8459            _depth: fidl::encoding::Depth,
8460        ) -> fidl::Result<()> {
8461            decoder.debug_check_bounds::<Self>(offset);
8462            // Verify that padding bytes are zero.
8463            fidl::decode!(
8464                fidl_fuchsia_wlan_internal::SignalReportIndication,
8465                D,
8466                &mut self.ind,
8467                decoder,
8468                offset + 0,
8469                _depth
8470            )?;
8471            Ok(())
8472        }
8473    }
8474
8475    impl fidl::encoding::ValueTypeMarker for MlmeStartCaptureFramesRequest {
8476        type Borrowed<'a> = &'a Self;
8477        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8478            value
8479        }
8480    }
8481
8482    unsafe impl fidl::encoding::TypeMarker for MlmeStartCaptureFramesRequest {
8483        type Owned = Self;
8484
8485        #[inline(always)]
8486        fn inline_align(_context: fidl::encoding::Context) -> usize {
8487            4
8488        }
8489
8490        #[inline(always)]
8491        fn inline_size(_context: fidl::encoding::Context) -> usize {
8492            4
8493        }
8494    }
8495
8496    unsafe impl<D: fidl::encoding::ResourceDialect>
8497        fidl::encoding::Encode<MlmeStartCaptureFramesRequest, D>
8498        for &MlmeStartCaptureFramesRequest
8499    {
8500        #[inline]
8501        unsafe fn encode(
8502            self,
8503            encoder: &mut fidl::encoding::Encoder<'_, D>,
8504            offset: usize,
8505            _depth: fidl::encoding::Depth,
8506        ) -> fidl::Result<()> {
8507            encoder.debug_check_bounds::<MlmeStartCaptureFramesRequest>(offset);
8508            // Delegate to tuple encoding.
8509            fidl::encoding::Encode::<MlmeStartCaptureFramesRequest, D>::encode(
8510                (<StartCaptureFramesRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
8511                encoder,
8512                offset,
8513                _depth,
8514            )
8515        }
8516    }
8517    unsafe impl<
8518            D: fidl::encoding::ResourceDialect,
8519            T0: fidl::encoding::Encode<StartCaptureFramesRequest, D>,
8520        > fidl::encoding::Encode<MlmeStartCaptureFramesRequest, D> for (T0,)
8521    {
8522        #[inline]
8523        unsafe fn encode(
8524            self,
8525            encoder: &mut fidl::encoding::Encoder<'_, D>,
8526            offset: usize,
8527            depth: fidl::encoding::Depth,
8528        ) -> fidl::Result<()> {
8529            encoder.debug_check_bounds::<MlmeStartCaptureFramesRequest>(offset);
8530            // Zero out padding regions. There's no need to apply masks
8531            // because the unmasked parts will be overwritten by fields.
8532            // Write the fields.
8533            self.0.encode(encoder, offset + 0, depth)?;
8534            Ok(())
8535        }
8536    }
8537
8538    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8539        for MlmeStartCaptureFramesRequest
8540    {
8541        #[inline(always)]
8542        fn new_empty() -> Self {
8543            Self { req: fidl::new_empty!(StartCaptureFramesRequest, D) }
8544        }
8545
8546        #[inline]
8547        unsafe fn decode(
8548            &mut self,
8549            decoder: &mut fidl::encoding::Decoder<'_, D>,
8550            offset: usize,
8551            _depth: fidl::encoding::Depth,
8552        ) -> fidl::Result<()> {
8553            decoder.debug_check_bounds::<Self>(offset);
8554            // Verify that padding bytes are zero.
8555            fidl::decode!(
8556                StartCaptureFramesRequest,
8557                D,
8558                &mut self.req,
8559                decoder,
8560                offset + 0,
8561                _depth
8562            )?;
8563            Ok(())
8564        }
8565    }
8566
8567    impl fidl::encoding::ValueTypeMarker for MlmeStartCaptureFramesResponse {
8568        type Borrowed<'a> = &'a Self;
8569        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8570            value
8571        }
8572    }
8573
8574    unsafe impl fidl::encoding::TypeMarker for MlmeStartCaptureFramesResponse {
8575        type Owned = Self;
8576
8577        #[inline(always)]
8578        fn inline_align(_context: fidl::encoding::Context) -> usize {
8579            4
8580        }
8581
8582        #[inline(always)]
8583        fn inline_size(_context: fidl::encoding::Context) -> usize {
8584            8
8585        }
8586    }
8587
8588    unsafe impl<D: fidl::encoding::ResourceDialect>
8589        fidl::encoding::Encode<MlmeStartCaptureFramesResponse, D>
8590        for &MlmeStartCaptureFramesResponse
8591    {
8592        #[inline]
8593        unsafe fn encode(
8594            self,
8595            encoder: &mut fidl::encoding::Encoder<'_, D>,
8596            offset: usize,
8597            _depth: fidl::encoding::Depth,
8598        ) -> fidl::Result<()> {
8599            encoder.debug_check_bounds::<MlmeStartCaptureFramesResponse>(offset);
8600            // Delegate to tuple encoding.
8601            fidl::encoding::Encode::<MlmeStartCaptureFramesResponse, D>::encode(
8602                (<StartCaptureFramesResponse as fidl::encoding::ValueTypeMarker>::borrow(
8603                    &self.resp,
8604                ),),
8605                encoder,
8606                offset,
8607                _depth,
8608            )
8609        }
8610    }
8611    unsafe impl<
8612            D: fidl::encoding::ResourceDialect,
8613            T0: fidl::encoding::Encode<StartCaptureFramesResponse, D>,
8614        > fidl::encoding::Encode<MlmeStartCaptureFramesResponse, D> for (T0,)
8615    {
8616        #[inline]
8617        unsafe fn encode(
8618            self,
8619            encoder: &mut fidl::encoding::Encoder<'_, D>,
8620            offset: usize,
8621            depth: fidl::encoding::Depth,
8622        ) -> fidl::Result<()> {
8623            encoder.debug_check_bounds::<MlmeStartCaptureFramesResponse>(offset);
8624            // Zero out padding regions. There's no need to apply masks
8625            // because the unmasked parts will be overwritten by fields.
8626            // Write the fields.
8627            self.0.encode(encoder, offset + 0, depth)?;
8628            Ok(())
8629        }
8630    }
8631
8632    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8633        for MlmeStartCaptureFramesResponse
8634    {
8635        #[inline(always)]
8636        fn new_empty() -> Self {
8637            Self { resp: fidl::new_empty!(StartCaptureFramesResponse, D) }
8638        }
8639
8640        #[inline]
8641        unsafe fn decode(
8642            &mut self,
8643            decoder: &mut fidl::encoding::Decoder<'_, D>,
8644            offset: usize,
8645            _depth: fidl::encoding::Depth,
8646        ) -> fidl::Result<()> {
8647            decoder.debug_check_bounds::<Self>(offset);
8648            // Verify that padding bytes are zero.
8649            fidl::decode!(
8650                StartCaptureFramesResponse,
8651                D,
8652                &mut self.resp,
8653                decoder,
8654                offset + 0,
8655                _depth
8656            )?;
8657            Ok(())
8658        }
8659    }
8660
8661    impl fidl::encoding::ValueTypeMarker for MlmeStartConfRequest {
8662        type Borrowed<'a> = &'a Self;
8663        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8664            value
8665        }
8666    }
8667
8668    unsafe impl fidl::encoding::TypeMarker for MlmeStartConfRequest {
8669        type Owned = Self;
8670
8671        #[inline(always)]
8672        fn inline_align(_context: fidl::encoding::Context) -> usize {
8673            4
8674        }
8675
8676        #[inline(always)]
8677        fn inline_size(_context: fidl::encoding::Context) -> usize {
8678            4
8679        }
8680    }
8681
8682    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeStartConfRequest, D>
8683        for &MlmeStartConfRequest
8684    {
8685        #[inline]
8686        unsafe fn encode(
8687            self,
8688            encoder: &mut fidl::encoding::Encoder<'_, D>,
8689            offset: usize,
8690            _depth: fidl::encoding::Depth,
8691        ) -> fidl::Result<()> {
8692            encoder.debug_check_bounds::<MlmeStartConfRequest>(offset);
8693            // Delegate to tuple encoding.
8694            fidl::encoding::Encode::<MlmeStartConfRequest, D>::encode(
8695                (<StartConfirm as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
8696                encoder,
8697                offset,
8698                _depth,
8699            )
8700        }
8701    }
8702    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StartConfirm, D>>
8703        fidl::encoding::Encode<MlmeStartConfRequest, D> for (T0,)
8704    {
8705        #[inline]
8706        unsafe fn encode(
8707            self,
8708            encoder: &mut fidl::encoding::Encoder<'_, D>,
8709            offset: usize,
8710            depth: fidl::encoding::Depth,
8711        ) -> fidl::Result<()> {
8712            encoder.debug_check_bounds::<MlmeStartConfRequest>(offset);
8713            // Zero out padding regions. There's no need to apply masks
8714            // because the unmasked parts will be overwritten by fields.
8715            // Write the fields.
8716            self.0.encode(encoder, offset + 0, depth)?;
8717            Ok(())
8718        }
8719    }
8720
8721    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeStartConfRequest {
8722        #[inline(always)]
8723        fn new_empty() -> Self {
8724            Self { resp: fidl::new_empty!(StartConfirm, D) }
8725        }
8726
8727        #[inline]
8728        unsafe fn decode(
8729            &mut self,
8730            decoder: &mut fidl::encoding::Decoder<'_, D>,
8731            offset: usize,
8732            _depth: fidl::encoding::Depth,
8733        ) -> fidl::Result<()> {
8734            decoder.debug_check_bounds::<Self>(offset);
8735            // Verify that padding bytes are zero.
8736            fidl::decode!(StartConfirm, D, &mut self.resp, decoder, offset + 0, _depth)?;
8737            Ok(())
8738        }
8739    }
8740
8741    impl fidl::encoding::ValueTypeMarker for MlmeStartReqRequest {
8742        type Borrowed<'a> = &'a Self;
8743        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8744            value
8745        }
8746    }
8747
8748    unsafe impl fidl::encoding::TypeMarker for MlmeStartReqRequest {
8749        type Owned = Self;
8750
8751        #[inline(always)]
8752        fn inline_align(_context: fidl::encoding::Context) -> usize {
8753            8
8754        }
8755
8756        #[inline(always)]
8757        fn inline_size(_context: fidl::encoding::Context) -> usize {
8758            96
8759        }
8760    }
8761
8762    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeStartReqRequest, D>
8763        for &MlmeStartReqRequest
8764    {
8765        #[inline]
8766        unsafe fn encode(
8767            self,
8768            encoder: &mut fidl::encoding::Encoder<'_, D>,
8769            offset: usize,
8770            _depth: fidl::encoding::Depth,
8771        ) -> fidl::Result<()> {
8772            encoder.debug_check_bounds::<MlmeStartReqRequest>(offset);
8773            // Delegate to tuple encoding.
8774            fidl::encoding::Encode::<MlmeStartReqRequest, D>::encode(
8775                (<StartRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
8776                encoder,
8777                offset,
8778                _depth,
8779            )
8780        }
8781    }
8782    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StartRequest, D>>
8783        fidl::encoding::Encode<MlmeStartReqRequest, D> for (T0,)
8784    {
8785        #[inline]
8786        unsafe fn encode(
8787            self,
8788            encoder: &mut fidl::encoding::Encoder<'_, D>,
8789            offset: usize,
8790            depth: fidl::encoding::Depth,
8791        ) -> fidl::Result<()> {
8792            encoder.debug_check_bounds::<MlmeStartReqRequest>(offset);
8793            // Zero out padding regions. There's no need to apply masks
8794            // because the unmasked parts will be overwritten by fields.
8795            // Write the fields.
8796            self.0.encode(encoder, offset + 0, depth)?;
8797            Ok(())
8798        }
8799    }
8800
8801    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeStartReqRequest {
8802        #[inline(always)]
8803        fn new_empty() -> Self {
8804            Self { req: fidl::new_empty!(StartRequest, D) }
8805        }
8806
8807        #[inline]
8808        unsafe fn decode(
8809            &mut self,
8810            decoder: &mut fidl::encoding::Decoder<'_, D>,
8811            offset: usize,
8812            _depth: fidl::encoding::Depth,
8813        ) -> fidl::Result<()> {
8814            decoder.debug_check_bounds::<Self>(offset);
8815            // Verify that padding bytes are zero.
8816            fidl::decode!(StartRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
8817            Ok(())
8818        }
8819    }
8820
8821    impl fidl::encoding::ValueTypeMarker for MlmeStartScanRequest {
8822        type Borrowed<'a> = &'a Self;
8823        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8824            value
8825        }
8826    }
8827
8828    unsafe impl fidl::encoding::TypeMarker for MlmeStartScanRequest {
8829        type Owned = Self;
8830
8831        #[inline(always)]
8832        fn inline_align(_context: fidl::encoding::Context) -> usize {
8833            8
8834        }
8835
8836        #[inline(always)]
8837        fn inline_size(_context: fidl::encoding::Context) -> usize {
8838            64
8839        }
8840    }
8841
8842    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeStartScanRequest, D>
8843        for &MlmeStartScanRequest
8844    {
8845        #[inline]
8846        unsafe fn encode(
8847            self,
8848            encoder: &mut fidl::encoding::Encoder<'_, D>,
8849            offset: usize,
8850            _depth: fidl::encoding::Depth,
8851        ) -> fidl::Result<()> {
8852            encoder.debug_check_bounds::<MlmeStartScanRequest>(offset);
8853            // Delegate to tuple encoding.
8854            fidl::encoding::Encode::<MlmeStartScanRequest, D>::encode(
8855                (<ScanRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
8856                encoder,
8857                offset,
8858                _depth,
8859            )
8860        }
8861    }
8862    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ScanRequest, D>>
8863        fidl::encoding::Encode<MlmeStartScanRequest, D> for (T0,)
8864    {
8865        #[inline]
8866        unsafe fn encode(
8867            self,
8868            encoder: &mut fidl::encoding::Encoder<'_, D>,
8869            offset: usize,
8870            depth: fidl::encoding::Depth,
8871        ) -> fidl::Result<()> {
8872            encoder.debug_check_bounds::<MlmeStartScanRequest>(offset);
8873            // Zero out padding regions. There's no need to apply masks
8874            // because the unmasked parts will be overwritten by fields.
8875            // Write the fields.
8876            self.0.encode(encoder, offset + 0, depth)?;
8877            Ok(())
8878        }
8879    }
8880
8881    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeStartScanRequest {
8882        #[inline(always)]
8883        fn new_empty() -> Self {
8884            Self { req: fidl::new_empty!(ScanRequest, D) }
8885        }
8886
8887        #[inline]
8888        unsafe fn decode(
8889            &mut self,
8890            decoder: &mut fidl::encoding::Decoder<'_, D>,
8891            offset: usize,
8892            _depth: fidl::encoding::Depth,
8893        ) -> fidl::Result<()> {
8894            decoder.debug_check_bounds::<Self>(offset);
8895            // Verify that padding bytes are zero.
8896            fidl::decode!(ScanRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
8897            Ok(())
8898        }
8899    }
8900
8901    impl fidl::encoding::ValueTypeMarker for MlmeStopConfRequest {
8902        type Borrowed<'a> = &'a Self;
8903        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8904            value
8905        }
8906    }
8907
8908    unsafe impl fidl::encoding::TypeMarker for MlmeStopConfRequest {
8909        type Owned = Self;
8910
8911        #[inline(always)]
8912        fn inline_align(_context: fidl::encoding::Context) -> usize {
8913            4
8914        }
8915
8916        #[inline(always)]
8917        fn inline_size(_context: fidl::encoding::Context) -> usize {
8918            4
8919        }
8920    }
8921
8922    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeStopConfRequest, D>
8923        for &MlmeStopConfRequest
8924    {
8925        #[inline]
8926        unsafe fn encode(
8927            self,
8928            encoder: &mut fidl::encoding::Encoder<'_, D>,
8929            offset: usize,
8930            _depth: fidl::encoding::Depth,
8931        ) -> fidl::Result<()> {
8932            encoder.debug_check_bounds::<MlmeStopConfRequest>(offset);
8933            // Delegate to tuple encoding.
8934            fidl::encoding::Encode::<MlmeStopConfRequest, D>::encode(
8935                (<StopConfirm as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
8936                encoder,
8937                offset,
8938                _depth,
8939            )
8940        }
8941    }
8942    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StopConfirm, D>>
8943        fidl::encoding::Encode<MlmeStopConfRequest, D> for (T0,)
8944    {
8945        #[inline]
8946        unsafe fn encode(
8947            self,
8948            encoder: &mut fidl::encoding::Encoder<'_, D>,
8949            offset: usize,
8950            depth: fidl::encoding::Depth,
8951        ) -> fidl::Result<()> {
8952            encoder.debug_check_bounds::<MlmeStopConfRequest>(offset);
8953            // Zero out padding regions. There's no need to apply masks
8954            // because the unmasked parts will be overwritten by fields.
8955            // Write the fields.
8956            self.0.encode(encoder, offset + 0, depth)?;
8957            Ok(())
8958        }
8959    }
8960
8961    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeStopConfRequest {
8962        #[inline(always)]
8963        fn new_empty() -> Self {
8964            Self { resp: fidl::new_empty!(StopConfirm, D) }
8965        }
8966
8967        #[inline]
8968        unsafe fn decode(
8969            &mut self,
8970            decoder: &mut fidl::encoding::Decoder<'_, D>,
8971            offset: usize,
8972            _depth: fidl::encoding::Depth,
8973        ) -> fidl::Result<()> {
8974            decoder.debug_check_bounds::<Self>(offset);
8975            // Verify that padding bytes are zero.
8976            fidl::decode!(StopConfirm, D, &mut self.resp, decoder, offset + 0, _depth)?;
8977            Ok(())
8978        }
8979    }
8980
8981    impl fidl::encoding::ValueTypeMarker for MlmeStopReqRequest {
8982        type Borrowed<'a> = &'a Self;
8983        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8984            value
8985        }
8986    }
8987
8988    unsafe impl fidl::encoding::TypeMarker for MlmeStopReqRequest {
8989        type Owned = Self;
8990
8991        #[inline(always)]
8992        fn inline_align(_context: fidl::encoding::Context) -> usize {
8993            8
8994        }
8995
8996        #[inline(always)]
8997        fn inline_size(_context: fidl::encoding::Context) -> usize {
8998            16
8999        }
9000    }
9001
9002    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeStopReqRequest, D>
9003        for &MlmeStopReqRequest
9004    {
9005        #[inline]
9006        unsafe fn encode(
9007            self,
9008            encoder: &mut fidl::encoding::Encoder<'_, D>,
9009            offset: usize,
9010            _depth: fidl::encoding::Depth,
9011        ) -> fidl::Result<()> {
9012            encoder.debug_check_bounds::<MlmeStopReqRequest>(offset);
9013            // Delegate to tuple encoding.
9014            fidl::encoding::Encode::<MlmeStopReqRequest, D>::encode(
9015                (<StopRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
9016                encoder,
9017                offset,
9018                _depth,
9019            )
9020        }
9021    }
9022    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StopRequest, D>>
9023        fidl::encoding::Encode<MlmeStopReqRequest, D> for (T0,)
9024    {
9025        #[inline]
9026        unsafe fn encode(
9027            self,
9028            encoder: &mut fidl::encoding::Encoder<'_, D>,
9029            offset: usize,
9030            depth: fidl::encoding::Depth,
9031        ) -> fidl::Result<()> {
9032            encoder.debug_check_bounds::<MlmeStopReqRequest>(offset);
9033            // Zero out padding regions. There's no need to apply masks
9034            // because the unmasked parts will be overwritten by fields.
9035            // Write the fields.
9036            self.0.encode(encoder, offset + 0, depth)?;
9037            Ok(())
9038        }
9039    }
9040
9041    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeStopReqRequest {
9042        #[inline(always)]
9043        fn new_empty() -> Self {
9044            Self { req: fidl::new_empty!(StopRequest, D) }
9045        }
9046
9047        #[inline]
9048        unsafe fn decode(
9049            &mut self,
9050            decoder: &mut fidl::encoding::Decoder<'_, D>,
9051            offset: usize,
9052            _depth: fidl::encoding::Depth,
9053        ) -> fidl::Result<()> {
9054            decoder.debug_check_bounds::<Self>(offset);
9055            // Verify that padding bytes are zero.
9056            fidl::decode!(StopRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
9057            Ok(())
9058        }
9059    }
9060
9061    impl fidl::encoding::ValueTypeMarker for NegotiatedCapabilities {
9062        type Borrowed<'a> = &'a Self;
9063        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9064            value
9065        }
9066    }
9067
9068    unsafe impl fidl::encoding::TypeMarker for NegotiatedCapabilities {
9069        type Owned = Self;
9070
9071        #[inline(always)]
9072        fn inline_align(_context: fidl::encoding::Context) -> usize {
9073            8
9074        }
9075
9076        #[inline(always)]
9077        fn inline_size(_context: fidl::encoding::Context) -> usize {
9078            56
9079        }
9080    }
9081
9082    unsafe impl<D: fidl::encoding::ResourceDialect>
9083        fidl::encoding::Encode<NegotiatedCapabilities, D> for &NegotiatedCapabilities
9084    {
9085        #[inline]
9086        unsafe fn encode(
9087            self,
9088            encoder: &mut fidl::encoding::Encoder<'_, D>,
9089            offset: usize,
9090            _depth: fidl::encoding::Depth,
9091        ) -> fidl::Result<()> {
9092            encoder.debug_check_bounds::<NegotiatedCapabilities>(offset);
9093            // Delegate to tuple encoding.
9094            fidl::encoding::Encode::<NegotiatedCapabilities, D>::encode(
9095                (
9096                    <fidl_fuchsia_wlan_common::WlanChannel as fidl::encoding::ValueTypeMarker>::borrow(&self.channel),
9097                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.capability_info),
9098                    <fidl::encoding::Vector<u8, 14> as fidl::encoding::ValueTypeMarker>::borrow(&self.rates),
9099                    <fidl::encoding::Boxed<WmmParameter> as fidl::encoding::ValueTypeMarker>::borrow(&self.wmm_param),
9100                    <fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities> as fidl::encoding::ValueTypeMarker>::borrow(&self.ht_cap),
9101                    <fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities> as fidl::encoding::ValueTypeMarker>::borrow(&self.vht_cap),
9102                ),
9103                encoder, offset, _depth
9104            )
9105        }
9106    }
9107    unsafe impl<
9108            D: fidl::encoding::ResourceDialect,
9109            T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanChannel, D>,
9110            T1: fidl::encoding::Encode<u16, D>,
9111            T2: fidl::encoding::Encode<fidl::encoding::Vector<u8, 14>, D>,
9112            T3: fidl::encoding::Encode<fidl::encoding::Boxed<WmmParameter>, D>,
9113            T4: fidl::encoding::Encode<
9114                fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities>,
9115                D,
9116            >,
9117            T5: fidl::encoding::Encode<
9118                fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>,
9119                D,
9120            >,
9121        > fidl::encoding::Encode<NegotiatedCapabilities, D> for (T0, T1, T2, T3, T4, T5)
9122    {
9123        #[inline]
9124        unsafe fn encode(
9125            self,
9126            encoder: &mut fidl::encoding::Encoder<'_, D>,
9127            offset: usize,
9128            depth: fidl::encoding::Depth,
9129        ) -> fidl::Result<()> {
9130            encoder.debug_check_bounds::<NegotiatedCapabilities>(offset);
9131            // Zero out padding regions. There's no need to apply masks
9132            // because the unmasked parts will be overwritten by fields.
9133            unsafe {
9134                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9135                (ptr as *mut u64).write_unaligned(0);
9136            }
9137            // Write the fields.
9138            self.0.encode(encoder, offset + 0, depth)?;
9139            self.1.encode(encoder, offset + 12, depth)?;
9140            self.2.encode(encoder, offset + 16, depth)?;
9141            self.3.encode(encoder, offset + 32, depth)?;
9142            self.4.encode(encoder, offset + 40, depth)?;
9143            self.5.encode(encoder, offset + 48, depth)?;
9144            Ok(())
9145        }
9146    }
9147
9148    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9149        for NegotiatedCapabilities
9150    {
9151        #[inline(always)]
9152        fn new_empty() -> Self {
9153            Self {
9154                channel: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanChannel, D),
9155                capability_info: fidl::new_empty!(u16, D),
9156                rates: fidl::new_empty!(fidl::encoding::Vector<u8, 14>, D),
9157                wmm_param: fidl::new_empty!(fidl::encoding::Boxed<WmmParameter>, D),
9158                ht_cap: fidl::new_empty!(
9159                    fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities>,
9160                    D
9161                ),
9162                vht_cap: fidl::new_empty!(
9163                    fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>,
9164                    D
9165                ),
9166            }
9167        }
9168
9169        #[inline]
9170        unsafe fn decode(
9171            &mut self,
9172            decoder: &mut fidl::encoding::Decoder<'_, D>,
9173            offset: usize,
9174            _depth: fidl::encoding::Depth,
9175        ) -> fidl::Result<()> {
9176            decoder.debug_check_bounds::<Self>(offset);
9177            // Verify that padding bytes are zero.
9178            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9179            let padval = unsafe { (ptr as *const u64).read_unaligned() };
9180            let mask = 0xffff000000000000u64;
9181            let maskedval = padval & mask;
9182            if maskedval != 0 {
9183                return Err(fidl::Error::NonZeroPadding {
9184                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9185                });
9186            }
9187            fidl::decode!(
9188                fidl_fuchsia_wlan_common::WlanChannel,
9189                D,
9190                &mut self.channel,
9191                decoder,
9192                offset + 0,
9193                _depth
9194            )?;
9195            fidl::decode!(u16, D, &mut self.capability_info, decoder, offset + 12, _depth)?;
9196            fidl::decode!(fidl::encoding::Vector<u8, 14>, D, &mut self.rates, decoder, offset + 16, _depth)?;
9197            fidl::decode!(
9198                fidl::encoding::Boxed<WmmParameter>,
9199                D,
9200                &mut self.wmm_param,
9201                decoder,
9202                offset + 32,
9203                _depth
9204            )?;
9205            fidl::decode!(
9206                fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities>,
9207                D,
9208                &mut self.ht_cap,
9209                decoder,
9210                offset + 40,
9211                _depth
9212            )?;
9213            fidl::decode!(
9214                fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>,
9215                D,
9216                &mut self.vht_cap,
9217                decoder,
9218                offset + 48,
9219                _depth
9220            )?;
9221            Ok(())
9222        }
9223    }
9224
9225    impl fidl::encoding::ValueTypeMarker for PmkInfo {
9226        type Borrowed<'a> = &'a Self;
9227        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9228            value
9229        }
9230    }
9231
9232    unsafe impl fidl::encoding::TypeMarker for PmkInfo {
9233        type Owned = Self;
9234
9235        #[inline(always)]
9236        fn inline_align(_context: fidl::encoding::Context) -> usize {
9237            8
9238        }
9239
9240        #[inline(always)]
9241        fn inline_size(_context: fidl::encoding::Context) -> usize {
9242            32
9243        }
9244    }
9245
9246    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PmkInfo, D> for &PmkInfo {
9247        #[inline]
9248        unsafe fn encode(
9249            self,
9250            encoder: &mut fidl::encoding::Encoder<'_, D>,
9251            offset: usize,
9252            _depth: fidl::encoding::Depth,
9253        ) -> fidl::Result<()> {
9254            encoder.debug_check_bounds::<PmkInfo>(offset);
9255            // Delegate to tuple encoding.
9256            fidl::encoding::Encode::<PmkInfo, D>::encode(
9257                (
9258                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.pmk),
9259                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.pmkid),
9260                ),
9261                encoder, offset, _depth
9262            )
9263        }
9264    }
9265    unsafe impl<
9266            D: fidl::encoding::ResourceDialect,
9267            T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
9268            T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
9269        > fidl::encoding::Encode<PmkInfo, D> for (T0, T1)
9270    {
9271        #[inline]
9272        unsafe fn encode(
9273            self,
9274            encoder: &mut fidl::encoding::Encoder<'_, D>,
9275            offset: usize,
9276            depth: fidl::encoding::Depth,
9277        ) -> fidl::Result<()> {
9278            encoder.debug_check_bounds::<PmkInfo>(offset);
9279            // Zero out padding regions. There's no need to apply masks
9280            // because the unmasked parts will be overwritten by fields.
9281            // Write the fields.
9282            self.0.encode(encoder, offset + 0, depth)?;
9283            self.1.encode(encoder, offset + 16, depth)?;
9284            Ok(())
9285        }
9286    }
9287
9288    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PmkInfo {
9289        #[inline(always)]
9290        fn new_empty() -> Self {
9291            Self {
9292                pmk: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
9293                pmkid: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
9294            }
9295        }
9296
9297        #[inline]
9298        unsafe fn decode(
9299            &mut self,
9300            decoder: &mut fidl::encoding::Decoder<'_, D>,
9301            offset: usize,
9302            _depth: fidl::encoding::Depth,
9303        ) -> fidl::Result<()> {
9304            decoder.debug_check_bounds::<Self>(offset);
9305            // Verify that padding bytes are zero.
9306            fidl::decode!(
9307                fidl::encoding::UnboundedVector<u8>,
9308                D,
9309                &mut self.pmk,
9310                decoder,
9311                offset + 0,
9312                _depth
9313            )?;
9314            fidl::decode!(
9315                fidl::encoding::UnboundedVector<u8>,
9316                D,
9317                &mut self.pmkid,
9318                decoder,
9319                offset + 16,
9320                _depth
9321            )?;
9322            Ok(())
9323        }
9324    }
9325
9326    impl fidl::encoding::ValueTypeMarker for ReconnectRequest {
9327        type Borrowed<'a> = &'a Self;
9328        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9329            value
9330        }
9331    }
9332
9333    unsafe impl fidl::encoding::TypeMarker for ReconnectRequest {
9334        type Owned = Self;
9335
9336        #[inline(always)]
9337        fn inline_align(_context: fidl::encoding::Context) -> usize {
9338            1
9339        }
9340
9341        #[inline(always)]
9342        fn inline_size(_context: fidl::encoding::Context) -> usize {
9343            6
9344        }
9345        #[inline(always)]
9346        fn encode_is_copy() -> bool {
9347            true
9348        }
9349
9350        #[inline(always)]
9351        fn decode_is_copy() -> bool {
9352            true
9353        }
9354    }
9355
9356    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ReconnectRequest, D>
9357        for &ReconnectRequest
9358    {
9359        #[inline]
9360        unsafe fn encode(
9361            self,
9362            encoder: &mut fidl::encoding::Encoder<'_, D>,
9363            offset: usize,
9364            _depth: fidl::encoding::Depth,
9365        ) -> fidl::Result<()> {
9366            encoder.debug_check_bounds::<ReconnectRequest>(offset);
9367            unsafe {
9368                // Copy the object into the buffer.
9369                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9370                (buf_ptr as *mut ReconnectRequest)
9371                    .write_unaligned((self as *const ReconnectRequest).read());
9372                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9373                // done second because the memcpy will write garbage to these bytes.
9374            }
9375            Ok(())
9376        }
9377    }
9378    unsafe impl<
9379            D: fidl::encoding::ResourceDialect,
9380            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
9381        > fidl::encoding::Encode<ReconnectRequest, D> for (T0,)
9382    {
9383        #[inline]
9384        unsafe fn encode(
9385            self,
9386            encoder: &mut fidl::encoding::Encoder<'_, D>,
9387            offset: usize,
9388            depth: fidl::encoding::Depth,
9389        ) -> fidl::Result<()> {
9390            encoder.debug_check_bounds::<ReconnectRequest>(offset);
9391            // Zero out padding regions. There's no need to apply masks
9392            // because the unmasked parts will be overwritten by fields.
9393            // Write the fields.
9394            self.0.encode(encoder, offset + 0, depth)?;
9395            Ok(())
9396        }
9397    }
9398
9399    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ReconnectRequest {
9400        #[inline(always)]
9401        fn new_empty() -> Self {
9402            Self { peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D) }
9403        }
9404
9405        #[inline]
9406        unsafe fn decode(
9407            &mut self,
9408            decoder: &mut fidl::encoding::Decoder<'_, D>,
9409            offset: usize,
9410            _depth: fidl::encoding::Depth,
9411        ) -> fidl::Result<()> {
9412            decoder.debug_check_bounds::<Self>(offset);
9413            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9414            // Verify that padding bytes are zero.
9415            // Copy from the buffer into the object.
9416            unsafe {
9417                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
9418            }
9419            Ok(())
9420        }
9421    }
9422
9423    impl fidl::encoding::ValueTypeMarker for ResetRequest {
9424        type Borrowed<'a> = &'a Self;
9425        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9426            value
9427        }
9428    }
9429
9430    unsafe impl fidl::encoding::TypeMarker for ResetRequest {
9431        type Owned = Self;
9432
9433        #[inline(always)]
9434        fn inline_align(_context: fidl::encoding::Context) -> usize {
9435            1
9436        }
9437
9438        #[inline(always)]
9439        fn inline_size(_context: fidl::encoding::Context) -> usize {
9440            7
9441        }
9442    }
9443
9444    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ResetRequest, D>
9445        for &ResetRequest
9446    {
9447        #[inline]
9448        unsafe fn encode(
9449            self,
9450            encoder: &mut fidl::encoding::Encoder<'_, D>,
9451            offset: usize,
9452            _depth: fidl::encoding::Depth,
9453        ) -> fidl::Result<()> {
9454            encoder.debug_check_bounds::<ResetRequest>(offset);
9455            // Delegate to tuple encoding.
9456            fidl::encoding::Encode::<ResetRequest, D>::encode(
9457                (
9458                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(
9459                        &self.sta_address,
9460                    ),
9461                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.set_default_mib),
9462                ),
9463                encoder,
9464                offset,
9465                _depth,
9466            )
9467        }
9468    }
9469    unsafe impl<
9470            D: fidl::encoding::ResourceDialect,
9471            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
9472            T1: fidl::encoding::Encode<bool, D>,
9473        > fidl::encoding::Encode<ResetRequest, D> for (T0, T1)
9474    {
9475        #[inline]
9476        unsafe fn encode(
9477            self,
9478            encoder: &mut fidl::encoding::Encoder<'_, D>,
9479            offset: usize,
9480            depth: fidl::encoding::Depth,
9481        ) -> fidl::Result<()> {
9482            encoder.debug_check_bounds::<ResetRequest>(offset);
9483            // Zero out padding regions. There's no need to apply masks
9484            // because the unmasked parts will be overwritten by fields.
9485            // Write the fields.
9486            self.0.encode(encoder, offset + 0, depth)?;
9487            self.1.encode(encoder, offset + 6, depth)?;
9488            Ok(())
9489        }
9490    }
9491
9492    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ResetRequest {
9493        #[inline(always)]
9494        fn new_empty() -> Self {
9495            Self {
9496                sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
9497                set_default_mib: fidl::new_empty!(bool, D),
9498            }
9499        }
9500
9501        #[inline]
9502        unsafe fn decode(
9503            &mut self,
9504            decoder: &mut fidl::encoding::Decoder<'_, D>,
9505            offset: usize,
9506            _depth: fidl::encoding::Depth,
9507        ) -> fidl::Result<()> {
9508            decoder.debug_check_bounds::<Self>(offset);
9509            // Verify that padding bytes are zero.
9510            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.sta_address, decoder, offset + 0, _depth)?;
9511            fidl::decode!(bool, D, &mut self.set_default_mib, decoder, offset + 6, _depth)?;
9512            Ok(())
9513        }
9514    }
9515
9516    impl fidl::encoding::ValueTypeMarker for RoamConfirm {
9517        type Borrowed<'a> = &'a Self;
9518        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9519            value
9520        }
9521    }
9522
9523    unsafe impl fidl::encoding::TypeMarker for RoamConfirm {
9524        type Owned = Self;
9525
9526        #[inline(always)]
9527        fn inline_align(_context: fidl::encoding::Context) -> usize {
9528            8
9529        }
9530
9531        #[inline(always)]
9532        fn inline_size(_context: fidl::encoding::Context) -> usize {
9533            32
9534        }
9535    }
9536
9537    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RoamConfirm, D>
9538        for &RoamConfirm
9539    {
9540        #[inline]
9541        unsafe fn encode(
9542            self,
9543            encoder: &mut fidl::encoding::Encoder<'_, D>,
9544            offset: usize,
9545            _depth: fidl::encoding::Depth,
9546        ) -> fidl::Result<()> {
9547            encoder.debug_check_bounds::<RoamConfirm>(offset);
9548            // Delegate to tuple encoding.
9549            fidl::encoding::Encode::<RoamConfirm, D>::encode(
9550                (
9551                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.selected_bssid),
9552                    <fidl_fuchsia_wlan_ieee80211::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.status_code),
9553                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.original_association_maintained),
9554                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.target_bss_authenticated),
9555                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.association_id),
9556                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.association_ies),
9557                ),
9558                encoder, offset, _depth
9559            )
9560        }
9561    }
9562    unsafe impl<
9563            D: fidl::encoding::ResourceDialect,
9564            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
9565            T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::StatusCode, D>,
9566            T2: fidl::encoding::Encode<bool, D>,
9567            T3: fidl::encoding::Encode<bool, D>,
9568            T4: fidl::encoding::Encode<u16, D>,
9569            T5: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
9570        > fidl::encoding::Encode<RoamConfirm, D> for (T0, T1, T2, T3, T4, T5)
9571    {
9572        #[inline]
9573        unsafe fn encode(
9574            self,
9575            encoder: &mut fidl::encoding::Encoder<'_, D>,
9576            offset: usize,
9577            depth: fidl::encoding::Depth,
9578        ) -> fidl::Result<()> {
9579            encoder.debug_check_bounds::<RoamConfirm>(offset);
9580            // Zero out padding regions. There's no need to apply masks
9581            // because the unmasked parts will be overwritten by fields.
9582            unsafe {
9583                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9584                (ptr as *mut u64).write_unaligned(0);
9585            }
9586            // Write the fields.
9587            self.0.encode(encoder, offset + 0, depth)?;
9588            self.1.encode(encoder, offset + 6, depth)?;
9589            self.2.encode(encoder, offset + 8, depth)?;
9590            self.3.encode(encoder, offset + 9, depth)?;
9591            self.4.encode(encoder, offset + 10, depth)?;
9592            self.5.encode(encoder, offset + 16, depth)?;
9593            Ok(())
9594        }
9595    }
9596
9597    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RoamConfirm {
9598        #[inline(always)]
9599        fn new_empty() -> Self {
9600            Self {
9601                selected_bssid: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
9602                status_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::StatusCode, D),
9603                original_association_maintained: fidl::new_empty!(bool, D),
9604                target_bss_authenticated: fidl::new_empty!(bool, D),
9605                association_id: fidl::new_empty!(u16, D),
9606                association_ies: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
9607            }
9608        }
9609
9610        #[inline]
9611        unsafe fn decode(
9612            &mut self,
9613            decoder: &mut fidl::encoding::Decoder<'_, D>,
9614            offset: usize,
9615            _depth: fidl::encoding::Depth,
9616        ) -> fidl::Result<()> {
9617            decoder.debug_check_bounds::<Self>(offset);
9618            // Verify that padding bytes are zero.
9619            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9620            let padval = unsafe { (ptr as *const u64).read_unaligned() };
9621            let mask = 0xffffffff00000000u64;
9622            let maskedval = padval & mask;
9623            if maskedval != 0 {
9624                return Err(fidl::Error::NonZeroPadding {
9625                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9626                });
9627            }
9628            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.selected_bssid, decoder, offset + 0, _depth)?;
9629            fidl::decode!(
9630                fidl_fuchsia_wlan_ieee80211::StatusCode,
9631                D,
9632                &mut self.status_code,
9633                decoder,
9634                offset + 6,
9635                _depth
9636            )?;
9637            fidl::decode!(
9638                bool,
9639                D,
9640                &mut self.original_association_maintained,
9641                decoder,
9642                offset + 8,
9643                _depth
9644            )?;
9645            fidl::decode!(
9646                bool,
9647                D,
9648                &mut self.target_bss_authenticated,
9649                decoder,
9650                offset + 9,
9651                _depth
9652            )?;
9653            fidl::decode!(u16, D, &mut self.association_id, decoder, offset + 10, _depth)?;
9654            fidl::decode!(
9655                fidl::encoding::UnboundedVector<u8>,
9656                D,
9657                &mut self.association_ies,
9658                decoder,
9659                offset + 16,
9660                _depth
9661            )?;
9662            Ok(())
9663        }
9664    }
9665
9666    impl fidl::encoding::ValueTypeMarker for RoamRequest {
9667        type Borrowed<'a> = &'a Self;
9668        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9669            value
9670        }
9671    }
9672
9673    unsafe impl fidl::encoding::TypeMarker for RoamRequest {
9674        type Owned = Self;
9675
9676        #[inline(always)]
9677        fn inline_align(_context: fidl::encoding::Context) -> usize {
9678            8
9679        }
9680
9681        #[inline(always)]
9682        fn inline_size(_context: fidl::encoding::Context) -> usize {
9683            48
9684        }
9685    }
9686
9687    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RoamRequest, D>
9688        for &RoamRequest
9689    {
9690        #[inline]
9691        unsafe fn encode(
9692            self,
9693            encoder: &mut fidl::encoding::Encoder<'_, D>,
9694            offset: usize,
9695            _depth: fidl::encoding::Depth,
9696        ) -> fidl::Result<()> {
9697            encoder.debug_check_bounds::<RoamRequest>(offset);
9698            // Delegate to tuple encoding.
9699            fidl::encoding::Encode::<RoamRequest, D>::encode(
9700                (
9701                    <fidl_fuchsia_wlan_common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.selected_bss),
9702                ),
9703                encoder, offset, _depth
9704            )
9705        }
9706    }
9707    unsafe impl<
9708            D: fidl::encoding::ResourceDialect,
9709            T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::BssDescription, D>,
9710        > fidl::encoding::Encode<RoamRequest, D> for (T0,)
9711    {
9712        #[inline]
9713        unsafe fn encode(
9714            self,
9715            encoder: &mut fidl::encoding::Encoder<'_, D>,
9716            offset: usize,
9717            depth: fidl::encoding::Depth,
9718        ) -> fidl::Result<()> {
9719            encoder.debug_check_bounds::<RoamRequest>(offset);
9720            // Zero out padding regions. There's no need to apply masks
9721            // because the unmasked parts will be overwritten by fields.
9722            // Write the fields.
9723            self.0.encode(encoder, offset + 0, depth)?;
9724            Ok(())
9725        }
9726    }
9727
9728    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RoamRequest {
9729        #[inline(always)]
9730        fn new_empty() -> Self {
9731            Self { selected_bss: fidl::new_empty!(fidl_fuchsia_wlan_common::BssDescription, D) }
9732        }
9733
9734        #[inline]
9735        unsafe fn decode(
9736            &mut self,
9737            decoder: &mut fidl::encoding::Decoder<'_, D>,
9738            offset: usize,
9739            _depth: fidl::encoding::Depth,
9740        ) -> fidl::Result<()> {
9741            decoder.debug_check_bounds::<Self>(offset);
9742            // Verify that padding bytes are zero.
9743            fidl::decode!(
9744                fidl_fuchsia_wlan_common::BssDescription,
9745                D,
9746                &mut self.selected_bss,
9747                decoder,
9748                offset + 0,
9749                _depth
9750            )?;
9751            Ok(())
9752        }
9753    }
9754
9755    impl fidl::encoding::ValueTypeMarker for RoamResultIndication {
9756        type Borrowed<'a> = &'a Self;
9757        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9758            value
9759        }
9760    }
9761
9762    unsafe impl fidl::encoding::TypeMarker for RoamResultIndication {
9763        type Owned = Self;
9764
9765        #[inline(always)]
9766        fn inline_align(_context: fidl::encoding::Context) -> usize {
9767            8
9768        }
9769
9770        #[inline(always)]
9771        fn inline_size(_context: fidl::encoding::Context) -> usize {
9772            32
9773        }
9774    }
9775
9776    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RoamResultIndication, D>
9777        for &RoamResultIndication
9778    {
9779        #[inline]
9780        unsafe fn encode(
9781            self,
9782            encoder: &mut fidl::encoding::Encoder<'_, D>,
9783            offset: usize,
9784            _depth: fidl::encoding::Depth,
9785        ) -> fidl::Result<()> {
9786            encoder.debug_check_bounds::<RoamResultIndication>(offset);
9787            // Delegate to tuple encoding.
9788            fidl::encoding::Encode::<RoamResultIndication, D>::encode(
9789                (
9790                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.selected_bssid),
9791                    <fidl_fuchsia_wlan_ieee80211::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.status_code),
9792                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.original_association_maintained),
9793                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.target_bss_authenticated),
9794                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.association_id),
9795                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.association_ies),
9796                ),
9797                encoder, offset, _depth
9798            )
9799        }
9800    }
9801    unsafe impl<
9802            D: fidl::encoding::ResourceDialect,
9803            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
9804            T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::StatusCode, D>,
9805            T2: fidl::encoding::Encode<bool, D>,
9806            T3: fidl::encoding::Encode<bool, D>,
9807            T4: fidl::encoding::Encode<u16, D>,
9808            T5: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
9809        > fidl::encoding::Encode<RoamResultIndication, D> for (T0, T1, T2, T3, T4, T5)
9810    {
9811        #[inline]
9812        unsafe fn encode(
9813            self,
9814            encoder: &mut fidl::encoding::Encoder<'_, D>,
9815            offset: usize,
9816            depth: fidl::encoding::Depth,
9817        ) -> fidl::Result<()> {
9818            encoder.debug_check_bounds::<RoamResultIndication>(offset);
9819            // Zero out padding regions. There's no need to apply masks
9820            // because the unmasked parts will be overwritten by fields.
9821            unsafe {
9822                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9823                (ptr as *mut u64).write_unaligned(0);
9824            }
9825            // Write the fields.
9826            self.0.encode(encoder, offset + 0, depth)?;
9827            self.1.encode(encoder, offset + 6, depth)?;
9828            self.2.encode(encoder, offset + 8, depth)?;
9829            self.3.encode(encoder, offset + 9, depth)?;
9830            self.4.encode(encoder, offset + 10, depth)?;
9831            self.5.encode(encoder, offset + 16, depth)?;
9832            Ok(())
9833        }
9834    }
9835
9836    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RoamResultIndication {
9837        #[inline(always)]
9838        fn new_empty() -> Self {
9839            Self {
9840                selected_bssid: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
9841                status_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::StatusCode, D),
9842                original_association_maintained: fidl::new_empty!(bool, D),
9843                target_bss_authenticated: fidl::new_empty!(bool, D),
9844                association_id: fidl::new_empty!(u16, D),
9845                association_ies: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
9846            }
9847        }
9848
9849        #[inline]
9850        unsafe fn decode(
9851            &mut self,
9852            decoder: &mut fidl::encoding::Decoder<'_, D>,
9853            offset: usize,
9854            _depth: fidl::encoding::Depth,
9855        ) -> fidl::Result<()> {
9856            decoder.debug_check_bounds::<Self>(offset);
9857            // Verify that padding bytes are zero.
9858            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9859            let padval = unsafe { (ptr as *const u64).read_unaligned() };
9860            let mask = 0xffffffff00000000u64;
9861            let maskedval = padval & mask;
9862            if maskedval != 0 {
9863                return Err(fidl::Error::NonZeroPadding {
9864                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9865                });
9866            }
9867            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.selected_bssid, decoder, offset + 0, _depth)?;
9868            fidl::decode!(
9869                fidl_fuchsia_wlan_ieee80211::StatusCode,
9870                D,
9871                &mut self.status_code,
9872                decoder,
9873                offset + 6,
9874                _depth
9875            )?;
9876            fidl::decode!(
9877                bool,
9878                D,
9879                &mut self.original_association_maintained,
9880                decoder,
9881                offset + 8,
9882                _depth
9883            )?;
9884            fidl::decode!(
9885                bool,
9886                D,
9887                &mut self.target_bss_authenticated,
9888                decoder,
9889                offset + 9,
9890                _depth
9891            )?;
9892            fidl::decode!(u16, D, &mut self.association_id, decoder, offset + 10, _depth)?;
9893            fidl::decode!(
9894                fidl::encoding::UnboundedVector<u8>,
9895                D,
9896                &mut self.association_ies,
9897                decoder,
9898                offset + 16,
9899                _depth
9900            )?;
9901            Ok(())
9902        }
9903    }
9904
9905    impl fidl::encoding::ValueTypeMarker for RoamStartIndication {
9906        type Borrowed<'a> = &'a Self;
9907        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9908            value
9909        }
9910    }
9911
9912    unsafe impl fidl::encoding::TypeMarker for RoamStartIndication {
9913        type Owned = Self;
9914
9915        #[inline(always)]
9916        fn inline_align(_context: fidl::encoding::Context) -> usize {
9917            8
9918        }
9919
9920        #[inline(always)]
9921        fn inline_size(_context: fidl::encoding::Context) -> usize {
9922            64
9923        }
9924    }
9925
9926    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RoamStartIndication, D>
9927        for &RoamStartIndication
9928    {
9929        #[inline]
9930        unsafe fn encode(
9931            self,
9932            encoder: &mut fidl::encoding::Encoder<'_, D>,
9933            offset: usize,
9934            _depth: fidl::encoding::Depth,
9935        ) -> fidl::Result<()> {
9936            encoder.debug_check_bounds::<RoamStartIndication>(offset);
9937            // Delegate to tuple encoding.
9938            fidl::encoding::Encode::<RoamStartIndication, D>::encode(
9939                (
9940                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.selected_bssid),
9941                    <fidl_fuchsia_wlan_common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.selected_bss),
9942                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.original_association_maintained),
9943                ),
9944                encoder, offset, _depth
9945            )
9946        }
9947    }
9948    unsafe impl<
9949            D: fidl::encoding::ResourceDialect,
9950            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
9951            T1: fidl::encoding::Encode<fidl_fuchsia_wlan_common::BssDescription, D>,
9952            T2: fidl::encoding::Encode<bool, D>,
9953        > fidl::encoding::Encode<RoamStartIndication, D> for (T0, T1, T2)
9954    {
9955        #[inline]
9956        unsafe fn encode(
9957            self,
9958            encoder: &mut fidl::encoding::Encoder<'_, D>,
9959            offset: usize,
9960            depth: fidl::encoding::Depth,
9961        ) -> fidl::Result<()> {
9962            encoder.debug_check_bounds::<RoamStartIndication>(offset);
9963            // Zero out padding regions. There's no need to apply masks
9964            // because the unmasked parts will be overwritten by fields.
9965            unsafe {
9966                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
9967                (ptr as *mut u64).write_unaligned(0);
9968            }
9969            unsafe {
9970                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(56);
9971                (ptr as *mut u64).write_unaligned(0);
9972            }
9973            // Write the fields.
9974            self.0.encode(encoder, offset + 0, depth)?;
9975            self.1.encode(encoder, offset + 8, depth)?;
9976            self.2.encode(encoder, offset + 56, depth)?;
9977            Ok(())
9978        }
9979    }
9980
9981    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RoamStartIndication {
9982        #[inline(always)]
9983        fn new_empty() -> Self {
9984            Self {
9985                selected_bssid: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
9986                selected_bss: fidl::new_empty!(fidl_fuchsia_wlan_common::BssDescription, D),
9987                original_association_maintained: fidl::new_empty!(bool, D),
9988            }
9989        }
9990
9991        #[inline]
9992        unsafe fn decode(
9993            &mut self,
9994            decoder: &mut fidl::encoding::Decoder<'_, D>,
9995            offset: usize,
9996            _depth: fidl::encoding::Depth,
9997        ) -> fidl::Result<()> {
9998            decoder.debug_check_bounds::<Self>(offset);
9999            // Verify that padding bytes are zero.
10000            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
10001            let padval = unsafe { (ptr as *const u64).read_unaligned() };
10002            let mask = 0xffff000000000000u64;
10003            let maskedval = padval & mask;
10004            if maskedval != 0 {
10005                return Err(fidl::Error::NonZeroPadding {
10006                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
10007                });
10008            }
10009            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(56) };
10010            let padval = unsafe { (ptr as *const u64).read_unaligned() };
10011            let mask = 0xffffffffffffff00u64;
10012            let maskedval = padval & mask;
10013            if maskedval != 0 {
10014                return Err(fidl::Error::NonZeroPadding {
10015                    padding_start: offset + 56 + ((mask as u64).trailing_zeros() / 8) as usize,
10016                });
10017            }
10018            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.selected_bssid, decoder, offset + 0, _depth)?;
10019            fidl::decode!(
10020                fidl_fuchsia_wlan_common::BssDescription,
10021                D,
10022                &mut self.selected_bss,
10023                decoder,
10024                offset + 8,
10025                _depth
10026            )?;
10027            fidl::decode!(
10028                bool,
10029                D,
10030                &mut self.original_association_maintained,
10031                decoder,
10032                offset + 56,
10033                _depth
10034            )?;
10035            Ok(())
10036        }
10037    }
10038
10039    impl fidl::encoding::ValueTypeMarker for SaeFrame {
10040        type Borrowed<'a> = &'a Self;
10041        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10042            value
10043        }
10044    }
10045
10046    unsafe impl fidl::encoding::TypeMarker for SaeFrame {
10047        type Owned = Self;
10048
10049        #[inline(always)]
10050        fn inline_align(_context: fidl::encoding::Context) -> usize {
10051            8
10052        }
10053
10054        #[inline(always)]
10055        fn inline_size(_context: fidl::encoding::Context) -> usize {
10056            32
10057        }
10058    }
10059
10060    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SaeFrame, D> for &SaeFrame {
10061        #[inline]
10062        unsafe fn encode(
10063            self,
10064            encoder: &mut fidl::encoding::Encoder<'_, D>,
10065            offset: usize,
10066            _depth: fidl::encoding::Depth,
10067        ) -> fidl::Result<()> {
10068            encoder.debug_check_bounds::<SaeFrame>(offset);
10069            // Delegate to tuple encoding.
10070            fidl::encoding::Encode::<SaeFrame, D>::encode(
10071                (
10072                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
10073                    <fidl_fuchsia_wlan_ieee80211::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.status_code),
10074                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.seq_num),
10075                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.sae_fields),
10076                ),
10077                encoder, offset, _depth
10078            )
10079        }
10080    }
10081    unsafe impl<
10082            D: fidl::encoding::ResourceDialect,
10083            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
10084            T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::StatusCode, D>,
10085            T2: fidl::encoding::Encode<u16, D>,
10086            T3: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
10087        > fidl::encoding::Encode<SaeFrame, D> for (T0, T1, T2, T3)
10088    {
10089        #[inline]
10090        unsafe fn encode(
10091            self,
10092            encoder: &mut fidl::encoding::Encoder<'_, D>,
10093            offset: usize,
10094            depth: fidl::encoding::Depth,
10095        ) -> fidl::Result<()> {
10096            encoder.debug_check_bounds::<SaeFrame>(offset);
10097            // Zero out padding regions. There's no need to apply masks
10098            // because the unmasked parts will be overwritten by fields.
10099            unsafe {
10100                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
10101                (ptr as *mut u64).write_unaligned(0);
10102            }
10103            // Write the fields.
10104            self.0.encode(encoder, offset + 0, depth)?;
10105            self.1.encode(encoder, offset + 6, depth)?;
10106            self.2.encode(encoder, offset + 8, depth)?;
10107            self.3.encode(encoder, offset + 16, depth)?;
10108            Ok(())
10109        }
10110    }
10111
10112    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SaeFrame {
10113        #[inline(always)]
10114        fn new_empty() -> Self {
10115            Self {
10116                peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
10117                status_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::StatusCode, D),
10118                seq_num: fidl::new_empty!(u16, D),
10119                sae_fields: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
10120            }
10121        }
10122
10123        #[inline]
10124        unsafe fn decode(
10125            &mut self,
10126            decoder: &mut fidl::encoding::Decoder<'_, D>,
10127            offset: usize,
10128            _depth: fidl::encoding::Depth,
10129        ) -> fidl::Result<()> {
10130            decoder.debug_check_bounds::<Self>(offset);
10131            // Verify that padding bytes are zero.
10132            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
10133            let padval = unsafe { (ptr as *const u64).read_unaligned() };
10134            let mask = 0xffffffffffff0000u64;
10135            let maskedval = padval & mask;
10136            if maskedval != 0 {
10137                return Err(fidl::Error::NonZeroPadding {
10138                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
10139                });
10140            }
10141            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
10142            fidl::decode!(
10143                fidl_fuchsia_wlan_ieee80211::StatusCode,
10144                D,
10145                &mut self.status_code,
10146                decoder,
10147                offset + 6,
10148                _depth
10149            )?;
10150            fidl::decode!(u16, D, &mut self.seq_num, decoder, offset + 8, _depth)?;
10151            fidl::decode!(
10152                fidl::encoding::UnboundedVector<u8>,
10153                D,
10154                &mut self.sae_fields,
10155                decoder,
10156                offset + 16,
10157                _depth
10158            )?;
10159            Ok(())
10160        }
10161    }
10162
10163    impl fidl::encoding::ValueTypeMarker for SaeHandshakeIndication {
10164        type Borrowed<'a> = &'a Self;
10165        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10166            value
10167        }
10168    }
10169
10170    unsafe impl fidl::encoding::TypeMarker for SaeHandshakeIndication {
10171        type Owned = Self;
10172
10173        #[inline(always)]
10174        fn inline_align(_context: fidl::encoding::Context) -> usize {
10175            1
10176        }
10177
10178        #[inline(always)]
10179        fn inline_size(_context: fidl::encoding::Context) -> usize {
10180            6
10181        }
10182        #[inline(always)]
10183        fn encode_is_copy() -> bool {
10184            true
10185        }
10186
10187        #[inline(always)]
10188        fn decode_is_copy() -> bool {
10189            true
10190        }
10191    }
10192
10193    unsafe impl<D: fidl::encoding::ResourceDialect>
10194        fidl::encoding::Encode<SaeHandshakeIndication, D> for &SaeHandshakeIndication
10195    {
10196        #[inline]
10197        unsafe fn encode(
10198            self,
10199            encoder: &mut fidl::encoding::Encoder<'_, D>,
10200            offset: usize,
10201            _depth: fidl::encoding::Depth,
10202        ) -> fidl::Result<()> {
10203            encoder.debug_check_bounds::<SaeHandshakeIndication>(offset);
10204            unsafe {
10205                // Copy the object into the buffer.
10206                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
10207                (buf_ptr as *mut SaeHandshakeIndication)
10208                    .write_unaligned((self as *const SaeHandshakeIndication).read());
10209                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
10210                // done second because the memcpy will write garbage to these bytes.
10211            }
10212            Ok(())
10213        }
10214    }
10215    unsafe impl<
10216            D: fidl::encoding::ResourceDialect,
10217            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
10218        > fidl::encoding::Encode<SaeHandshakeIndication, D> for (T0,)
10219    {
10220        #[inline]
10221        unsafe fn encode(
10222            self,
10223            encoder: &mut fidl::encoding::Encoder<'_, D>,
10224            offset: usize,
10225            depth: fidl::encoding::Depth,
10226        ) -> fidl::Result<()> {
10227            encoder.debug_check_bounds::<SaeHandshakeIndication>(offset);
10228            // Zero out padding regions. There's no need to apply masks
10229            // because the unmasked parts will be overwritten by fields.
10230            // Write the fields.
10231            self.0.encode(encoder, offset + 0, depth)?;
10232            Ok(())
10233        }
10234    }
10235
10236    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10237        for SaeHandshakeIndication
10238    {
10239        #[inline(always)]
10240        fn new_empty() -> Self {
10241            Self { peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D) }
10242        }
10243
10244        #[inline]
10245        unsafe fn decode(
10246            &mut self,
10247            decoder: &mut fidl::encoding::Decoder<'_, D>,
10248            offset: usize,
10249            _depth: fidl::encoding::Depth,
10250        ) -> fidl::Result<()> {
10251            decoder.debug_check_bounds::<Self>(offset);
10252            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
10253            // Verify that padding bytes are zero.
10254            // Copy from the buffer into the object.
10255            unsafe {
10256                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
10257            }
10258            Ok(())
10259        }
10260    }
10261
10262    impl fidl::encoding::ValueTypeMarker for SaeHandshakeResponse {
10263        type Borrowed<'a> = &'a Self;
10264        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10265            value
10266        }
10267    }
10268
10269    unsafe impl fidl::encoding::TypeMarker for SaeHandshakeResponse {
10270        type Owned = Self;
10271
10272        #[inline(always)]
10273        fn inline_align(_context: fidl::encoding::Context) -> usize {
10274            2
10275        }
10276
10277        #[inline(always)]
10278        fn inline_size(_context: fidl::encoding::Context) -> usize {
10279            8
10280        }
10281    }
10282
10283    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SaeHandshakeResponse, D>
10284        for &SaeHandshakeResponse
10285    {
10286        #[inline]
10287        unsafe fn encode(
10288            self,
10289            encoder: &mut fidl::encoding::Encoder<'_, D>,
10290            offset: usize,
10291            _depth: fidl::encoding::Depth,
10292        ) -> fidl::Result<()> {
10293            encoder.debug_check_bounds::<SaeHandshakeResponse>(offset);
10294            // Delegate to tuple encoding.
10295            fidl::encoding::Encode::<SaeHandshakeResponse, D>::encode(
10296                (
10297                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
10298                    <fidl_fuchsia_wlan_ieee80211::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.status_code),
10299                ),
10300                encoder, offset, _depth
10301            )
10302        }
10303    }
10304    unsafe impl<
10305            D: fidl::encoding::ResourceDialect,
10306            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
10307            T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::StatusCode, D>,
10308        > fidl::encoding::Encode<SaeHandshakeResponse, D> for (T0, T1)
10309    {
10310        #[inline]
10311        unsafe fn encode(
10312            self,
10313            encoder: &mut fidl::encoding::Encoder<'_, D>,
10314            offset: usize,
10315            depth: fidl::encoding::Depth,
10316        ) -> fidl::Result<()> {
10317            encoder.debug_check_bounds::<SaeHandshakeResponse>(offset);
10318            // Zero out padding regions. There's no need to apply masks
10319            // because the unmasked parts will be overwritten by fields.
10320            // Write the fields.
10321            self.0.encode(encoder, offset + 0, depth)?;
10322            self.1.encode(encoder, offset + 6, depth)?;
10323            Ok(())
10324        }
10325    }
10326
10327    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SaeHandshakeResponse {
10328        #[inline(always)]
10329        fn new_empty() -> Self {
10330            Self {
10331                peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
10332                status_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::StatusCode, D),
10333            }
10334        }
10335
10336        #[inline]
10337        unsafe fn decode(
10338            &mut self,
10339            decoder: &mut fidl::encoding::Decoder<'_, D>,
10340            offset: usize,
10341            _depth: fidl::encoding::Depth,
10342        ) -> fidl::Result<()> {
10343            decoder.debug_check_bounds::<Self>(offset);
10344            // Verify that padding bytes are zero.
10345            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
10346            fidl::decode!(
10347                fidl_fuchsia_wlan_ieee80211::StatusCode,
10348                D,
10349                &mut self.status_code,
10350                decoder,
10351                offset + 6,
10352                _depth
10353            )?;
10354            Ok(())
10355        }
10356    }
10357
10358    impl fidl::encoding::ValueTypeMarker for ScanEnd {
10359        type Borrowed<'a> = &'a Self;
10360        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10361            value
10362        }
10363    }
10364
10365    unsafe impl fidl::encoding::TypeMarker for ScanEnd {
10366        type Owned = Self;
10367
10368        #[inline(always)]
10369        fn inline_align(_context: fidl::encoding::Context) -> usize {
10370            8
10371        }
10372
10373        #[inline(always)]
10374        fn inline_size(_context: fidl::encoding::Context) -> usize {
10375            16
10376        }
10377    }
10378
10379    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ScanEnd, D> for &ScanEnd {
10380        #[inline]
10381        unsafe fn encode(
10382            self,
10383            encoder: &mut fidl::encoding::Encoder<'_, D>,
10384            offset: usize,
10385            _depth: fidl::encoding::Depth,
10386        ) -> fidl::Result<()> {
10387            encoder.debug_check_bounds::<ScanEnd>(offset);
10388            // Delegate to tuple encoding.
10389            fidl::encoding::Encode::<ScanEnd, D>::encode(
10390                (
10391                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.txn_id),
10392                    <ScanResultCode as fidl::encoding::ValueTypeMarker>::borrow(&self.code),
10393                ),
10394                encoder,
10395                offset,
10396                _depth,
10397            )
10398        }
10399    }
10400    unsafe impl<
10401            D: fidl::encoding::ResourceDialect,
10402            T0: fidl::encoding::Encode<u64, D>,
10403            T1: fidl::encoding::Encode<ScanResultCode, D>,
10404        > fidl::encoding::Encode<ScanEnd, D> for (T0, T1)
10405    {
10406        #[inline]
10407        unsafe fn encode(
10408            self,
10409            encoder: &mut fidl::encoding::Encoder<'_, D>,
10410            offset: usize,
10411            depth: fidl::encoding::Depth,
10412        ) -> fidl::Result<()> {
10413            encoder.debug_check_bounds::<ScanEnd>(offset);
10414            // Zero out padding regions. There's no need to apply masks
10415            // because the unmasked parts will be overwritten by fields.
10416            unsafe {
10417                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
10418                (ptr as *mut u64).write_unaligned(0);
10419            }
10420            // Write the fields.
10421            self.0.encode(encoder, offset + 0, depth)?;
10422            self.1.encode(encoder, offset + 8, depth)?;
10423            Ok(())
10424        }
10425    }
10426
10427    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanEnd {
10428        #[inline(always)]
10429        fn new_empty() -> Self {
10430            Self { txn_id: fidl::new_empty!(u64, D), code: fidl::new_empty!(ScanResultCode, D) }
10431        }
10432
10433        #[inline]
10434        unsafe fn decode(
10435            &mut self,
10436            decoder: &mut fidl::encoding::Decoder<'_, D>,
10437            offset: usize,
10438            _depth: fidl::encoding::Depth,
10439        ) -> fidl::Result<()> {
10440            decoder.debug_check_bounds::<Self>(offset);
10441            // Verify that padding bytes are zero.
10442            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
10443            let padval = unsafe { (ptr as *const u64).read_unaligned() };
10444            let mask = 0xffffffff00000000u64;
10445            let maskedval = padval & mask;
10446            if maskedval != 0 {
10447                return Err(fidl::Error::NonZeroPadding {
10448                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
10449                });
10450            }
10451            fidl::decode!(u64, D, &mut self.txn_id, decoder, offset + 0, _depth)?;
10452            fidl::decode!(ScanResultCode, D, &mut self.code, decoder, offset + 8, _depth)?;
10453            Ok(())
10454        }
10455    }
10456
10457    impl fidl::encoding::ValueTypeMarker for ScanRequest {
10458        type Borrowed<'a> = &'a Self;
10459        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10460            value
10461        }
10462    }
10463
10464    unsafe impl fidl::encoding::TypeMarker for ScanRequest {
10465        type Owned = Self;
10466
10467        #[inline(always)]
10468        fn inline_align(_context: fidl::encoding::Context) -> usize {
10469            8
10470        }
10471
10472        #[inline(always)]
10473        fn inline_size(_context: fidl::encoding::Context) -> usize {
10474            64
10475        }
10476    }
10477
10478    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ScanRequest, D>
10479        for &ScanRequest
10480    {
10481        #[inline]
10482        unsafe fn encode(
10483            self,
10484            encoder: &mut fidl::encoding::Encoder<'_, D>,
10485            offset: usize,
10486            _depth: fidl::encoding::Depth,
10487        ) -> fidl::Result<()> {
10488            encoder.debug_check_bounds::<ScanRequest>(offset);
10489            // Delegate to tuple encoding.
10490            fidl::encoding::Encode::<ScanRequest, D>::encode(
10491                (
10492                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.txn_id),
10493                    <ScanTypes as fidl::encoding::ValueTypeMarker>::borrow(&self.scan_type),
10494                    <fidl::encoding::Vector<u8, 256> as fidl::encoding::ValueTypeMarker>::borrow(&self.channel_list),
10495                    <fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssid_list),
10496                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.probe_delay),
10497                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.min_channel_time),
10498                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.max_channel_time),
10499                ),
10500                encoder, offset, _depth
10501            )
10502        }
10503    }
10504    unsafe impl<
10505            D: fidl::encoding::ResourceDialect,
10506            T0: fidl::encoding::Encode<u64, D>,
10507            T1: fidl::encoding::Encode<ScanTypes, D>,
10508            T2: fidl::encoding::Encode<fidl::encoding::Vector<u8, 256>, D>,
10509            T3: fidl::encoding::Encode<
10510                fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>,
10511                D,
10512            >,
10513            T4: fidl::encoding::Encode<u32, D>,
10514            T5: fidl::encoding::Encode<u32, D>,
10515            T6: fidl::encoding::Encode<u32, D>,
10516        > fidl::encoding::Encode<ScanRequest, D> for (T0, T1, T2, T3, T4, T5, T6)
10517    {
10518        #[inline]
10519        unsafe fn encode(
10520            self,
10521            encoder: &mut fidl::encoding::Encoder<'_, D>,
10522            offset: usize,
10523            depth: fidl::encoding::Depth,
10524        ) -> fidl::Result<()> {
10525            encoder.debug_check_bounds::<ScanRequest>(offset);
10526            // Zero out padding regions. There's no need to apply masks
10527            // because the unmasked parts will be overwritten by fields.
10528            unsafe {
10529                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
10530                (ptr as *mut u64).write_unaligned(0);
10531            }
10532            unsafe {
10533                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(56);
10534                (ptr as *mut u64).write_unaligned(0);
10535            }
10536            // Write the fields.
10537            self.0.encode(encoder, offset + 0, depth)?;
10538            self.1.encode(encoder, offset + 8, depth)?;
10539            self.2.encode(encoder, offset + 16, depth)?;
10540            self.3.encode(encoder, offset + 32, depth)?;
10541            self.4.encode(encoder, offset + 48, depth)?;
10542            self.5.encode(encoder, offset + 52, depth)?;
10543            self.6.encode(encoder, offset + 56, depth)?;
10544            Ok(())
10545        }
10546    }
10547
10548    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanRequest {
10549        #[inline(always)]
10550        fn new_empty() -> Self {
10551            Self {
10552                txn_id: fidl::new_empty!(u64, D),
10553                scan_type: fidl::new_empty!(ScanTypes, D),
10554                channel_list: fidl::new_empty!(fidl::encoding::Vector<u8, 256>, D),
10555                ssid_list: fidl::new_empty!(
10556                    fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>,
10557                    D
10558                ),
10559                probe_delay: fidl::new_empty!(u32, D),
10560                min_channel_time: fidl::new_empty!(u32, D),
10561                max_channel_time: fidl::new_empty!(u32, D),
10562            }
10563        }
10564
10565        #[inline]
10566        unsafe fn decode(
10567            &mut self,
10568            decoder: &mut fidl::encoding::Decoder<'_, D>,
10569            offset: usize,
10570            _depth: fidl::encoding::Depth,
10571        ) -> fidl::Result<()> {
10572            decoder.debug_check_bounds::<Self>(offset);
10573            // Verify that padding bytes are zero.
10574            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
10575            let padval = unsafe { (ptr as *const u64).read_unaligned() };
10576            let mask = 0xffffffff00000000u64;
10577            let maskedval = padval & mask;
10578            if maskedval != 0 {
10579                return Err(fidl::Error::NonZeroPadding {
10580                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
10581                });
10582            }
10583            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(56) };
10584            let padval = unsafe { (ptr as *const u64).read_unaligned() };
10585            let mask = 0xffffffff00000000u64;
10586            let maskedval = padval & mask;
10587            if maskedval != 0 {
10588                return Err(fidl::Error::NonZeroPadding {
10589                    padding_start: offset + 56 + ((mask as u64).trailing_zeros() / 8) as usize,
10590                });
10591            }
10592            fidl::decode!(u64, D, &mut self.txn_id, decoder, offset + 0, _depth)?;
10593            fidl::decode!(ScanTypes, D, &mut self.scan_type, decoder, offset + 8, _depth)?;
10594            fidl::decode!(fidl::encoding::Vector<u8, 256>, D, &mut self.channel_list, decoder, offset + 16, _depth)?;
10595            fidl::decode!(
10596                fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>,
10597                D,
10598                &mut self.ssid_list,
10599                decoder,
10600                offset + 32,
10601                _depth
10602            )?;
10603            fidl::decode!(u32, D, &mut self.probe_delay, decoder, offset + 48, _depth)?;
10604            fidl::decode!(u32, D, &mut self.min_channel_time, decoder, offset + 52, _depth)?;
10605            fidl::decode!(u32, D, &mut self.max_channel_time, decoder, offset + 56, _depth)?;
10606            Ok(())
10607        }
10608    }
10609
10610    impl fidl::encoding::ValueTypeMarker for ScanResult {
10611        type Borrowed<'a> = &'a Self;
10612        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10613            value
10614        }
10615    }
10616
10617    unsafe impl fidl::encoding::TypeMarker for ScanResult {
10618        type Owned = Self;
10619
10620        #[inline(always)]
10621        fn inline_align(_context: fidl::encoding::Context) -> usize {
10622            8
10623        }
10624
10625        #[inline(always)]
10626        fn inline_size(_context: fidl::encoding::Context) -> usize {
10627            64
10628        }
10629    }
10630
10631    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ScanResult, D>
10632        for &ScanResult
10633    {
10634        #[inline]
10635        unsafe fn encode(
10636            self,
10637            encoder: &mut fidl::encoding::Encoder<'_, D>,
10638            offset: usize,
10639            _depth: fidl::encoding::Depth,
10640        ) -> fidl::Result<()> {
10641            encoder.debug_check_bounds::<ScanResult>(offset);
10642            // Delegate to tuple encoding.
10643            fidl::encoding::Encode::<ScanResult, D>::encode(
10644                (
10645                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.txn_id),
10646                    <i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.timestamp_nanos),
10647                    <fidl_fuchsia_wlan_common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.bss),
10648                ),
10649                encoder, offset, _depth
10650            )
10651        }
10652    }
10653    unsafe impl<
10654            D: fidl::encoding::ResourceDialect,
10655            T0: fidl::encoding::Encode<u64, D>,
10656            T1: fidl::encoding::Encode<i64, D>,
10657            T2: fidl::encoding::Encode<fidl_fuchsia_wlan_common::BssDescription, D>,
10658        > fidl::encoding::Encode<ScanResult, D> for (T0, T1, T2)
10659    {
10660        #[inline]
10661        unsafe fn encode(
10662            self,
10663            encoder: &mut fidl::encoding::Encoder<'_, D>,
10664            offset: usize,
10665            depth: fidl::encoding::Depth,
10666        ) -> fidl::Result<()> {
10667            encoder.debug_check_bounds::<ScanResult>(offset);
10668            // Zero out padding regions. There's no need to apply masks
10669            // because the unmasked parts will be overwritten by fields.
10670            // Write the fields.
10671            self.0.encode(encoder, offset + 0, depth)?;
10672            self.1.encode(encoder, offset + 8, depth)?;
10673            self.2.encode(encoder, offset + 16, depth)?;
10674            Ok(())
10675        }
10676    }
10677
10678    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanResult {
10679        #[inline(always)]
10680        fn new_empty() -> Self {
10681            Self {
10682                txn_id: fidl::new_empty!(u64, D),
10683                timestamp_nanos: fidl::new_empty!(i64, D),
10684                bss: fidl::new_empty!(fidl_fuchsia_wlan_common::BssDescription, D),
10685            }
10686        }
10687
10688        #[inline]
10689        unsafe fn decode(
10690            &mut self,
10691            decoder: &mut fidl::encoding::Decoder<'_, D>,
10692            offset: usize,
10693            _depth: fidl::encoding::Depth,
10694        ) -> fidl::Result<()> {
10695            decoder.debug_check_bounds::<Self>(offset);
10696            // Verify that padding bytes are zero.
10697            fidl::decode!(u64, D, &mut self.txn_id, decoder, offset + 0, _depth)?;
10698            fidl::decode!(i64, D, &mut self.timestamp_nanos, decoder, offset + 8, _depth)?;
10699            fidl::decode!(
10700                fidl_fuchsia_wlan_common::BssDescription,
10701                D,
10702                &mut self.bss,
10703                decoder,
10704                offset + 16,
10705                _depth
10706            )?;
10707            Ok(())
10708        }
10709    }
10710
10711    impl fidl::encoding::ValueTypeMarker for SetControlledPortRequest {
10712        type Borrowed<'a> = &'a Self;
10713        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10714            value
10715        }
10716    }
10717
10718    unsafe impl fidl::encoding::TypeMarker for SetControlledPortRequest {
10719        type Owned = Self;
10720
10721        #[inline(always)]
10722        fn inline_align(_context: fidl::encoding::Context) -> usize {
10723            4
10724        }
10725
10726        #[inline(always)]
10727        fn inline_size(_context: fidl::encoding::Context) -> usize {
10728            12
10729        }
10730    }
10731
10732    unsafe impl<D: fidl::encoding::ResourceDialect>
10733        fidl::encoding::Encode<SetControlledPortRequest, D> for &SetControlledPortRequest
10734    {
10735        #[inline]
10736        unsafe fn encode(
10737            self,
10738            encoder: &mut fidl::encoding::Encoder<'_, D>,
10739            offset: usize,
10740            _depth: fidl::encoding::Depth,
10741        ) -> fidl::Result<()> {
10742            encoder.debug_check_bounds::<SetControlledPortRequest>(offset);
10743            // Delegate to tuple encoding.
10744            fidl::encoding::Encode::<SetControlledPortRequest, D>::encode(
10745                (
10746                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(
10747                        &self.peer_sta_address,
10748                    ),
10749                    <ControlledPortState as fidl::encoding::ValueTypeMarker>::borrow(&self.state),
10750                ),
10751                encoder,
10752                offset,
10753                _depth,
10754            )
10755        }
10756    }
10757    unsafe impl<
10758            D: fidl::encoding::ResourceDialect,
10759            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
10760            T1: fidl::encoding::Encode<ControlledPortState, D>,
10761        > fidl::encoding::Encode<SetControlledPortRequest, D> for (T0, T1)
10762    {
10763        #[inline]
10764        unsafe fn encode(
10765            self,
10766            encoder: &mut fidl::encoding::Encoder<'_, D>,
10767            offset: usize,
10768            depth: fidl::encoding::Depth,
10769        ) -> fidl::Result<()> {
10770            encoder.debug_check_bounds::<SetControlledPortRequest>(offset);
10771            // Zero out padding regions. There's no need to apply masks
10772            // because the unmasked parts will be overwritten by fields.
10773            unsafe {
10774                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
10775                (ptr as *mut u32).write_unaligned(0);
10776            }
10777            // Write the fields.
10778            self.0.encode(encoder, offset + 0, depth)?;
10779            self.1.encode(encoder, offset + 8, depth)?;
10780            Ok(())
10781        }
10782    }
10783
10784    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10785        for SetControlledPortRequest
10786    {
10787        #[inline(always)]
10788        fn new_empty() -> Self {
10789            Self {
10790                peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
10791                state: fidl::new_empty!(ControlledPortState, D),
10792            }
10793        }
10794
10795        #[inline]
10796        unsafe fn decode(
10797            &mut self,
10798            decoder: &mut fidl::encoding::Decoder<'_, D>,
10799            offset: usize,
10800            _depth: fidl::encoding::Depth,
10801        ) -> fidl::Result<()> {
10802            decoder.debug_check_bounds::<Self>(offset);
10803            // Verify that padding bytes are zero.
10804            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
10805            let padval = unsafe { (ptr as *const u32).read_unaligned() };
10806            let mask = 0xffff0000u32;
10807            let maskedval = padval & mask;
10808            if maskedval != 0 {
10809                return Err(fidl::Error::NonZeroPadding {
10810                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
10811                });
10812            }
10813            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
10814            fidl::decode!(ControlledPortState, D, &mut self.state, decoder, offset + 8, _depth)?;
10815            Ok(())
10816        }
10817    }
10818
10819    impl fidl::encoding::ValueTypeMarker for SetKeyDescriptor {
10820        type Borrowed<'a> = &'a Self;
10821        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10822            value
10823        }
10824    }
10825
10826    unsafe impl fidl::encoding::TypeMarker for SetKeyDescriptor {
10827        type Owned = Self;
10828
10829        #[inline(always)]
10830        fn inline_align(_context: fidl::encoding::Context) -> usize {
10831            8
10832        }
10833
10834        #[inline(always)]
10835        fn inline_size(_context: fidl::encoding::Context) -> usize {
10836            48
10837        }
10838    }
10839
10840    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetKeyDescriptor, D>
10841        for &SetKeyDescriptor
10842    {
10843        #[inline]
10844        unsafe fn encode(
10845            self,
10846            encoder: &mut fidl::encoding::Encoder<'_, D>,
10847            offset: usize,
10848            _depth: fidl::encoding::Depth,
10849        ) -> fidl::Result<()> {
10850            encoder.debug_check_bounds::<SetKeyDescriptor>(offset);
10851            // Delegate to tuple encoding.
10852            fidl::encoding::Encode::<SetKeyDescriptor, D>::encode(
10853                (
10854                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.key),
10855                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.key_id),
10856                    <KeyType as fidl::encoding::ValueTypeMarker>::borrow(&self.key_type),
10857                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.address),
10858                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.rsc),
10859                    <fidl::encoding::Array<u8, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.cipher_suite_oui),
10860                    <fidl_fuchsia_wlan_ieee80211::CipherSuiteType as fidl::encoding::ValueTypeMarker>::borrow(&self.cipher_suite_type),
10861                ),
10862                encoder, offset, _depth
10863            )
10864        }
10865    }
10866    unsafe impl<
10867            D: fidl::encoding::ResourceDialect,
10868            T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
10869            T1: fidl::encoding::Encode<u16, D>,
10870            T2: fidl::encoding::Encode<KeyType, D>,
10871            T3: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
10872            T4: fidl::encoding::Encode<u64, D>,
10873            T5: fidl::encoding::Encode<fidl::encoding::Array<u8, 3>, D>,
10874            T6: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::CipherSuiteType, D>,
10875        > fidl::encoding::Encode<SetKeyDescriptor, D> for (T0, T1, T2, T3, T4, T5, T6)
10876    {
10877        #[inline]
10878        unsafe fn encode(
10879            self,
10880            encoder: &mut fidl::encoding::Encoder<'_, D>,
10881            offset: usize,
10882            depth: fidl::encoding::Depth,
10883        ) -> fidl::Result<()> {
10884            encoder.debug_check_bounds::<SetKeyDescriptor>(offset);
10885            // Zero out padding regions. There's no need to apply masks
10886            // because the unmasked parts will be overwritten by fields.
10887            unsafe {
10888                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
10889                (ptr as *mut u64).write_unaligned(0);
10890            }
10891            unsafe {
10892                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
10893                (ptr as *mut u64).write_unaligned(0);
10894            }
10895            unsafe {
10896                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
10897                (ptr as *mut u64).write_unaligned(0);
10898            }
10899            // Write the fields.
10900            self.0.encode(encoder, offset + 0, depth)?;
10901            self.1.encode(encoder, offset + 16, depth)?;
10902            self.2.encode(encoder, offset + 20, depth)?;
10903            self.3.encode(encoder, offset + 24, depth)?;
10904            self.4.encode(encoder, offset + 32, depth)?;
10905            self.5.encode(encoder, offset + 40, depth)?;
10906            self.6.encode(encoder, offset + 44, depth)?;
10907            Ok(())
10908        }
10909    }
10910
10911    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetKeyDescriptor {
10912        #[inline(always)]
10913        fn new_empty() -> Self {
10914            Self {
10915                key: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
10916                key_id: fidl::new_empty!(u16, D),
10917                key_type: fidl::new_empty!(KeyType, D),
10918                address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
10919                rsc: fidl::new_empty!(u64, D),
10920                cipher_suite_oui: fidl::new_empty!(fidl::encoding::Array<u8, 3>, D),
10921                cipher_suite_type: fidl::new_empty!(
10922                    fidl_fuchsia_wlan_ieee80211::CipherSuiteType,
10923                    D
10924                ),
10925            }
10926        }
10927
10928        #[inline]
10929        unsafe fn decode(
10930            &mut self,
10931            decoder: &mut fidl::encoding::Decoder<'_, D>,
10932            offset: usize,
10933            _depth: fidl::encoding::Depth,
10934        ) -> fidl::Result<()> {
10935            decoder.debug_check_bounds::<Self>(offset);
10936            // Verify that padding bytes are zero.
10937            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
10938            let padval = unsafe { (ptr as *const u64).read_unaligned() };
10939            let mask = 0xffff0000u64;
10940            let maskedval = padval & mask;
10941            if maskedval != 0 {
10942                return Err(fidl::Error::NonZeroPadding {
10943                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
10944                });
10945            }
10946            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
10947            let padval = unsafe { (ptr as *const u64).read_unaligned() };
10948            let mask = 0xffff000000000000u64;
10949            let maskedval = padval & mask;
10950            if maskedval != 0 {
10951                return Err(fidl::Error::NonZeroPadding {
10952                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
10953                });
10954            }
10955            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
10956            let padval = unsafe { (ptr as *const u64).read_unaligned() };
10957            let mask = 0xff000000u64;
10958            let maskedval = padval & mask;
10959            if maskedval != 0 {
10960                return Err(fidl::Error::NonZeroPadding {
10961                    padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
10962                });
10963            }
10964            fidl::decode!(
10965                fidl::encoding::UnboundedVector<u8>,
10966                D,
10967                &mut self.key,
10968                decoder,
10969                offset + 0,
10970                _depth
10971            )?;
10972            fidl::decode!(u16, D, &mut self.key_id, decoder, offset + 16, _depth)?;
10973            fidl::decode!(KeyType, D, &mut self.key_type, decoder, offset + 20, _depth)?;
10974            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.address, decoder, offset + 24, _depth)?;
10975            fidl::decode!(u64, D, &mut self.rsc, decoder, offset + 32, _depth)?;
10976            fidl::decode!(fidl::encoding::Array<u8, 3>, D, &mut self.cipher_suite_oui, decoder, offset + 40, _depth)?;
10977            fidl::decode!(
10978                fidl_fuchsia_wlan_ieee80211::CipherSuiteType,
10979                D,
10980                &mut self.cipher_suite_type,
10981                decoder,
10982                offset + 44,
10983                _depth
10984            )?;
10985            Ok(())
10986        }
10987    }
10988
10989    impl fidl::encoding::ValueTypeMarker for SetKeyResult {
10990        type Borrowed<'a> = &'a Self;
10991        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10992            value
10993        }
10994    }
10995
10996    unsafe impl fidl::encoding::TypeMarker for SetKeyResult {
10997        type Owned = Self;
10998
10999        #[inline(always)]
11000        fn inline_align(_context: fidl::encoding::Context) -> usize {
11001            4
11002        }
11003
11004        #[inline(always)]
11005        fn inline_size(_context: fidl::encoding::Context) -> usize {
11006            8
11007        }
11008    }
11009
11010    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetKeyResult, D>
11011        for &SetKeyResult
11012    {
11013        #[inline]
11014        unsafe fn encode(
11015            self,
11016            encoder: &mut fidl::encoding::Encoder<'_, D>,
11017            offset: usize,
11018            _depth: fidl::encoding::Depth,
11019        ) -> fidl::Result<()> {
11020            encoder.debug_check_bounds::<SetKeyResult>(offset);
11021            unsafe {
11022                // Copy the object into the buffer.
11023                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11024                (buf_ptr as *mut SetKeyResult)
11025                    .write_unaligned((self as *const SetKeyResult).read());
11026                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11027                // done second because the memcpy will write garbage to these bytes.
11028                let padding_ptr = buf_ptr.offset(0) as *mut u32;
11029                let padding_mask = 0xffff0000u32;
11030                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
11031            }
11032            Ok(())
11033        }
11034    }
11035    unsafe impl<
11036            D: fidl::encoding::ResourceDialect,
11037            T0: fidl::encoding::Encode<u16, D>,
11038            T1: fidl::encoding::Encode<i32, D>,
11039        > fidl::encoding::Encode<SetKeyResult, D> for (T0, T1)
11040    {
11041        #[inline]
11042        unsafe fn encode(
11043            self,
11044            encoder: &mut fidl::encoding::Encoder<'_, D>,
11045            offset: usize,
11046            depth: fidl::encoding::Depth,
11047        ) -> fidl::Result<()> {
11048            encoder.debug_check_bounds::<SetKeyResult>(offset);
11049            // Zero out padding regions. There's no need to apply masks
11050            // because the unmasked parts will be overwritten by fields.
11051            unsafe {
11052                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
11053                (ptr as *mut u32).write_unaligned(0);
11054            }
11055            // Write the fields.
11056            self.0.encode(encoder, offset + 0, depth)?;
11057            self.1.encode(encoder, offset + 4, depth)?;
11058            Ok(())
11059        }
11060    }
11061
11062    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetKeyResult {
11063        #[inline(always)]
11064        fn new_empty() -> Self {
11065            Self { key_id: fidl::new_empty!(u16, D), status: fidl::new_empty!(i32, D) }
11066        }
11067
11068        #[inline]
11069        unsafe fn decode(
11070            &mut self,
11071            decoder: &mut fidl::encoding::Decoder<'_, D>,
11072            offset: usize,
11073            _depth: fidl::encoding::Depth,
11074        ) -> fidl::Result<()> {
11075            decoder.debug_check_bounds::<Self>(offset);
11076            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11077            // Verify that padding bytes are zero.
11078            let ptr = unsafe { buf_ptr.offset(0) };
11079            let padval = unsafe { (ptr as *const u32).read_unaligned() };
11080            let mask = 0xffff0000u32;
11081            let maskedval = padval & mask;
11082            if maskedval != 0 {
11083                return Err(fidl::Error::NonZeroPadding {
11084                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
11085                });
11086            }
11087            // Copy from the buffer into the object.
11088            unsafe {
11089                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
11090            }
11091            Ok(())
11092        }
11093    }
11094
11095    impl fidl::encoding::ValueTypeMarker for SetKeysConfirm {
11096        type Borrowed<'a> = &'a Self;
11097        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11098            value
11099        }
11100    }
11101
11102    unsafe impl fidl::encoding::TypeMarker for SetKeysConfirm {
11103        type Owned = Self;
11104
11105        #[inline(always)]
11106        fn inline_align(_context: fidl::encoding::Context) -> usize {
11107            8
11108        }
11109
11110        #[inline(always)]
11111        fn inline_size(_context: fidl::encoding::Context) -> usize {
11112            16
11113        }
11114    }
11115
11116    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetKeysConfirm, D>
11117        for &SetKeysConfirm
11118    {
11119        #[inline]
11120        unsafe fn encode(
11121            self,
11122            encoder: &mut fidl::encoding::Encoder<'_, D>,
11123            offset: usize,
11124            _depth: fidl::encoding::Depth,
11125        ) -> fidl::Result<()> {
11126            encoder.debug_check_bounds::<SetKeysConfirm>(offset);
11127            // Delegate to tuple encoding.
11128            fidl::encoding::Encode::<SetKeysConfirm, D>::encode(
11129                (
11130                    <fidl::encoding::UnboundedVector<SetKeyResult> as fidl::encoding::ValueTypeMarker>::borrow(&self.results),
11131                ),
11132                encoder, offset, _depth
11133            )
11134        }
11135    }
11136    unsafe impl<
11137            D: fidl::encoding::ResourceDialect,
11138            T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<SetKeyResult>, D>,
11139        > fidl::encoding::Encode<SetKeysConfirm, D> for (T0,)
11140    {
11141        #[inline]
11142        unsafe fn encode(
11143            self,
11144            encoder: &mut fidl::encoding::Encoder<'_, D>,
11145            offset: usize,
11146            depth: fidl::encoding::Depth,
11147        ) -> fidl::Result<()> {
11148            encoder.debug_check_bounds::<SetKeysConfirm>(offset);
11149            // Zero out padding regions. There's no need to apply masks
11150            // because the unmasked parts will be overwritten by fields.
11151            // Write the fields.
11152            self.0.encode(encoder, offset + 0, depth)?;
11153            Ok(())
11154        }
11155    }
11156
11157    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetKeysConfirm {
11158        #[inline(always)]
11159        fn new_empty() -> Self {
11160            Self { results: fidl::new_empty!(fidl::encoding::UnboundedVector<SetKeyResult>, D) }
11161        }
11162
11163        #[inline]
11164        unsafe fn decode(
11165            &mut self,
11166            decoder: &mut fidl::encoding::Decoder<'_, D>,
11167            offset: usize,
11168            _depth: fidl::encoding::Depth,
11169        ) -> fidl::Result<()> {
11170            decoder.debug_check_bounds::<Self>(offset);
11171            // Verify that padding bytes are zero.
11172            fidl::decode!(
11173                fidl::encoding::UnboundedVector<SetKeyResult>,
11174                D,
11175                &mut self.results,
11176                decoder,
11177                offset + 0,
11178                _depth
11179            )?;
11180            Ok(())
11181        }
11182    }
11183
11184    impl fidl::encoding::ValueTypeMarker for SetKeysRequest {
11185        type Borrowed<'a> = &'a Self;
11186        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11187            value
11188        }
11189    }
11190
11191    unsafe impl fidl::encoding::TypeMarker for SetKeysRequest {
11192        type Owned = Self;
11193
11194        #[inline(always)]
11195        fn inline_align(_context: fidl::encoding::Context) -> usize {
11196            8
11197        }
11198
11199        #[inline(always)]
11200        fn inline_size(_context: fidl::encoding::Context) -> usize {
11201            16
11202        }
11203    }
11204
11205    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetKeysRequest, D>
11206        for &SetKeysRequest
11207    {
11208        #[inline]
11209        unsafe fn encode(
11210            self,
11211            encoder: &mut fidl::encoding::Encoder<'_, D>,
11212            offset: usize,
11213            _depth: fidl::encoding::Depth,
11214        ) -> fidl::Result<()> {
11215            encoder.debug_check_bounds::<SetKeysRequest>(offset);
11216            // Delegate to tuple encoding.
11217            fidl::encoding::Encode::<SetKeysRequest, D>::encode(
11218                (
11219                    <fidl::encoding::UnboundedVector<SetKeyDescriptor> as fidl::encoding::ValueTypeMarker>::borrow(&self.keylist),
11220                ),
11221                encoder, offset, _depth
11222            )
11223        }
11224    }
11225    unsafe impl<
11226            D: fidl::encoding::ResourceDialect,
11227            T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<SetKeyDescriptor>, D>,
11228        > fidl::encoding::Encode<SetKeysRequest, D> for (T0,)
11229    {
11230        #[inline]
11231        unsafe fn encode(
11232            self,
11233            encoder: &mut fidl::encoding::Encoder<'_, D>,
11234            offset: usize,
11235            depth: fidl::encoding::Depth,
11236        ) -> fidl::Result<()> {
11237            encoder.debug_check_bounds::<SetKeysRequest>(offset);
11238            // Zero out padding regions. There's no need to apply masks
11239            // because the unmasked parts will be overwritten by fields.
11240            // Write the fields.
11241            self.0.encode(encoder, offset + 0, depth)?;
11242            Ok(())
11243        }
11244    }
11245
11246    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetKeysRequest {
11247        #[inline(always)]
11248        fn new_empty() -> Self {
11249            Self { keylist: fidl::new_empty!(fidl::encoding::UnboundedVector<SetKeyDescriptor>, D) }
11250        }
11251
11252        #[inline]
11253        unsafe fn decode(
11254            &mut self,
11255            decoder: &mut fidl::encoding::Decoder<'_, D>,
11256            offset: usize,
11257            _depth: fidl::encoding::Depth,
11258        ) -> fidl::Result<()> {
11259            decoder.debug_check_bounds::<Self>(offset);
11260            // Verify that padding bytes are zero.
11261            fidl::decode!(
11262                fidl::encoding::UnboundedVector<SetKeyDescriptor>,
11263                D,
11264                &mut self.keylist,
11265                decoder,
11266                offset + 0,
11267                _depth
11268            )?;
11269            Ok(())
11270        }
11271    }
11272
11273    impl fidl::encoding::ValueTypeMarker for StartCaptureFramesRequest {
11274        type Borrowed<'a> = &'a Self;
11275        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11276            value
11277        }
11278    }
11279
11280    unsafe impl fidl::encoding::TypeMarker for StartCaptureFramesRequest {
11281        type Owned = Self;
11282
11283        #[inline(always)]
11284        fn inline_align(_context: fidl::encoding::Context) -> usize {
11285            4
11286        }
11287
11288        #[inline(always)]
11289        fn inline_size(_context: fidl::encoding::Context) -> usize {
11290            4
11291        }
11292    }
11293
11294    unsafe impl<D: fidl::encoding::ResourceDialect>
11295        fidl::encoding::Encode<StartCaptureFramesRequest, D> for &StartCaptureFramesRequest
11296    {
11297        #[inline]
11298        unsafe fn encode(
11299            self,
11300            encoder: &mut fidl::encoding::Encoder<'_, D>,
11301            offset: usize,
11302            _depth: fidl::encoding::Depth,
11303        ) -> fidl::Result<()> {
11304            encoder.debug_check_bounds::<StartCaptureFramesRequest>(offset);
11305            // Delegate to tuple encoding.
11306            fidl::encoding::Encode::<StartCaptureFramesRequest, D>::encode(
11307                (<MgmtFrameCaptureFlags as fidl::encoding::ValueTypeMarker>::borrow(
11308                    &self.mgmt_frame_flags,
11309                ),),
11310                encoder,
11311                offset,
11312                _depth,
11313            )
11314        }
11315    }
11316    unsafe impl<
11317            D: fidl::encoding::ResourceDialect,
11318            T0: fidl::encoding::Encode<MgmtFrameCaptureFlags, D>,
11319        > fidl::encoding::Encode<StartCaptureFramesRequest, D> for (T0,)
11320    {
11321        #[inline]
11322        unsafe fn encode(
11323            self,
11324            encoder: &mut fidl::encoding::Encoder<'_, D>,
11325            offset: usize,
11326            depth: fidl::encoding::Depth,
11327        ) -> fidl::Result<()> {
11328            encoder.debug_check_bounds::<StartCaptureFramesRequest>(offset);
11329            // Zero out padding regions. There's no need to apply masks
11330            // because the unmasked parts will be overwritten by fields.
11331            // Write the fields.
11332            self.0.encode(encoder, offset + 0, depth)?;
11333            Ok(())
11334        }
11335    }
11336
11337    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11338        for StartCaptureFramesRequest
11339    {
11340        #[inline(always)]
11341        fn new_empty() -> Self {
11342            Self { mgmt_frame_flags: fidl::new_empty!(MgmtFrameCaptureFlags, D) }
11343        }
11344
11345        #[inline]
11346        unsafe fn decode(
11347            &mut self,
11348            decoder: &mut fidl::encoding::Decoder<'_, D>,
11349            offset: usize,
11350            _depth: fidl::encoding::Depth,
11351        ) -> fidl::Result<()> {
11352            decoder.debug_check_bounds::<Self>(offset);
11353            // Verify that padding bytes are zero.
11354            fidl::decode!(
11355                MgmtFrameCaptureFlags,
11356                D,
11357                &mut self.mgmt_frame_flags,
11358                decoder,
11359                offset + 0,
11360                _depth
11361            )?;
11362            Ok(())
11363        }
11364    }
11365
11366    impl fidl::encoding::ValueTypeMarker for StartCaptureFramesResponse {
11367        type Borrowed<'a> = &'a Self;
11368        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11369            value
11370        }
11371    }
11372
11373    unsafe impl fidl::encoding::TypeMarker for StartCaptureFramesResponse {
11374        type Owned = Self;
11375
11376        #[inline(always)]
11377        fn inline_align(_context: fidl::encoding::Context) -> usize {
11378            4
11379        }
11380
11381        #[inline(always)]
11382        fn inline_size(_context: fidl::encoding::Context) -> usize {
11383            8
11384        }
11385    }
11386
11387    unsafe impl<D: fidl::encoding::ResourceDialect>
11388        fidl::encoding::Encode<StartCaptureFramesResponse, D> for &StartCaptureFramesResponse
11389    {
11390        #[inline]
11391        unsafe fn encode(
11392            self,
11393            encoder: &mut fidl::encoding::Encoder<'_, D>,
11394            offset: usize,
11395            _depth: fidl::encoding::Depth,
11396        ) -> fidl::Result<()> {
11397            encoder.debug_check_bounds::<StartCaptureFramesResponse>(offset);
11398            // Delegate to tuple encoding.
11399            fidl::encoding::Encode::<StartCaptureFramesResponse, D>::encode(
11400                (
11401                    <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.status),
11402                    <MgmtFrameCaptureFlags as fidl::encoding::ValueTypeMarker>::borrow(
11403                        &self.supported_mgmt_frames,
11404                    ),
11405                ),
11406                encoder,
11407                offset,
11408                _depth,
11409            )
11410        }
11411    }
11412    unsafe impl<
11413            D: fidl::encoding::ResourceDialect,
11414            T0: fidl::encoding::Encode<i32, D>,
11415            T1: fidl::encoding::Encode<MgmtFrameCaptureFlags, D>,
11416        > fidl::encoding::Encode<StartCaptureFramesResponse, D> for (T0, T1)
11417    {
11418        #[inline]
11419        unsafe fn encode(
11420            self,
11421            encoder: &mut fidl::encoding::Encoder<'_, D>,
11422            offset: usize,
11423            depth: fidl::encoding::Depth,
11424        ) -> fidl::Result<()> {
11425            encoder.debug_check_bounds::<StartCaptureFramesResponse>(offset);
11426            // Zero out padding regions. There's no need to apply masks
11427            // because the unmasked parts will be overwritten by fields.
11428            // Write the fields.
11429            self.0.encode(encoder, offset + 0, depth)?;
11430            self.1.encode(encoder, offset + 4, depth)?;
11431            Ok(())
11432        }
11433    }
11434
11435    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11436        for StartCaptureFramesResponse
11437    {
11438        #[inline(always)]
11439        fn new_empty() -> Self {
11440            Self {
11441                status: fidl::new_empty!(i32, D),
11442                supported_mgmt_frames: fidl::new_empty!(MgmtFrameCaptureFlags, D),
11443            }
11444        }
11445
11446        #[inline]
11447        unsafe fn decode(
11448            &mut self,
11449            decoder: &mut fidl::encoding::Decoder<'_, D>,
11450            offset: usize,
11451            _depth: fidl::encoding::Depth,
11452        ) -> fidl::Result<()> {
11453            decoder.debug_check_bounds::<Self>(offset);
11454            // Verify that padding bytes are zero.
11455            fidl::decode!(i32, D, &mut self.status, decoder, offset + 0, _depth)?;
11456            fidl::decode!(
11457                MgmtFrameCaptureFlags,
11458                D,
11459                &mut self.supported_mgmt_frames,
11460                decoder,
11461                offset + 4,
11462                _depth
11463            )?;
11464            Ok(())
11465        }
11466    }
11467
11468    impl fidl::encoding::ValueTypeMarker for StartConfirm {
11469        type Borrowed<'a> = &'a Self;
11470        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11471            value
11472        }
11473    }
11474
11475    unsafe impl fidl::encoding::TypeMarker for StartConfirm {
11476        type Owned = Self;
11477
11478        #[inline(always)]
11479        fn inline_align(_context: fidl::encoding::Context) -> usize {
11480            4
11481        }
11482
11483        #[inline(always)]
11484        fn inline_size(_context: fidl::encoding::Context) -> usize {
11485            4
11486        }
11487    }
11488
11489    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StartConfirm, D>
11490        for &StartConfirm
11491    {
11492        #[inline]
11493        unsafe fn encode(
11494            self,
11495            encoder: &mut fidl::encoding::Encoder<'_, D>,
11496            offset: usize,
11497            _depth: fidl::encoding::Depth,
11498        ) -> fidl::Result<()> {
11499            encoder.debug_check_bounds::<StartConfirm>(offset);
11500            // Delegate to tuple encoding.
11501            fidl::encoding::Encode::<StartConfirm, D>::encode(
11502                (<StartResultCode as fidl::encoding::ValueTypeMarker>::borrow(&self.result_code),),
11503                encoder,
11504                offset,
11505                _depth,
11506            )
11507        }
11508    }
11509    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StartResultCode, D>>
11510        fidl::encoding::Encode<StartConfirm, D> for (T0,)
11511    {
11512        #[inline]
11513        unsafe fn encode(
11514            self,
11515            encoder: &mut fidl::encoding::Encoder<'_, D>,
11516            offset: usize,
11517            depth: fidl::encoding::Depth,
11518        ) -> fidl::Result<()> {
11519            encoder.debug_check_bounds::<StartConfirm>(offset);
11520            // Zero out padding regions. There's no need to apply masks
11521            // because the unmasked parts will be overwritten by fields.
11522            // Write the fields.
11523            self.0.encode(encoder, offset + 0, depth)?;
11524            Ok(())
11525        }
11526    }
11527
11528    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StartConfirm {
11529        #[inline(always)]
11530        fn new_empty() -> Self {
11531            Self { result_code: fidl::new_empty!(StartResultCode, D) }
11532        }
11533
11534        #[inline]
11535        unsafe fn decode(
11536            &mut self,
11537            decoder: &mut fidl::encoding::Decoder<'_, D>,
11538            offset: usize,
11539            _depth: fidl::encoding::Depth,
11540        ) -> fidl::Result<()> {
11541            decoder.debug_check_bounds::<Self>(offset);
11542            // Verify that padding bytes are zero.
11543            fidl::decode!(StartResultCode, D, &mut self.result_code, decoder, offset + 0, _depth)?;
11544            Ok(())
11545        }
11546    }
11547
11548    impl fidl::encoding::ValueTypeMarker for StartRequest {
11549        type Borrowed<'a> = &'a Self;
11550        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11551            value
11552        }
11553    }
11554
11555    unsafe impl fidl::encoding::TypeMarker for StartRequest {
11556        type Owned = Self;
11557
11558        #[inline(always)]
11559        fn inline_align(_context: fidl::encoding::Context) -> usize {
11560            8
11561        }
11562
11563        #[inline(always)]
11564        fn inline_size(_context: fidl::encoding::Context) -> usize {
11565            96
11566        }
11567    }
11568
11569    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StartRequest, D>
11570        for &StartRequest
11571    {
11572        #[inline]
11573        unsafe fn encode(
11574            self,
11575            encoder: &mut fidl::encoding::Encoder<'_, D>,
11576            offset: usize,
11577            _depth: fidl::encoding::Depth,
11578        ) -> fidl::Result<()> {
11579            encoder.debug_check_bounds::<StartRequest>(offset);
11580            // Delegate to tuple encoding.
11581            fidl::encoding::Encode::<StartRequest, D>::encode(
11582                (
11583                    <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssid),
11584                    <fidl_fuchsia_wlan_common::BssType as fidl::encoding::ValueTypeMarker>::borrow(&self.bss_type),
11585                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.beacon_period),
11586                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.dtim_period),
11587                    <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.channel),
11588                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.capability_info),
11589                    <fidl::encoding::Vector<u8, 14> as fidl::encoding::ValueTypeMarker>::borrow(&self.rates),
11590                    <Country as fidl::encoding::ValueTypeMarker>::borrow(&self.country),
11591                    <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(&self.mesh_id),
11592                    <fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>> as fidl::encoding::ValueTypeMarker>::borrow(&self.rsne),
11593                    <fidl_fuchsia_wlan_common::WlanPhyType as fidl::encoding::ValueTypeMarker>::borrow(&self.phy),
11594                    <fidl_fuchsia_wlan_common::ChannelBandwidth as fidl::encoding::ValueTypeMarker>::borrow(&self.channel_bandwidth),
11595                ),
11596                encoder, offset, _depth
11597            )
11598        }
11599    }
11600    unsafe impl<
11601            D: fidl::encoding::ResourceDialect,
11602            T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
11603            T1: fidl::encoding::Encode<fidl_fuchsia_wlan_common::BssType, D>,
11604            T2: fidl::encoding::Encode<u16, D>,
11605            T3: fidl::encoding::Encode<u8, D>,
11606            T4: fidl::encoding::Encode<u8, D>,
11607            T5: fidl::encoding::Encode<u16, D>,
11608            T6: fidl::encoding::Encode<fidl::encoding::Vector<u8, 14>, D>,
11609            T7: fidl::encoding::Encode<Country, D>,
11610            T8: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
11611            T9: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>>, D>,
11612            T10: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanPhyType, D>,
11613            T11: fidl::encoding::Encode<fidl_fuchsia_wlan_common::ChannelBandwidth, D>,
11614        > fidl::encoding::Encode<StartRequest, D>
11615        for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
11616    {
11617        #[inline]
11618        unsafe fn encode(
11619            self,
11620            encoder: &mut fidl::encoding::Encoder<'_, D>,
11621            offset: usize,
11622            depth: fidl::encoding::Depth,
11623        ) -> fidl::Result<()> {
11624            encoder.debug_check_bounds::<StartRequest>(offset);
11625            // Zero out padding regions. There's no need to apply masks
11626            // because the unmasked parts will be overwritten by fields.
11627            unsafe {
11628                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
11629                (ptr as *mut u64).write_unaligned(0);
11630            }
11631            unsafe {
11632                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
11633                (ptr as *mut u64).write_unaligned(0);
11634            }
11635            // Write the fields.
11636            self.0.encode(encoder, offset + 0, depth)?;
11637            self.1.encode(encoder, offset + 16, depth)?;
11638            self.2.encode(encoder, offset + 20, depth)?;
11639            self.3.encode(encoder, offset + 22, depth)?;
11640            self.4.encode(encoder, offset + 23, depth)?;
11641            self.5.encode(encoder, offset + 24, depth)?;
11642            self.6.encode(encoder, offset + 32, depth)?;
11643            self.7.encode(encoder, offset + 48, depth)?;
11644            self.8.encode(encoder, offset + 56, depth)?;
11645            self.9.encode(encoder, offset + 72, depth)?;
11646            self.10.encode(encoder, offset + 88, depth)?;
11647            self.11.encode(encoder, offset + 92, depth)?;
11648            Ok(())
11649        }
11650    }
11651
11652    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StartRequest {
11653        #[inline(always)]
11654        fn new_empty() -> Self {
11655            Self {
11656                ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
11657                bss_type: fidl::new_empty!(fidl_fuchsia_wlan_common::BssType, D),
11658                beacon_period: fidl::new_empty!(u16, D),
11659                dtim_period: fidl::new_empty!(u8, D),
11660                channel: fidl::new_empty!(u8, D),
11661                capability_info: fidl::new_empty!(u16, D),
11662                rates: fidl::new_empty!(fidl::encoding::Vector<u8, 14>, D),
11663                country: fidl::new_empty!(Country, D),
11664                mesh_id: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
11665                rsne: fidl::new_empty!(
11666                    fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>>,
11667                    D
11668                ),
11669                phy: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanPhyType, D),
11670                channel_bandwidth: fidl::new_empty!(fidl_fuchsia_wlan_common::ChannelBandwidth, D),
11671            }
11672        }
11673
11674        #[inline]
11675        unsafe fn decode(
11676            &mut self,
11677            decoder: &mut fidl::encoding::Decoder<'_, D>,
11678            offset: usize,
11679            _depth: fidl::encoding::Depth,
11680        ) -> fidl::Result<()> {
11681            decoder.debug_check_bounds::<Self>(offset);
11682            // Verify that padding bytes are zero.
11683            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
11684            let padval = unsafe { (ptr as *const u64).read_unaligned() };
11685            let mask = 0xffffffffffff0000u64;
11686            let maskedval = padval & mask;
11687            if maskedval != 0 {
11688                return Err(fidl::Error::NonZeroPadding {
11689                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
11690                });
11691            }
11692            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
11693            let padval = unsafe { (ptr as *const u64).read_unaligned() };
11694            let mask = 0xffffffffff000000u64;
11695            let maskedval = padval & mask;
11696            if maskedval != 0 {
11697                return Err(fidl::Error::NonZeroPadding {
11698                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
11699                });
11700            }
11701            fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 0, _depth)?;
11702            fidl::decode!(
11703                fidl_fuchsia_wlan_common::BssType,
11704                D,
11705                &mut self.bss_type,
11706                decoder,
11707                offset + 16,
11708                _depth
11709            )?;
11710            fidl::decode!(u16, D, &mut self.beacon_period, decoder, offset + 20, _depth)?;
11711            fidl::decode!(u8, D, &mut self.dtim_period, decoder, offset + 22, _depth)?;
11712            fidl::decode!(u8, D, &mut self.channel, decoder, offset + 23, _depth)?;
11713            fidl::decode!(u16, D, &mut self.capability_info, decoder, offset + 24, _depth)?;
11714            fidl::decode!(fidl::encoding::Vector<u8, 14>, D, &mut self.rates, decoder, offset + 32, _depth)?;
11715            fidl::decode!(Country, D, &mut self.country, decoder, offset + 48, _depth)?;
11716            fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.mesh_id, decoder, offset + 56, _depth)?;
11717            fidl::decode!(
11718                fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>>,
11719                D,
11720                &mut self.rsne,
11721                decoder,
11722                offset + 72,
11723                _depth
11724            )?;
11725            fidl::decode!(
11726                fidl_fuchsia_wlan_common::WlanPhyType,
11727                D,
11728                &mut self.phy,
11729                decoder,
11730                offset + 88,
11731                _depth
11732            )?;
11733            fidl::decode!(
11734                fidl_fuchsia_wlan_common::ChannelBandwidth,
11735                D,
11736                &mut self.channel_bandwidth,
11737                decoder,
11738                offset + 92,
11739                _depth
11740            )?;
11741            Ok(())
11742        }
11743    }
11744
11745    impl fidl::encoding::ValueTypeMarker for StopConfirm {
11746        type Borrowed<'a> = &'a Self;
11747        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11748            value
11749        }
11750    }
11751
11752    unsafe impl fidl::encoding::TypeMarker for StopConfirm {
11753        type Owned = Self;
11754
11755        #[inline(always)]
11756        fn inline_align(_context: fidl::encoding::Context) -> usize {
11757            4
11758        }
11759
11760        #[inline(always)]
11761        fn inline_size(_context: fidl::encoding::Context) -> usize {
11762            4
11763        }
11764    }
11765
11766    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StopConfirm, D>
11767        for &StopConfirm
11768    {
11769        #[inline]
11770        unsafe fn encode(
11771            self,
11772            encoder: &mut fidl::encoding::Encoder<'_, D>,
11773            offset: usize,
11774            _depth: fidl::encoding::Depth,
11775        ) -> fidl::Result<()> {
11776            encoder.debug_check_bounds::<StopConfirm>(offset);
11777            // Delegate to tuple encoding.
11778            fidl::encoding::Encode::<StopConfirm, D>::encode(
11779                (<StopResultCode as fidl::encoding::ValueTypeMarker>::borrow(&self.result_code),),
11780                encoder,
11781                offset,
11782                _depth,
11783            )
11784        }
11785    }
11786    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StopResultCode, D>>
11787        fidl::encoding::Encode<StopConfirm, D> for (T0,)
11788    {
11789        #[inline]
11790        unsafe fn encode(
11791            self,
11792            encoder: &mut fidl::encoding::Encoder<'_, D>,
11793            offset: usize,
11794            depth: fidl::encoding::Depth,
11795        ) -> fidl::Result<()> {
11796            encoder.debug_check_bounds::<StopConfirm>(offset);
11797            // Zero out padding regions. There's no need to apply masks
11798            // because the unmasked parts will be overwritten by fields.
11799            // Write the fields.
11800            self.0.encode(encoder, offset + 0, depth)?;
11801            Ok(())
11802        }
11803    }
11804
11805    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StopConfirm {
11806        #[inline(always)]
11807        fn new_empty() -> Self {
11808            Self { result_code: fidl::new_empty!(StopResultCode, D) }
11809        }
11810
11811        #[inline]
11812        unsafe fn decode(
11813            &mut self,
11814            decoder: &mut fidl::encoding::Decoder<'_, D>,
11815            offset: usize,
11816            _depth: fidl::encoding::Depth,
11817        ) -> fidl::Result<()> {
11818            decoder.debug_check_bounds::<Self>(offset);
11819            // Verify that padding bytes are zero.
11820            fidl::decode!(StopResultCode, D, &mut self.result_code, decoder, offset + 0, _depth)?;
11821            Ok(())
11822        }
11823    }
11824
11825    impl fidl::encoding::ValueTypeMarker for StopRequest {
11826        type Borrowed<'a> = &'a Self;
11827        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11828            value
11829        }
11830    }
11831
11832    unsafe impl fidl::encoding::TypeMarker for StopRequest {
11833        type Owned = Self;
11834
11835        #[inline(always)]
11836        fn inline_align(_context: fidl::encoding::Context) -> usize {
11837            8
11838        }
11839
11840        #[inline(always)]
11841        fn inline_size(_context: fidl::encoding::Context) -> usize {
11842            16
11843        }
11844    }
11845
11846    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StopRequest, D>
11847        for &StopRequest
11848    {
11849        #[inline]
11850        unsafe fn encode(
11851            self,
11852            encoder: &mut fidl::encoding::Encoder<'_, D>,
11853            offset: usize,
11854            _depth: fidl::encoding::Depth,
11855        ) -> fidl::Result<()> {
11856            encoder.debug_check_bounds::<StopRequest>(offset);
11857            // Delegate to tuple encoding.
11858            fidl::encoding::Encode::<StopRequest, D>::encode(
11859                (<fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
11860                    &self.ssid,
11861                ),),
11862                encoder,
11863                offset,
11864                _depth,
11865            )
11866        }
11867    }
11868    unsafe impl<
11869            D: fidl::encoding::ResourceDialect,
11870            T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
11871        > fidl::encoding::Encode<StopRequest, D> for (T0,)
11872    {
11873        #[inline]
11874        unsafe fn encode(
11875            self,
11876            encoder: &mut fidl::encoding::Encoder<'_, D>,
11877            offset: usize,
11878            depth: fidl::encoding::Depth,
11879        ) -> fidl::Result<()> {
11880            encoder.debug_check_bounds::<StopRequest>(offset);
11881            // Zero out padding regions. There's no need to apply masks
11882            // because the unmasked parts will be overwritten by fields.
11883            // Write the fields.
11884            self.0.encode(encoder, offset + 0, depth)?;
11885            Ok(())
11886        }
11887    }
11888
11889    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StopRequest {
11890        #[inline(always)]
11891        fn new_empty() -> Self {
11892            Self { ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D) }
11893        }
11894
11895        #[inline]
11896        unsafe fn decode(
11897            &mut self,
11898            decoder: &mut fidl::encoding::Decoder<'_, D>,
11899            offset: usize,
11900            _depth: fidl::encoding::Depth,
11901        ) -> fidl::Result<()> {
11902            decoder.debug_check_bounds::<Self>(offset);
11903            // Verify that padding bytes are zero.
11904            fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 0, _depth)?;
11905            Ok(())
11906        }
11907    }
11908
11909    impl fidl::encoding::ValueTypeMarker for WmmParameter {
11910        type Borrowed<'a> = &'a Self;
11911        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11912            value
11913        }
11914    }
11915
11916    unsafe impl fidl::encoding::TypeMarker for WmmParameter {
11917        type Owned = Self;
11918
11919        #[inline(always)]
11920        fn inline_align(_context: fidl::encoding::Context) -> usize {
11921            1
11922        }
11923
11924        #[inline(always)]
11925        fn inline_size(_context: fidl::encoding::Context) -> usize {
11926            18
11927        }
11928        #[inline(always)]
11929        fn encode_is_copy() -> bool {
11930            true
11931        }
11932
11933        #[inline(always)]
11934        fn decode_is_copy() -> bool {
11935            true
11936        }
11937    }
11938
11939    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<WmmParameter, D>
11940        for &WmmParameter
11941    {
11942        #[inline]
11943        unsafe fn encode(
11944            self,
11945            encoder: &mut fidl::encoding::Encoder<'_, D>,
11946            offset: usize,
11947            _depth: fidl::encoding::Depth,
11948        ) -> fidl::Result<()> {
11949            encoder.debug_check_bounds::<WmmParameter>(offset);
11950            unsafe {
11951                // Copy the object into the buffer.
11952                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11953                (buf_ptr as *mut WmmParameter)
11954                    .write_unaligned((self as *const WmmParameter).read());
11955                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11956                // done second because the memcpy will write garbage to these bytes.
11957            }
11958            Ok(())
11959        }
11960    }
11961    unsafe impl<
11962            D: fidl::encoding::ResourceDialect,
11963            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 18>, D>,
11964        > fidl::encoding::Encode<WmmParameter, D> for (T0,)
11965    {
11966        #[inline]
11967        unsafe fn encode(
11968            self,
11969            encoder: &mut fidl::encoding::Encoder<'_, D>,
11970            offset: usize,
11971            depth: fidl::encoding::Depth,
11972        ) -> fidl::Result<()> {
11973            encoder.debug_check_bounds::<WmmParameter>(offset);
11974            // Zero out padding regions. There's no need to apply masks
11975            // because the unmasked parts will be overwritten by fields.
11976            // Write the fields.
11977            self.0.encode(encoder, offset + 0, depth)?;
11978            Ok(())
11979        }
11980    }
11981
11982    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WmmParameter {
11983        #[inline(always)]
11984        fn new_empty() -> Self {
11985            Self { bytes: fidl::new_empty!(fidl::encoding::Array<u8, 18>, D) }
11986        }
11987
11988        #[inline]
11989        unsafe fn decode(
11990            &mut self,
11991            decoder: &mut fidl::encoding::Decoder<'_, D>,
11992            offset: usize,
11993            _depth: fidl::encoding::Depth,
11994        ) -> fidl::Result<()> {
11995            decoder.debug_check_bounds::<Self>(offset);
11996            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11997            // Verify that padding bytes are zero.
11998            // Copy from the buffer into the object.
11999            unsafe {
12000                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 18);
12001            }
12002            Ok(())
12003        }
12004    }
12005
12006    impl fidl::encoding::ValueTypeMarker for GetIfaceHistogramStatsResponse {
12007        type Borrowed<'a> = &'a Self;
12008        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12009            value
12010        }
12011    }
12012
12013    unsafe impl fidl::encoding::TypeMarker for GetIfaceHistogramStatsResponse {
12014        type Owned = Self;
12015
12016        #[inline(always)]
12017        fn inline_align(_context: fidl::encoding::Context) -> usize {
12018            8
12019        }
12020
12021        #[inline(always)]
12022        fn inline_size(_context: fidl::encoding::Context) -> usize {
12023            16
12024        }
12025    }
12026
12027    unsafe impl<D: fidl::encoding::ResourceDialect>
12028        fidl::encoding::Encode<GetIfaceHistogramStatsResponse, D>
12029        for &GetIfaceHistogramStatsResponse
12030    {
12031        #[inline]
12032        unsafe fn encode(
12033            self,
12034            encoder: &mut fidl::encoding::Encoder<'_, D>,
12035            offset: usize,
12036            _depth: fidl::encoding::Depth,
12037        ) -> fidl::Result<()> {
12038            encoder.debug_check_bounds::<GetIfaceHistogramStatsResponse>(offset);
12039            encoder.write_num::<u64>(self.ordinal(), offset);
12040            match self {
12041            GetIfaceHistogramStatsResponse::Stats(ref val) => {
12042                fidl::encoding::encode_in_envelope::<fidl_fuchsia_wlan_stats::IfaceHistogramStats, D>(
12043                    <fidl_fuchsia_wlan_stats::IfaceHistogramStats as fidl::encoding::ValueTypeMarker>::borrow(val),
12044                    encoder, offset + 8, _depth
12045                )
12046            }
12047            GetIfaceHistogramStatsResponse::ErrorStatus(ref val) => {
12048                fidl::encoding::encode_in_envelope::<i32, D>(
12049                    <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
12050                    encoder, offset + 8, _depth
12051                )
12052            }
12053        }
12054        }
12055    }
12056
12057    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12058        for GetIfaceHistogramStatsResponse
12059    {
12060        #[inline(always)]
12061        fn new_empty() -> Self {
12062            Self::Stats(fidl::new_empty!(fidl_fuchsia_wlan_stats::IfaceHistogramStats, D))
12063        }
12064
12065        #[inline]
12066        unsafe fn decode(
12067            &mut self,
12068            decoder: &mut fidl::encoding::Decoder<'_, D>,
12069            offset: usize,
12070            mut depth: fidl::encoding::Depth,
12071        ) -> fidl::Result<()> {
12072            decoder.debug_check_bounds::<Self>(offset);
12073            #[allow(unused_variables)]
12074            let next_out_of_line = decoder.next_out_of_line();
12075            let handles_before = decoder.remaining_handles();
12076            let (ordinal, inlined, num_bytes, num_handles) =
12077                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
12078
12079            let member_inline_size = match ordinal {
12080            1 => <fidl_fuchsia_wlan_stats::IfaceHistogramStats as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12081            2 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12082            _ => return Err(fidl::Error::UnknownUnionTag),
12083        };
12084
12085            if inlined != (member_inline_size <= 4) {
12086                return Err(fidl::Error::InvalidInlineBitInEnvelope);
12087            }
12088            let _inner_offset;
12089            if inlined {
12090                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
12091                _inner_offset = offset + 8;
12092            } else {
12093                depth.increment()?;
12094                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12095            }
12096            match ordinal {
12097                1 => {
12098                    #[allow(irrefutable_let_patterns)]
12099                    if let GetIfaceHistogramStatsResponse::Stats(_) = self {
12100                        // Do nothing, read the value into the object
12101                    } else {
12102                        // Initialize `self` to the right variant
12103                        *self = GetIfaceHistogramStatsResponse::Stats(fidl::new_empty!(
12104                            fidl_fuchsia_wlan_stats::IfaceHistogramStats,
12105                            D
12106                        ));
12107                    }
12108                    #[allow(irrefutable_let_patterns)]
12109                    if let GetIfaceHistogramStatsResponse::Stats(ref mut val) = self {
12110                        fidl::decode!(
12111                            fidl_fuchsia_wlan_stats::IfaceHistogramStats,
12112                            D,
12113                            val,
12114                            decoder,
12115                            _inner_offset,
12116                            depth
12117                        )?;
12118                    } else {
12119                        unreachable!()
12120                    }
12121                }
12122                2 => {
12123                    #[allow(irrefutable_let_patterns)]
12124                    if let GetIfaceHistogramStatsResponse::ErrorStatus(_) = self {
12125                        // Do nothing, read the value into the object
12126                    } else {
12127                        // Initialize `self` to the right variant
12128                        *self =
12129                            GetIfaceHistogramStatsResponse::ErrorStatus(fidl::new_empty!(i32, D));
12130                    }
12131                    #[allow(irrefutable_let_patterns)]
12132                    if let GetIfaceHistogramStatsResponse::ErrorStatus(ref mut val) = self {
12133                        fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
12134                    } else {
12135                        unreachable!()
12136                    }
12137                }
12138                ordinal => panic!("unexpected ordinal {:?}", ordinal),
12139            }
12140            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
12141                return Err(fidl::Error::InvalidNumBytesInEnvelope);
12142            }
12143            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12144                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12145            }
12146            Ok(())
12147        }
12148    }
12149
12150    impl fidl::encoding::ValueTypeMarker for GetIfaceStatsResponse {
12151        type Borrowed<'a> = &'a Self;
12152        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12153            value
12154        }
12155    }
12156
12157    unsafe impl fidl::encoding::TypeMarker for GetIfaceStatsResponse {
12158        type Owned = Self;
12159
12160        #[inline(always)]
12161        fn inline_align(_context: fidl::encoding::Context) -> usize {
12162            8
12163        }
12164
12165        #[inline(always)]
12166        fn inline_size(_context: fidl::encoding::Context) -> usize {
12167            16
12168        }
12169    }
12170
12171    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GetIfaceStatsResponse, D>
12172        for &GetIfaceStatsResponse
12173    {
12174        #[inline]
12175        unsafe fn encode(
12176            self,
12177            encoder: &mut fidl::encoding::Encoder<'_, D>,
12178            offset: usize,
12179            _depth: fidl::encoding::Depth,
12180        ) -> fidl::Result<()> {
12181            encoder.debug_check_bounds::<GetIfaceStatsResponse>(offset);
12182            encoder.write_num::<u64>(self.ordinal(), offset);
12183            match self {
12184            GetIfaceStatsResponse::Stats(ref val) => {
12185                fidl::encoding::encode_in_envelope::<fidl_fuchsia_wlan_stats::IfaceStats, D>(
12186                    <fidl_fuchsia_wlan_stats::IfaceStats as fidl::encoding::ValueTypeMarker>::borrow(val),
12187                    encoder, offset + 8, _depth
12188                )
12189            }
12190            GetIfaceStatsResponse::ErrorStatus(ref val) => {
12191                fidl::encoding::encode_in_envelope::<i32, D>(
12192                    <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
12193                    encoder, offset + 8, _depth
12194                )
12195            }
12196        }
12197        }
12198    }
12199
12200    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GetIfaceStatsResponse {
12201        #[inline(always)]
12202        fn new_empty() -> Self {
12203            Self::Stats(fidl::new_empty!(fidl_fuchsia_wlan_stats::IfaceStats, D))
12204        }
12205
12206        #[inline]
12207        unsafe fn decode(
12208            &mut self,
12209            decoder: &mut fidl::encoding::Decoder<'_, D>,
12210            offset: usize,
12211            mut depth: fidl::encoding::Depth,
12212        ) -> fidl::Result<()> {
12213            decoder.debug_check_bounds::<Self>(offset);
12214            #[allow(unused_variables)]
12215            let next_out_of_line = decoder.next_out_of_line();
12216            let handles_before = decoder.remaining_handles();
12217            let (ordinal, inlined, num_bytes, num_handles) =
12218                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
12219
12220            let member_inline_size = match ordinal {
12221                1 => {
12222                    <fidl_fuchsia_wlan_stats::IfaceStats as fidl::encoding::TypeMarker>::inline_size(
12223                        decoder.context,
12224                    )
12225                }
12226                2 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12227                _ => return Err(fidl::Error::UnknownUnionTag),
12228            };
12229
12230            if inlined != (member_inline_size <= 4) {
12231                return Err(fidl::Error::InvalidInlineBitInEnvelope);
12232            }
12233            let _inner_offset;
12234            if inlined {
12235                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
12236                _inner_offset = offset + 8;
12237            } else {
12238                depth.increment()?;
12239                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12240            }
12241            match ordinal {
12242                1 => {
12243                    #[allow(irrefutable_let_patterns)]
12244                    if let GetIfaceStatsResponse::Stats(_) = self {
12245                        // Do nothing, read the value into the object
12246                    } else {
12247                        // Initialize `self` to the right variant
12248                        *self = GetIfaceStatsResponse::Stats(fidl::new_empty!(
12249                            fidl_fuchsia_wlan_stats::IfaceStats,
12250                            D
12251                        ));
12252                    }
12253                    #[allow(irrefutable_let_patterns)]
12254                    if let GetIfaceStatsResponse::Stats(ref mut val) = self {
12255                        fidl::decode!(
12256                            fidl_fuchsia_wlan_stats::IfaceStats,
12257                            D,
12258                            val,
12259                            decoder,
12260                            _inner_offset,
12261                            depth
12262                        )?;
12263                    } else {
12264                        unreachable!()
12265                    }
12266                }
12267                2 => {
12268                    #[allow(irrefutable_let_patterns)]
12269                    if let GetIfaceStatsResponse::ErrorStatus(_) = self {
12270                        // Do nothing, read the value into the object
12271                    } else {
12272                        // Initialize `self` to the right variant
12273                        *self = GetIfaceStatsResponse::ErrorStatus(fidl::new_empty!(i32, D));
12274                    }
12275                    #[allow(irrefutable_let_patterns)]
12276                    if let GetIfaceStatsResponse::ErrorStatus(ref mut val) = self {
12277                        fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
12278                    } else {
12279                        unreachable!()
12280                    }
12281                }
12282                ordinal => panic!("unexpected ordinal {:?}", ordinal),
12283            }
12284            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
12285                return Err(fidl::Error::InvalidNumBytesInEnvelope);
12286            }
12287            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12288                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12289            }
12290            Ok(())
12291        }
12292    }
12293}