fidl_fuchsia_wlan_fullmac__common/
fidl_fuchsia_wlan_fullmac__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
11pub const WLAN_MAX_KEYLIST_SIZE: u32 = 4;
12
13/// Max length for vendor IEs to be added to the association request. This is currently
14/// used for WPA.
15pub const WLAN_VIE_MAX_LEN: u32 = 514;
16
17#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
18pub enum EapolTxResult {
19    Success,
20    TransmissionFailure,
21    #[doc(hidden)]
22    __SourceBreaking {
23        unknown_ordinal: u8,
24    },
25}
26
27/// Pattern that matches an unknown `EapolTxResult` member.
28#[macro_export]
29macro_rules! EapolTxResultUnknown {
30    () => {
31        _
32    };
33}
34
35impl EapolTxResult {
36    #[inline]
37    pub fn from_primitive(prim: u8) -> Option<Self> {
38        match prim {
39            0 => Some(Self::Success),
40            1 => Some(Self::TransmissionFailure),
41            _ => None,
42        }
43    }
44
45    #[inline]
46    pub fn from_primitive_allow_unknown(prim: u8) -> Self {
47        match prim {
48            0 => Self::Success,
49            1 => Self::TransmissionFailure,
50            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
51        }
52    }
53
54    #[inline]
55    pub fn unknown() -> Self {
56        Self::__SourceBreaking { unknown_ordinal: 0xff }
57    }
58
59    #[inline]
60    pub const fn into_primitive(self) -> u8 {
61        match self {
62            Self::Success => 0,
63            Self::TransmissionFailure => 1,
64            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
65        }
66    }
67
68    #[inline]
69    pub fn is_unknown(&self) -> bool {
70        match self {
71            Self::__SourceBreaking { unknown_ordinal: _ } => true,
72            _ => false,
73        }
74    }
75}
76
77#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
78pub enum StartResult {
79    Success,
80    BssAlreadyStartedOrJoined,
81    ResetRequiredBeforeStart,
82    NotSupported,
83    #[doc(hidden)]
84    __SourceBreaking {
85        unknown_ordinal: u8,
86    },
87}
88
89/// Pattern that matches an unknown `StartResult` member.
90#[macro_export]
91macro_rules! StartResultUnknown {
92    () => {
93        _
94    };
95}
96
97impl StartResult {
98    #[inline]
99    pub fn from_primitive(prim: u8) -> Option<Self> {
100        match prim {
101            0 => Some(Self::Success),
102            1 => Some(Self::BssAlreadyStartedOrJoined),
103            2 => Some(Self::ResetRequiredBeforeStart),
104            3 => Some(Self::NotSupported),
105            _ => None,
106        }
107    }
108
109    #[inline]
110    pub fn from_primitive_allow_unknown(prim: u8) -> Self {
111        match prim {
112            0 => Self::Success,
113            1 => Self::BssAlreadyStartedOrJoined,
114            2 => Self::ResetRequiredBeforeStart,
115            3 => Self::NotSupported,
116            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
117        }
118    }
119
120    #[inline]
121    pub fn unknown() -> Self {
122        Self::__SourceBreaking { unknown_ordinal: 0xff }
123    }
124
125    #[inline]
126    pub const fn into_primitive(self) -> u8 {
127        match self {
128            Self::Success => 0,
129            Self::BssAlreadyStartedOrJoined => 1,
130            Self::ResetRequiredBeforeStart => 2,
131            Self::NotSupported => 3,
132            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
133        }
134    }
135
136    #[inline]
137    pub fn is_unknown(&self) -> bool {
138        match self {
139            Self::__SourceBreaking { unknown_ordinal: _ } => true,
140            _ => false,
141        }
142    }
143}
144
145#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
146pub enum StopResult {
147    Success,
148    BssAlreadyStopped,
149    InternalError,
150    #[doc(hidden)]
151    __SourceBreaking {
152        unknown_ordinal: u8,
153    },
154}
155
156/// Pattern that matches an unknown `StopResult` member.
157#[macro_export]
158macro_rules! StopResultUnknown {
159    () => {
160        _
161    };
162}
163
164impl StopResult {
165    #[inline]
166    pub fn from_primitive(prim: u8) -> Option<Self> {
167        match prim {
168            0 => Some(Self::Success),
169            1 => Some(Self::BssAlreadyStopped),
170            2 => Some(Self::InternalError),
171            _ => None,
172        }
173    }
174
175    #[inline]
176    pub fn from_primitive_allow_unknown(prim: u8) -> Self {
177        match prim {
178            0 => Self::Success,
179            1 => Self::BssAlreadyStopped,
180            2 => Self::InternalError,
181            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
182        }
183    }
184
185    #[inline]
186    pub fn unknown() -> Self {
187        Self::__SourceBreaking { unknown_ordinal: 0xff }
188    }
189
190    #[inline]
191    pub const fn into_primitive(self) -> u8 {
192        match self {
193            Self::Success => 0,
194            Self::BssAlreadyStopped => 1,
195            Self::InternalError => 2,
196            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
197        }
198    }
199
200    #[inline]
201    pub fn is_unknown(&self) -> bool {
202        match self {
203            Self::__SourceBreaking { unknown_ordinal: _ } => true,
204            _ => false,
205        }
206    }
207}
208
209#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
210pub enum WlanAssocResult {
211    Success,
212    RefusedReasonUnspecified,
213    RefusedNotAuthenticated,
214    RefusedCapabilitiesMismatch,
215    RefusedExternalReason,
216    RefusedApOutOfMemory,
217    RefusedBasicRatesMismatch,
218    RejectedEmergencyServicesNotSupported,
219    RefusedTemporarily,
220    #[doc(hidden)]
221    __SourceBreaking {
222        unknown_ordinal: u8,
223    },
224}
225
226/// Pattern that matches an unknown `WlanAssocResult` member.
227#[macro_export]
228macro_rules! WlanAssocResultUnknown {
229    () => {
230        _
231    };
232}
233
234impl WlanAssocResult {
235    #[inline]
236    pub fn from_primitive(prim: u8) -> Option<Self> {
237        match prim {
238            0 => Some(Self::Success),
239            1 => Some(Self::RefusedReasonUnspecified),
240            2 => Some(Self::RefusedNotAuthenticated),
241            3 => Some(Self::RefusedCapabilitiesMismatch),
242            4 => Some(Self::RefusedExternalReason),
243            5 => Some(Self::RefusedApOutOfMemory),
244            6 => Some(Self::RefusedBasicRatesMismatch),
245            7 => Some(Self::RejectedEmergencyServicesNotSupported),
246            8 => Some(Self::RefusedTemporarily),
247            _ => None,
248        }
249    }
250
251    #[inline]
252    pub fn from_primitive_allow_unknown(prim: u8) -> Self {
253        match prim {
254            0 => Self::Success,
255            1 => Self::RefusedReasonUnspecified,
256            2 => Self::RefusedNotAuthenticated,
257            3 => Self::RefusedCapabilitiesMismatch,
258            4 => Self::RefusedExternalReason,
259            5 => Self::RefusedApOutOfMemory,
260            6 => Self::RefusedBasicRatesMismatch,
261            7 => Self::RejectedEmergencyServicesNotSupported,
262            8 => Self::RefusedTemporarily,
263            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
264        }
265    }
266
267    #[inline]
268    pub fn unknown() -> Self {
269        Self::__SourceBreaking { unknown_ordinal: 0xff }
270    }
271
272    #[inline]
273    pub const fn into_primitive(self) -> u8 {
274        match self {
275            Self::Success => 0,
276            Self::RefusedReasonUnspecified => 1,
277            Self::RefusedNotAuthenticated => 2,
278            Self::RefusedCapabilitiesMismatch => 3,
279            Self::RefusedExternalReason => 4,
280            Self::RefusedApOutOfMemory => 5,
281            Self::RefusedBasicRatesMismatch => 6,
282            Self::RejectedEmergencyServicesNotSupported => 7,
283            Self::RefusedTemporarily => 8,
284            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
285        }
286    }
287
288    #[inline]
289    pub fn is_unknown(&self) -> bool {
290        match self {
291            Self::__SourceBreaking { unknown_ordinal: _ } => true,
292            _ => false,
293        }
294    }
295}
296
297#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
298pub enum WlanAuthResult {
299    Success,
300    Refused,
301    AntiCloggingTokenRequired,
302    FiniteCyclicGroupNotSupported,
303    Rejected,
304    FailureTimeout,
305    #[doc(hidden)]
306    __SourceBreaking {
307        unknown_ordinal: u8,
308    },
309}
310
311/// Pattern that matches an unknown `WlanAuthResult` member.
312#[macro_export]
313macro_rules! WlanAuthResultUnknown {
314    () => {
315        _
316    };
317}
318
319impl WlanAuthResult {
320    #[inline]
321    pub fn from_primitive(prim: u8) -> Option<Self> {
322        match prim {
323            0 => Some(Self::Success),
324            1 => Some(Self::Refused),
325            2 => Some(Self::AntiCloggingTokenRequired),
326            3 => Some(Self::FiniteCyclicGroupNotSupported),
327            4 => Some(Self::Rejected),
328            5 => Some(Self::FailureTimeout),
329            _ => None,
330        }
331    }
332
333    #[inline]
334    pub fn from_primitive_allow_unknown(prim: u8) -> Self {
335        match prim {
336            0 => Self::Success,
337            1 => Self::Refused,
338            2 => Self::AntiCloggingTokenRequired,
339            3 => Self::FiniteCyclicGroupNotSupported,
340            4 => Self::Rejected,
341            5 => Self::FailureTimeout,
342            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
343        }
344    }
345
346    #[inline]
347    pub fn unknown() -> Self {
348        Self::__SourceBreaking { unknown_ordinal: 0xff }
349    }
350
351    #[inline]
352    pub const fn into_primitive(self) -> u8 {
353        match self {
354            Self::Success => 0,
355            Self::Refused => 1,
356            Self::AntiCloggingTokenRequired => 2,
357            Self::FiniteCyclicGroupNotSupported => 3,
358            Self::Rejected => 4,
359            Self::FailureTimeout => 5,
360            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
361        }
362    }
363
364    #[inline]
365    pub fn is_unknown(&self) -> bool {
366        match self {
367            Self::__SourceBreaking { unknown_ordinal: _ } => true,
368            _ => false,
369        }
370    }
371}
372
373#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
374pub enum WlanAuthType {
375    OpenSystem,
376    SharedKey,
377    FastBssTransition,
378    Sae,
379    #[doc(hidden)]
380    __SourceBreaking {
381        unknown_ordinal: u8,
382    },
383}
384
385/// Pattern that matches an unknown `WlanAuthType` member.
386#[macro_export]
387macro_rules! WlanAuthTypeUnknown {
388    () => {
389        _
390    };
391}
392
393impl WlanAuthType {
394    #[inline]
395    pub fn from_primitive(prim: u8) -> Option<Self> {
396        match prim {
397            1 => Some(Self::OpenSystem),
398            2 => Some(Self::SharedKey),
399            3 => Some(Self::FastBssTransition),
400            4 => Some(Self::Sae),
401            _ => None,
402        }
403    }
404
405    #[inline]
406    pub fn from_primitive_allow_unknown(prim: u8) -> Self {
407        match prim {
408            1 => Self::OpenSystem,
409            2 => Self::SharedKey,
410            3 => Self::FastBssTransition,
411            4 => Self::Sae,
412            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
413        }
414    }
415
416    #[inline]
417    pub fn unknown() -> Self {
418        Self::__SourceBreaking { unknown_ordinal: 0xff }
419    }
420
421    #[inline]
422    pub const fn into_primitive(self) -> u8 {
423        match self {
424            Self::OpenSystem => 1,
425            Self::SharedKey => 2,
426            Self::FastBssTransition => 3,
427            Self::Sae => 4,
428            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
429        }
430    }
431
432    #[inline]
433    pub fn is_unknown(&self) -> bool {
434        match self {
435            Self::__SourceBreaking { unknown_ordinal: _ } => true,
436            _ => false,
437        }
438    }
439}
440
441#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
442pub enum WlanScanResult {
443    Success,
444    NotSupported,
445    InvalidArgs,
446    InternalError,
447    ShouldWait,
448    CanceledByDriverOrFirmware,
449    #[doc(hidden)]
450    __SourceBreaking {
451        unknown_ordinal: u8,
452    },
453}
454
455/// Pattern that matches an unknown `WlanScanResult` member.
456#[macro_export]
457macro_rules! WlanScanResultUnknown {
458    () => {
459        _
460    };
461}
462
463impl WlanScanResult {
464    #[inline]
465    pub fn from_primitive(prim: u8) -> Option<Self> {
466        match prim {
467            0 => Some(Self::Success),
468            1 => Some(Self::NotSupported),
469            2 => Some(Self::InvalidArgs),
470            3 => Some(Self::InternalError),
471            4 => Some(Self::ShouldWait),
472            5 => Some(Self::CanceledByDriverOrFirmware),
473            _ => None,
474        }
475    }
476
477    #[inline]
478    pub fn from_primitive_allow_unknown(prim: u8) -> Self {
479        match prim {
480            0 => Self::Success,
481            1 => Self::NotSupported,
482            2 => Self::InvalidArgs,
483            3 => Self::InternalError,
484            4 => Self::ShouldWait,
485            5 => Self::CanceledByDriverOrFirmware,
486            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
487        }
488    }
489
490    #[inline]
491    pub fn unknown() -> Self {
492        Self::__SourceBreaking { unknown_ordinal: 0xff }
493    }
494
495    #[inline]
496    pub const fn into_primitive(self) -> u8 {
497        match self {
498            Self::Success => 0,
499            Self::NotSupported => 1,
500            Self::InvalidArgs => 2,
501            Self::InternalError => 3,
502            Self::ShouldWait => 4,
503            Self::CanceledByDriverOrFirmware => 5,
504            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
505        }
506    }
507
508    #[inline]
509    pub fn is_unknown(&self) -> bool {
510        match self {
511            Self::__SourceBreaking { unknown_ordinal: _ } => true,
512            _ => false,
513        }
514    }
515}
516
517#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
518pub enum WlanScanType {
519    Active,
520    Passive,
521    #[doc(hidden)]
522    __SourceBreaking {
523        unknown_ordinal: u8,
524    },
525}
526
527/// Pattern that matches an unknown `WlanScanType` member.
528#[macro_export]
529macro_rules! WlanScanTypeUnknown {
530    () => {
531        _
532    };
533}
534
535impl WlanScanType {
536    #[inline]
537    pub fn from_primitive(prim: u8) -> Option<Self> {
538        match prim {
539            1 => Some(Self::Active),
540            2 => Some(Self::Passive),
541            _ => None,
542        }
543    }
544
545    #[inline]
546    pub fn from_primitive_allow_unknown(prim: u8) -> Self {
547        match prim {
548            1 => Self::Active,
549            2 => Self::Passive,
550            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
551        }
552    }
553
554    #[inline]
555    pub fn unknown() -> Self {
556        Self::__SourceBreaking { unknown_ordinal: 0xff }
557    }
558
559    #[inline]
560    pub const fn into_primitive(self) -> u8 {
561        match self {
562            Self::Active => 1,
563            Self::Passive => 2,
564            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
565        }
566    }
567
568    #[inline]
569    pub fn is_unknown(&self) -> bool {
570        match self {
571            Self::__SourceBreaking { unknown_ordinal: _ } => true,
572            _ => false,
573        }
574    }
575}
576
577#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
578#[repr(C)]
579pub struct WlanFullmacChannelSwitchInfo {
580    pub new_channel: u8,
581}
582
583impl fidl::Persistable for WlanFullmacChannelSwitchInfo {}
584
585#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
586#[repr(C)]
587pub struct WlanFullmacImplIfcOnChannelSwitchRequest {
588    pub ind: WlanFullmacChannelSwitchInfo,
589}
590
591impl fidl::Persistable for WlanFullmacImplIfcOnChannelSwitchRequest {}
592
593#[derive(Clone, Debug, PartialEq)]
594pub struct WlanFullmacImplIfcOnWmmStatusRespRequest {
595    pub status: i32,
596    pub wmm_params: fidl_fuchsia_wlan_common__common::WlanWmmParameters,
597}
598
599impl fidl::Persistable for WlanFullmacImplIfcOnWmmStatusRespRequest {}
600
601#[derive(Clone, Debug, PartialEq)]
602pub struct WlanFullmacImplIfcSaeFrameRxRequest {
603    pub frame: SaeFrame,
604}
605
606impl fidl::Persistable for WlanFullmacImplIfcSaeFrameRxRequest {}
607
608#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
609#[repr(C)]
610pub struct WlanFullmacImplIfcSignalReportRequest {
611    pub ind: WlanFullmacSignalReportIndication,
612}
613
614impl fidl::Persistable for WlanFullmacImplIfcSignalReportRequest {}
615
616#[derive(Clone, Debug, PartialEq)]
617pub struct WlanFullmacImplSaeFrameTxRequest {
618    pub frame: SaeFrame,
619}
620
621impl fidl::Persistable for WlanFullmacImplSaeFrameTxRequest {}
622
623#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
624pub struct WlanFullmacImplSetKeysResponse {
625    pub resp: WlanFullmacSetKeysResp,
626}
627
628impl fidl::Persistable for WlanFullmacImplSetKeysResponse {}
629
630#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
631#[repr(C)]
632pub struct WlanFullmacImplSetMacAddressRequest {
633    pub mac_addr: [u8; 6],
634}
635
636impl fidl::Persistable for WlanFullmacImplSetMacAddressRequest {}
637
638#[derive(Clone, Debug, PartialEq)]
639pub struct WlanFullmacImplGetIfaceHistogramStatsResponse {
640    pub stats: fidl_fuchsia_wlan_stats__common::IfaceHistogramStats,
641}
642
643impl fidl::Persistable for WlanFullmacImplGetIfaceHistogramStatsResponse {}
644
645#[derive(Clone, Debug, PartialEq)]
646pub struct WlanFullmacImplGetIfaceStatsResponse {
647    pub stats: fidl_fuchsia_wlan_stats__common::IfaceStats,
648}
649
650impl fidl::Persistable for WlanFullmacImplGetIfaceStatsResponse {}
651
652#[derive(Clone, Debug, PartialEq)]
653pub struct WlanFullmacImplQuerySecuritySupportResponse {
654    pub resp: fidl_fuchsia_wlan_common__common::SecuritySupport,
655}
656
657impl fidl::Persistable for WlanFullmacImplQuerySecuritySupportResponse {}
658
659#[derive(Clone, Debug, PartialEq)]
660pub struct WlanFullmacImplQuerySpectrumManagementSupportResponse {
661    pub resp: fidl_fuchsia_wlan_common__common::SpectrumManagementSupport,
662}
663
664impl fidl::Persistable for WlanFullmacImplQuerySpectrumManagementSupportResponse {}
665
666#[derive(Clone, Debug, PartialEq)]
667pub struct WlanFullmacImplQueryTelemetrySupportResponse {
668    pub resp: fidl_fuchsia_wlan_stats__common::TelemetrySupport,
669}
670
671impl fidl::Persistable for WlanFullmacImplQueryTelemetrySupportResponse {}
672
673#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
674pub struct WlanFullmacRssiStats {
675    pub hist: Vec<u64>,
676}
677
678impl fidl::Persistable for WlanFullmacRssiStats {}
679
680#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
681pub struct WlanFullmacSetKeysResp {
682    pub statuslist: Vec<i32>,
683}
684
685impl fidl::Persistable for WlanFullmacSetKeysResp {}
686
687#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
688#[repr(C)]
689pub struct WlanFullmacSignalReportIndication {
690    pub rssi_dbm: i8,
691    pub snr_db: i8,
692}
693
694impl fidl::Persistable for WlanFullmacSignalReportIndication {}
695
696/// Describes parameters and capabilities for a single WlanBand.
697#[derive(Clone, Debug, Default, PartialEq)]
698pub struct BandCapability {
699    /// The values of this table apply to the band indicated in this field.
700    ///
701    /// Required.
702    pub band: Option<fidl_fuchsia_wlan_ieee80211__common::WlanBand>,
703    /// Basic rates supported in units of 500 kbit/s (as defined in
704    /// IEEE Std 802.11-2016, 9.4.2.3), e.g., 0x02 represents 1 Mbps.
705    /// The value returned by this type indicates all the non-HT rates
706    /// the device supports transmitting and receiving.
707    ///
708    /// Required.
709    pub basic_rates: Option<Vec<u8>>,
710    /// HT PHY mode capabilities.
711    ///
712    /// Optional. If this field is not present, then the device does not support HT PHY mode in this
713    /// band.
714    pub ht_caps: Option<fidl_fuchsia_wlan_ieee80211__common::HtCapabilities>,
715    /// VHT PHY mode capabilities.
716    ///
717    /// Optional. If this field is not present, then the device does not support VHT PHY mode in
718    /// this band.
719    pub vht_caps: Option<fidl_fuchsia_wlan_ieee80211__common::VhtCapabilities>,
720    /// A list of operating channels considered valid by hardware, in the context of
721    /// regulatory information known to the device driver, at the time of its
722    /// construction during iface creation. In this context, an operating channel
723    /// means a channel which APs may transmit Beacon frames on in the current
724    /// regulatory domain.
725    ///
726    /// This list should be used to determine efficacy of subsequent requests to
727    /// scan a subset of channels using the iface, or to determine which operating
728    /// channel to use when starting an AP.
729    ///
730    /// Required.
731    pub operating_channels: Option<Vec<u8>>,
732    #[doc(hidden)]
733    pub __source_breaking: fidl::marker::SourceBreaking,
734}
735
736impl fidl::Persistable for BandCapability {}
737
738/// Contains the information of SAE authentication frames. Shared between transmit and receive
739/// directions, see WlanFullmacImplIfc::SaeFrameRx and WlanFullmacImpl::SaeFrameTx.
740#[derive(Clone, Debug, Default, PartialEq)]
741pub struct SaeFrame {
742    /// The peer's MAC address. Required.
743    pub peer_sta_address: Option<[u8; 6]>,
744    /// The status code for this SAE frame. Required.
745    pub status_code: Option<fidl_fuchsia_wlan_ieee80211__common::StatusCode>,
746    /// The sequence number. Required.
747    pub seq_num: Option<u16>,
748    /// Contains fields in the frame body relevant to SAE.
749    /// See IEEE Std 802.11-2016 table 9-35 and table 9-36 for more details.
750    /// Required.
751    pub sae_fields: Option<Vec<u8>>,
752    #[doc(hidden)]
753    pub __source_breaking: fidl::marker::SourceBreaking,
754}
755
756impl fidl::Persistable for SaeFrame {}
757
758#[derive(Clone, Debug, Default, PartialEq)]
759pub struct WlanFullmacImplAssocRespRequest {
760    pub peer_sta_address: Option<[u8; 6]>,
761    pub result_code: Option<WlanAssocResult>,
762    pub association_id: Option<u16>,
763    #[doc(hidden)]
764    pub __source_breaking: fidl::marker::SourceBreaking,
765}
766
767impl fidl::Persistable for WlanFullmacImplAssocRespRequest {}
768
769#[derive(Clone, Debug, Default, PartialEq)]
770pub struct WlanFullmacImplAuthRespRequest {
771    pub peer_sta_address: Option<[u8; 6]>,
772    pub result_code: Option<WlanAuthResult>,
773    #[doc(hidden)]
774    pub __source_breaking: fidl::marker::SourceBreaking,
775}
776
777impl fidl::Persistable for WlanFullmacImplAuthRespRequest {}
778
779#[derive(Clone, Debug, Default, PartialEq)]
780pub struct WlanFullmacImplConnectRequest {
781    pub selected_bss: Option<fidl_fuchsia_wlan_common__common::BssDescription>,
782    /// Timeout specified in beacon interval.
783    pub connect_failure_timeout: Option<u32>,
784    /// Additional parameters specific to the authentication exchange.
785    pub auth_type: Option<WlanAuthType>,
786    /// sae_password is ignored except when SAE_DRIVER_AUTH is enabled and the
787    /// auth_type is SAE.
788    pub sae_password: Option<Vec<u8>>,
789    /// WEP key used in the authentication exchange.
790    /// This is only populated for the WEP security type, otherwise this field is empty.
791    pub wep_key: Option<fidl_fuchsia_wlan_common__common::WlanKeyConfig>,
792    /// Additional parameters specific to the association exchange.
793    pub security_ie: Option<Vec<u8>>,
794    /// WEP key used in the authentication exchange.
795    /// This is only populated for the WEP security type, otherwise this field is empty.
796    pub wep_key_desc: Option<fidl_fuchsia_wlan_ieee80211__common::SetKeyDescriptor>,
797    #[doc(hidden)]
798    pub __source_breaking: fidl::marker::SourceBreaking,
799}
800
801impl fidl::Persistable for WlanFullmacImplConnectRequest {}
802
803#[derive(Clone, Debug, Default, PartialEq)]
804pub struct WlanFullmacImplDeauthRequest {
805    pub peer_sta_address: Option<[u8; 6]>,
806    pub reason_code: Option<fidl_fuchsia_wlan_ieee80211__common::ReasonCode>,
807    #[doc(hidden)]
808    pub __source_breaking: fidl::marker::SourceBreaking,
809}
810
811impl fidl::Persistable for WlanFullmacImplDeauthRequest {}
812
813#[derive(Clone, Debug, Default, PartialEq)]
814pub struct WlanFullmacImplDisassocRequest {
815    pub peer_sta_address: Option<[u8; 6]>,
816    pub reason_code: Option<fidl_fuchsia_wlan_ieee80211__common::ReasonCode>,
817    #[doc(hidden)]
818    pub __source_breaking: fidl::marker::SourceBreaking,
819}
820
821impl fidl::Persistable for WlanFullmacImplDisassocRequest {}
822
823#[derive(Clone, Debug, Default, PartialEq)]
824pub struct WlanFullmacImplEapolTxRequest {
825    pub src_addr: Option<[u8; 6]>,
826    pub dst_addr: Option<[u8; 6]>,
827    pub data: Option<Vec<u8>>,
828    #[doc(hidden)]
829    pub __source_breaking: fidl::marker::SourceBreaking,
830}
831
832impl fidl::Persistable for WlanFullmacImplEapolTxRequest {}
833
834#[derive(Clone, Debug, Default, PartialEq)]
835pub struct WlanFullmacImplIfcAssocIndRequest {
836    pub peer_sta_address: Option<[u8; 6]>,
837    pub listen_interval: Option<u16>,
838    pub ssid: Option<Vec<u8>>,
839    pub rsne: Option<Vec<u8>>,
840    pub vendor_ie: Option<Vec<u8>>,
841    #[doc(hidden)]
842    pub __source_breaking: fidl::marker::SourceBreaking,
843}
844
845impl fidl::Persistable for WlanFullmacImplIfcAssocIndRequest {}
846
847#[derive(Clone, Debug, Default, PartialEq)]
848pub struct WlanFullmacImplIfcAuthIndRequest {
849    pub peer_sta_address: Option<[u8; 6]>,
850    pub auth_type: Option<WlanAuthType>,
851    #[doc(hidden)]
852    pub __source_breaking: fidl::marker::SourceBreaking,
853}
854
855impl fidl::Persistable for WlanFullmacImplIfcAuthIndRequest {}
856
857#[derive(Clone, Debug, Default, PartialEq)]
858pub struct WlanFullmacImplIfcConnectConfRequest {
859    pub peer_sta_address: Option<[u8; 6]>,
860    pub result_code: Option<fidl_fuchsia_wlan_ieee80211__common::StatusCode>,
861    pub association_id: Option<u16>,
862    pub association_ies: Option<Vec<u8>>,
863    #[doc(hidden)]
864    pub __source_breaking: fidl::marker::SourceBreaking,
865}
866
867impl fidl::Persistable for WlanFullmacImplIfcConnectConfRequest {}
868
869#[derive(Clone, Debug, Default, PartialEq)]
870pub struct WlanFullmacImplIfcDeauthConfRequest {
871    pub peer_sta_address: Option<[u8; 6]>,
872    #[doc(hidden)]
873    pub __source_breaking: fidl::marker::SourceBreaking,
874}
875
876impl fidl::Persistable for WlanFullmacImplIfcDeauthConfRequest {}
877
878#[derive(Clone, Debug, Default, PartialEq)]
879pub struct WlanFullmacImplIfcDeauthIndRequest {
880    /// MAC address of the peer. Required.
881    pub peer_sta_address: Option<[u8; 6]>,
882    /// Reason code for deauthentication. Required.
883    pub reason_code: Option<fidl_fuchsia_wlan_ieee80211__common::ReasonCode>,
884    /// locally_initiated is true if deauth is initiated from the device,
885    /// and is false if it's initiated remotely (e.g. due to deauth frame)
886    pub locally_initiated: Option<bool>,
887    #[doc(hidden)]
888    pub __source_breaking: fidl::marker::SourceBreaking,
889}
890
891impl fidl::Persistable for WlanFullmacImplIfcDeauthIndRequest {}
892
893#[derive(Clone, Debug, Default, PartialEq)]
894pub struct WlanFullmacImplIfcDisassocConfRequest {
895    /// ZX_OK indicates that the disassociate request was serviced and the peer was
896    /// disassociated. Other errors indicate that the request could not be serviced, for these
897    /// or other reasons:
898    ///   - ZX_ERR_BAD_STATE: association not possible in current state (e.g. disconnected)
899    ///   - ZX_ERR_INVALID_ARGS: no association exists with specified peer
900    ///   - ZX_ERR_SHOULD_WAIT: disassociate request could not be serviced because firmware or
901    ///     driver was busy
902    pub status: Option<i32>,
903    #[doc(hidden)]
904    pub __source_breaking: fidl::marker::SourceBreaking,
905}
906
907impl fidl::Persistable for WlanFullmacImplIfcDisassocConfRequest {}
908
909#[derive(Clone, Debug, Default, PartialEq)]
910pub struct WlanFullmacImplIfcDisassocIndRequest {
911    /// Address of the peer that was disassociated. Required.
912    pub peer_sta_address: Option<[u8; 6]>,
913    /// Reason for the disassociation. Required.
914    pub reason_code: Option<fidl_fuchsia_wlan_ieee80211__common::ReasonCode>,
915    /// Whether the disassociation was initiated from the device. Required.
916    /// locally_initiated is true if disassociation was initiated from the device (e.g. firmware
917    /// or vendor driver started the disassociation); false if the disassociation was initiated
918    /// externally (e.g. due to receipt of a disassociate frame from an AP).
919    pub locally_initiated: Option<bool>,
920    #[doc(hidden)]
921    pub __source_breaking: fidl::marker::SourceBreaking,
922}
923
924impl fidl::Persistable for WlanFullmacImplIfcDisassocIndRequest {}
925
926#[derive(Clone, Debug, Default, PartialEq)]
927pub struct WlanFullmacImplIfcEapolConfRequest {
928    /// The result of the transmission. Required.
929    pub result_code: Option<EapolTxResult>,
930    /// This value corresponds to the dst_addr in the EapolTxRequest we're confirming.
931    /// IEEE 802.11-2020 does not include this field, but we need it to disambiguate
932    /// if multiple EAPoL handshakes are ongoing.
933    /// Required.
934    pub dst_addr: Option<[u8; 6]>,
935    #[doc(hidden)]
936    pub __source_breaking: fidl::marker::SourceBreaking,
937}
938
939impl fidl::Persistable for WlanFullmacImplIfcEapolConfRequest {}
940
941#[derive(Clone, Debug, Default, PartialEq)]
942pub struct WlanFullmacImplIfcEapolIndRequest {
943    /// The address of the sender. Required.
944    pub src_addr: Option<[u8; 6]>,
945    /// The address of the intended destination. Required.
946    pub dst_addr: Option<[u8; 6]>,
947    /// The bytes of the EAPoL frame data. Required.
948    pub data: Option<Vec<u8>>,
949    #[doc(hidden)]
950    pub __source_breaking: fidl::marker::SourceBreaking,
951}
952
953impl fidl::Persistable for WlanFullmacImplIfcEapolIndRequest {}
954
955#[derive(Clone, Debug, Default, PartialEq)]
956pub struct WlanFullmacImplIfcOnPmkAvailableRequest {
957    /// The pairwise master key bytes. Required.
958    pub pmk: Option<Vec<u8>>,
959    /// The PMK IDs. Required.
960    pub pmkid: Option<Vec<u8>>,
961    #[doc(hidden)]
962    pub __source_breaking: fidl::marker::SourceBreaking,
963}
964
965impl fidl::Persistable for WlanFullmacImplIfcOnPmkAvailableRequest {}
966
967#[derive(Clone, Debug, Default, PartialEq)]
968pub struct WlanFullmacImplIfcOnScanEndRequest {
969    pub txn_id: Option<u64>,
970    pub code: Option<WlanScanResult>,
971    #[doc(hidden)]
972    pub __source_breaking: fidl::marker::SourceBreaking,
973}
974
975impl fidl::Persistable for WlanFullmacImplIfcOnScanEndRequest {}
976
977#[derive(Clone, Debug, Default, PartialEq)]
978pub struct WlanFullmacImplIfcOnScanResultRequest {
979    pub txn_id: Option<u64>,
980    pub timestamp_nanos: Option<i64>,
981    pub bss: Option<fidl_fuchsia_wlan_common__common::BssDescription>,
982    #[doc(hidden)]
983    pub __source_breaking: fidl::marker::SourceBreaking,
984}
985
986impl fidl::Persistable for WlanFullmacImplIfcOnScanResultRequest {}
987
988#[derive(Clone, Debug, Default, PartialEq)]
989pub struct WlanFullmacImplIfcRoamConfRequest {
990    /// BSSID of the target BSS. Required.
991    pub selected_bssid: Option<[u8; 6]>,
992    /// Result of the roam attempt. Required.
993    pub status_code: Option<fidl_fuchsia_wlan_ieee80211__common::StatusCode>,
994    /// Whether the original BSS association has been maintained through the roam attempt. Required.
995    /// A successful roam always incurs disassociation from the original BSS, so if `status_code` is
996    /// success then this field must be set to false; a roam failure typically incurs disassociation
997    /// from the original BSS, but may not in some cases (e.g. in some Fast BSS Transition scenarios).
998    pub original_association_maintained: Option<bool>,
999    /// Whether the client is authenticated with the target BSS. If `status_code` is success, then
1000    /// this field must be set to true; if the roam attempt failed, this field may be true or false.
1001    /// This allows higher layers to decide how to clean up connection state after a failed roam
1002    /// attempt.
1003    pub target_bss_authenticated: Option<bool>,
1004    /// Association ID for this association with the AP. Required if `status_code` is success.
1005    pub association_id: Option<u16>,
1006    /// IEs for this association with the AP. Required if `status_code` is success.
1007    pub association_ies: Option<Vec<u8>>,
1008    #[doc(hidden)]
1009    pub __source_breaking: fidl::marker::SourceBreaking,
1010}
1011
1012impl fidl::Persistable for WlanFullmacImplIfcRoamConfRequest {}
1013
1014#[derive(Clone, Debug, Default, PartialEq)]
1015pub struct WlanFullmacImplIfcRoamResultIndRequest {
1016    /// BSSID of the target BSS. Required.
1017    pub selected_bssid: Option<[u8; 6]>,
1018    /// Result of the roam attempt. Required.
1019    pub status_code: Option<fidl_fuchsia_wlan_ieee80211__common::StatusCode>,
1020    /// Whether the original BSS association has been maintained through the roam attempt. Required.
1021    /// A successful roam always incurs disassociation from the original BSS, so if `status_code` is
1022    /// success then this field must be set to false; a roam failure typically incurs disassociation
1023    /// from the original BSS, but may not in some cases (e.g. in some Fast BSS Transition scenarios).
1024    pub original_association_maintained: Option<bool>,
1025    /// Whether the client is authenticated with the target BSS. If `status_code` is success, then
1026    /// this field must be set to true; if the roam attempt failed, this field may be true or false.
1027    /// This allows higher layers to decide how to clean up connection state after a failed roam
1028    /// attempt.
1029    pub target_bss_authenticated: Option<bool>,
1030    /// Association ID for this association with the AP. Required if `status_code` is success.
1031    pub association_id: Option<u16>,
1032    /// IEs for this association with the AP. Required if `status_code` is success.
1033    pub association_ies: Option<Vec<u8>>,
1034    #[doc(hidden)]
1035    pub __source_breaking: fidl::marker::SourceBreaking,
1036}
1037
1038impl fidl::Persistable for WlanFullmacImplIfcRoamResultIndRequest {}
1039
1040#[derive(Clone, Debug, Default, PartialEq)]
1041pub struct WlanFullmacImplIfcRoamStartIndRequest {
1042    /// BSSID of the target BSS. Required.
1043    pub selected_bssid: Option<[u8; 6]>,
1044    /// Full BSS description of the target BSS. Required.
1045    /// If the data in BssDescription is incorrect or incomplete, the roam cannot succeed,
1046    /// because higher layers will not be able to complete required actions (e.g. SAE).
1047    pub selected_bss: Option<fidl_fuchsia_wlan_common__common::BssDescription>,
1048    /// Whether the original BSS association has been maintained at the start of a roam attempt.
1049    /// Required. 802.11 dictates that a STA can only be associated with a single BSS, so a roam
1050    /// attempt typically incurs disassociation at the start of the roam attempt. However,
1051    /// 802.11 also provides a mechanism (i.e. Fast BSS Transition) that allows a device to
1052    /// maintain association with the original BSS while establishing authentication with the
1053    /// target BSS, in order to avoid losing the original association if authentication with the
1054    /// target BSS fails.
1055    pub original_association_maintained: Option<bool>,
1056    #[doc(hidden)]
1057    pub __source_breaking: fidl::marker::SourceBreaking,
1058}
1059
1060impl fidl::Persistable for WlanFullmacImplIfcRoamStartIndRequest {}
1061
1062#[derive(Clone, Debug, Default, PartialEq)]
1063pub struct WlanFullmacImplIfcSaeHandshakeIndRequest {
1064    pub peer_sta_address: Option<[u8; 6]>,
1065    #[doc(hidden)]
1066    pub __source_breaking: fidl::marker::SourceBreaking,
1067}
1068
1069impl fidl::Persistable for WlanFullmacImplIfcSaeHandshakeIndRequest {}
1070
1071#[derive(Clone, Debug, Default, PartialEq)]
1072pub struct WlanFullmacImplIfcStartConfRequest {
1073    /// The result of the StartBss request. Required.
1074    pub result_code: Option<StartResult>,
1075    #[doc(hidden)]
1076    pub __source_breaking: fidl::marker::SourceBreaking,
1077}
1078
1079impl fidl::Persistable for WlanFullmacImplIfcStartConfRequest {}
1080
1081#[derive(Clone, Debug, Default, PartialEq)]
1082pub struct WlanFullmacImplIfcStopConfRequest {
1083    /// The result of the StopBss request. Required.
1084    pub result_code: Option<StopResult>,
1085    #[doc(hidden)]
1086    pub __source_breaking: fidl::marker::SourceBreaking,
1087}
1088
1089impl fidl::Persistable for WlanFullmacImplIfcStopConfRequest {}
1090
1091#[derive(Clone, Debug, Default, PartialEq)]
1092pub struct WlanFullmacImplOnLinkStateChangedRequest {
1093    pub online: Option<bool>,
1094    #[doc(hidden)]
1095    pub __source_breaking: fidl::marker::SourceBreaking,
1096}
1097
1098impl fidl::Persistable for WlanFullmacImplOnLinkStateChangedRequest {}
1099
1100#[derive(Clone, Debug, Default, PartialEq)]
1101pub struct WlanFullmacImplReconnectRequest {
1102    pub peer_sta_address: Option<[u8; 6]>,
1103    #[doc(hidden)]
1104    pub __source_breaking: fidl::marker::SourceBreaking,
1105}
1106
1107impl fidl::Persistable for WlanFullmacImplReconnectRequest {}
1108
1109#[derive(Clone, Debug, Default, PartialEq)]
1110pub struct WlanFullmacImplRoamRequest {
1111    /// Full BSS description of the target BSS. Required.
1112    /// If the data in BssDescription is incorrect or incomplete, the roam cannot succeed,
1113    /// because higher layers will not be able to complete required actions (e.g. SAE).
1114    pub selected_bss: Option<fidl_fuchsia_wlan_common__common::BssDescription>,
1115    #[doc(hidden)]
1116    pub __source_breaking: fidl::marker::SourceBreaking,
1117}
1118
1119impl fidl::Persistable for WlanFullmacImplRoamRequest {}
1120
1121#[derive(Clone, Debug, Default, PartialEq)]
1122pub struct WlanFullmacImplSaeHandshakeRespRequest {
1123    /// The peer's MAC address. Required.
1124    pub peer_sta_address: Option<[u8; 6]>,
1125    /// The status of the SAE handshake. Required.
1126    pub status_code: Option<fidl_fuchsia_wlan_ieee80211__common::StatusCode>,
1127    #[doc(hidden)]
1128    pub __source_breaking: fidl::marker::SourceBreaking,
1129}
1130
1131impl fidl::Persistable for WlanFullmacImplSaeHandshakeRespRequest {}
1132
1133#[derive(Clone, Debug, Default, PartialEq)]
1134pub struct WlanFullmacImplSetKeysRequest {
1135    pub keylist: Option<Vec<fidl_fuchsia_wlan_common__common::WlanKeyConfig>>,
1136    pub key_descriptors: Option<Vec<fidl_fuchsia_wlan_ieee80211__common::SetKeyDescriptor>>,
1137    #[doc(hidden)]
1138    pub __source_breaking: fidl::marker::SourceBreaking,
1139}
1140
1141impl fidl::Persistable for WlanFullmacImplSetKeysRequest {}
1142
1143#[derive(Clone, Debug, Default, PartialEq)]
1144pub struct WlanFullmacImplStartBssRequest {
1145    pub ssid: Option<Vec<u8>>,
1146    pub bss_type: Option<fidl_fuchsia_wlan_common__common::BssType>,
1147    pub beacon_period: Option<u32>,
1148    pub dtim_period: Option<u32>,
1149    pub channel: Option<u8>,
1150    pub rsne: Option<Vec<u8>>,
1151    pub vendor_ie: Option<Vec<u8>>,
1152    #[doc(hidden)]
1153    pub __source_breaking: fidl::marker::SourceBreaking,
1154}
1155
1156impl fidl::Persistable for WlanFullmacImplStartBssRequest {}
1157
1158#[derive(Clone, Debug, Default, PartialEq)]
1159pub struct WlanFullmacImplStartScanRequest {
1160    /// Unique transaction id (will be indicated in corresponding scan results).
1161    pub txn_id: Option<u64>,
1162    pub scan_type: Option<WlanScanType>,
1163    /// List of channels to scan on. An empty list of channels will cause a
1164    /// scan request to immediately return a OnScanEnd with code INVALID_ARGS.
1165    ///
1166    /// Invalid channel numbers will be silently ignored. The validity of a channel
1167    /// number depends on the current regulatory region, and a FullMAC driver cannot
1168    /// always determine the region setting. This is especially the case when
1169    /// firmware changes the region setting dynamically.
1170    pub channels: Option<Vec<u8>>,
1171    /// List of SSIDs to scan for. An empty list of ssids is the same as specifying
1172    /// a list containing only the wildcard SSID.
1173    ///
1174    /// There is no limit on the number of SSIDs specified. A large number of
1175    /// SSIDs may result in extended scan times because of hardware limitations on
1176    /// the number of SSIDs permitted per scan request and the technical limitation
1177    /// in IEEE 802.11-2016 that limits the number of SSIDs in a single Probe Request
1178    /// frame to ieee80211.SSID_LIST_MAX SSIDs.
1179    pub ssids: Option<Vec<Vec<u8>>>,
1180    /// Minimum amount of time in msecs spent on a channel during scan.
1181    pub min_channel_time: Option<u32>,
1182    /// Maximum amount of time in msecs spent on a channel during scan.
1183    pub max_channel_time: Option<u32>,
1184    #[doc(hidden)]
1185    pub __source_breaking: fidl::marker::SourceBreaking,
1186}
1187
1188impl fidl::Persistable for WlanFullmacImplStartScanRequest {}
1189
1190#[derive(Clone, Debug, Default, PartialEq)]
1191pub struct WlanFullmacImplStopBssRequest {
1192    pub ssid: Option<Vec<u8>>,
1193    #[doc(hidden)]
1194    pub __source_breaking: fidl::marker::SourceBreaking,
1195}
1196
1197impl fidl::Persistable for WlanFullmacImplStopBssRequest {}
1198
1199#[derive(Clone, Debug, Default, PartialEq)]
1200pub struct WlanFullmacImplQueryResponse {
1201    /// Station address. Required.
1202    pub sta_addr: Option<[u8; 6]>,
1203    /// MAC role. Required.
1204    pub role: Option<fidl_fuchsia_wlan_common__common::WlanMacRole>,
1205    /// Supported bands. Required.
1206    pub band_caps: Option<Vec<BandCapability>>,
1207    #[doc(hidden)]
1208    pub __source_breaking: fidl::marker::SourceBreaking,
1209}
1210
1211impl fidl::Persistable for WlanFullmacImplQueryResponse {}
1212
1213pub mod wlan_fullmac_impl__ordinals {
1214    pub const INIT: u64 = 0x593dfb6cb3f0f1aa;
1215    pub const QUERY: u64 = 0x28ac65f9da3941d4;
1216    pub const QUERY_SECURITY_SUPPORT: u64 = 0x11cf3fa6eeb93f84;
1217    pub const QUERY_SPECTRUM_MANAGEMENT_SUPPORT: u64 = 0x22ae7551d855b83a;
1218    pub const QUERY_TELEMETRY_SUPPORT: u64 = 0x4561479ca560827f;
1219    pub const START_SCAN: u64 = 0x26c17bf595aa161c;
1220    pub const CONNECT: u64 = 0x19eb0322efb07a76;
1221    pub const RECONNECT: u64 = 0x474084c4ef19ee71;
1222    pub const ROAM: u64 = 0x1e35dcc98b124b64;
1223    pub const AUTH_RESP: u64 = 0x5f7ea24b44a4aaeb;
1224    pub const DEAUTH: u64 = 0x112786eccbf12f37;
1225    pub const ASSOC_RESP: u64 = 0x5022ce6b8eefec2f;
1226    pub const DISASSOC: u64 = 0x9c0fc4e8de53e01;
1227    pub const START_BSS: u64 = 0x6922644d6b1d341d;
1228    pub const STOP_BSS: u64 = 0x5aeb9b72e7575268;
1229    pub const SET_KEYS: u64 = 0x20f46b1e039f0985;
1230    pub const EAPOL_TX: u64 = 0x529a2d90fd4c8177;
1231    pub const GET_IFACE_STATS: u64 = 0x505563776ef0392f;
1232    pub const GET_IFACE_HISTOGRAM_STATS: u64 = 0x503d586f30ccf2cd;
1233    pub const GET_SIGNAL_REPORT: u64 = 0x5d93f056e4796bb3;
1234    pub const SAE_HANDSHAKE_RESP: u64 = 0x72cd3a31ae5a54f6;
1235    pub const SAE_FRAME_TX: u64 = 0x4715ad5dc5a6340f;
1236    pub const WMM_STATUS_REQ: u64 = 0x635ecef3beb7a059;
1237    pub const ON_LINK_STATE_CHANGED: u64 = 0x4d896e5b68e488d7;
1238    pub const SET_MAC_ADDRESS: u64 = 0x211a97f6f21ae5f0;
1239}
1240
1241pub mod wlan_fullmac_impl_ifc_ordinals {
1242    pub const ON_SCAN_RESULT: u64 = 0x29aa81dc570f7a3e;
1243    pub const ON_SCAN_END: u64 = 0x7cd8aff80d27073c;
1244    pub const CONNECT_CONF: u64 = 0x3c22c6d80b2a2759;
1245    pub const ROAM_CONF: u64 = 0x368b2a5b903b3f7b;
1246    pub const ROAM_START_IND: u64 = 0x23e1d9368935e7e4;
1247    pub const ROAM_RESULT_IND: u64 = 0x7081c1b1ceea4914;
1248    pub const AUTH_IND: u64 = 0x270e1f8889650d0b;
1249    pub const DEAUTH_CONF: u64 = 0x2c94b0d7258111b7;
1250    pub const DEAUTH_IND: u64 = 0x26cd27cdadd8dbaf;
1251    pub const ASSOC_IND: u64 = 0x3e44529e3dc179ce;
1252    pub const DISASSOC_CONF: u64 = 0x7c713bcd58a76cb3;
1253    pub const DISASSOC_IND: u64 = 0x6667b381b7f3990f;
1254    pub const START_CONF: u64 = 0x3e9b9641f3ddc7fc;
1255    pub const STOP_CONF: u64 = 0x320a5ff227a4e9df;
1256    pub const EAPOL_CONF: u64 = 0x77364db9cc3970ec;
1257    pub const ON_CHANNEL_SWITCH: u64 = 0x21db0b8f71cae647;
1258    pub const SIGNAL_REPORT: u64 = 0x79679fa8789c3d9f;
1259    pub const EAPOL_IND: u64 = 0x3de8ec1eda10d1d0;
1260    pub const ON_PMK_AVAILABLE: u64 = 0x5cedd8d9be28a17e;
1261    pub const SAE_HANDSHAKE_IND: u64 = 0x4f3d53885503a1d8;
1262    pub const SAE_FRAME_RX: u64 = 0x51650906857ed4d4;
1263    pub const ON_WMM_STATUS_RESP: u64 = 0x6823a88bf3ba8b2a;
1264}
1265
1266mod internal {
1267    use super::*;
1268    unsafe impl fidl::encoding::TypeMarker for EapolTxResult {
1269        type Owned = Self;
1270
1271        #[inline(always)]
1272        fn inline_align(_context: fidl::encoding::Context) -> usize {
1273            std::mem::align_of::<u8>()
1274        }
1275
1276        #[inline(always)]
1277        fn inline_size(_context: fidl::encoding::Context) -> usize {
1278            std::mem::size_of::<u8>()
1279        }
1280
1281        #[inline(always)]
1282        fn encode_is_copy() -> bool {
1283            false
1284        }
1285
1286        #[inline(always)]
1287        fn decode_is_copy() -> bool {
1288            false
1289        }
1290    }
1291
1292    impl fidl::encoding::ValueTypeMarker for EapolTxResult {
1293        type Borrowed<'a> = Self;
1294        #[inline(always)]
1295        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1296            *value
1297        }
1298    }
1299
1300    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for EapolTxResult {
1301        #[inline]
1302        unsafe fn encode(
1303            self,
1304            encoder: &mut fidl::encoding::Encoder<'_, D>,
1305            offset: usize,
1306            _depth: fidl::encoding::Depth,
1307        ) -> fidl::Result<()> {
1308            encoder.debug_check_bounds::<Self>(offset);
1309            encoder.write_num(self.into_primitive(), offset);
1310            Ok(())
1311        }
1312    }
1313
1314    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EapolTxResult {
1315        #[inline(always)]
1316        fn new_empty() -> Self {
1317            Self::unknown()
1318        }
1319
1320        #[inline]
1321        unsafe fn decode(
1322            &mut self,
1323            decoder: &mut fidl::encoding::Decoder<'_, D>,
1324            offset: usize,
1325            _depth: fidl::encoding::Depth,
1326        ) -> fidl::Result<()> {
1327            decoder.debug_check_bounds::<Self>(offset);
1328            let prim = decoder.read_num::<u8>(offset);
1329
1330            *self = Self::from_primitive_allow_unknown(prim);
1331            Ok(())
1332        }
1333    }
1334    unsafe impl fidl::encoding::TypeMarker for StartResult {
1335        type Owned = Self;
1336
1337        #[inline(always)]
1338        fn inline_align(_context: fidl::encoding::Context) -> usize {
1339            std::mem::align_of::<u8>()
1340        }
1341
1342        #[inline(always)]
1343        fn inline_size(_context: fidl::encoding::Context) -> usize {
1344            std::mem::size_of::<u8>()
1345        }
1346
1347        #[inline(always)]
1348        fn encode_is_copy() -> bool {
1349            false
1350        }
1351
1352        #[inline(always)]
1353        fn decode_is_copy() -> bool {
1354            false
1355        }
1356    }
1357
1358    impl fidl::encoding::ValueTypeMarker for StartResult {
1359        type Borrowed<'a> = Self;
1360        #[inline(always)]
1361        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1362            *value
1363        }
1364    }
1365
1366    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for StartResult {
1367        #[inline]
1368        unsafe fn encode(
1369            self,
1370            encoder: &mut fidl::encoding::Encoder<'_, D>,
1371            offset: usize,
1372            _depth: fidl::encoding::Depth,
1373        ) -> fidl::Result<()> {
1374            encoder.debug_check_bounds::<Self>(offset);
1375            encoder.write_num(self.into_primitive(), offset);
1376            Ok(())
1377        }
1378    }
1379
1380    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StartResult {
1381        #[inline(always)]
1382        fn new_empty() -> Self {
1383            Self::unknown()
1384        }
1385
1386        #[inline]
1387        unsafe fn decode(
1388            &mut self,
1389            decoder: &mut fidl::encoding::Decoder<'_, D>,
1390            offset: usize,
1391            _depth: fidl::encoding::Depth,
1392        ) -> fidl::Result<()> {
1393            decoder.debug_check_bounds::<Self>(offset);
1394            let prim = decoder.read_num::<u8>(offset);
1395
1396            *self = Self::from_primitive_allow_unknown(prim);
1397            Ok(())
1398        }
1399    }
1400    unsafe impl fidl::encoding::TypeMarker for StopResult {
1401        type Owned = Self;
1402
1403        #[inline(always)]
1404        fn inline_align(_context: fidl::encoding::Context) -> usize {
1405            std::mem::align_of::<u8>()
1406        }
1407
1408        #[inline(always)]
1409        fn inline_size(_context: fidl::encoding::Context) -> usize {
1410            std::mem::size_of::<u8>()
1411        }
1412
1413        #[inline(always)]
1414        fn encode_is_copy() -> bool {
1415            false
1416        }
1417
1418        #[inline(always)]
1419        fn decode_is_copy() -> bool {
1420            false
1421        }
1422    }
1423
1424    impl fidl::encoding::ValueTypeMarker for StopResult {
1425        type Borrowed<'a> = Self;
1426        #[inline(always)]
1427        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1428            *value
1429        }
1430    }
1431
1432    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for StopResult {
1433        #[inline]
1434        unsafe fn encode(
1435            self,
1436            encoder: &mut fidl::encoding::Encoder<'_, D>,
1437            offset: usize,
1438            _depth: fidl::encoding::Depth,
1439        ) -> fidl::Result<()> {
1440            encoder.debug_check_bounds::<Self>(offset);
1441            encoder.write_num(self.into_primitive(), offset);
1442            Ok(())
1443        }
1444    }
1445
1446    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StopResult {
1447        #[inline(always)]
1448        fn new_empty() -> Self {
1449            Self::unknown()
1450        }
1451
1452        #[inline]
1453        unsafe fn decode(
1454            &mut self,
1455            decoder: &mut fidl::encoding::Decoder<'_, D>,
1456            offset: usize,
1457            _depth: fidl::encoding::Depth,
1458        ) -> fidl::Result<()> {
1459            decoder.debug_check_bounds::<Self>(offset);
1460            let prim = decoder.read_num::<u8>(offset);
1461
1462            *self = Self::from_primitive_allow_unknown(prim);
1463            Ok(())
1464        }
1465    }
1466    unsafe impl fidl::encoding::TypeMarker for WlanAssocResult {
1467        type Owned = Self;
1468
1469        #[inline(always)]
1470        fn inline_align(_context: fidl::encoding::Context) -> usize {
1471            std::mem::align_of::<u8>()
1472        }
1473
1474        #[inline(always)]
1475        fn inline_size(_context: fidl::encoding::Context) -> usize {
1476            std::mem::size_of::<u8>()
1477        }
1478
1479        #[inline(always)]
1480        fn encode_is_copy() -> bool {
1481            false
1482        }
1483
1484        #[inline(always)]
1485        fn decode_is_copy() -> bool {
1486            false
1487        }
1488    }
1489
1490    impl fidl::encoding::ValueTypeMarker for WlanAssocResult {
1491        type Borrowed<'a> = Self;
1492        #[inline(always)]
1493        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1494            *value
1495        }
1496    }
1497
1498    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1499        for WlanAssocResult
1500    {
1501        #[inline]
1502        unsafe fn encode(
1503            self,
1504            encoder: &mut fidl::encoding::Encoder<'_, D>,
1505            offset: usize,
1506            _depth: fidl::encoding::Depth,
1507        ) -> fidl::Result<()> {
1508            encoder.debug_check_bounds::<Self>(offset);
1509            encoder.write_num(self.into_primitive(), offset);
1510            Ok(())
1511        }
1512    }
1513
1514    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WlanAssocResult {
1515        #[inline(always)]
1516        fn new_empty() -> Self {
1517            Self::unknown()
1518        }
1519
1520        #[inline]
1521        unsafe fn decode(
1522            &mut self,
1523            decoder: &mut fidl::encoding::Decoder<'_, D>,
1524            offset: usize,
1525            _depth: fidl::encoding::Depth,
1526        ) -> fidl::Result<()> {
1527            decoder.debug_check_bounds::<Self>(offset);
1528            let prim = decoder.read_num::<u8>(offset);
1529
1530            *self = Self::from_primitive_allow_unknown(prim);
1531            Ok(())
1532        }
1533    }
1534    unsafe impl fidl::encoding::TypeMarker for WlanAuthResult {
1535        type Owned = Self;
1536
1537        #[inline(always)]
1538        fn inline_align(_context: fidl::encoding::Context) -> usize {
1539            std::mem::align_of::<u8>()
1540        }
1541
1542        #[inline(always)]
1543        fn inline_size(_context: fidl::encoding::Context) -> usize {
1544            std::mem::size_of::<u8>()
1545        }
1546
1547        #[inline(always)]
1548        fn encode_is_copy() -> bool {
1549            false
1550        }
1551
1552        #[inline(always)]
1553        fn decode_is_copy() -> bool {
1554            false
1555        }
1556    }
1557
1558    impl fidl::encoding::ValueTypeMarker for WlanAuthResult {
1559        type Borrowed<'a> = Self;
1560        #[inline(always)]
1561        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1562            *value
1563        }
1564    }
1565
1566    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for WlanAuthResult {
1567        #[inline]
1568        unsafe fn encode(
1569            self,
1570            encoder: &mut fidl::encoding::Encoder<'_, D>,
1571            offset: usize,
1572            _depth: fidl::encoding::Depth,
1573        ) -> fidl::Result<()> {
1574            encoder.debug_check_bounds::<Self>(offset);
1575            encoder.write_num(self.into_primitive(), offset);
1576            Ok(())
1577        }
1578    }
1579
1580    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WlanAuthResult {
1581        #[inline(always)]
1582        fn new_empty() -> Self {
1583            Self::unknown()
1584        }
1585
1586        #[inline]
1587        unsafe fn decode(
1588            &mut self,
1589            decoder: &mut fidl::encoding::Decoder<'_, D>,
1590            offset: usize,
1591            _depth: fidl::encoding::Depth,
1592        ) -> fidl::Result<()> {
1593            decoder.debug_check_bounds::<Self>(offset);
1594            let prim = decoder.read_num::<u8>(offset);
1595
1596            *self = Self::from_primitive_allow_unknown(prim);
1597            Ok(())
1598        }
1599    }
1600    unsafe impl fidl::encoding::TypeMarker for WlanAuthType {
1601        type Owned = Self;
1602
1603        #[inline(always)]
1604        fn inline_align(_context: fidl::encoding::Context) -> usize {
1605            std::mem::align_of::<u8>()
1606        }
1607
1608        #[inline(always)]
1609        fn inline_size(_context: fidl::encoding::Context) -> usize {
1610            std::mem::size_of::<u8>()
1611        }
1612
1613        #[inline(always)]
1614        fn encode_is_copy() -> bool {
1615            false
1616        }
1617
1618        #[inline(always)]
1619        fn decode_is_copy() -> bool {
1620            false
1621        }
1622    }
1623
1624    impl fidl::encoding::ValueTypeMarker for WlanAuthType {
1625        type Borrowed<'a> = Self;
1626        #[inline(always)]
1627        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1628            *value
1629        }
1630    }
1631
1632    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for WlanAuthType {
1633        #[inline]
1634        unsafe fn encode(
1635            self,
1636            encoder: &mut fidl::encoding::Encoder<'_, D>,
1637            offset: usize,
1638            _depth: fidl::encoding::Depth,
1639        ) -> fidl::Result<()> {
1640            encoder.debug_check_bounds::<Self>(offset);
1641            encoder.write_num(self.into_primitive(), offset);
1642            Ok(())
1643        }
1644    }
1645
1646    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WlanAuthType {
1647        #[inline(always)]
1648        fn new_empty() -> Self {
1649            Self::unknown()
1650        }
1651
1652        #[inline]
1653        unsafe fn decode(
1654            &mut self,
1655            decoder: &mut fidl::encoding::Decoder<'_, D>,
1656            offset: usize,
1657            _depth: fidl::encoding::Depth,
1658        ) -> fidl::Result<()> {
1659            decoder.debug_check_bounds::<Self>(offset);
1660            let prim = decoder.read_num::<u8>(offset);
1661
1662            *self = Self::from_primitive_allow_unknown(prim);
1663            Ok(())
1664        }
1665    }
1666    unsafe impl fidl::encoding::TypeMarker for WlanScanResult {
1667        type Owned = Self;
1668
1669        #[inline(always)]
1670        fn inline_align(_context: fidl::encoding::Context) -> usize {
1671            std::mem::align_of::<u8>()
1672        }
1673
1674        #[inline(always)]
1675        fn inline_size(_context: fidl::encoding::Context) -> usize {
1676            std::mem::size_of::<u8>()
1677        }
1678
1679        #[inline(always)]
1680        fn encode_is_copy() -> bool {
1681            false
1682        }
1683
1684        #[inline(always)]
1685        fn decode_is_copy() -> bool {
1686            false
1687        }
1688    }
1689
1690    impl fidl::encoding::ValueTypeMarker for WlanScanResult {
1691        type Borrowed<'a> = Self;
1692        #[inline(always)]
1693        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1694            *value
1695        }
1696    }
1697
1698    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for WlanScanResult {
1699        #[inline]
1700        unsafe fn encode(
1701            self,
1702            encoder: &mut fidl::encoding::Encoder<'_, D>,
1703            offset: usize,
1704            _depth: fidl::encoding::Depth,
1705        ) -> fidl::Result<()> {
1706            encoder.debug_check_bounds::<Self>(offset);
1707            encoder.write_num(self.into_primitive(), offset);
1708            Ok(())
1709        }
1710    }
1711
1712    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WlanScanResult {
1713        #[inline(always)]
1714        fn new_empty() -> Self {
1715            Self::unknown()
1716        }
1717
1718        #[inline]
1719        unsafe fn decode(
1720            &mut self,
1721            decoder: &mut fidl::encoding::Decoder<'_, D>,
1722            offset: usize,
1723            _depth: fidl::encoding::Depth,
1724        ) -> fidl::Result<()> {
1725            decoder.debug_check_bounds::<Self>(offset);
1726            let prim = decoder.read_num::<u8>(offset);
1727
1728            *self = Self::from_primitive_allow_unknown(prim);
1729            Ok(())
1730        }
1731    }
1732    unsafe impl fidl::encoding::TypeMarker for WlanScanType {
1733        type Owned = Self;
1734
1735        #[inline(always)]
1736        fn inline_align(_context: fidl::encoding::Context) -> usize {
1737            std::mem::align_of::<u8>()
1738        }
1739
1740        #[inline(always)]
1741        fn inline_size(_context: fidl::encoding::Context) -> usize {
1742            std::mem::size_of::<u8>()
1743        }
1744
1745        #[inline(always)]
1746        fn encode_is_copy() -> bool {
1747            false
1748        }
1749
1750        #[inline(always)]
1751        fn decode_is_copy() -> bool {
1752            false
1753        }
1754    }
1755
1756    impl fidl::encoding::ValueTypeMarker for WlanScanType {
1757        type Borrowed<'a> = Self;
1758        #[inline(always)]
1759        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1760            *value
1761        }
1762    }
1763
1764    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for WlanScanType {
1765        #[inline]
1766        unsafe fn encode(
1767            self,
1768            encoder: &mut fidl::encoding::Encoder<'_, D>,
1769            offset: usize,
1770            _depth: fidl::encoding::Depth,
1771        ) -> fidl::Result<()> {
1772            encoder.debug_check_bounds::<Self>(offset);
1773            encoder.write_num(self.into_primitive(), offset);
1774            Ok(())
1775        }
1776    }
1777
1778    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WlanScanType {
1779        #[inline(always)]
1780        fn new_empty() -> Self {
1781            Self::unknown()
1782        }
1783
1784        #[inline]
1785        unsafe fn decode(
1786            &mut self,
1787            decoder: &mut fidl::encoding::Decoder<'_, D>,
1788            offset: usize,
1789            _depth: fidl::encoding::Depth,
1790        ) -> fidl::Result<()> {
1791            decoder.debug_check_bounds::<Self>(offset);
1792            let prim = decoder.read_num::<u8>(offset);
1793
1794            *self = Self::from_primitive_allow_unknown(prim);
1795            Ok(())
1796        }
1797    }
1798
1799    impl fidl::encoding::ValueTypeMarker for WlanFullmacChannelSwitchInfo {
1800        type Borrowed<'a> = &'a Self;
1801        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1802            value
1803        }
1804    }
1805
1806    unsafe impl fidl::encoding::TypeMarker for WlanFullmacChannelSwitchInfo {
1807        type Owned = Self;
1808
1809        #[inline(always)]
1810        fn inline_align(_context: fidl::encoding::Context) -> usize {
1811            1
1812        }
1813
1814        #[inline(always)]
1815        fn inline_size(_context: fidl::encoding::Context) -> usize {
1816            1
1817        }
1818        #[inline(always)]
1819        fn encode_is_copy() -> bool {
1820            true
1821        }
1822
1823        #[inline(always)]
1824        fn decode_is_copy() -> bool {
1825            true
1826        }
1827    }
1828
1829    unsafe impl<D: fidl::encoding::ResourceDialect>
1830        fidl::encoding::Encode<WlanFullmacChannelSwitchInfo, D> for &WlanFullmacChannelSwitchInfo
1831    {
1832        #[inline]
1833        unsafe fn encode(
1834            self,
1835            encoder: &mut fidl::encoding::Encoder<'_, D>,
1836            offset: usize,
1837            _depth: fidl::encoding::Depth,
1838        ) -> fidl::Result<()> {
1839            encoder.debug_check_bounds::<WlanFullmacChannelSwitchInfo>(offset);
1840            unsafe {
1841                // Copy the object into the buffer.
1842                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1843                (buf_ptr as *mut WlanFullmacChannelSwitchInfo)
1844                    .write_unaligned((self as *const WlanFullmacChannelSwitchInfo).read());
1845                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1846                // done second because the memcpy will write garbage to these bytes.
1847            }
1848            Ok(())
1849        }
1850    }
1851    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
1852        fidl::encoding::Encode<WlanFullmacChannelSwitchInfo, D> for (T0,)
1853    {
1854        #[inline]
1855        unsafe fn encode(
1856            self,
1857            encoder: &mut fidl::encoding::Encoder<'_, D>,
1858            offset: usize,
1859            depth: fidl::encoding::Depth,
1860        ) -> fidl::Result<()> {
1861            encoder.debug_check_bounds::<WlanFullmacChannelSwitchInfo>(offset);
1862            // Zero out padding regions. There's no need to apply masks
1863            // because the unmasked parts will be overwritten by fields.
1864            // Write the fields.
1865            self.0.encode(encoder, offset + 0, depth)?;
1866            Ok(())
1867        }
1868    }
1869
1870    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1871        for WlanFullmacChannelSwitchInfo
1872    {
1873        #[inline(always)]
1874        fn new_empty() -> Self {
1875            Self { new_channel: fidl::new_empty!(u8, D) }
1876        }
1877
1878        #[inline]
1879        unsafe fn decode(
1880            &mut self,
1881            decoder: &mut fidl::encoding::Decoder<'_, D>,
1882            offset: usize,
1883            _depth: fidl::encoding::Depth,
1884        ) -> fidl::Result<()> {
1885            decoder.debug_check_bounds::<Self>(offset);
1886            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1887            // Verify that padding bytes are zero.
1888            // Copy from the buffer into the object.
1889            unsafe {
1890                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
1891            }
1892            Ok(())
1893        }
1894    }
1895
1896    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplIfcOnChannelSwitchRequest {
1897        type Borrowed<'a> = &'a Self;
1898        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1899            value
1900        }
1901    }
1902
1903    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplIfcOnChannelSwitchRequest {
1904        type Owned = Self;
1905
1906        #[inline(always)]
1907        fn inline_align(_context: fidl::encoding::Context) -> usize {
1908            1
1909        }
1910
1911        #[inline(always)]
1912        fn inline_size(_context: fidl::encoding::Context) -> usize {
1913            1
1914        }
1915        #[inline(always)]
1916        fn encode_is_copy() -> bool {
1917            true
1918        }
1919
1920        #[inline(always)]
1921        fn decode_is_copy() -> bool {
1922            true
1923        }
1924    }
1925
1926    unsafe impl<D: fidl::encoding::ResourceDialect>
1927        fidl::encoding::Encode<WlanFullmacImplIfcOnChannelSwitchRequest, D>
1928        for &WlanFullmacImplIfcOnChannelSwitchRequest
1929    {
1930        #[inline]
1931        unsafe fn encode(
1932            self,
1933            encoder: &mut fidl::encoding::Encoder<'_, D>,
1934            offset: usize,
1935            _depth: fidl::encoding::Depth,
1936        ) -> fidl::Result<()> {
1937            encoder.debug_check_bounds::<WlanFullmacImplIfcOnChannelSwitchRequest>(offset);
1938            unsafe {
1939                // Copy the object into the buffer.
1940                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1941                (buf_ptr as *mut WlanFullmacImplIfcOnChannelSwitchRequest).write_unaligned(
1942                    (self as *const WlanFullmacImplIfcOnChannelSwitchRequest).read(),
1943                );
1944                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1945                // done second because the memcpy will write garbage to these bytes.
1946            }
1947            Ok(())
1948        }
1949    }
1950    unsafe impl<
1951        D: fidl::encoding::ResourceDialect,
1952        T0: fidl::encoding::Encode<WlanFullmacChannelSwitchInfo, D>,
1953    > fidl::encoding::Encode<WlanFullmacImplIfcOnChannelSwitchRequest, D> for (T0,)
1954    {
1955        #[inline]
1956        unsafe fn encode(
1957            self,
1958            encoder: &mut fidl::encoding::Encoder<'_, D>,
1959            offset: usize,
1960            depth: fidl::encoding::Depth,
1961        ) -> fidl::Result<()> {
1962            encoder.debug_check_bounds::<WlanFullmacImplIfcOnChannelSwitchRequest>(offset);
1963            // Zero out padding regions. There's no need to apply masks
1964            // because the unmasked parts will be overwritten by fields.
1965            // Write the fields.
1966            self.0.encode(encoder, offset + 0, depth)?;
1967            Ok(())
1968        }
1969    }
1970
1971    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1972        for WlanFullmacImplIfcOnChannelSwitchRequest
1973    {
1974        #[inline(always)]
1975        fn new_empty() -> Self {
1976            Self { ind: fidl::new_empty!(WlanFullmacChannelSwitchInfo, D) }
1977        }
1978
1979        #[inline]
1980        unsafe fn decode(
1981            &mut self,
1982            decoder: &mut fidl::encoding::Decoder<'_, D>,
1983            offset: usize,
1984            _depth: fidl::encoding::Depth,
1985        ) -> fidl::Result<()> {
1986            decoder.debug_check_bounds::<Self>(offset);
1987            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1988            // Verify that padding bytes are zero.
1989            // Copy from the buffer into the object.
1990            unsafe {
1991                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
1992            }
1993            Ok(())
1994        }
1995    }
1996
1997    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplIfcOnWmmStatusRespRequest {
1998        type Borrowed<'a> = &'a Self;
1999        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2000            value
2001        }
2002    }
2003
2004    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplIfcOnWmmStatusRespRequest {
2005        type Owned = Self;
2006
2007        #[inline(always)]
2008        fn inline_align(_context: fidl::encoding::Context) -> usize {
2009            4
2010        }
2011
2012        #[inline(always)]
2013        fn inline_size(_context: fidl::encoding::Context) -> usize {
2014            40
2015        }
2016    }
2017
2018    unsafe impl<D: fidl::encoding::ResourceDialect>
2019        fidl::encoding::Encode<WlanFullmacImplIfcOnWmmStatusRespRequest, D>
2020        for &WlanFullmacImplIfcOnWmmStatusRespRequest
2021    {
2022        #[inline]
2023        unsafe fn encode(
2024            self,
2025            encoder: &mut fidl::encoding::Encoder<'_, D>,
2026            offset: usize,
2027            _depth: fidl::encoding::Depth,
2028        ) -> fidl::Result<()> {
2029            encoder.debug_check_bounds::<WlanFullmacImplIfcOnWmmStatusRespRequest>(offset);
2030            // Delegate to tuple encoding.
2031            fidl::encoding::Encode::<WlanFullmacImplIfcOnWmmStatusRespRequest, D>::encode(
2032                (
2033                    <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.status),
2034                    <fidl_fuchsia_wlan_common__common::WlanWmmParameters as fidl::encoding::ValueTypeMarker>::borrow(&self.wmm_params),
2035                ),
2036                encoder, offset, _depth
2037            )
2038        }
2039    }
2040    unsafe impl<
2041        D: fidl::encoding::ResourceDialect,
2042        T0: fidl::encoding::Encode<i32, D>,
2043        T1: fidl::encoding::Encode<fidl_fuchsia_wlan_common__common::WlanWmmParameters, D>,
2044    > fidl::encoding::Encode<WlanFullmacImplIfcOnWmmStatusRespRequest, D> for (T0, T1)
2045    {
2046        #[inline]
2047        unsafe fn encode(
2048            self,
2049            encoder: &mut fidl::encoding::Encoder<'_, D>,
2050            offset: usize,
2051            depth: fidl::encoding::Depth,
2052        ) -> fidl::Result<()> {
2053            encoder.debug_check_bounds::<WlanFullmacImplIfcOnWmmStatusRespRequest>(offset);
2054            // Zero out padding regions. There's no need to apply masks
2055            // because the unmasked parts will be overwritten by fields.
2056            unsafe {
2057                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(36);
2058                (ptr as *mut u32).write_unaligned(0);
2059            }
2060            // Write the fields.
2061            self.0.encode(encoder, offset + 0, depth)?;
2062            self.1.encode(encoder, offset + 4, depth)?;
2063            Ok(())
2064        }
2065    }
2066
2067    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2068        for WlanFullmacImplIfcOnWmmStatusRespRequest
2069    {
2070        #[inline(always)]
2071        fn new_empty() -> Self {
2072            Self {
2073                status: fidl::new_empty!(i32, D),
2074                wmm_params: fidl::new_empty!(
2075                    fidl_fuchsia_wlan_common__common::WlanWmmParameters,
2076                    D
2077                ),
2078            }
2079        }
2080
2081        #[inline]
2082        unsafe fn decode(
2083            &mut self,
2084            decoder: &mut fidl::encoding::Decoder<'_, D>,
2085            offset: usize,
2086            _depth: fidl::encoding::Depth,
2087        ) -> fidl::Result<()> {
2088            decoder.debug_check_bounds::<Self>(offset);
2089            // Verify that padding bytes are zero.
2090            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(36) };
2091            let padval = unsafe { (ptr as *const u32).read_unaligned() };
2092            let mask = 0xffff0000u32;
2093            let maskedval = padval & mask;
2094            if maskedval != 0 {
2095                return Err(fidl::Error::NonZeroPadding {
2096                    padding_start: offset + 36 + ((mask as u64).trailing_zeros() / 8) as usize,
2097                });
2098            }
2099            fidl::decode!(i32, D, &mut self.status, decoder, offset + 0, _depth)?;
2100            fidl::decode!(
2101                fidl_fuchsia_wlan_common__common::WlanWmmParameters,
2102                D,
2103                &mut self.wmm_params,
2104                decoder,
2105                offset + 4,
2106                _depth
2107            )?;
2108            Ok(())
2109        }
2110    }
2111
2112    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplIfcSaeFrameRxRequest {
2113        type Borrowed<'a> = &'a Self;
2114        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2115            value
2116        }
2117    }
2118
2119    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplIfcSaeFrameRxRequest {
2120        type Owned = Self;
2121
2122        #[inline(always)]
2123        fn inline_align(_context: fidl::encoding::Context) -> usize {
2124            8
2125        }
2126
2127        #[inline(always)]
2128        fn inline_size(_context: fidl::encoding::Context) -> usize {
2129            16
2130        }
2131    }
2132
2133    unsafe impl<D: fidl::encoding::ResourceDialect>
2134        fidl::encoding::Encode<WlanFullmacImplIfcSaeFrameRxRequest, D>
2135        for &WlanFullmacImplIfcSaeFrameRxRequest
2136    {
2137        #[inline]
2138        unsafe fn encode(
2139            self,
2140            encoder: &mut fidl::encoding::Encoder<'_, D>,
2141            offset: usize,
2142            _depth: fidl::encoding::Depth,
2143        ) -> fidl::Result<()> {
2144            encoder.debug_check_bounds::<WlanFullmacImplIfcSaeFrameRxRequest>(offset);
2145            // Delegate to tuple encoding.
2146            fidl::encoding::Encode::<WlanFullmacImplIfcSaeFrameRxRequest, D>::encode(
2147                (<SaeFrame as fidl::encoding::ValueTypeMarker>::borrow(&self.frame),),
2148                encoder,
2149                offset,
2150                _depth,
2151            )
2152        }
2153    }
2154    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SaeFrame, D>>
2155        fidl::encoding::Encode<WlanFullmacImplIfcSaeFrameRxRequest, D> for (T0,)
2156    {
2157        #[inline]
2158        unsafe fn encode(
2159            self,
2160            encoder: &mut fidl::encoding::Encoder<'_, D>,
2161            offset: usize,
2162            depth: fidl::encoding::Depth,
2163        ) -> fidl::Result<()> {
2164            encoder.debug_check_bounds::<WlanFullmacImplIfcSaeFrameRxRequest>(offset);
2165            // Zero out padding regions. There's no need to apply masks
2166            // because the unmasked parts will be overwritten by fields.
2167            // Write the fields.
2168            self.0.encode(encoder, offset + 0, depth)?;
2169            Ok(())
2170        }
2171    }
2172
2173    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2174        for WlanFullmacImplIfcSaeFrameRxRequest
2175    {
2176        #[inline(always)]
2177        fn new_empty() -> Self {
2178            Self { frame: fidl::new_empty!(SaeFrame, D) }
2179        }
2180
2181        #[inline]
2182        unsafe fn decode(
2183            &mut self,
2184            decoder: &mut fidl::encoding::Decoder<'_, D>,
2185            offset: usize,
2186            _depth: fidl::encoding::Depth,
2187        ) -> fidl::Result<()> {
2188            decoder.debug_check_bounds::<Self>(offset);
2189            // Verify that padding bytes are zero.
2190            fidl::decode!(SaeFrame, D, &mut self.frame, decoder, offset + 0, _depth)?;
2191            Ok(())
2192        }
2193    }
2194
2195    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplIfcSignalReportRequest {
2196        type Borrowed<'a> = &'a Self;
2197        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2198            value
2199        }
2200    }
2201
2202    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplIfcSignalReportRequest {
2203        type Owned = Self;
2204
2205        #[inline(always)]
2206        fn inline_align(_context: fidl::encoding::Context) -> usize {
2207            1
2208        }
2209
2210        #[inline(always)]
2211        fn inline_size(_context: fidl::encoding::Context) -> usize {
2212            2
2213        }
2214        #[inline(always)]
2215        fn encode_is_copy() -> bool {
2216            true
2217        }
2218
2219        #[inline(always)]
2220        fn decode_is_copy() -> bool {
2221            true
2222        }
2223    }
2224
2225    unsafe impl<D: fidl::encoding::ResourceDialect>
2226        fidl::encoding::Encode<WlanFullmacImplIfcSignalReportRequest, D>
2227        for &WlanFullmacImplIfcSignalReportRequest
2228    {
2229        #[inline]
2230        unsafe fn encode(
2231            self,
2232            encoder: &mut fidl::encoding::Encoder<'_, D>,
2233            offset: usize,
2234            _depth: fidl::encoding::Depth,
2235        ) -> fidl::Result<()> {
2236            encoder.debug_check_bounds::<WlanFullmacImplIfcSignalReportRequest>(offset);
2237            unsafe {
2238                // Copy the object into the buffer.
2239                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2240                (buf_ptr as *mut WlanFullmacImplIfcSignalReportRequest)
2241                    .write_unaligned((self as *const WlanFullmacImplIfcSignalReportRequest).read());
2242                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2243                // done second because the memcpy will write garbage to these bytes.
2244            }
2245            Ok(())
2246        }
2247    }
2248    unsafe impl<
2249        D: fidl::encoding::ResourceDialect,
2250        T0: fidl::encoding::Encode<WlanFullmacSignalReportIndication, D>,
2251    > fidl::encoding::Encode<WlanFullmacImplIfcSignalReportRequest, D> for (T0,)
2252    {
2253        #[inline]
2254        unsafe fn encode(
2255            self,
2256            encoder: &mut fidl::encoding::Encoder<'_, D>,
2257            offset: usize,
2258            depth: fidl::encoding::Depth,
2259        ) -> fidl::Result<()> {
2260            encoder.debug_check_bounds::<WlanFullmacImplIfcSignalReportRequest>(offset);
2261            // Zero out padding regions. There's no need to apply masks
2262            // because the unmasked parts will be overwritten by fields.
2263            // Write the fields.
2264            self.0.encode(encoder, offset + 0, depth)?;
2265            Ok(())
2266        }
2267    }
2268
2269    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2270        for WlanFullmacImplIfcSignalReportRequest
2271    {
2272        #[inline(always)]
2273        fn new_empty() -> Self {
2274            Self { ind: fidl::new_empty!(WlanFullmacSignalReportIndication, D) }
2275        }
2276
2277        #[inline]
2278        unsafe fn decode(
2279            &mut self,
2280            decoder: &mut fidl::encoding::Decoder<'_, D>,
2281            offset: usize,
2282            _depth: fidl::encoding::Depth,
2283        ) -> fidl::Result<()> {
2284            decoder.debug_check_bounds::<Self>(offset);
2285            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2286            // Verify that padding bytes are zero.
2287            // Copy from the buffer into the object.
2288            unsafe {
2289                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
2290            }
2291            Ok(())
2292        }
2293    }
2294
2295    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplSaeFrameTxRequest {
2296        type Borrowed<'a> = &'a Self;
2297        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2298            value
2299        }
2300    }
2301
2302    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplSaeFrameTxRequest {
2303        type Owned = Self;
2304
2305        #[inline(always)]
2306        fn inline_align(_context: fidl::encoding::Context) -> usize {
2307            8
2308        }
2309
2310        #[inline(always)]
2311        fn inline_size(_context: fidl::encoding::Context) -> usize {
2312            16
2313        }
2314    }
2315
2316    unsafe impl<D: fidl::encoding::ResourceDialect>
2317        fidl::encoding::Encode<WlanFullmacImplSaeFrameTxRequest, D>
2318        for &WlanFullmacImplSaeFrameTxRequest
2319    {
2320        #[inline]
2321        unsafe fn encode(
2322            self,
2323            encoder: &mut fidl::encoding::Encoder<'_, D>,
2324            offset: usize,
2325            _depth: fidl::encoding::Depth,
2326        ) -> fidl::Result<()> {
2327            encoder.debug_check_bounds::<WlanFullmacImplSaeFrameTxRequest>(offset);
2328            // Delegate to tuple encoding.
2329            fidl::encoding::Encode::<WlanFullmacImplSaeFrameTxRequest, D>::encode(
2330                (<SaeFrame as fidl::encoding::ValueTypeMarker>::borrow(&self.frame),),
2331                encoder,
2332                offset,
2333                _depth,
2334            )
2335        }
2336    }
2337    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SaeFrame, D>>
2338        fidl::encoding::Encode<WlanFullmacImplSaeFrameTxRequest, D> for (T0,)
2339    {
2340        #[inline]
2341        unsafe fn encode(
2342            self,
2343            encoder: &mut fidl::encoding::Encoder<'_, D>,
2344            offset: usize,
2345            depth: fidl::encoding::Depth,
2346        ) -> fidl::Result<()> {
2347            encoder.debug_check_bounds::<WlanFullmacImplSaeFrameTxRequest>(offset);
2348            // Zero out padding regions. There's no need to apply masks
2349            // because the unmasked parts will be overwritten by fields.
2350            // Write the fields.
2351            self.0.encode(encoder, offset + 0, depth)?;
2352            Ok(())
2353        }
2354    }
2355
2356    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2357        for WlanFullmacImplSaeFrameTxRequest
2358    {
2359        #[inline(always)]
2360        fn new_empty() -> Self {
2361            Self { frame: fidl::new_empty!(SaeFrame, D) }
2362        }
2363
2364        #[inline]
2365        unsafe fn decode(
2366            &mut self,
2367            decoder: &mut fidl::encoding::Decoder<'_, D>,
2368            offset: usize,
2369            _depth: fidl::encoding::Depth,
2370        ) -> fidl::Result<()> {
2371            decoder.debug_check_bounds::<Self>(offset);
2372            // Verify that padding bytes are zero.
2373            fidl::decode!(SaeFrame, D, &mut self.frame, decoder, offset + 0, _depth)?;
2374            Ok(())
2375        }
2376    }
2377
2378    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplSetKeysResponse {
2379        type Borrowed<'a> = &'a Self;
2380        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2381            value
2382        }
2383    }
2384
2385    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplSetKeysResponse {
2386        type Owned = Self;
2387
2388        #[inline(always)]
2389        fn inline_align(_context: fidl::encoding::Context) -> usize {
2390            8
2391        }
2392
2393        #[inline(always)]
2394        fn inline_size(_context: fidl::encoding::Context) -> usize {
2395            16
2396        }
2397    }
2398
2399    unsafe impl<D: fidl::encoding::ResourceDialect>
2400        fidl::encoding::Encode<WlanFullmacImplSetKeysResponse, D>
2401        for &WlanFullmacImplSetKeysResponse
2402    {
2403        #[inline]
2404        unsafe fn encode(
2405            self,
2406            encoder: &mut fidl::encoding::Encoder<'_, D>,
2407            offset: usize,
2408            _depth: fidl::encoding::Depth,
2409        ) -> fidl::Result<()> {
2410            encoder.debug_check_bounds::<WlanFullmacImplSetKeysResponse>(offset);
2411            // Delegate to tuple encoding.
2412            fidl::encoding::Encode::<WlanFullmacImplSetKeysResponse, D>::encode(
2413                (<WlanFullmacSetKeysResp as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
2414                encoder,
2415                offset,
2416                _depth,
2417            )
2418        }
2419    }
2420    unsafe impl<
2421        D: fidl::encoding::ResourceDialect,
2422        T0: fidl::encoding::Encode<WlanFullmacSetKeysResp, D>,
2423    > fidl::encoding::Encode<WlanFullmacImplSetKeysResponse, D> for (T0,)
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::<WlanFullmacImplSetKeysResponse>(offset);
2433            // Zero out padding regions. There's no need to apply masks
2434            // because the unmasked parts will be overwritten by fields.
2435            // Write the fields.
2436            self.0.encode(encoder, offset + 0, depth)?;
2437            Ok(())
2438        }
2439    }
2440
2441    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2442        for WlanFullmacImplSetKeysResponse
2443    {
2444        #[inline(always)]
2445        fn new_empty() -> Self {
2446            Self { resp: fidl::new_empty!(WlanFullmacSetKeysResp, D) }
2447        }
2448
2449        #[inline]
2450        unsafe fn decode(
2451            &mut self,
2452            decoder: &mut fidl::encoding::Decoder<'_, D>,
2453            offset: usize,
2454            _depth: fidl::encoding::Depth,
2455        ) -> fidl::Result<()> {
2456            decoder.debug_check_bounds::<Self>(offset);
2457            // Verify that padding bytes are zero.
2458            fidl::decode!(WlanFullmacSetKeysResp, D, &mut self.resp, decoder, offset + 0, _depth)?;
2459            Ok(())
2460        }
2461    }
2462
2463    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplSetMacAddressRequest {
2464        type Borrowed<'a> = &'a Self;
2465        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2466            value
2467        }
2468    }
2469
2470    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplSetMacAddressRequest {
2471        type Owned = Self;
2472
2473        #[inline(always)]
2474        fn inline_align(_context: fidl::encoding::Context) -> usize {
2475            1
2476        }
2477
2478        #[inline(always)]
2479        fn inline_size(_context: fidl::encoding::Context) -> usize {
2480            6
2481        }
2482        #[inline(always)]
2483        fn encode_is_copy() -> bool {
2484            true
2485        }
2486
2487        #[inline(always)]
2488        fn decode_is_copy() -> bool {
2489            true
2490        }
2491    }
2492
2493    unsafe impl<D: fidl::encoding::ResourceDialect>
2494        fidl::encoding::Encode<WlanFullmacImplSetMacAddressRequest, D>
2495        for &WlanFullmacImplSetMacAddressRequest
2496    {
2497        #[inline]
2498        unsafe fn encode(
2499            self,
2500            encoder: &mut fidl::encoding::Encoder<'_, D>,
2501            offset: usize,
2502            _depth: fidl::encoding::Depth,
2503        ) -> fidl::Result<()> {
2504            encoder.debug_check_bounds::<WlanFullmacImplSetMacAddressRequest>(offset);
2505            unsafe {
2506                // Copy the object into the buffer.
2507                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2508                (buf_ptr as *mut WlanFullmacImplSetMacAddressRequest)
2509                    .write_unaligned((self as *const WlanFullmacImplSetMacAddressRequest).read());
2510                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2511                // done second because the memcpy will write garbage to these bytes.
2512            }
2513            Ok(())
2514        }
2515    }
2516    unsafe impl<
2517        D: fidl::encoding::ResourceDialect,
2518        T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
2519    > fidl::encoding::Encode<WlanFullmacImplSetMacAddressRequest, D> for (T0,)
2520    {
2521        #[inline]
2522        unsafe fn encode(
2523            self,
2524            encoder: &mut fidl::encoding::Encoder<'_, D>,
2525            offset: usize,
2526            depth: fidl::encoding::Depth,
2527        ) -> fidl::Result<()> {
2528            encoder.debug_check_bounds::<WlanFullmacImplSetMacAddressRequest>(offset);
2529            // Zero out padding regions. There's no need to apply masks
2530            // because the unmasked parts will be overwritten by fields.
2531            // Write the fields.
2532            self.0.encode(encoder, offset + 0, depth)?;
2533            Ok(())
2534        }
2535    }
2536
2537    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2538        for WlanFullmacImplSetMacAddressRequest
2539    {
2540        #[inline(always)]
2541        fn new_empty() -> Self {
2542            Self { mac_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D) }
2543        }
2544
2545        #[inline]
2546        unsafe fn decode(
2547            &mut self,
2548            decoder: &mut fidl::encoding::Decoder<'_, D>,
2549            offset: usize,
2550            _depth: fidl::encoding::Depth,
2551        ) -> fidl::Result<()> {
2552            decoder.debug_check_bounds::<Self>(offset);
2553            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2554            // Verify that padding bytes are zero.
2555            // Copy from the buffer into the object.
2556            unsafe {
2557                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
2558            }
2559            Ok(())
2560        }
2561    }
2562
2563    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplGetIfaceHistogramStatsResponse {
2564        type Borrowed<'a> = &'a Self;
2565        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2566            value
2567        }
2568    }
2569
2570    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplGetIfaceHistogramStatsResponse {
2571        type Owned = Self;
2572
2573        #[inline(always)]
2574        fn inline_align(_context: fidl::encoding::Context) -> usize {
2575            8
2576        }
2577
2578        #[inline(always)]
2579        fn inline_size(_context: fidl::encoding::Context) -> usize {
2580            16
2581        }
2582    }
2583
2584    unsafe impl<D: fidl::encoding::ResourceDialect>
2585        fidl::encoding::Encode<WlanFullmacImplGetIfaceHistogramStatsResponse, D>
2586        for &WlanFullmacImplGetIfaceHistogramStatsResponse
2587    {
2588        #[inline]
2589        unsafe fn encode(
2590            self,
2591            encoder: &mut fidl::encoding::Encoder<'_, D>,
2592            offset: usize,
2593            _depth: fidl::encoding::Depth,
2594        ) -> fidl::Result<()> {
2595            encoder.debug_check_bounds::<WlanFullmacImplGetIfaceHistogramStatsResponse>(offset);
2596            // Delegate to tuple encoding.
2597            fidl::encoding::Encode::<WlanFullmacImplGetIfaceHistogramStatsResponse, D>::encode(
2598                (
2599                    <fidl_fuchsia_wlan_stats__common::IfaceHistogramStats as fidl::encoding::ValueTypeMarker>::borrow(&self.stats),
2600                ),
2601                encoder, offset, _depth
2602            )
2603        }
2604    }
2605    unsafe impl<
2606        D: fidl::encoding::ResourceDialect,
2607        T0: fidl::encoding::Encode<fidl_fuchsia_wlan_stats__common::IfaceHistogramStats, D>,
2608    > fidl::encoding::Encode<WlanFullmacImplGetIfaceHistogramStatsResponse, D> for (T0,)
2609    {
2610        #[inline]
2611        unsafe fn encode(
2612            self,
2613            encoder: &mut fidl::encoding::Encoder<'_, D>,
2614            offset: usize,
2615            depth: fidl::encoding::Depth,
2616        ) -> fidl::Result<()> {
2617            encoder.debug_check_bounds::<WlanFullmacImplGetIfaceHistogramStatsResponse>(offset);
2618            // Zero out padding regions. There's no need to apply masks
2619            // because the unmasked parts will be overwritten by fields.
2620            // Write the fields.
2621            self.0.encode(encoder, offset + 0, depth)?;
2622            Ok(())
2623        }
2624    }
2625
2626    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2627        for WlanFullmacImplGetIfaceHistogramStatsResponse
2628    {
2629        #[inline(always)]
2630        fn new_empty() -> Self {
2631            Self {
2632                stats: fidl::new_empty!(fidl_fuchsia_wlan_stats__common::IfaceHistogramStats, D),
2633            }
2634        }
2635
2636        #[inline]
2637        unsafe fn decode(
2638            &mut self,
2639            decoder: &mut fidl::encoding::Decoder<'_, D>,
2640            offset: usize,
2641            _depth: fidl::encoding::Depth,
2642        ) -> fidl::Result<()> {
2643            decoder.debug_check_bounds::<Self>(offset);
2644            // Verify that padding bytes are zero.
2645            fidl::decode!(
2646                fidl_fuchsia_wlan_stats__common::IfaceHistogramStats,
2647                D,
2648                &mut self.stats,
2649                decoder,
2650                offset + 0,
2651                _depth
2652            )?;
2653            Ok(())
2654        }
2655    }
2656
2657    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplGetIfaceStatsResponse {
2658        type Borrowed<'a> = &'a Self;
2659        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2660            value
2661        }
2662    }
2663
2664    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplGetIfaceStatsResponse {
2665        type Owned = Self;
2666
2667        #[inline(always)]
2668        fn inline_align(_context: fidl::encoding::Context) -> usize {
2669            8
2670        }
2671
2672        #[inline(always)]
2673        fn inline_size(_context: fidl::encoding::Context) -> usize {
2674            16
2675        }
2676    }
2677
2678    unsafe impl<D: fidl::encoding::ResourceDialect>
2679        fidl::encoding::Encode<WlanFullmacImplGetIfaceStatsResponse, D>
2680        for &WlanFullmacImplGetIfaceStatsResponse
2681    {
2682        #[inline]
2683        unsafe fn encode(
2684            self,
2685            encoder: &mut fidl::encoding::Encoder<'_, D>,
2686            offset: usize,
2687            _depth: fidl::encoding::Depth,
2688        ) -> fidl::Result<()> {
2689            encoder.debug_check_bounds::<WlanFullmacImplGetIfaceStatsResponse>(offset);
2690            // Delegate to tuple encoding.
2691            fidl::encoding::Encode::<WlanFullmacImplGetIfaceStatsResponse, D>::encode(
2692                (
2693                    <fidl_fuchsia_wlan_stats__common::IfaceStats as fidl::encoding::ValueTypeMarker>::borrow(&self.stats),
2694                ),
2695                encoder, offset, _depth
2696            )
2697        }
2698    }
2699    unsafe impl<
2700        D: fidl::encoding::ResourceDialect,
2701        T0: fidl::encoding::Encode<fidl_fuchsia_wlan_stats__common::IfaceStats, D>,
2702    > fidl::encoding::Encode<WlanFullmacImplGetIfaceStatsResponse, D> for (T0,)
2703    {
2704        #[inline]
2705        unsafe fn encode(
2706            self,
2707            encoder: &mut fidl::encoding::Encoder<'_, D>,
2708            offset: usize,
2709            depth: fidl::encoding::Depth,
2710        ) -> fidl::Result<()> {
2711            encoder.debug_check_bounds::<WlanFullmacImplGetIfaceStatsResponse>(offset);
2712            // Zero out padding regions. There's no need to apply masks
2713            // because the unmasked parts will be overwritten by fields.
2714            // Write the fields.
2715            self.0.encode(encoder, offset + 0, depth)?;
2716            Ok(())
2717        }
2718    }
2719
2720    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2721        for WlanFullmacImplGetIfaceStatsResponse
2722    {
2723        #[inline(always)]
2724        fn new_empty() -> Self {
2725            Self { stats: fidl::new_empty!(fidl_fuchsia_wlan_stats__common::IfaceStats, D) }
2726        }
2727
2728        #[inline]
2729        unsafe fn decode(
2730            &mut self,
2731            decoder: &mut fidl::encoding::Decoder<'_, D>,
2732            offset: usize,
2733            _depth: fidl::encoding::Depth,
2734        ) -> fidl::Result<()> {
2735            decoder.debug_check_bounds::<Self>(offset);
2736            // Verify that padding bytes are zero.
2737            fidl::decode!(
2738                fidl_fuchsia_wlan_stats__common::IfaceStats,
2739                D,
2740                &mut self.stats,
2741                decoder,
2742                offset + 0,
2743                _depth
2744            )?;
2745            Ok(())
2746        }
2747    }
2748
2749    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplQuerySecuritySupportResponse {
2750        type Borrowed<'a> = &'a Self;
2751        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2752            value
2753        }
2754    }
2755
2756    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplQuerySecuritySupportResponse {
2757        type Owned = Self;
2758
2759        #[inline(always)]
2760        fn inline_align(_context: fidl::encoding::Context) -> usize {
2761            1
2762        }
2763
2764        #[inline(always)]
2765        fn inline_size(_context: fidl::encoding::Context) -> usize {
2766            3
2767        }
2768    }
2769
2770    unsafe impl<D: fidl::encoding::ResourceDialect>
2771        fidl::encoding::Encode<WlanFullmacImplQuerySecuritySupportResponse, D>
2772        for &WlanFullmacImplQuerySecuritySupportResponse
2773    {
2774        #[inline]
2775        unsafe fn encode(
2776            self,
2777            encoder: &mut fidl::encoding::Encoder<'_, D>,
2778            offset: usize,
2779            _depth: fidl::encoding::Depth,
2780        ) -> fidl::Result<()> {
2781            encoder.debug_check_bounds::<WlanFullmacImplQuerySecuritySupportResponse>(offset);
2782            // Delegate to tuple encoding.
2783            fidl::encoding::Encode::<WlanFullmacImplQuerySecuritySupportResponse, D>::encode(
2784                (
2785                    <fidl_fuchsia_wlan_common__common::SecuritySupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
2786                ),
2787                encoder, offset, _depth
2788            )
2789        }
2790    }
2791    unsafe impl<
2792        D: fidl::encoding::ResourceDialect,
2793        T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common__common::SecuritySupport, D>,
2794    > fidl::encoding::Encode<WlanFullmacImplQuerySecuritySupportResponse, D> for (T0,)
2795    {
2796        #[inline]
2797        unsafe fn encode(
2798            self,
2799            encoder: &mut fidl::encoding::Encoder<'_, D>,
2800            offset: usize,
2801            depth: fidl::encoding::Depth,
2802        ) -> fidl::Result<()> {
2803            encoder.debug_check_bounds::<WlanFullmacImplQuerySecuritySupportResponse>(offset);
2804            // Zero out padding regions. There's no need to apply masks
2805            // because the unmasked parts will be overwritten by fields.
2806            // Write the fields.
2807            self.0.encode(encoder, offset + 0, depth)?;
2808            Ok(())
2809        }
2810    }
2811
2812    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2813        for WlanFullmacImplQuerySecuritySupportResponse
2814    {
2815        #[inline(always)]
2816        fn new_empty() -> Self {
2817            Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_common__common::SecuritySupport, D) }
2818        }
2819
2820        #[inline]
2821        unsafe fn decode(
2822            &mut self,
2823            decoder: &mut fidl::encoding::Decoder<'_, D>,
2824            offset: usize,
2825            _depth: fidl::encoding::Depth,
2826        ) -> fidl::Result<()> {
2827            decoder.debug_check_bounds::<Self>(offset);
2828            // Verify that padding bytes are zero.
2829            fidl::decode!(
2830                fidl_fuchsia_wlan_common__common::SecuritySupport,
2831                D,
2832                &mut self.resp,
2833                decoder,
2834                offset + 0,
2835                _depth
2836            )?;
2837            Ok(())
2838        }
2839    }
2840
2841    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplQuerySpectrumManagementSupportResponse {
2842        type Borrowed<'a> = &'a Self;
2843        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2844            value
2845        }
2846    }
2847
2848    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplQuerySpectrumManagementSupportResponse {
2849        type Owned = Self;
2850
2851        #[inline(always)]
2852        fn inline_align(_context: fidl::encoding::Context) -> usize {
2853            1
2854        }
2855
2856        #[inline(always)]
2857        fn inline_size(_context: fidl::encoding::Context) -> usize {
2858            1
2859        }
2860    }
2861
2862    unsafe impl<D: fidl::encoding::ResourceDialect>
2863        fidl::encoding::Encode<WlanFullmacImplQuerySpectrumManagementSupportResponse, D>
2864        for &WlanFullmacImplQuerySpectrumManagementSupportResponse
2865    {
2866        #[inline]
2867        unsafe fn encode(
2868            self,
2869            encoder: &mut fidl::encoding::Encoder<'_, D>,
2870            offset: usize,
2871            _depth: fidl::encoding::Depth,
2872        ) -> fidl::Result<()> {
2873            encoder.debug_check_bounds::<WlanFullmacImplQuerySpectrumManagementSupportResponse>(
2874                offset,
2875            );
2876            // Delegate to tuple encoding.
2877            fidl::encoding::Encode::<WlanFullmacImplQuerySpectrumManagementSupportResponse, D>::encode(
2878                (
2879                    <fidl_fuchsia_wlan_common__common::SpectrumManagementSupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
2880                ),
2881                encoder, offset, _depth
2882            )
2883        }
2884    }
2885    unsafe impl<
2886        D: fidl::encoding::ResourceDialect,
2887        T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common__common::SpectrumManagementSupport, D>,
2888    > fidl::encoding::Encode<WlanFullmacImplQuerySpectrumManagementSupportResponse, D> for (T0,)
2889    {
2890        #[inline]
2891        unsafe fn encode(
2892            self,
2893            encoder: &mut fidl::encoding::Encoder<'_, D>,
2894            offset: usize,
2895            depth: fidl::encoding::Depth,
2896        ) -> fidl::Result<()> {
2897            encoder.debug_check_bounds::<WlanFullmacImplQuerySpectrumManagementSupportResponse>(
2898                offset,
2899            );
2900            // Zero out padding regions. There's no need to apply masks
2901            // because the unmasked parts will be overwritten by fields.
2902            // Write the fields.
2903            self.0.encode(encoder, offset + 0, depth)?;
2904            Ok(())
2905        }
2906    }
2907
2908    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2909        for WlanFullmacImplQuerySpectrumManagementSupportResponse
2910    {
2911        #[inline(always)]
2912        fn new_empty() -> Self {
2913            Self {
2914                resp: fidl::new_empty!(
2915                    fidl_fuchsia_wlan_common__common::SpectrumManagementSupport,
2916                    D
2917                ),
2918            }
2919        }
2920
2921        #[inline]
2922        unsafe fn decode(
2923            &mut self,
2924            decoder: &mut fidl::encoding::Decoder<'_, D>,
2925            offset: usize,
2926            _depth: fidl::encoding::Depth,
2927        ) -> fidl::Result<()> {
2928            decoder.debug_check_bounds::<Self>(offset);
2929            // Verify that padding bytes are zero.
2930            fidl::decode!(
2931                fidl_fuchsia_wlan_common__common::SpectrumManagementSupport,
2932                D,
2933                &mut self.resp,
2934                decoder,
2935                offset + 0,
2936                _depth
2937            )?;
2938            Ok(())
2939        }
2940    }
2941
2942    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplQueryTelemetrySupportResponse {
2943        type Borrowed<'a> = &'a Self;
2944        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2945            value
2946        }
2947    }
2948
2949    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplQueryTelemetrySupportResponse {
2950        type Owned = Self;
2951
2952        #[inline(always)]
2953        fn inline_align(_context: fidl::encoding::Context) -> usize {
2954            8
2955        }
2956
2957        #[inline(always)]
2958        fn inline_size(_context: fidl::encoding::Context) -> usize {
2959            16
2960        }
2961    }
2962
2963    unsafe impl<D: fidl::encoding::ResourceDialect>
2964        fidl::encoding::Encode<WlanFullmacImplQueryTelemetrySupportResponse, D>
2965        for &WlanFullmacImplQueryTelemetrySupportResponse
2966    {
2967        #[inline]
2968        unsafe fn encode(
2969            self,
2970            encoder: &mut fidl::encoding::Encoder<'_, D>,
2971            offset: usize,
2972            _depth: fidl::encoding::Depth,
2973        ) -> fidl::Result<()> {
2974            encoder.debug_check_bounds::<WlanFullmacImplQueryTelemetrySupportResponse>(offset);
2975            // Delegate to tuple encoding.
2976            fidl::encoding::Encode::<WlanFullmacImplQueryTelemetrySupportResponse, D>::encode(
2977                (
2978                    <fidl_fuchsia_wlan_stats__common::TelemetrySupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
2979                ),
2980                encoder, offset, _depth
2981            )
2982        }
2983    }
2984    unsafe impl<
2985        D: fidl::encoding::ResourceDialect,
2986        T0: fidl::encoding::Encode<fidl_fuchsia_wlan_stats__common::TelemetrySupport, D>,
2987    > fidl::encoding::Encode<WlanFullmacImplQueryTelemetrySupportResponse, D> for (T0,)
2988    {
2989        #[inline]
2990        unsafe fn encode(
2991            self,
2992            encoder: &mut fidl::encoding::Encoder<'_, D>,
2993            offset: usize,
2994            depth: fidl::encoding::Depth,
2995        ) -> fidl::Result<()> {
2996            encoder.debug_check_bounds::<WlanFullmacImplQueryTelemetrySupportResponse>(offset);
2997            // Zero out padding regions. There's no need to apply masks
2998            // because the unmasked parts will be overwritten by fields.
2999            // Write the fields.
3000            self.0.encode(encoder, offset + 0, depth)?;
3001            Ok(())
3002        }
3003    }
3004
3005    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3006        for WlanFullmacImplQueryTelemetrySupportResponse
3007    {
3008        #[inline(always)]
3009        fn new_empty() -> Self {
3010            Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_stats__common::TelemetrySupport, D) }
3011        }
3012
3013        #[inline]
3014        unsafe fn decode(
3015            &mut self,
3016            decoder: &mut fidl::encoding::Decoder<'_, D>,
3017            offset: usize,
3018            _depth: fidl::encoding::Depth,
3019        ) -> fidl::Result<()> {
3020            decoder.debug_check_bounds::<Self>(offset);
3021            // Verify that padding bytes are zero.
3022            fidl::decode!(
3023                fidl_fuchsia_wlan_stats__common::TelemetrySupport,
3024                D,
3025                &mut self.resp,
3026                decoder,
3027                offset + 0,
3028                _depth
3029            )?;
3030            Ok(())
3031        }
3032    }
3033
3034    impl fidl::encoding::ValueTypeMarker for WlanFullmacRssiStats {
3035        type Borrowed<'a> = &'a Self;
3036        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3037            value
3038        }
3039    }
3040
3041    unsafe impl fidl::encoding::TypeMarker for WlanFullmacRssiStats {
3042        type Owned = Self;
3043
3044        #[inline(always)]
3045        fn inline_align(_context: fidl::encoding::Context) -> usize {
3046            8
3047        }
3048
3049        #[inline(always)]
3050        fn inline_size(_context: fidl::encoding::Context) -> usize {
3051            16
3052        }
3053    }
3054
3055    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<WlanFullmacRssiStats, D>
3056        for &WlanFullmacRssiStats
3057    {
3058        #[inline]
3059        unsafe fn encode(
3060            self,
3061            encoder: &mut fidl::encoding::Encoder<'_, D>,
3062            offset: usize,
3063            _depth: fidl::encoding::Depth,
3064        ) -> fidl::Result<()> {
3065            encoder.debug_check_bounds::<WlanFullmacRssiStats>(offset);
3066            // Delegate to tuple encoding.
3067            fidl::encoding::Encode::<WlanFullmacRssiStats, D>::encode(
3068                (
3069                    <fidl::encoding::UnboundedVector<u64> as fidl::encoding::ValueTypeMarker>::borrow(&self.hist),
3070                ),
3071                encoder, offset, _depth
3072            )
3073        }
3074    }
3075    unsafe impl<
3076        D: fidl::encoding::ResourceDialect,
3077        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u64>, D>,
3078    > fidl::encoding::Encode<WlanFullmacRssiStats, D> for (T0,)
3079    {
3080        #[inline]
3081        unsafe fn encode(
3082            self,
3083            encoder: &mut fidl::encoding::Encoder<'_, D>,
3084            offset: usize,
3085            depth: fidl::encoding::Depth,
3086        ) -> fidl::Result<()> {
3087            encoder.debug_check_bounds::<WlanFullmacRssiStats>(offset);
3088            // Zero out padding regions. There's no need to apply masks
3089            // because the unmasked parts will be overwritten by fields.
3090            // Write the fields.
3091            self.0.encode(encoder, offset + 0, depth)?;
3092            Ok(())
3093        }
3094    }
3095
3096    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WlanFullmacRssiStats {
3097        #[inline(always)]
3098        fn new_empty() -> Self {
3099            Self { hist: fidl::new_empty!(fidl::encoding::UnboundedVector<u64>, D) }
3100        }
3101
3102        #[inline]
3103        unsafe fn decode(
3104            &mut self,
3105            decoder: &mut fidl::encoding::Decoder<'_, D>,
3106            offset: usize,
3107            _depth: fidl::encoding::Depth,
3108        ) -> fidl::Result<()> {
3109            decoder.debug_check_bounds::<Self>(offset);
3110            // Verify that padding bytes are zero.
3111            fidl::decode!(
3112                fidl::encoding::UnboundedVector<u64>,
3113                D,
3114                &mut self.hist,
3115                decoder,
3116                offset + 0,
3117                _depth
3118            )?;
3119            Ok(())
3120        }
3121    }
3122
3123    impl fidl::encoding::ValueTypeMarker for WlanFullmacSetKeysResp {
3124        type Borrowed<'a> = &'a Self;
3125        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3126            value
3127        }
3128    }
3129
3130    unsafe impl fidl::encoding::TypeMarker for WlanFullmacSetKeysResp {
3131        type Owned = Self;
3132
3133        #[inline(always)]
3134        fn inline_align(_context: fidl::encoding::Context) -> usize {
3135            8
3136        }
3137
3138        #[inline(always)]
3139        fn inline_size(_context: fidl::encoding::Context) -> usize {
3140            16
3141        }
3142    }
3143
3144    unsafe impl<D: fidl::encoding::ResourceDialect>
3145        fidl::encoding::Encode<WlanFullmacSetKeysResp, D> for &WlanFullmacSetKeysResp
3146    {
3147        #[inline]
3148        unsafe fn encode(
3149            self,
3150            encoder: &mut fidl::encoding::Encoder<'_, D>,
3151            offset: usize,
3152            _depth: fidl::encoding::Depth,
3153        ) -> fidl::Result<()> {
3154            encoder.debug_check_bounds::<WlanFullmacSetKeysResp>(offset);
3155            // Delegate to tuple encoding.
3156            fidl::encoding::Encode::<WlanFullmacSetKeysResp, D>::encode(
3157                (<fidl::encoding::Vector<i32, 4> as fidl::encoding::ValueTypeMarker>::borrow(
3158                    &self.statuslist,
3159                ),),
3160                encoder,
3161                offset,
3162                _depth,
3163            )
3164        }
3165    }
3166    unsafe impl<
3167        D: fidl::encoding::ResourceDialect,
3168        T0: fidl::encoding::Encode<fidl::encoding::Vector<i32, 4>, D>,
3169    > fidl::encoding::Encode<WlanFullmacSetKeysResp, D> for (T0,)
3170    {
3171        #[inline]
3172        unsafe fn encode(
3173            self,
3174            encoder: &mut fidl::encoding::Encoder<'_, D>,
3175            offset: usize,
3176            depth: fidl::encoding::Depth,
3177        ) -> fidl::Result<()> {
3178            encoder.debug_check_bounds::<WlanFullmacSetKeysResp>(offset);
3179            // Zero out padding regions. There's no need to apply masks
3180            // because the unmasked parts will be overwritten by fields.
3181            // Write the fields.
3182            self.0.encode(encoder, offset + 0, depth)?;
3183            Ok(())
3184        }
3185    }
3186
3187    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3188        for WlanFullmacSetKeysResp
3189    {
3190        #[inline(always)]
3191        fn new_empty() -> Self {
3192            Self { statuslist: fidl::new_empty!(fidl::encoding::Vector<i32, 4>, D) }
3193        }
3194
3195        #[inline]
3196        unsafe fn decode(
3197            &mut self,
3198            decoder: &mut fidl::encoding::Decoder<'_, D>,
3199            offset: usize,
3200            _depth: fidl::encoding::Depth,
3201        ) -> fidl::Result<()> {
3202            decoder.debug_check_bounds::<Self>(offset);
3203            // Verify that padding bytes are zero.
3204            fidl::decode!(fidl::encoding::Vector<i32, 4>, D, &mut self.statuslist, decoder, offset + 0, _depth)?;
3205            Ok(())
3206        }
3207    }
3208
3209    impl fidl::encoding::ValueTypeMarker for WlanFullmacSignalReportIndication {
3210        type Borrowed<'a> = &'a Self;
3211        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3212            value
3213        }
3214    }
3215
3216    unsafe impl fidl::encoding::TypeMarker for WlanFullmacSignalReportIndication {
3217        type Owned = Self;
3218
3219        #[inline(always)]
3220        fn inline_align(_context: fidl::encoding::Context) -> usize {
3221            1
3222        }
3223
3224        #[inline(always)]
3225        fn inline_size(_context: fidl::encoding::Context) -> usize {
3226            2
3227        }
3228        #[inline(always)]
3229        fn encode_is_copy() -> bool {
3230            true
3231        }
3232
3233        #[inline(always)]
3234        fn decode_is_copy() -> bool {
3235            true
3236        }
3237    }
3238
3239    unsafe impl<D: fidl::encoding::ResourceDialect>
3240        fidl::encoding::Encode<WlanFullmacSignalReportIndication, D>
3241        for &WlanFullmacSignalReportIndication
3242    {
3243        #[inline]
3244        unsafe fn encode(
3245            self,
3246            encoder: &mut fidl::encoding::Encoder<'_, D>,
3247            offset: usize,
3248            _depth: fidl::encoding::Depth,
3249        ) -> fidl::Result<()> {
3250            encoder.debug_check_bounds::<WlanFullmacSignalReportIndication>(offset);
3251            unsafe {
3252                // Copy the object into the buffer.
3253                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3254                (buf_ptr as *mut WlanFullmacSignalReportIndication)
3255                    .write_unaligned((self as *const WlanFullmacSignalReportIndication).read());
3256                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3257                // done second because the memcpy will write garbage to these bytes.
3258            }
3259            Ok(())
3260        }
3261    }
3262    unsafe impl<
3263        D: fidl::encoding::ResourceDialect,
3264        T0: fidl::encoding::Encode<i8, D>,
3265        T1: fidl::encoding::Encode<i8, D>,
3266    > fidl::encoding::Encode<WlanFullmacSignalReportIndication, D> for (T0, T1)
3267    {
3268        #[inline]
3269        unsafe fn encode(
3270            self,
3271            encoder: &mut fidl::encoding::Encoder<'_, D>,
3272            offset: usize,
3273            depth: fidl::encoding::Depth,
3274        ) -> fidl::Result<()> {
3275            encoder.debug_check_bounds::<WlanFullmacSignalReportIndication>(offset);
3276            // Zero out padding regions. There's no need to apply masks
3277            // because the unmasked parts will be overwritten by fields.
3278            // Write the fields.
3279            self.0.encode(encoder, offset + 0, depth)?;
3280            self.1.encode(encoder, offset + 1, depth)?;
3281            Ok(())
3282        }
3283    }
3284
3285    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3286        for WlanFullmacSignalReportIndication
3287    {
3288        #[inline(always)]
3289        fn new_empty() -> Self {
3290            Self { rssi_dbm: fidl::new_empty!(i8, D), snr_db: fidl::new_empty!(i8, D) }
3291        }
3292
3293        #[inline]
3294        unsafe fn decode(
3295            &mut self,
3296            decoder: &mut fidl::encoding::Decoder<'_, D>,
3297            offset: usize,
3298            _depth: fidl::encoding::Depth,
3299        ) -> fidl::Result<()> {
3300            decoder.debug_check_bounds::<Self>(offset);
3301            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3302            // Verify that padding bytes are zero.
3303            // Copy from the buffer into the object.
3304            unsafe {
3305                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
3306            }
3307            Ok(())
3308        }
3309    }
3310
3311    impl BandCapability {
3312        #[inline(always)]
3313        fn max_ordinal_present(&self) -> u64 {
3314            if let Some(_) = self.operating_channels {
3315                return 5;
3316            }
3317            if let Some(_) = self.vht_caps {
3318                return 4;
3319            }
3320            if let Some(_) = self.ht_caps {
3321                return 3;
3322            }
3323            if let Some(_) = self.basic_rates {
3324                return 2;
3325            }
3326            if let Some(_) = self.band {
3327                return 1;
3328            }
3329            0
3330        }
3331    }
3332
3333    impl fidl::encoding::ValueTypeMarker for BandCapability {
3334        type Borrowed<'a> = &'a Self;
3335        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3336            value
3337        }
3338    }
3339
3340    unsafe impl fidl::encoding::TypeMarker for BandCapability {
3341        type Owned = Self;
3342
3343        #[inline(always)]
3344        fn inline_align(_context: fidl::encoding::Context) -> usize {
3345            8
3346        }
3347
3348        #[inline(always)]
3349        fn inline_size(_context: fidl::encoding::Context) -> usize {
3350            16
3351        }
3352    }
3353
3354    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BandCapability, D>
3355        for &BandCapability
3356    {
3357        unsafe fn encode(
3358            self,
3359            encoder: &mut fidl::encoding::Encoder<'_, D>,
3360            offset: usize,
3361            mut depth: fidl::encoding::Depth,
3362        ) -> fidl::Result<()> {
3363            encoder.debug_check_bounds::<BandCapability>(offset);
3364            // Vector header
3365            let max_ordinal: u64 = self.max_ordinal_present();
3366            encoder.write_num(max_ordinal, offset);
3367            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3368            // Calling encoder.out_of_line_offset(0) is not allowed.
3369            if max_ordinal == 0 {
3370                return Ok(());
3371            }
3372            depth.increment()?;
3373            let envelope_size = 8;
3374            let bytes_len = max_ordinal as usize * envelope_size;
3375            #[allow(unused_variables)]
3376            let offset = encoder.out_of_line_offset(bytes_len);
3377            let mut _prev_end_offset: usize = 0;
3378            if 1 > max_ordinal {
3379                return Ok(());
3380            }
3381
3382            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3383            // are envelope_size bytes.
3384            let cur_offset: usize = (1 - 1) * envelope_size;
3385
3386            // Zero reserved fields.
3387            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3388
3389            // Safety:
3390            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3391            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3392            //   envelope_size bytes, there is always sufficient room.
3393            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_ieee80211__common::WlanBand, D>(
3394            self.band.as_ref().map(<fidl_fuchsia_wlan_ieee80211__common::WlanBand as fidl::encoding::ValueTypeMarker>::borrow),
3395            encoder, offset + cur_offset, depth
3396        )?;
3397
3398            _prev_end_offset = cur_offset + envelope_size;
3399            if 2 > max_ordinal {
3400                return Ok(());
3401            }
3402
3403            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3404            // are envelope_size bytes.
3405            let cur_offset: usize = (2 - 1) * envelope_size;
3406
3407            // Zero reserved fields.
3408            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3409
3410            // Safety:
3411            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3412            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3413            //   envelope_size bytes, there is always sufficient room.
3414            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 12>, D>(
3415                self.basic_rates.as_ref().map(
3416                    <fidl::encoding::Vector<u8, 12> as fidl::encoding::ValueTypeMarker>::borrow,
3417                ),
3418                encoder,
3419                offset + cur_offset,
3420                depth,
3421            )?;
3422
3423            _prev_end_offset = cur_offset + envelope_size;
3424            if 3 > max_ordinal {
3425                return Ok(());
3426            }
3427
3428            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3429            // are envelope_size bytes.
3430            let cur_offset: usize = (3 - 1) * envelope_size;
3431
3432            // Zero reserved fields.
3433            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3434
3435            // Safety:
3436            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3437            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3438            //   envelope_size bytes, there is always sufficient room.
3439            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_ieee80211__common::HtCapabilities, D>(
3440            self.ht_caps.as_ref().map(<fidl_fuchsia_wlan_ieee80211__common::HtCapabilities as fidl::encoding::ValueTypeMarker>::borrow),
3441            encoder, offset + cur_offset, depth
3442        )?;
3443
3444            _prev_end_offset = cur_offset + envelope_size;
3445            if 4 > max_ordinal {
3446                return Ok(());
3447            }
3448
3449            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3450            // are envelope_size bytes.
3451            let cur_offset: usize = (4 - 1) * envelope_size;
3452
3453            // Zero reserved fields.
3454            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3455
3456            // Safety:
3457            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3458            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3459            //   envelope_size bytes, there is always sufficient room.
3460            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_ieee80211__common::VhtCapabilities, D>(
3461            self.vht_caps.as_ref().map(<fidl_fuchsia_wlan_ieee80211__common::VhtCapabilities as fidl::encoding::ValueTypeMarker>::borrow),
3462            encoder, offset + cur_offset, depth
3463        )?;
3464
3465            _prev_end_offset = cur_offset + envelope_size;
3466            if 5 > max_ordinal {
3467                return Ok(());
3468            }
3469
3470            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3471            // are envelope_size bytes.
3472            let cur_offset: usize = (5 - 1) * envelope_size;
3473
3474            // Zero reserved fields.
3475            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3476
3477            // Safety:
3478            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3479            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3480            //   envelope_size bytes, there is always sufficient room.
3481            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 256>, D>(
3482                self.operating_channels.as_ref().map(
3483                    <fidl::encoding::Vector<u8, 256> as fidl::encoding::ValueTypeMarker>::borrow,
3484                ),
3485                encoder,
3486                offset + cur_offset,
3487                depth,
3488            )?;
3489
3490            _prev_end_offset = cur_offset + envelope_size;
3491
3492            Ok(())
3493        }
3494    }
3495
3496    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BandCapability {
3497        #[inline(always)]
3498        fn new_empty() -> Self {
3499            Self::default()
3500        }
3501
3502        unsafe fn decode(
3503            &mut self,
3504            decoder: &mut fidl::encoding::Decoder<'_, D>,
3505            offset: usize,
3506            mut depth: fidl::encoding::Depth,
3507        ) -> fidl::Result<()> {
3508            decoder.debug_check_bounds::<Self>(offset);
3509            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3510                None => return Err(fidl::Error::NotNullable),
3511                Some(len) => len,
3512            };
3513            // Calling decoder.out_of_line_offset(0) is not allowed.
3514            if len == 0 {
3515                return Ok(());
3516            };
3517            depth.increment()?;
3518            let envelope_size = 8;
3519            let bytes_len = len * envelope_size;
3520            let offset = decoder.out_of_line_offset(bytes_len)?;
3521            // Decode the envelope for each type.
3522            let mut _next_ordinal_to_read = 0;
3523            let mut next_offset = offset;
3524            let end_offset = offset + bytes_len;
3525            _next_ordinal_to_read += 1;
3526            if next_offset >= end_offset {
3527                return Ok(());
3528            }
3529
3530            // Decode unknown envelopes for gaps in ordinals.
3531            while _next_ordinal_to_read < 1 {
3532                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3533                _next_ordinal_to_read += 1;
3534                next_offset += envelope_size;
3535            }
3536
3537            let next_out_of_line = decoder.next_out_of_line();
3538            let handles_before = decoder.remaining_handles();
3539            if let Some((inlined, num_bytes, num_handles)) =
3540                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3541            {
3542                let member_inline_size = <fidl_fuchsia_wlan_ieee80211__common::WlanBand as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3543                if inlined != (member_inline_size <= 4) {
3544                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3545                }
3546                let inner_offset;
3547                let mut inner_depth = depth.clone();
3548                if inlined {
3549                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3550                    inner_offset = next_offset;
3551                } else {
3552                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3553                    inner_depth.increment()?;
3554                }
3555                let val_ref = self.band.get_or_insert_with(|| {
3556                    fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::WlanBand, D)
3557                });
3558                fidl::decode!(
3559                    fidl_fuchsia_wlan_ieee80211__common::WlanBand,
3560                    D,
3561                    val_ref,
3562                    decoder,
3563                    inner_offset,
3564                    inner_depth
3565                )?;
3566                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3567                {
3568                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3569                }
3570                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3571                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3572                }
3573            }
3574
3575            next_offset += envelope_size;
3576            _next_ordinal_to_read += 1;
3577            if next_offset >= end_offset {
3578                return Ok(());
3579            }
3580
3581            // Decode unknown envelopes for gaps in ordinals.
3582            while _next_ordinal_to_read < 2 {
3583                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3584                _next_ordinal_to_read += 1;
3585                next_offset += envelope_size;
3586            }
3587
3588            let next_out_of_line = decoder.next_out_of_line();
3589            let handles_before = decoder.remaining_handles();
3590            if let Some((inlined, num_bytes, num_handles)) =
3591                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3592            {
3593                let member_inline_size =
3594                    <fidl::encoding::Vector<u8, 12> as fidl::encoding::TypeMarker>::inline_size(
3595                        decoder.context,
3596                    );
3597                if inlined != (member_inline_size <= 4) {
3598                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3599                }
3600                let inner_offset;
3601                let mut inner_depth = depth.clone();
3602                if inlined {
3603                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3604                    inner_offset = next_offset;
3605                } else {
3606                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3607                    inner_depth.increment()?;
3608                }
3609                let val_ref = self
3610                    .basic_rates
3611                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 12>, D));
3612                fidl::decode!(fidl::encoding::Vector<u8, 12>, D, val_ref, decoder, inner_offset, inner_depth)?;
3613                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3614                {
3615                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3616                }
3617                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3618                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3619                }
3620            }
3621
3622            next_offset += envelope_size;
3623            _next_ordinal_to_read += 1;
3624            if next_offset >= end_offset {
3625                return Ok(());
3626            }
3627
3628            // Decode unknown envelopes for gaps in ordinals.
3629            while _next_ordinal_to_read < 3 {
3630                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3631                _next_ordinal_to_read += 1;
3632                next_offset += envelope_size;
3633            }
3634
3635            let next_out_of_line = decoder.next_out_of_line();
3636            let handles_before = decoder.remaining_handles();
3637            if let Some((inlined, num_bytes, num_handles)) =
3638                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3639            {
3640                let member_inline_size = <fidl_fuchsia_wlan_ieee80211__common::HtCapabilities as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3641                if inlined != (member_inline_size <= 4) {
3642                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3643                }
3644                let inner_offset;
3645                let mut inner_depth = depth.clone();
3646                if inlined {
3647                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3648                    inner_offset = next_offset;
3649                } else {
3650                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3651                    inner_depth.increment()?;
3652                }
3653                let val_ref = self.ht_caps.get_or_insert_with(|| {
3654                    fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::HtCapabilities, D)
3655                });
3656                fidl::decode!(
3657                    fidl_fuchsia_wlan_ieee80211__common::HtCapabilities,
3658                    D,
3659                    val_ref,
3660                    decoder,
3661                    inner_offset,
3662                    inner_depth
3663                )?;
3664                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3665                {
3666                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3667                }
3668                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3669                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3670                }
3671            }
3672
3673            next_offset += envelope_size;
3674            _next_ordinal_to_read += 1;
3675            if next_offset >= end_offset {
3676                return Ok(());
3677            }
3678
3679            // Decode unknown envelopes for gaps in ordinals.
3680            while _next_ordinal_to_read < 4 {
3681                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3682                _next_ordinal_to_read += 1;
3683                next_offset += envelope_size;
3684            }
3685
3686            let next_out_of_line = decoder.next_out_of_line();
3687            let handles_before = decoder.remaining_handles();
3688            if let Some((inlined, num_bytes, num_handles)) =
3689                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3690            {
3691                let member_inline_size = <fidl_fuchsia_wlan_ieee80211__common::VhtCapabilities as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3692                if inlined != (member_inline_size <= 4) {
3693                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3694                }
3695                let inner_offset;
3696                let mut inner_depth = depth.clone();
3697                if inlined {
3698                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3699                    inner_offset = next_offset;
3700                } else {
3701                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3702                    inner_depth.increment()?;
3703                }
3704                let val_ref = self.vht_caps.get_or_insert_with(|| {
3705                    fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::VhtCapabilities, D)
3706                });
3707                fidl::decode!(
3708                    fidl_fuchsia_wlan_ieee80211__common::VhtCapabilities,
3709                    D,
3710                    val_ref,
3711                    decoder,
3712                    inner_offset,
3713                    inner_depth
3714                )?;
3715                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3716                {
3717                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3718                }
3719                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3720                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3721                }
3722            }
3723
3724            next_offset += envelope_size;
3725            _next_ordinal_to_read += 1;
3726            if next_offset >= end_offset {
3727                return Ok(());
3728            }
3729
3730            // Decode unknown envelopes for gaps in ordinals.
3731            while _next_ordinal_to_read < 5 {
3732                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3733                _next_ordinal_to_read += 1;
3734                next_offset += envelope_size;
3735            }
3736
3737            let next_out_of_line = decoder.next_out_of_line();
3738            let handles_before = decoder.remaining_handles();
3739            if let Some((inlined, num_bytes, num_handles)) =
3740                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3741            {
3742                let member_inline_size =
3743                    <fidl::encoding::Vector<u8, 256> as fidl::encoding::TypeMarker>::inline_size(
3744                        decoder.context,
3745                    );
3746                if inlined != (member_inline_size <= 4) {
3747                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3748                }
3749                let inner_offset;
3750                let mut inner_depth = depth.clone();
3751                if inlined {
3752                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3753                    inner_offset = next_offset;
3754                } else {
3755                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3756                    inner_depth.increment()?;
3757                }
3758                let val_ref = self
3759                    .operating_channels
3760                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 256>, D));
3761                fidl::decode!(fidl::encoding::Vector<u8, 256>, D, val_ref, decoder, inner_offset, inner_depth)?;
3762                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3763                {
3764                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3765                }
3766                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3767                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3768                }
3769            }
3770
3771            next_offset += envelope_size;
3772
3773            // Decode the remaining unknown envelopes.
3774            while next_offset < end_offset {
3775                _next_ordinal_to_read += 1;
3776                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3777                next_offset += envelope_size;
3778            }
3779
3780            Ok(())
3781        }
3782    }
3783
3784    impl SaeFrame {
3785        #[inline(always)]
3786        fn max_ordinal_present(&self) -> u64 {
3787            if let Some(_) = self.sae_fields {
3788                return 4;
3789            }
3790            if let Some(_) = self.seq_num {
3791                return 3;
3792            }
3793            if let Some(_) = self.status_code {
3794                return 2;
3795            }
3796            if let Some(_) = self.peer_sta_address {
3797                return 1;
3798            }
3799            0
3800        }
3801    }
3802
3803    impl fidl::encoding::ValueTypeMarker for SaeFrame {
3804        type Borrowed<'a> = &'a Self;
3805        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3806            value
3807        }
3808    }
3809
3810    unsafe impl fidl::encoding::TypeMarker for SaeFrame {
3811        type Owned = Self;
3812
3813        #[inline(always)]
3814        fn inline_align(_context: fidl::encoding::Context) -> usize {
3815            8
3816        }
3817
3818        #[inline(always)]
3819        fn inline_size(_context: fidl::encoding::Context) -> usize {
3820            16
3821        }
3822    }
3823
3824    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SaeFrame, D> for &SaeFrame {
3825        unsafe fn encode(
3826            self,
3827            encoder: &mut fidl::encoding::Encoder<'_, D>,
3828            offset: usize,
3829            mut depth: fidl::encoding::Depth,
3830        ) -> fidl::Result<()> {
3831            encoder.debug_check_bounds::<SaeFrame>(offset);
3832            // Vector header
3833            let max_ordinal: u64 = self.max_ordinal_present();
3834            encoder.write_num(max_ordinal, offset);
3835            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3836            // Calling encoder.out_of_line_offset(0) is not allowed.
3837            if max_ordinal == 0 {
3838                return Ok(());
3839            }
3840            depth.increment()?;
3841            let envelope_size = 8;
3842            let bytes_len = max_ordinal as usize * envelope_size;
3843            #[allow(unused_variables)]
3844            let offset = encoder.out_of_line_offset(bytes_len);
3845            let mut _prev_end_offset: usize = 0;
3846            if 1 > max_ordinal {
3847                return Ok(());
3848            }
3849
3850            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3851            // are envelope_size bytes.
3852            let cur_offset: usize = (1 - 1) * envelope_size;
3853
3854            // Zero reserved fields.
3855            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3856
3857            // Safety:
3858            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3859            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3860            //   envelope_size bytes, there is always sufficient room.
3861            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
3862                self.peer_sta_address
3863                    .as_ref()
3864                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
3865                encoder,
3866                offset + cur_offset,
3867                depth,
3868            )?;
3869
3870            _prev_end_offset = cur_offset + envelope_size;
3871            if 2 > max_ordinal {
3872                return Ok(());
3873            }
3874
3875            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3876            // are envelope_size bytes.
3877            let cur_offset: usize = (2 - 1) * envelope_size;
3878
3879            // Zero reserved fields.
3880            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3881
3882            // Safety:
3883            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3884            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3885            //   envelope_size bytes, there is always sufficient room.
3886            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_ieee80211__common::StatusCode, D>(
3887            self.status_code.as_ref().map(<fidl_fuchsia_wlan_ieee80211__common::StatusCode as fidl::encoding::ValueTypeMarker>::borrow),
3888            encoder, offset + cur_offset, depth
3889        )?;
3890
3891            _prev_end_offset = cur_offset + envelope_size;
3892            if 3 > max_ordinal {
3893                return Ok(());
3894            }
3895
3896            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3897            // are envelope_size bytes.
3898            let cur_offset: usize = (3 - 1) * envelope_size;
3899
3900            // Zero reserved fields.
3901            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3902
3903            // Safety:
3904            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3905            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3906            //   envelope_size bytes, there is always sufficient room.
3907            fidl::encoding::encode_in_envelope_optional::<u16, D>(
3908                self.seq_num.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
3909                encoder,
3910                offset + cur_offset,
3911                depth,
3912            )?;
3913
3914            _prev_end_offset = cur_offset + envelope_size;
3915            if 4 > max_ordinal {
3916                return Ok(());
3917            }
3918
3919            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3920            // are envelope_size bytes.
3921            let cur_offset: usize = (4 - 1) * envelope_size;
3922
3923            // Zero reserved fields.
3924            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3925
3926            // Safety:
3927            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3928            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3929            //   envelope_size bytes, there is always sufficient room.
3930            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<u8>, D>(
3931            self.sae_fields.as_ref().map(<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow),
3932            encoder, offset + cur_offset, depth
3933        )?;
3934
3935            _prev_end_offset = cur_offset + envelope_size;
3936
3937            Ok(())
3938        }
3939    }
3940
3941    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SaeFrame {
3942        #[inline(always)]
3943        fn new_empty() -> Self {
3944            Self::default()
3945        }
3946
3947        unsafe fn decode(
3948            &mut self,
3949            decoder: &mut fidl::encoding::Decoder<'_, D>,
3950            offset: usize,
3951            mut depth: fidl::encoding::Depth,
3952        ) -> fidl::Result<()> {
3953            decoder.debug_check_bounds::<Self>(offset);
3954            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3955                None => return Err(fidl::Error::NotNullable),
3956                Some(len) => len,
3957            };
3958            // Calling decoder.out_of_line_offset(0) is not allowed.
3959            if len == 0 {
3960                return Ok(());
3961            };
3962            depth.increment()?;
3963            let envelope_size = 8;
3964            let bytes_len = len * envelope_size;
3965            let offset = decoder.out_of_line_offset(bytes_len)?;
3966            // Decode the envelope for each type.
3967            let mut _next_ordinal_to_read = 0;
3968            let mut next_offset = offset;
3969            let end_offset = offset + bytes_len;
3970            _next_ordinal_to_read += 1;
3971            if next_offset >= end_offset {
3972                return Ok(());
3973            }
3974
3975            // Decode unknown envelopes for gaps in ordinals.
3976            while _next_ordinal_to_read < 1 {
3977                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3978                _next_ordinal_to_read += 1;
3979                next_offset += envelope_size;
3980            }
3981
3982            let next_out_of_line = decoder.next_out_of_line();
3983            let handles_before = decoder.remaining_handles();
3984            if let Some((inlined, num_bytes, num_handles)) =
3985                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3986            {
3987                let member_inline_size =
3988                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
3989                        decoder.context,
3990                    );
3991                if inlined != (member_inline_size <= 4) {
3992                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3993                }
3994                let inner_offset;
3995                let mut inner_depth = depth.clone();
3996                if inlined {
3997                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3998                    inner_offset = next_offset;
3999                } else {
4000                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4001                    inner_depth.increment()?;
4002                }
4003                let val_ref = self
4004                    .peer_sta_address
4005                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
4006                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
4007                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4008                {
4009                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4010                }
4011                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4012                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4013                }
4014            }
4015
4016            next_offset += envelope_size;
4017            _next_ordinal_to_read += 1;
4018            if next_offset >= end_offset {
4019                return Ok(());
4020            }
4021
4022            // Decode unknown envelopes for gaps in ordinals.
4023            while _next_ordinal_to_read < 2 {
4024                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4025                _next_ordinal_to_read += 1;
4026                next_offset += envelope_size;
4027            }
4028
4029            let next_out_of_line = decoder.next_out_of_line();
4030            let handles_before = decoder.remaining_handles();
4031            if let Some((inlined, num_bytes, num_handles)) =
4032                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4033            {
4034                let member_inline_size = <fidl_fuchsia_wlan_ieee80211__common::StatusCode as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4035                if inlined != (member_inline_size <= 4) {
4036                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4037                }
4038                let inner_offset;
4039                let mut inner_depth = depth.clone();
4040                if inlined {
4041                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4042                    inner_offset = next_offset;
4043                } else {
4044                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4045                    inner_depth.increment()?;
4046                }
4047                let val_ref = self.status_code.get_or_insert_with(|| {
4048                    fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::StatusCode, D)
4049                });
4050                fidl::decode!(
4051                    fidl_fuchsia_wlan_ieee80211__common::StatusCode,
4052                    D,
4053                    val_ref,
4054                    decoder,
4055                    inner_offset,
4056                    inner_depth
4057                )?;
4058                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4059                {
4060                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4061                }
4062                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4063                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4064                }
4065            }
4066
4067            next_offset += envelope_size;
4068            _next_ordinal_to_read += 1;
4069            if next_offset >= end_offset {
4070                return Ok(());
4071            }
4072
4073            // Decode unknown envelopes for gaps in ordinals.
4074            while _next_ordinal_to_read < 3 {
4075                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4076                _next_ordinal_to_read += 1;
4077                next_offset += envelope_size;
4078            }
4079
4080            let next_out_of_line = decoder.next_out_of_line();
4081            let handles_before = decoder.remaining_handles();
4082            if let Some((inlined, num_bytes, num_handles)) =
4083                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4084            {
4085                let member_inline_size =
4086                    <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4087                if inlined != (member_inline_size <= 4) {
4088                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4089                }
4090                let inner_offset;
4091                let mut inner_depth = depth.clone();
4092                if inlined {
4093                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4094                    inner_offset = next_offset;
4095                } else {
4096                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4097                    inner_depth.increment()?;
4098                }
4099                let val_ref = self.seq_num.get_or_insert_with(|| fidl::new_empty!(u16, D));
4100                fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
4101                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4102                {
4103                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4104                }
4105                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4106                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4107                }
4108            }
4109
4110            next_offset += envelope_size;
4111            _next_ordinal_to_read += 1;
4112            if next_offset >= end_offset {
4113                return Ok(());
4114            }
4115
4116            // Decode unknown envelopes for gaps in ordinals.
4117            while _next_ordinal_to_read < 4 {
4118                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4119                _next_ordinal_to_read += 1;
4120                next_offset += envelope_size;
4121            }
4122
4123            let next_out_of_line = decoder.next_out_of_line();
4124            let handles_before = decoder.remaining_handles();
4125            if let Some((inlined, num_bytes, num_handles)) =
4126                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4127            {
4128                let member_inline_size = <fidl::encoding::UnboundedVector<u8> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4129                if inlined != (member_inline_size <= 4) {
4130                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4131                }
4132                let inner_offset;
4133                let mut inner_depth = depth.clone();
4134                if inlined {
4135                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4136                    inner_offset = next_offset;
4137                } else {
4138                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4139                    inner_depth.increment()?;
4140                }
4141                let val_ref = self.sae_fields.get_or_insert_with(|| {
4142                    fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D)
4143                });
4144                fidl::decode!(
4145                    fidl::encoding::UnboundedVector<u8>,
4146                    D,
4147                    val_ref,
4148                    decoder,
4149                    inner_offset,
4150                    inner_depth
4151                )?;
4152                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4153                {
4154                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4155                }
4156                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4157                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4158                }
4159            }
4160
4161            next_offset += envelope_size;
4162
4163            // Decode the remaining unknown envelopes.
4164            while next_offset < end_offset {
4165                _next_ordinal_to_read += 1;
4166                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4167                next_offset += envelope_size;
4168            }
4169
4170            Ok(())
4171        }
4172    }
4173
4174    impl WlanFullmacImplAssocRespRequest {
4175        #[inline(always)]
4176        fn max_ordinal_present(&self) -> u64 {
4177            if let Some(_) = self.association_id {
4178                return 3;
4179            }
4180            if let Some(_) = self.result_code {
4181                return 2;
4182            }
4183            if let Some(_) = self.peer_sta_address {
4184                return 1;
4185            }
4186            0
4187        }
4188    }
4189
4190    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplAssocRespRequest {
4191        type Borrowed<'a> = &'a Self;
4192        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4193            value
4194        }
4195    }
4196
4197    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplAssocRespRequest {
4198        type Owned = Self;
4199
4200        #[inline(always)]
4201        fn inline_align(_context: fidl::encoding::Context) -> usize {
4202            8
4203        }
4204
4205        #[inline(always)]
4206        fn inline_size(_context: fidl::encoding::Context) -> usize {
4207            16
4208        }
4209    }
4210
4211    unsafe impl<D: fidl::encoding::ResourceDialect>
4212        fidl::encoding::Encode<WlanFullmacImplAssocRespRequest, D>
4213        for &WlanFullmacImplAssocRespRequest
4214    {
4215        unsafe fn encode(
4216            self,
4217            encoder: &mut fidl::encoding::Encoder<'_, D>,
4218            offset: usize,
4219            mut depth: fidl::encoding::Depth,
4220        ) -> fidl::Result<()> {
4221            encoder.debug_check_bounds::<WlanFullmacImplAssocRespRequest>(offset);
4222            // Vector header
4223            let max_ordinal: u64 = self.max_ordinal_present();
4224            encoder.write_num(max_ordinal, offset);
4225            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4226            // Calling encoder.out_of_line_offset(0) is not allowed.
4227            if max_ordinal == 0 {
4228                return Ok(());
4229            }
4230            depth.increment()?;
4231            let envelope_size = 8;
4232            let bytes_len = max_ordinal as usize * envelope_size;
4233            #[allow(unused_variables)]
4234            let offset = encoder.out_of_line_offset(bytes_len);
4235            let mut _prev_end_offset: usize = 0;
4236            if 1 > max_ordinal {
4237                return Ok(());
4238            }
4239
4240            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4241            // are envelope_size bytes.
4242            let cur_offset: usize = (1 - 1) * envelope_size;
4243
4244            // Zero reserved fields.
4245            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4246
4247            // Safety:
4248            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4249            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4250            //   envelope_size bytes, there is always sufficient room.
4251            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
4252                self.peer_sta_address
4253                    .as_ref()
4254                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
4255                encoder,
4256                offset + cur_offset,
4257                depth,
4258            )?;
4259
4260            _prev_end_offset = cur_offset + envelope_size;
4261            if 2 > max_ordinal {
4262                return Ok(());
4263            }
4264
4265            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4266            // are envelope_size bytes.
4267            let cur_offset: usize = (2 - 1) * envelope_size;
4268
4269            // Zero reserved fields.
4270            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4271
4272            // Safety:
4273            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4274            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4275            //   envelope_size bytes, there is always sufficient room.
4276            fidl::encoding::encode_in_envelope_optional::<WlanAssocResult, D>(
4277                self.result_code
4278                    .as_ref()
4279                    .map(<WlanAssocResult as fidl::encoding::ValueTypeMarker>::borrow),
4280                encoder,
4281                offset + cur_offset,
4282                depth,
4283            )?;
4284
4285            _prev_end_offset = cur_offset + envelope_size;
4286            if 3 > max_ordinal {
4287                return Ok(());
4288            }
4289
4290            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4291            // are envelope_size bytes.
4292            let cur_offset: usize = (3 - 1) * envelope_size;
4293
4294            // Zero reserved fields.
4295            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4296
4297            // Safety:
4298            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4299            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4300            //   envelope_size bytes, there is always sufficient room.
4301            fidl::encoding::encode_in_envelope_optional::<u16, D>(
4302                self.association_id.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
4303                encoder,
4304                offset + cur_offset,
4305                depth,
4306            )?;
4307
4308            _prev_end_offset = cur_offset + envelope_size;
4309
4310            Ok(())
4311        }
4312    }
4313
4314    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4315        for WlanFullmacImplAssocRespRequest
4316    {
4317        #[inline(always)]
4318        fn new_empty() -> Self {
4319            Self::default()
4320        }
4321
4322        unsafe fn decode(
4323            &mut self,
4324            decoder: &mut fidl::encoding::Decoder<'_, D>,
4325            offset: usize,
4326            mut depth: fidl::encoding::Depth,
4327        ) -> fidl::Result<()> {
4328            decoder.debug_check_bounds::<Self>(offset);
4329            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4330                None => return Err(fidl::Error::NotNullable),
4331                Some(len) => len,
4332            };
4333            // Calling decoder.out_of_line_offset(0) is not allowed.
4334            if len == 0 {
4335                return Ok(());
4336            };
4337            depth.increment()?;
4338            let envelope_size = 8;
4339            let bytes_len = len * envelope_size;
4340            let offset = decoder.out_of_line_offset(bytes_len)?;
4341            // Decode the envelope for each type.
4342            let mut _next_ordinal_to_read = 0;
4343            let mut next_offset = offset;
4344            let end_offset = offset + bytes_len;
4345            _next_ordinal_to_read += 1;
4346            if next_offset >= end_offset {
4347                return Ok(());
4348            }
4349
4350            // Decode unknown envelopes for gaps in ordinals.
4351            while _next_ordinal_to_read < 1 {
4352                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4353                _next_ordinal_to_read += 1;
4354                next_offset += envelope_size;
4355            }
4356
4357            let next_out_of_line = decoder.next_out_of_line();
4358            let handles_before = decoder.remaining_handles();
4359            if let Some((inlined, num_bytes, num_handles)) =
4360                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4361            {
4362                let member_inline_size =
4363                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
4364                        decoder.context,
4365                    );
4366                if inlined != (member_inline_size <= 4) {
4367                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4368                }
4369                let inner_offset;
4370                let mut inner_depth = depth.clone();
4371                if inlined {
4372                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4373                    inner_offset = next_offset;
4374                } else {
4375                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4376                    inner_depth.increment()?;
4377                }
4378                let val_ref = self
4379                    .peer_sta_address
4380                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
4381                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
4382                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4383                {
4384                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4385                }
4386                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4387                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4388                }
4389            }
4390
4391            next_offset += envelope_size;
4392            _next_ordinal_to_read += 1;
4393            if next_offset >= end_offset {
4394                return Ok(());
4395            }
4396
4397            // Decode unknown envelopes for gaps in ordinals.
4398            while _next_ordinal_to_read < 2 {
4399                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4400                _next_ordinal_to_read += 1;
4401                next_offset += envelope_size;
4402            }
4403
4404            let next_out_of_line = decoder.next_out_of_line();
4405            let handles_before = decoder.remaining_handles();
4406            if let Some((inlined, num_bytes, num_handles)) =
4407                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4408            {
4409                let member_inline_size =
4410                    <WlanAssocResult as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4411                if inlined != (member_inline_size <= 4) {
4412                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4413                }
4414                let inner_offset;
4415                let mut inner_depth = depth.clone();
4416                if inlined {
4417                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4418                    inner_offset = next_offset;
4419                } else {
4420                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4421                    inner_depth.increment()?;
4422                }
4423                let val_ref =
4424                    self.result_code.get_or_insert_with(|| fidl::new_empty!(WlanAssocResult, D));
4425                fidl::decode!(WlanAssocResult, D, val_ref, decoder, inner_offset, inner_depth)?;
4426                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4427                {
4428                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4429                }
4430                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4431                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4432                }
4433            }
4434
4435            next_offset += envelope_size;
4436            _next_ordinal_to_read += 1;
4437            if next_offset >= end_offset {
4438                return Ok(());
4439            }
4440
4441            // Decode unknown envelopes for gaps in ordinals.
4442            while _next_ordinal_to_read < 3 {
4443                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4444                _next_ordinal_to_read += 1;
4445                next_offset += envelope_size;
4446            }
4447
4448            let next_out_of_line = decoder.next_out_of_line();
4449            let handles_before = decoder.remaining_handles();
4450            if let Some((inlined, num_bytes, num_handles)) =
4451                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4452            {
4453                let member_inline_size =
4454                    <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4455                if inlined != (member_inline_size <= 4) {
4456                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4457                }
4458                let inner_offset;
4459                let mut inner_depth = depth.clone();
4460                if inlined {
4461                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4462                    inner_offset = next_offset;
4463                } else {
4464                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4465                    inner_depth.increment()?;
4466                }
4467                let val_ref = self.association_id.get_or_insert_with(|| fidl::new_empty!(u16, D));
4468                fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
4469                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4470                {
4471                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4472                }
4473                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4474                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4475                }
4476            }
4477
4478            next_offset += envelope_size;
4479
4480            // Decode the remaining unknown envelopes.
4481            while next_offset < end_offset {
4482                _next_ordinal_to_read += 1;
4483                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4484                next_offset += envelope_size;
4485            }
4486
4487            Ok(())
4488        }
4489    }
4490
4491    impl WlanFullmacImplAuthRespRequest {
4492        #[inline(always)]
4493        fn max_ordinal_present(&self) -> u64 {
4494            if let Some(_) = self.result_code {
4495                return 2;
4496            }
4497            if let Some(_) = self.peer_sta_address {
4498                return 1;
4499            }
4500            0
4501        }
4502    }
4503
4504    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplAuthRespRequest {
4505        type Borrowed<'a> = &'a Self;
4506        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4507            value
4508        }
4509    }
4510
4511    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplAuthRespRequest {
4512        type Owned = Self;
4513
4514        #[inline(always)]
4515        fn inline_align(_context: fidl::encoding::Context) -> usize {
4516            8
4517        }
4518
4519        #[inline(always)]
4520        fn inline_size(_context: fidl::encoding::Context) -> usize {
4521            16
4522        }
4523    }
4524
4525    unsafe impl<D: fidl::encoding::ResourceDialect>
4526        fidl::encoding::Encode<WlanFullmacImplAuthRespRequest, D>
4527        for &WlanFullmacImplAuthRespRequest
4528    {
4529        unsafe fn encode(
4530            self,
4531            encoder: &mut fidl::encoding::Encoder<'_, D>,
4532            offset: usize,
4533            mut depth: fidl::encoding::Depth,
4534        ) -> fidl::Result<()> {
4535            encoder.debug_check_bounds::<WlanFullmacImplAuthRespRequest>(offset);
4536            // Vector header
4537            let max_ordinal: u64 = self.max_ordinal_present();
4538            encoder.write_num(max_ordinal, offset);
4539            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4540            // Calling encoder.out_of_line_offset(0) is not allowed.
4541            if max_ordinal == 0 {
4542                return Ok(());
4543            }
4544            depth.increment()?;
4545            let envelope_size = 8;
4546            let bytes_len = max_ordinal as usize * envelope_size;
4547            #[allow(unused_variables)]
4548            let offset = encoder.out_of_line_offset(bytes_len);
4549            let mut _prev_end_offset: usize = 0;
4550            if 1 > max_ordinal {
4551                return Ok(());
4552            }
4553
4554            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4555            // are envelope_size bytes.
4556            let cur_offset: usize = (1 - 1) * envelope_size;
4557
4558            // Zero reserved fields.
4559            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4560
4561            // Safety:
4562            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4563            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4564            //   envelope_size bytes, there is always sufficient room.
4565            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
4566                self.peer_sta_address
4567                    .as_ref()
4568                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
4569                encoder,
4570                offset + cur_offset,
4571                depth,
4572            )?;
4573
4574            _prev_end_offset = cur_offset + envelope_size;
4575            if 2 > max_ordinal {
4576                return Ok(());
4577            }
4578
4579            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4580            // are envelope_size bytes.
4581            let cur_offset: usize = (2 - 1) * envelope_size;
4582
4583            // Zero reserved fields.
4584            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4585
4586            // Safety:
4587            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4588            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4589            //   envelope_size bytes, there is always sufficient room.
4590            fidl::encoding::encode_in_envelope_optional::<WlanAuthResult, D>(
4591                self.result_code
4592                    .as_ref()
4593                    .map(<WlanAuthResult as fidl::encoding::ValueTypeMarker>::borrow),
4594                encoder,
4595                offset + cur_offset,
4596                depth,
4597            )?;
4598
4599            _prev_end_offset = cur_offset + envelope_size;
4600
4601            Ok(())
4602        }
4603    }
4604
4605    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4606        for WlanFullmacImplAuthRespRequest
4607    {
4608        #[inline(always)]
4609        fn new_empty() -> Self {
4610            Self::default()
4611        }
4612
4613        unsafe fn decode(
4614            &mut self,
4615            decoder: &mut fidl::encoding::Decoder<'_, D>,
4616            offset: usize,
4617            mut depth: fidl::encoding::Depth,
4618        ) -> fidl::Result<()> {
4619            decoder.debug_check_bounds::<Self>(offset);
4620            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4621                None => return Err(fidl::Error::NotNullable),
4622                Some(len) => len,
4623            };
4624            // Calling decoder.out_of_line_offset(0) is not allowed.
4625            if len == 0 {
4626                return Ok(());
4627            };
4628            depth.increment()?;
4629            let envelope_size = 8;
4630            let bytes_len = len * envelope_size;
4631            let offset = decoder.out_of_line_offset(bytes_len)?;
4632            // Decode the envelope for each type.
4633            let mut _next_ordinal_to_read = 0;
4634            let mut next_offset = offset;
4635            let end_offset = offset + bytes_len;
4636            _next_ordinal_to_read += 1;
4637            if next_offset >= end_offset {
4638                return Ok(());
4639            }
4640
4641            // Decode unknown envelopes for gaps in ordinals.
4642            while _next_ordinal_to_read < 1 {
4643                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4644                _next_ordinal_to_read += 1;
4645                next_offset += envelope_size;
4646            }
4647
4648            let next_out_of_line = decoder.next_out_of_line();
4649            let handles_before = decoder.remaining_handles();
4650            if let Some((inlined, num_bytes, num_handles)) =
4651                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4652            {
4653                let member_inline_size =
4654                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
4655                        decoder.context,
4656                    );
4657                if inlined != (member_inline_size <= 4) {
4658                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4659                }
4660                let inner_offset;
4661                let mut inner_depth = depth.clone();
4662                if inlined {
4663                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4664                    inner_offset = next_offset;
4665                } else {
4666                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4667                    inner_depth.increment()?;
4668                }
4669                let val_ref = self
4670                    .peer_sta_address
4671                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
4672                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
4673                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4674                {
4675                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4676                }
4677                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4678                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4679                }
4680            }
4681
4682            next_offset += envelope_size;
4683            _next_ordinal_to_read += 1;
4684            if next_offset >= end_offset {
4685                return Ok(());
4686            }
4687
4688            // Decode unknown envelopes for gaps in ordinals.
4689            while _next_ordinal_to_read < 2 {
4690                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4691                _next_ordinal_to_read += 1;
4692                next_offset += envelope_size;
4693            }
4694
4695            let next_out_of_line = decoder.next_out_of_line();
4696            let handles_before = decoder.remaining_handles();
4697            if let Some((inlined, num_bytes, num_handles)) =
4698                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4699            {
4700                let member_inline_size =
4701                    <WlanAuthResult as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4702                if inlined != (member_inline_size <= 4) {
4703                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4704                }
4705                let inner_offset;
4706                let mut inner_depth = depth.clone();
4707                if inlined {
4708                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4709                    inner_offset = next_offset;
4710                } else {
4711                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4712                    inner_depth.increment()?;
4713                }
4714                let val_ref =
4715                    self.result_code.get_or_insert_with(|| fidl::new_empty!(WlanAuthResult, D));
4716                fidl::decode!(WlanAuthResult, D, val_ref, decoder, inner_offset, inner_depth)?;
4717                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4718                {
4719                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4720                }
4721                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4722                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4723                }
4724            }
4725
4726            next_offset += envelope_size;
4727
4728            // Decode the remaining unknown envelopes.
4729            while next_offset < end_offset {
4730                _next_ordinal_to_read += 1;
4731                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4732                next_offset += envelope_size;
4733            }
4734
4735            Ok(())
4736        }
4737    }
4738
4739    impl WlanFullmacImplConnectRequest {
4740        #[inline(always)]
4741        fn max_ordinal_present(&self) -> u64 {
4742            if let Some(_) = self.wep_key_desc {
4743                return 7;
4744            }
4745            if let Some(_) = self.security_ie {
4746                return 6;
4747            }
4748            if let Some(_) = self.wep_key {
4749                return 5;
4750            }
4751            if let Some(_) = self.sae_password {
4752                return 4;
4753            }
4754            if let Some(_) = self.auth_type {
4755                return 3;
4756            }
4757            if let Some(_) = self.connect_failure_timeout {
4758                return 2;
4759            }
4760            if let Some(_) = self.selected_bss {
4761                return 1;
4762            }
4763            0
4764        }
4765    }
4766
4767    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplConnectRequest {
4768        type Borrowed<'a> = &'a Self;
4769        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4770            value
4771        }
4772    }
4773
4774    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplConnectRequest {
4775        type Owned = Self;
4776
4777        #[inline(always)]
4778        fn inline_align(_context: fidl::encoding::Context) -> usize {
4779            8
4780        }
4781
4782        #[inline(always)]
4783        fn inline_size(_context: fidl::encoding::Context) -> usize {
4784            16
4785        }
4786    }
4787
4788    unsafe impl<D: fidl::encoding::ResourceDialect>
4789        fidl::encoding::Encode<WlanFullmacImplConnectRequest, D>
4790        for &WlanFullmacImplConnectRequest
4791    {
4792        unsafe fn encode(
4793            self,
4794            encoder: &mut fidl::encoding::Encoder<'_, D>,
4795            offset: usize,
4796            mut depth: fidl::encoding::Depth,
4797        ) -> fidl::Result<()> {
4798            encoder.debug_check_bounds::<WlanFullmacImplConnectRequest>(offset);
4799            // Vector header
4800            let max_ordinal: u64 = self.max_ordinal_present();
4801            encoder.write_num(max_ordinal, offset);
4802            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4803            // Calling encoder.out_of_line_offset(0) is not allowed.
4804            if max_ordinal == 0 {
4805                return Ok(());
4806            }
4807            depth.increment()?;
4808            let envelope_size = 8;
4809            let bytes_len = max_ordinal as usize * envelope_size;
4810            #[allow(unused_variables)]
4811            let offset = encoder.out_of_line_offset(bytes_len);
4812            let mut _prev_end_offset: usize = 0;
4813            if 1 > max_ordinal {
4814                return Ok(());
4815            }
4816
4817            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4818            // are envelope_size bytes.
4819            let cur_offset: usize = (1 - 1) * envelope_size;
4820
4821            // Zero reserved fields.
4822            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4823
4824            // Safety:
4825            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4826            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4827            //   envelope_size bytes, there is always sufficient room.
4828            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_common__common::BssDescription, D>(
4829            self.selected_bss.as_ref().map(<fidl_fuchsia_wlan_common__common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow),
4830            encoder, offset + cur_offset, depth
4831        )?;
4832
4833            _prev_end_offset = cur_offset + envelope_size;
4834            if 2 > max_ordinal {
4835                return Ok(());
4836            }
4837
4838            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4839            // are envelope_size bytes.
4840            let cur_offset: usize = (2 - 1) * envelope_size;
4841
4842            // Zero reserved fields.
4843            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4844
4845            // Safety:
4846            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4847            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4848            //   envelope_size bytes, there is always sufficient room.
4849            fidl::encoding::encode_in_envelope_optional::<u32, D>(
4850                self.connect_failure_timeout
4851                    .as_ref()
4852                    .map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
4853                encoder,
4854                offset + cur_offset,
4855                depth,
4856            )?;
4857
4858            _prev_end_offset = cur_offset + envelope_size;
4859            if 3 > max_ordinal {
4860                return Ok(());
4861            }
4862
4863            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4864            // are envelope_size bytes.
4865            let cur_offset: usize = (3 - 1) * envelope_size;
4866
4867            // Zero reserved fields.
4868            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4869
4870            // Safety:
4871            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4872            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4873            //   envelope_size bytes, there is always sufficient room.
4874            fidl::encoding::encode_in_envelope_optional::<WlanAuthType, D>(
4875                self.auth_type
4876                    .as_ref()
4877                    .map(<WlanAuthType as fidl::encoding::ValueTypeMarker>::borrow),
4878                encoder,
4879                offset + cur_offset,
4880                depth,
4881            )?;
4882
4883            _prev_end_offset = cur_offset + envelope_size;
4884            if 4 > max_ordinal {
4885                return Ok(());
4886            }
4887
4888            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4889            // are envelope_size bytes.
4890            let cur_offset: usize = (4 - 1) * envelope_size;
4891
4892            // Zero reserved fields.
4893            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4894
4895            // Safety:
4896            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4897            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4898            //   envelope_size bytes, there is always sufficient room.
4899            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<u8>, D>(
4900            self.sae_password.as_ref().map(<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow),
4901            encoder, offset + cur_offset, depth
4902        )?;
4903
4904            _prev_end_offset = cur_offset + envelope_size;
4905            if 5 > max_ordinal {
4906                return Ok(());
4907            }
4908
4909            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4910            // are envelope_size bytes.
4911            let cur_offset: usize = (5 - 1) * envelope_size;
4912
4913            // Zero reserved fields.
4914            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4915
4916            // Safety:
4917            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4918            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4919            //   envelope_size bytes, there is always sufficient room.
4920            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_common__common::WlanKeyConfig, D>(
4921            self.wep_key.as_ref().map(<fidl_fuchsia_wlan_common__common::WlanKeyConfig as fidl::encoding::ValueTypeMarker>::borrow),
4922            encoder, offset + cur_offset, depth
4923        )?;
4924
4925            _prev_end_offset = cur_offset + envelope_size;
4926            if 6 > max_ordinal {
4927                return Ok(());
4928            }
4929
4930            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4931            // are envelope_size bytes.
4932            let cur_offset: usize = (6 - 1) * envelope_size;
4933
4934            // Zero reserved fields.
4935            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4936
4937            // Safety:
4938            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4939            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4940            //   envelope_size bytes, there is always sufficient room.
4941            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 257>, D>(
4942                self.security_ie.as_ref().map(
4943                    <fidl::encoding::Vector<u8, 257> as fidl::encoding::ValueTypeMarker>::borrow,
4944                ),
4945                encoder,
4946                offset + cur_offset,
4947                depth,
4948            )?;
4949
4950            _prev_end_offset = cur_offset + envelope_size;
4951            if 7 > max_ordinal {
4952                return Ok(());
4953            }
4954
4955            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4956            // are envelope_size bytes.
4957            let cur_offset: usize = (7 - 1) * envelope_size;
4958
4959            // Zero reserved fields.
4960            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4961
4962            // Safety:
4963            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4964            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4965            //   envelope_size bytes, there is always sufficient room.
4966            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_ieee80211__common::SetKeyDescriptor, D>(
4967            self.wep_key_desc.as_ref().map(<fidl_fuchsia_wlan_ieee80211__common::SetKeyDescriptor as fidl::encoding::ValueTypeMarker>::borrow),
4968            encoder, offset + cur_offset, depth
4969        )?;
4970
4971            _prev_end_offset = cur_offset + envelope_size;
4972
4973            Ok(())
4974        }
4975    }
4976
4977    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4978        for WlanFullmacImplConnectRequest
4979    {
4980        #[inline(always)]
4981        fn new_empty() -> Self {
4982            Self::default()
4983        }
4984
4985        unsafe fn decode(
4986            &mut self,
4987            decoder: &mut fidl::encoding::Decoder<'_, D>,
4988            offset: usize,
4989            mut depth: fidl::encoding::Depth,
4990        ) -> fidl::Result<()> {
4991            decoder.debug_check_bounds::<Self>(offset);
4992            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4993                None => return Err(fidl::Error::NotNullable),
4994                Some(len) => len,
4995            };
4996            // Calling decoder.out_of_line_offset(0) is not allowed.
4997            if len == 0 {
4998                return Ok(());
4999            };
5000            depth.increment()?;
5001            let envelope_size = 8;
5002            let bytes_len = len * envelope_size;
5003            let offset = decoder.out_of_line_offset(bytes_len)?;
5004            // Decode the envelope for each type.
5005            let mut _next_ordinal_to_read = 0;
5006            let mut next_offset = offset;
5007            let end_offset = offset + bytes_len;
5008            _next_ordinal_to_read += 1;
5009            if next_offset >= end_offset {
5010                return Ok(());
5011            }
5012
5013            // Decode unknown envelopes for gaps in ordinals.
5014            while _next_ordinal_to_read < 1 {
5015                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5016                _next_ordinal_to_read += 1;
5017                next_offset += envelope_size;
5018            }
5019
5020            let next_out_of_line = decoder.next_out_of_line();
5021            let handles_before = decoder.remaining_handles();
5022            if let Some((inlined, num_bytes, num_handles)) =
5023                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5024            {
5025                let member_inline_size = <fidl_fuchsia_wlan_common__common::BssDescription as fidl::encoding::TypeMarker>::inline_size(decoder.context);
5026                if inlined != (member_inline_size <= 4) {
5027                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5028                }
5029                let inner_offset;
5030                let mut inner_depth = depth.clone();
5031                if inlined {
5032                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5033                    inner_offset = next_offset;
5034                } else {
5035                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5036                    inner_depth.increment()?;
5037                }
5038                let val_ref = self.selected_bss.get_or_insert_with(|| {
5039                    fidl::new_empty!(fidl_fuchsia_wlan_common__common::BssDescription, D)
5040                });
5041                fidl::decode!(
5042                    fidl_fuchsia_wlan_common__common::BssDescription,
5043                    D,
5044                    val_ref,
5045                    decoder,
5046                    inner_offset,
5047                    inner_depth
5048                )?;
5049                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5050                {
5051                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5052                }
5053                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5054                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5055                }
5056            }
5057
5058            next_offset += envelope_size;
5059            _next_ordinal_to_read += 1;
5060            if next_offset >= end_offset {
5061                return Ok(());
5062            }
5063
5064            // Decode unknown envelopes for gaps in ordinals.
5065            while _next_ordinal_to_read < 2 {
5066                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5067                _next_ordinal_to_read += 1;
5068                next_offset += envelope_size;
5069            }
5070
5071            let next_out_of_line = decoder.next_out_of_line();
5072            let handles_before = decoder.remaining_handles();
5073            if let Some((inlined, num_bytes, num_handles)) =
5074                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5075            {
5076                let member_inline_size =
5077                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
5078                if inlined != (member_inline_size <= 4) {
5079                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5080                }
5081                let inner_offset;
5082                let mut inner_depth = depth.clone();
5083                if inlined {
5084                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5085                    inner_offset = next_offset;
5086                } else {
5087                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5088                    inner_depth.increment()?;
5089                }
5090                let val_ref =
5091                    self.connect_failure_timeout.get_or_insert_with(|| fidl::new_empty!(u32, D));
5092                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
5093                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5094                {
5095                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5096                }
5097                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5098                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5099                }
5100            }
5101
5102            next_offset += envelope_size;
5103            _next_ordinal_to_read += 1;
5104            if next_offset >= end_offset {
5105                return Ok(());
5106            }
5107
5108            // Decode unknown envelopes for gaps in ordinals.
5109            while _next_ordinal_to_read < 3 {
5110                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5111                _next_ordinal_to_read += 1;
5112                next_offset += envelope_size;
5113            }
5114
5115            let next_out_of_line = decoder.next_out_of_line();
5116            let handles_before = decoder.remaining_handles();
5117            if let Some((inlined, num_bytes, num_handles)) =
5118                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5119            {
5120                let member_inline_size =
5121                    <WlanAuthType as fidl::encoding::TypeMarker>::inline_size(decoder.context);
5122                if inlined != (member_inline_size <= 4) {
5123                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5124                }
5125                let inner_offset;
5126                let mut inner_depth = depth.clone();
5127                if inlined {
5128                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5129                    inner_offset = next_offset;
5130                } else {
5131                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5132                    inner_depth.increment()?;
5133                }
5134                let val_ref =
5135                    self.auth_type.get_or_insert_with(|| fidl::new_empty!(WlanAuthType, D));
5136                fidl::decode!(WlanAuthType, D, val_ref, decoder, inner_offset, inner_depth)?;
5137                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5138                {
5139                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5140                }
5141                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5142                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5143                }
5144            }
5145
5146            next_offset += envelope_size;
5147            _next_ordinal_to_read += 1;
5148            if next_offset >= end_offset {
5149                return Ok(());
5150            }
5151
5152            // Decode unknown envelopes for gaps in ordinals.
5153            while _next_ordinal_to_read < 4 {
5154                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5155                _next_ordinal_to_read += 1;
5156                next_offset += envelope_size;
5157            }
5158
5159            let next_out_of_line = decoder.next_out_of_line();
5160            let handles_before = decoder.remaining_handles();
5161            if let Some((inlined, num_bytes, num_handles)) =
5162                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5163            {
5164                let member_inline_size = <fidl::encoding::UnboundedVector<u8> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
5165                if inlined != (member_inline_size <= 4) {
5166                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5167                }
5168                let inner_offset;
5169                let mut inner_depth = depth.clone();
5170                if inlined {
5171                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5172                    inner_offset = next_offset;
5173                } else {
5174                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5175                    inner_depth.increment()?;
5176                }
5177                let val_ref = self.sae_password.get_or_insert_with(|| {
5178                    fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D)
5179                });
5180                fidl::decode!(
5181                    fidl::encoding::UnboundedVector<u8>,
5182                    D,
5183                    val_ref,
5184                    decoder,
5185                    inner_offset,
5186                    inner_depth
5187                )?;
5188                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5189                {
5190                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5191                }
5192                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5193                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5194                }
5195            }
5196
5197            next_offset += envelope_size;
5198            _next_ordinal_to_read += 1;
5199            if next_offset >= end_offset {
5200                return Ok(());
5201            }
5202
5203            // Decode unknown envelopes for gaps in ordinals.
5204            while _next_ordinal_to_read < 5 {
5205                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5206                _next_ordinal_to_read += 1;
5207                next_offset += envelope_size;
5208            }
5209
5210            let next_out_of_line = decoder.next_out_of_line();
5211            let handles_before = decoder.remaining_handles();
5212            if let Some((inlined, num_bytes, num_handles)) =
5213                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5214            {
5215                let member_inline_size = <fidl_fuchsia_wlan_common__common::WlanKeyConfig as fidl::encoding::TypeMarker>::inline_size(decoder.context);
5216                if inlined != (member_inline_size <= 4) {
5217                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5218                }
5219                let inner_offset;
5220                let mut inner_depth = depth.clone();
5221                if inlined {
5222                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5223                    inner_offset = next_offset;
5224                } else {
5225                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5226                    inner_depth.increment()?;
5227                }
5228                let val_ref = self.wep_key.get_or_insert_with(|| {
5229                    fidl::new_empty!(fidl_fuchsia_wlan_common__common::WlanKeyConfig, D)
5230                });
5231                fidl::decode!(
5232                    fidl_fuchsia_wlan_common__common::WlanKeyConfig,
5233                    D,
5234                    val_ref,
5235                    decoder,
5236                    inner_offset,
5237                    inner_depth
5238                )?;
5239                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5240                {
5241                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5242                }
5243                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5244                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5245                }
5246            }
5247
5248            next_offset += envelope_size;
5249            _next_ordinal_to_read += 1;
5250            if next_offset >= end_offset {
5251                return Ok(());
5252            }
5253
5254            // Decode unknown envelopes for gaps in ordinals.
5255            while _next_ordinal_to_read < 6 {
5256                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5257                _next_ordinal_to_read += 1;
5258                next_offset += envelope_size;
5259            }
5260
5261            let next_out_of_line = decoder.next_out_of_line();
5262            let handles_before = decoder.remaining_handles();
5263            if let Some((inlined, num_bytes, num_handles)) =
5264                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5265            {
5266                let member_inline_size =
5267                    <fidl::encoding::Vector<u8, 257> as fidl::encoding::TypeMarker>::inline_size(
5268                        decoder.context,
5269                    );
5270                if inlined != (member_inline_size <= 4) {
5271                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5272                }
5273                let inner_offset;
5274                let mut inner_depth = depth.clone();
5275                if inlined {
5276                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5277                    inner_offset = next_offset;
5278                } else {
5279                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5280                    inner_depth.increment()?;
5281                }
5282                let val_ref = self
5283                    .security_ie
5284                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 257>, D));
5285                fidl::decode!(fidl::encoding::Vector<u8, 257>, D, val_ref, decoder, inner_offset, inner_depth)?;
5286                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5287                {
5288                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5289                }
5290                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5291                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5292                }
5293            }
5294
5295            next_offset += envelope_size;
5296            _next_ordinal_to_read += 1;
5297            if next_offset >= end_offset {
5298                return Ok(());
5299            }
5300
5301            // Decode unknown envelopes for gaps in ordinals.
5302            while _next_ordinal_to_read < 7 {
5303                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5304                _next_ordinal_to_read += 1;
5305                next_offset += envelope_size;
5306            }
5307
5308            let next_out_of_line = decoder.next_out_of_line();
5309            let handles_before = decoder.remaining_handles();
5310            if let Some((inlined, num_bytes, num_handles)) =
5311                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5312            {
5313                let member_inline_size = <fidl_fuchsia_wlan_ieee80211__common::SetKeyDescriptor as fidl::encoding::TypeMarker>::inline_size(decoder.context);
5314                if inlined != (member_inline_size <= 4) {
5315                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5316                }
5317                let inner_offset;
5318                let mut inner_depth = depth.clone();
5319                if inlined {
5320                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5321                    inner_offset = next_offset;
5322                } else {
5323                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5324                    inner_depth.increment()?;
5325                }
5326                let val_ref = self.wep_key_desc.get_or_insert_with(|| {
5327                    fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::SetKeyDescriptor, D)
5328                });
5329                fidl::decode!(
5330                    fidl_fuchsia_wlan_ieee80211__common::SetKeyDescriptor,
5331                    D,
5332                    val_ref,
5333                    decoder,
5334                    inner_offset,
5335                    inner_depth
5336                )?;
5337                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5338                {
5339                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5340                }
5341                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5342                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5343                }
5344            }
5345
5346            next_offset += envelope_size;
5347
5348            // Decode the remaining unknown envelopes.
5349            while next_offset < end_offset {
5350                _next_ordinal_to_read += 1;
5351                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5352                next_offset += envelope_size;
5353            }
5354
5355            Ok(())
5356        }
5357    }
5358
5359    impl WlanFullmacImplDeauthRequest {
5360        #[inline(always)]
5361        fn max_ordinal_present(&self) -> u64 {
5362            if let Some(_) = self.reason_code {
5363                return 2;
5364            }
5365            if let Some(_) = self.peer_sta_address {
5366                return 1;
5367            }
5368            0
5369        }
5370    }
5371
5372    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplDeauthRequest {
5373        type Borrowed<'a> = &'a Self;
5374        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5375            value
5376        }
5377    }
5378
5379    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplDeauthRequest {
5380        type Owned = Self;
5381
5382        #[inline(always)]
5383        fn inline_align(_context: fidl::encoding::Context) -> usize {
5384            8
5385        }
5386
5387        #[inline(always)]
5388        fn inline_size(_context: fidl::encoding::Context) -> usize {
5389            16
5390        }
5391    }
5392
5393    unsafe impl<D: fidl::encoding::ResourceDialect>
5394        fidl::encoding::Encode<WlanFullmacImplDeauthRequest, D> for &WlanFullmacImplDeauthRequest
5395    {
5396        unsafe fn encode(
5397            self,
5398            encoder: &mut fidl::encoding::Encoder<'_, D>,
5399            offset: usize,
5400            mut depth: fidl::encoding::Depth,
5401        ) -> fidl::Result<()> {
5402            encoder.debug_check_bounds::<WlanFullmacImplDeauthRequest>(offset);
5403            // Vector header
5404            let max_ordinal: u64 = self.max_ordinal_present();
5405            encoder.write_num(max_ordinal, offset);
5406            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
5407            // Calling encoder.out_of_line_offset(0) is not allowed.
5408            if max_ordinal == 0 {
5409                return Ok(());
5410            }
5411            depth.increment()?;
5412            let envelope_size = 8;
5413            let bytes_len = max_ordinal as usize * envelope_size;
5414            #[allow(unused_variables)]
5415            let offset = encoder.out_of_line_offset(bytes_len);
5416            let mut _prev_end_offset: usize = 0;
5417            if 1 > max_ordinal {
5418                return Ok(());
5419            }
5420
5421            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5422            // are envelope_size bytes.
5423            let cur_offset: usize = (1 - 1) * envelope_size;
5424
5425            // Zero reserved fields.
5426            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5427
5428            // Safety:
5429            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5430            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5431            //   envelope_size bytes, there is always sufficient room.
5432            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
5433                self.peer_sta_address
5434                    .as_ref()
5435                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
5436                encoder,
5437                offset + cur_offset,
5438                depth,
5439            )?;
5440
5441            _prev_end_offset = cur_offset + envelope_size;
5442            if 2 > max_ordinal {
5443                return Ok(());
5444            }
5445
5446            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5447            // are envelope_size bytes.
5448            let cur_offset: usize = (2 - 1) * envelope_size;
5449
5450            // Zero reserved fields.
5451            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5452
5453            // Safety:
5454            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5455            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5456            //   envelope_size bytes, there is always sufficient room.
5457            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_ieee80211__common::ReasonCode, D>(
5458            self.reason_code.as_ref().map(<fidl_fuchsia_wlan_ieee80211__common::ReasonCode as fidl::encoding::ValueTypeMarker>::borrow),
5459            encoder, offset + cur_offset, depth
5460        )?;
5461
5462            _prev_end_offset = cur_offset + envelope_size;
5463
5464            Ok(())
5465        }
5466    }
5467
5468    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5469        for WlanFullmacImplDeauthRequest
5470    {
5471        #[inline(always)]
5472        fn new_empty() -> Self {
5473            Self::default()
5474        }
5475
5476        unsafe fn decode(
5477            &mut self,
5478            decoder: &mut fidl::encoding::Decoder<'_, D>,
5479            offset: usize,
5480            mut depth: fidl::encoding::Depth,
5481        ) -> fidl::Result<()> {
5482            decoder.debug_check_bounds::<Self>(offset);
5483            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
5484                None => return Err(fidl::Error::NotNullable),
5485                Some(len) => len,
5486            };
5487            // Calling decoder.out_of_line_offset(0) is not allowed.
5488            if len == 0 {
5489                return Ok(());
5490            };
5491            depth.increment()?;
5492            let envelope_size = 8;
5493            let bytes_len = len * envelope_size;
5494            let offset = decoder.out_of_line_offset(bytes_len)?;
5495            // Decode the envelope for each type.
5496            let mut _next_ordinal_to_read = 0;
5497            let mut next_offset = offset;
5498            let end_offset = offset + bytes_len;
5499            _next_ordinal_to_read += 1;
5500            if next_offset >= end_offset {
5501                return Ok(());
5502            }
5503
5504            // Decode unknown envelopes for gaps in ordinals.
5505            while _next_ordinal_to_read < 1 {
5506                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5507                _next_ordinal_to_read += 1;
5508                next_offset += envelope_size;
5509            }
5510
5511            let next_out_of_line = decoder.next_out_of_line();
5512            let handles_before = decoder.remaining_handles();
5513            if let Some((inlined, num_bytes, num_handles)) =
5514                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5515            {
5516                let member_inline_size =
5517                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
5518                        decoder.context,
5519                    );
5520                if inlined != (member_inline_size <= 4) {
5521                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5522                }
5523                let inner_offset;
5524                let mut inner_depth = depth.clone();
5525                if inlined {
5526                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5527                    inner_offset = next_offset;
5528                } else {
5529                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5530                    inner_depth.increment()?;
5531                }
5532                let val_ref = self
5533                    .peer_sta_address
5534                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
5535                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
5536                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5537                {
5538                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5539                }
5540                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5541                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5542                }
5543            }
5544
5545            next_offset += envelope_size;
5546            _next_ordinal_to_read += 1;
5547            if next_offset >= end_offset {
5548                return Ok(());
5549            }
5550
5551            // Decode unknown envelopes for gaps in ordinals.
5552            while _next_ordinal_to_read < 2 {
5553                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5554                _next_ordinal_to_read += 1;
5555                next_offset += envelope_size;
5556            }
5557
5558            let next_out_of_line = decoder.next_out_of_line();
5559            let handles_before = decoder.remaining_handles();
5560            if let Some((inlined, num_bytes, num_handles)) =
5561                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5562            {
5563                let member_inline_size = <fidl_fuchsia_wlan_ieee80211__common::ReasonCode as fidl::encoding::TypeMarker>::inline_size(decoder.context);
5564                if inlined != (member_inline_size <= 4) {
5565                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5566                }
5567                let inner_offset;
5568                let mut inner_depth = depth.clone();
5569                if inlined {
5570                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5571                    inner_offset = next_offset;
5572                } else {
5573                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5574                    inner_depth.increment()?;
5575                }
5576                let val_ref = self.reason_code.get_or_insert_with(|| {
5577                    fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::ReasonCode, D)
5578                });
5579                fidl::decode!(
5580                    fidl_fuchsia_wlan_ieee80211__common::ReasonCode,
5581                    D,
5582                    val_ref,
5583                    decoder,
5584                    inner_offset,
5585                    inner_depth
5586                )?;
5587                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5588                {
5589                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5590                }
5591                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5592                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5593                }
5594            }
5595
5596            next_offset += envelope_size;
5597
5598            // Decode the remaining unknown envelopes.
5599            while next_offset < end_offset {
5600                _next_ordinal_to_read += 1;
5601                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5602                next_offset += envelope_size;
5603            }
5604
5605            Ok(())
5606        }
5607    }
5608
5609    impl WlanFullmacImplDisassocRequest {
5610        #[inline(always)]
5611        fn max_ordinal_present(&self) -> u64 {
5612            if let Some(_) = self.reason_code {
5613                return 2;
5614            }
5615            if let Some(_) = self.peer_sta_address {
5616                return 1;
5617            }
5618            0
5619        }
5620    }
5621
5622    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplDisassocRequest {
5623        type Borrowed<'a> = &'a Self;
5624        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5625            value
5626        }
5627    }
5628
5629    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplDisassocRequest {
5630        type Owned = Self;
5631
5632        #[inline(always)]
5633        fn inline_align(_context: fidl::encoding::Context) -> usize {
5634            8
5635        }
5636
5637        #[inline(always)]
5638        fn inline_size(_context: fidl::encoding::Context) -> usize {
5639            16
5640        }
5641    }
5642
5643    unsafe impl<D: fidl::encoding::ResourceDialect>
5644        fidl::encoding::Encode<WlanFullmacImplDisassocRequest, D>
5645        for &WlanFullmacImplDisassocRequest
5646    {
5647        unsafe fn encode(
5648            self,
5649            encoder: &mut fidl::encoding::Encoder<'_, D>,
5650            offset: usize,
5651            mut depth: fidl::encoding::Depth,
5652        ) -> fidl::Result<()> {
5653            encoder.debug_check_bounds::<WlanFullmacImplDisassocRequest>(offset);
5654            // Vector header
5655            let max_ordinal: u64 = self.max_ordinal_present();
5656            encoder.write_num(max_ordinal, offset);
5657            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
5658            // Calling encoder.out_of_line_offset(0) is not allowed.
5659            if max_ordinal == 0 {
5660                return Ok(());
5661            }
5662            depth.increment()?;
5663            let envelope_size = 8;
5664            let bytes_len = max_ordinal as usize * envelope_size;
5665            #[allow(unused_variables)]
5666            let offset = encoder.out_of_line_offset(bytes_len);
5667            let mut _prev_end_offset: usize = 0;
5668            if 1 > max_ordinal {
5669                return Ok(());
5670            }
5671
5672            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5673            // are envelope_size bytes.
5674            let cur_offset: usize = (1 - 1) * envelope_size;
5675
5676            // Zero reserved fields.
5677            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5678
5679            // Safety:
5680            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5681            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5682            //   envelope_size bytes, there is always sufficient room.
5683            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
5684                self.peer_sta_address
5685                    .as_ref()
5686                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
5687                encoder,
5688                offset + cur_offset,
5689                depth,
5690            )?;
5691
5692            _prev_end_offset = cur_offset + envelope_size;
5693            if 2 > max_ordinal {
5694                return Ok(());
5695            }
5696
5697            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5698            // are envelope_size bytes.
5699            let cur_offset: usize = (2 - 1) * envelope_size;
5700
5701            // Zero reserved fields.
5702            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5703
5704            // Safety:
5705            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5706            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5707            //   envelope_size bytes, there is always sufficient room.
5708            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_ieee80211__common::ReasonCode, D>(
5709            self.reason_code.as_ref().map(<fidl_fuchsia_wlan_ieee80211__common::ReasonCode as fidl::encoding::ValueTypeMarker>::borrow),
5710            encoder, offset + cur_offset, depth
5711        )?;
5712
5713            _prev_end_offset = cur_offset + envelope_size;
5714
5715            Ok(())
5716        }
5717    }
5718
5719    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5720        for WlanFullmacImplDisassocRequest
5721    {
5722        #[inline(always)]
5723        fn new_empty() -> Self {
5724            Self::default()
5725        }
5726
5727        unsafe fn decode(
5728            &mut self,
5729            decoder: &mut fidl::encoding::Decoder<'_, D>,
5730            offset: usize,
5731            mut depth: fidl::encoding::Depth,
5732        ) -> fidl::Result<()> {
5733            decoder.debug_check_bounds::<Self>(offset);
5734            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
5735                None => return Err(fidl::Error::NotNullable),
5736                Some(len) => len,
5737            };
5738            // Calling decoder.out_of_line_offset(0) is not allowed.
5739            if len == 0 {
5740                return Ok(());
5741            };
5742            depth.increment()?;
5743            let envelope_size = 8;
5744            let bytes_len = len * envelope_size;
5745            let offset = decoder.out_of_line_offset(bytes_len)?;
5746            // Decode the envelope for each type.
5747            let mut _next_ordinal_to_read = 0;
5748            let mut next_offset = offset;
5749            let end_offset = offset + bytes_len;
5750            _next_ordinal_to_read += 1;
5751            if next_offset >= end_offset {
5752                return Ok(());
5753            }
5754
5755            // Decode unknown envelopes for gaps in ordinals.
5756            while _next_ordinal_to_read < 1 {
5757                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5758                _next_ordinal_to_read += 1;
5759                next_offset += envelope_size;
5760            }
5761
5762            let next_out_of_line = decoder.next_out_of_line();
5763            let handles_before = decoder.remaining_handles();
5764            if let Some((inlined, num_bytes, num_handles)) =
5765                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5766            {
5767                let member_inline_size =
5768                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
5769                        decoder.context,
5770                    );
5771                if inlined != (member_inline_size <= 4) {
5772                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5773                }
5774                let inner_offset;
5775                let mut inner_depth = depth.clone();
5776                if inlined {
5777                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5778                    inner_offset = next_offset;
5779                } else {
5780                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5781                    inner_depth.increment()?;
5782                }
5783                let val_ref = self
5784                    .peer_sta_address
5785                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
5786                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
5787                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5788                {
5789                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5790                }
5791                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5792                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5793                }
5794            }
5795
5796            next_offset += envelope_size;
5797            _next_ordinal_to_read += 1;
5798            if next_offset >= end_offset {
5799                return Ok(());
5800            }
5801
5802            // Decode unknown envelopes for gaps in ordinals.
5803            while _next_ordinal_to_read < 2 {
5804                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5805                _next_ordinal_to_read += 1;
5806                next_offset += envelope_size;
5807            }
5808
5809            let next_out_of_line = decoder.next_out_of_line();
5810            let handles_before = decoder.remaining_handles();
5811            if let Some((inlined, num_bytes, num_handles)) =
5812                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5813            {
5814                let member_inline_size = <fidl_fuchsia_wlan_ieee80211__common::ReasonCode as fidl::encoding::TypeMarker>::inline_size(decoder.context);
5815                if inlined != (member_inline_size <= 4) {
5816                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5817                }
5818                let inner_offset;
5819                let mut inner_depth = depth.clone();
5820                if inlined {
5821                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5822                    inner_offset = next_offset;
5823                } else {
5824                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5825                    inner_depth.increment()?;
5826                }
5827                let val_ref = self.reason_code.get_or_insert_with(|| {
5828                    fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::ReasonCode, D)
5829                });
5830                fidl::decode!(
5831                    fidl_fuchsia_wlan_ieee80211__common::ReasonCode,
5832                    D,
5833                    val_ref,
5834                    decoder,
5835                    inner_offset,
5836                    inner_depth
5837                )?;
5838                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5839                {
5840                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5841                }
5842                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5843                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5844                }
5845            }
5846
5847            next_offset += envelope_size;
5848
5849            // Decode the remaining unknown envelopes.
5850            while next_offset < end_offset {
5851                _next_ordinal_to_read += 1;
5852                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5853                next_offset += envelope_size;
5854            }
5855
5856            Ok(())
5857        }
5858    }
5859
5860    impl WlanFullmacImplEapolTxRequest {
5861        #[inline(always)]
5862        fn max_ordinal_present(&self) -> u64 {
5863            if let Some(_) = self.data {
5864                return 3;
5865            }
5866            if let Some(_) = self.dst_addr {
5867                return 2;
5868            }
5869            if let Some(_) = self.src_addr {
5870                return 1;
5871            }
5872            0
5873        }
5874    }
5875
5876    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplEapolTxRequest {
5877        type Borrowed<'a> = &'a Self;
5878        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5879            value
5880        }
5881    }
5882
5883    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplEapolTxRequest {
5884        type Owned = Self;
5885
5886        #[inline(always)]
5887        fn inline_align(_context: fidl::encoding::Context) -> usize {
5888            8
5889        }
5890
5891        #[inline(always)]
5892        fn inline_size(_context: fidl::encoding::Context) -> usize {
5893            16
5894        }
5895    }
5896
5897    unsafe impl<D: fidl::encoding::ResourceDialect>
5898        fidl::encoding::Encode<WlanFullmacImplEapolTxRequest, D>
5899        for &WlanFullmacImplEapolTxRequest
5900    {
5901        unsafe fn encode(
5902            self,
5903            encoder: &mut fidl::encoding::Encoder<'_, D>,
5904            offset: usize,
5905            mut depth: fidl::encoding::Depth,
5906        ) -> fidl::Result<()> {
5907            encoder.debug_check_bounds::<WlanFullmacImplEapolTxRequest>(offset);
5908            // Vector header
5909            let max_ordinal: u64 = self.max_ordinal_present();
5910            encoder.write_num(max_ordinal, offset);
5911            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
5912            // Calling encoder.out_of_line_offset(0) is not allowed.
5913            if max_ordinal == 0 {
5914                return Ok(());
5915            }
5916            depth.increment()?;
5917            let envelope_size = 8;
5918            let bytes_len = max_ordinal as usize * envelope_size;
5919            #[allow(unused_variables)]
5920            let offset = encoder.out_of_line_offset(bytes_len);
5921            let mut _prev_end_offset: usize = 0;
5922            if 1 > max_ordinal {
5923                return Ok(());
5924            }
5925
5926            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5927            // are envelope_size bytes.
5928            let cur_offset: usize = (1 - 1) * envelope_size;
5929
5930            // Zero reserved fields.
5931            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5932
5933            // Safety:
5934            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5935            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5936            //   envelope_size bytes, there is always sufficient room.
5937            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
5938                self.src_addr
5939                    .as_ref()
5940                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
5941                encoder,
5942                offset + cur_offset,
5943                depth,
5944            )?;
5945
5946            _prev_end_offset = cur_offset + envelope_size;
5947            if 2 > max_ordinal {
5948                return Ok(());
5949            }
5950
5951            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5952            // are envelope_size bytes.
5953            let cur_offset: usize = (2 - 1) * envelope_size;
5954
5955            // Zero reserved fields.
5956            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5957
5958            // Safety:
5959            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5960            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5961            //   envelope_size bytes, there is always sufficient room.
5962            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
5963                self.dst_addr
5964                    .as_ref()
5965                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
5966                encoder,
5967                offset + cur_offset,
5968                depth,
5969            )?;
5970
5971            _prev_end_offset = cur_offset + envelope_size;
5972            if 3 > max_ordinal {
5973                return Ok(());
5974            }
5975
5976            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5977            // are envelope_size bytes.
5978            let cur_offset: usize = (3 - 1) * envelope_size;
5979
5980            // Zero reserved fields.
5981            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5982
5983            // Safety:
5984            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5985            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5986            //   envelope_size bytes, there is always sufficient room.
5987            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<u8>, D>(
5988            self.data.as_ref().map(<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow),
5989            encoder, offset + cur_offset, depth
5990        )?;
5991
5992            _prev_end_offset = cur_offset + envelope_size;
5993
5994            Ok(())
5995        }
5996    }
5997
5998    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5999        for WlanFullmacImplEapolTxRequest
6000    {
6001        #[inline(always)]
6002        fn new_empty() -> Self {
6003            Self::default()
6004        }
6005
6006        unsafe fn decode(
6007            &mut self,
6008            decoder: &mut fidl::encoding::Decoder<'_, D>,
6009            offset: usize,
6010            mut depth: fidl::encoding::Depth,
6011        ) -> fidl::Result<()> {
6012            decoder.debug_check_bounds::<Self>(offset);
6013            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6014                None => return Err(fidl::Error::NotNullable),
6015                Some(len) => len,
6016            };
6017            // Calling decoder.out_of_line_offset(0) is not allowed.
6018            if len == 0 {
6019                return Ok(());
6020            };
6021            depth.increment()?;
6022            let envelope_size = 8;
6023            let bytes_len = len * envelope_size;
6024            let offset = decoder.out_of_line_offset(bytes_len)?;
6025            // Decode the envelope for each type.
6026            let mut _next_ordinal_to_read = 0;
6027            let mut next_offset = offset;
6028            let end_offset = offset + bytes_len;
6029            _next_ordinal_to_read += 1;
6030            if next_offset >= end_offset {
6031                return Ok(());
6032            }
6033
6034            // Decode unknown envelopes for gaps in ordinals.
6035            while _next_ordinal_to_read < 1 {
6036                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6037                _next_ordinal_to_read += 1;
6038                next_offset += envelope_size;
6039            }
6040
6041            let next_out_of_line = decoder.next_out_of_line();
6042            let handles_before = decoder.remaining_handles();
6043            if let Some((inlined, num_bytes, num_handles)) =
6044                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6045            {
6046                let member_inline_size =
6047                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
6048                        decoder.context,
6049                    );
6050                if inlined != (member_inline_size <= 4) {
6051                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6052                }
6053                let inner_offset;
6054                let mut inner_depth = depth.clone();
6055                if inlined {
6056                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6057                    inner_offset = next_offset;
6058                } else {
6059                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6060                    inner_depth.increment()?;
6061                }
6062                let val_ref = self
6063                    .src_addr
6064                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
6065                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
6066                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6067                {
6068                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6069                }
6070                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6071                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6072                }
6073            }
6074
6075            next_offset += envelope_size;
6076            _next_ordinal_to_read += 1;
6077            if next_offset >= end_offset {
6078                return Ok(());
6079            }
6080
6081            // Decode unknown envelopes for gaps in ordinals.
6082            while _next_ordinal_to_read < 2 {
6083                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6084                _next_ordinal_to_read += 1;
6085                next_offset += envelope_size;
6086            }
6087
6088            let next_out_of_line = decoder.next_out_of_line();
6089            let handles_before = decoder.remaining_handles();
6090            if let Some((inlined, num_bytes, num_handles)) =
6091                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6092            {
6093                let member_inline_size =
6094                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
6095                        decoder.context,
6096                    );
6097                if inlined != (member_inline_size <= 4) {
6098                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6099                }
6100                let inner_offset;
6101                let mut inner_depth = depth.clone();
6102                if inlined {
6103                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6104                    inner_offset = next_offset;
6105                } else {
6106                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6107                    inner_depth.increment()?;
6108                }
6109                let val_ref = self
6110                    .dst_addr
6111                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
6112                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
6113                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6114                {
6115                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6116                }
6117                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6118                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6119                }
6120            }
6121
6122            next_offset += envelope_size;
6123            _next_ordinal_to_read += 1;
6124            if next_offset >= end_offset {
6125                return Ok(());
6126            }
6127
6128            // Decode unknown envelopes for gaps in ordinals.
6129            while _next_ordinal_to_read < 3 {
6130                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6131                _next_ordinal_to_read += 1;
6132                next_offset += envelope_size;
6133            }
6134
6135            let next_out_of_line = decoder.next_out_of_line();
6136            let handles_before = decoder.remaining_handles();
6137            if let Some((inlined, num_bytes, num_handles)) =
6138                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6139            {
6140                let member_inline_size = <fidl::encoding::UnboundedVector<u8> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6141                if inlined != (member_inline_size <= 4) {
6142                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6143                }
6144                let inner_offset;
6145                let mut inner_depth = depth.clone();
6146                if inlined {
6147                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6148                    inner_offset = next_offset;
6149                } else {
6150                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6151                    inner_depth.increment()?;
6152                }
6153                let val_ref = self.data.get_or_insert_with(|| {
6154                    fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D)
6155                });
6156                fidl::decode!(
6157                    fidl::encoding::UnboundedVector<u8>,
6158                    D,
6159                    val_ref,
6160                    decoder,
6161                    inner_offset,
6162                    inner_depth
6163                )?;
6164                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6165                {
6166                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6167                }
6168                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6169                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6170                }
6171            }
6172
6173            next_offset += envelope_size;
6174
6175            // Decode the remaining unknown envelopes.
6176            while next_offset < end_offset {
6177                _next_ordinal_to_read += 1;
6178                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6179                next_offset += envelope_size;
6180            }
6181
6182            Ok(())
6183        }
6184    }
6185
6186    impl WlanFullmacImplIfcAssocIndRequest {
6187        #[inline(always)]
6188        fn max_ordinal_present(&self) -> u64 {
6189            if let Some(_) = self.vendor_ie {
6190                return 5;
6191            }
6192            if let Some(_) = self.rsne {
6193                return 4;
6194            }
6195            if let Some(_) = self.ssid {
6196                return 3;
6197            }
6198            if let Some(_) = self.listen_interval {
6199                return 2;
6200            }
6201            if let Some(_) = self.peer_sta_address {
6202                return 1;
6203            }
6204            0
6205        }
6206    }
6207
6208    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplIfcAssocIndRequest {
6209        type Borrowed<'a> = &'a Self;
6210        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6211            value
6212        }
6213    }
6214
6215    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplIfcAssocIndRequest {
6216        type Owned = Self;
6217
6218        #[inline(always)]
6219        fn inline_align(_context: fidl::encoding::Context) -> usize {
6220            8
6221        }
6222
6223        #[inline(always)]
6224        fn inline_size(_context: fidl::encoding::Context) -> usize {
6225            16
6226        }
6227    }
6228
6229    unsafe impl<D: fidl::encoding::ResourceDialect>
6230        fidl::encoding::Encode<WlanFullmacImplIfcAssocIndRequest, D>
6231        for &WlanFullmacImplIfcAssocIndRequest
6232    {
6233        unsafe fn encode(
6234            self,
6235            encoder: &mut fidl::encoding::Encoder<'_, D>,
6236            offset: usize,
6237            mut depth: fidl::encoding::Depth,
6238        ) -> fidl::Result<()> {
6239            encoder.debug_check_bounds::<WlanFullmacImplIfcAssocIndRequest>(offset);
6240            // Vector header
6241            let max_ordinal: u64 = self.max_ordinal_present();
6242            encoder.write_num(max_ordinal, offset);
6243            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6244            // Calling encoder.out_of_line_offset(0) is not allowed.
6245            if max_ordinal == 0 {
6246                return Ok(());
6247            }
6248            depth.increment()?;
6249            let envelope_size = 8;
6250            let bytes_len = max_ordinal as usize * envelope_size;
6251            #[allow(unused_variables)]
6252            let offset = encoder.out_of_line_offset(bytes_len);
6253            let mut _prev_end_offset: usize = 0;
6254            if 1 > max_ordinal {
6255                return Ok(());
6256            }
6257
6258            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6259            // are envelope_size bytes.
6260            let cur_offset: usize = (1 - 1) * envelope_size;
6261
6262            // Zero reserved fields.
6263            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6264
6265            // Safety:
6266            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6267            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6268            //   envelope_size bytes, there is always sufficient room.
6269            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
6270                self.peer_sta_address
6271                    .as_ref()
6272                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
6273                encoder,
6274                offset + cur_offset,
6275                depth,
6276            )?;
6277
6278            _prev_end_offset = cur_offset + envelope_size;
6279            if 2 > max_ordinal {
6280                return Ok(());
6281            }
6282
6283            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6284            // are envelope_size bytes.
6285            let cur_offset: usize = (2 - 1) * envelope_size;
6286
6287            // Zero reserved fields.
6288            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6289
6290            // Safety:
6291            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6292            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6293            //   envelope_size bytes, there is always sufficient room.
6294            fidl::encoding::encode_in_envelope_optional::<u16, D>(
6295                self.listen_interval.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
6296                encoder,
6297                offset + cur_offset,
6298                depth,
6299            )?;
6300
6301            _prev_end_offset = cur_offset + envelope_size;
6302            if 3 > max_ordinal {
6303                return Ok(());
6304            }
6305
6306            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6307            // are envelope_size bytes.
6308            let cur_offset: usize = (3 - 1) * envelope_size;
6309
6310            // Zero reserved fields.
6311            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6312
6313            // Safety:
6314            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6315            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6316            //   envelope_size bytes, there is always sufficient room.
6317            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 32>, D>(
6318                self.ssid.as_ref().map(
6319                    <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow,
6320                ),
6321                encoder,
6322                offset + cur_offset,
6323                depth,
6324            )?;
6325
6326            _prev_end_offset = cur_offset + envelope_size;
6327            if 4 > max_ordinal {
6328                return Ok(());
6329            }
6330
6331            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6332            // are envelope_size bytes.
6333            let cur_offset: usize = (4 - 1) * envelope_size;
6334
6335            // Zero reserved fields.
6336            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6337
6338            // Safety:
6339            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6340            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6341            //   envelope_size bytes, there is always sufficient room.
6342            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 257>, D>(
6343                self.rsne.as_ref().map(
6344                    <fidl::encoding::Vector<u8, 257> as fidl::encoding::ValueTypeMarker>::borrow,
6345                ),
6346                encoder,
6347                offset + cur_offset,
6348                depth,
6349            )?;
6350
6351            _prev_end_offset = cur_offset + envelope_size;
6352            if 5 > max_ordinal {
6353                return Ok(());
6354            }
6355
6356            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6357            // are envelope_size bytes.
6358            let cur_offset: usize = (5 - 1) * envelope_size;
6359
6360            // Zero reserved fields.
6361            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6362
6363            // Safety:
6364            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6365            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6366            //   envelope_size bytes, there is always sufficient room.
6367            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 514>, D>(
6368                self.vendor_ie.as_ref().map(
6369                    <fidl::encoding::Vector<u8, 514> as fidl::encoding::ValueTypeMarker>::borrow,
6370                ),
6371                encoder,
6372                offset + cur_offset,
6373                depth,
6374            )?;
6375
6376            _prev_end_offset = cur_offset + envelope_size;
6377
6378            Ok(())
6379        }
6380    }
6381
6382    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6383        for WlanFullmacImplIfcAssocIndRequest
6384    {
6385        #[inline(always)]
6386        fn new_empty() -> Self {
6387            Self::default()
6388        }
6389
6390        unsafe fn decode(
6391            &mut self,
6392            decoder: &mut fidl::encoding::Decoder<'_, D>,
6393            offset: usize,
6394            mut depth: fidl::encoding::Depth,
6395        ) -> fidl::Result<()> {
6396            decoder.debug_check_bounds::<Self>(offset);
6397            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6398                None => return Err(fidl::Error::NotNullable),
6399                Some(len) => len,
6400            };
6401            // Calling decoder.out_of_line_offset(0) is not allowed.
6402            if len == 0 {
6403                return Ok(());
6404            };
6405            depth.increment()?;
6406            let envelope_size = 8;
6407            let bytes_len = len * envelope_size;
6408            let offset = decoder.out_of_line_offset(bytes_len)?;
6409            // Decode the envelope for each type.
6410            let mut _next_ordinal_to_read = 0;
6411            let mut next_offset = offset;
6412            let end_offset = offset + bytes_len;
6413            _next_ordinal_to_read += 1;
6414            if next_offset >= end_offset {
6415                return Ok(());
6416            }
6417
6418            // Decode unknown envelopes for gaps in ordinals.
6419            while _next_ordinal_to_read < 1 {
6420                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6421                _next_ordinal_to_read += 1;
6422                next_offset += envelope_size;
6423            }
6424
6425            let next_out_of_line = decoder.next_out_of_line();
6426            let handles_before = decoder.remaining_handles();
6427            if let Some((inlined, num_bytes, num_handles)) =
6428                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6429            {
6430                let member_inline_size =
6431                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
6432                        decoder.context,
6433                    );
6434                if inlined != (member_inline_size <= 4) {
6435                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6436                }
6437                let inner_offset;
6438                let mut inner_depth = depth.clone();
6439                if inlined {
6440                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6441                    inner_offset = next_offset;
6442                } else {
6443                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6444                    inner_depth.increment()?;
6445                }
6446                let val_ref = self
6447                    .peer_sta_address
6448                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
6449                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
6450                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6451                {
6452                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6453                }
6454                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6455                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6456                }
6457            }
6458
6459            next_offset += envelope_size;
6460            _next_ordinal_to_read += 1;
6461            if next_offset >= end_offset {
6462                return Ok(());
6463            }
6464
6465            // Decode unknown envelopes for gaps in ordinals.
6466            while _next_ordinal_to_read < 2 {
6467                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6468                _next_ordinal_to_read += 1;
6469                next_offset += envelope_size;
6470            }
6471
6472            let next_out_of_line = decoder.next_out_of_line();
6473            let handles_before = decoder.remaining_handles();
6474            if let Some((inlined, num_bytes, num_handles)) =
6475                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6476            {
6477                let member_inline_size =
6478                    <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6479                if inlined != (member_inline_size <= 4) {
6480                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6481                }
6482                let inner_offset;
6483                let mut inner_depth = depth.clone();
6484                if inlined {
6485                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6486                    inner_offset = next_offset;
6487                } else {
6488                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6489                    inner_depth.increment()?;
6490                }
6491                let val_ref = self.listen_interval.get_or_insert_with(|| fidl::new_empty!(u16, D));
6492                fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
6493                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6494                {
6495                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6496                }
6497                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6498                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6499                }
6500            }
6501
6502            next_offset += envelope_size;
6503            _next_ordinal_to_read += 1;
6504            if next_offset >= end_offset {
6505                return Ok(());
6506            }
6507
6508            // Decode unknown envelopes for gaps in ordinals.
6509            while _next_ordinal_to_read < 3 {
6510                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6511                _next_ordinal_to_read += 1;
6512                next_offset += envelope_size;
6513            }
6514
6515            let next_out_of_line = decoder.next_out_of_line();
6516            let handles_before = decoder.remaining_handles();
6517            if let Some((inlined, num_bytes, num_handles)) =
6518                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6519            {
6520                let member_inline_size =
6521                    <fidl::encoding::Vector<u8, 32> as fidl::encoding::TypeMarker>::inline_size(
6522                        decoder.context,
6523                    );
6524                if inlined != (member_inline_size <= 4) {
6525                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6526                }
6527                let inner_offset;
6528                let mut inner_depth = depth.clone();
6529                if inlined {
6530                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6531                    inner_offset = next_offset;
6532                } else {
6533                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6534                    inner_depth.increment()?;
6535                }
6536                let val_ref = self
6537                    .ssid
6538                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D));
6539                fidl::decode!(fidl::encoding::Vector<u8, 32>, D, val_ref, decoder, inner_offset, inner_depth)?;
6540                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6541                {
6542                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6543                }
6544                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6545                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6546                }
6547            }
6548
6549            next_offset += envelope_size;
6550            _next_ordinal_to_read += 1;
6551            if next_offset >= end_offset {
6552                return Ok(());
6553            }
6554
6555            // Decode unknown envelopes for gaps in ordinals.
6556            while _next_ordinal_to_read < 4 {
6557                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6558                _next_ordinal_to_read += 1;
6559                next_offset += envelope_size;
6560            }
6561
6562            let next_out_of_line = decoder.next_out_of_line();
6563            let handles_before = decoder.remaining_handles();
6564            if let Some((inlined, num_bytes, num_handles)) =
6565                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6566            {
6567                let member_inline_size =
6568                    <fidl::encoding::Vector<u8, 257> as fidl::encoding::TypeMarker>::inline_size(
6569                        decoder.context,
6570                    );
6571                if inlined != (member_inline_size <= 4) {
6572                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6573                }
6574                let inner_offset;
6575                let mut inner_depth = depth.clone();
6576                if inlined {
6577                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6578                    inner_offset = next_offset;
6579                } else {
6580                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6581                    inner_depth.increment()?;
6582                }
6583                let val_ref = self
6584                    .rsne
6585                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 257>, D));
6586                fidl::decode!(fidl::encoding::Vector<u8, 257>, D, val_ref, decoder, inner_offset, inner_depth)?;
6587                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6588                {
6589                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6590                }
6591                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6592                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6593                }
6594            }
6595
6596            next_offset += envelope_size;
6597            _next_ordinal_to_read += 1;
6598            if next_offset >= end_offset {
6599                return Ok(());
6600            }
6601
6602            // Decode unknown envelopes for gaps in ordinals.
6603            while _next_ordinal_to_read < 5 {
6604                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6605                _next_ordinal_to_read += 1;
6606                next_offset += envelope_size;
6607            }
6608
6609            let next_out_of_line = decoder.next_out_of_line();
6610            let handles_before = decoder.remaining_handles();
6611            if let Some((inlined, num_bytes, num_handles)) =
6612                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6613            {
6614                let member_inline_size =
6615                    <fidl::encoding::Vector<u8, 514> as fidl::encoding::TypeMarker>::inline_size(
6616                        decoder.context,
6617                    );
6618                if inlined != (member_inline_size <= 4) {
6619                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6620                }
6621                let inner_offset;
6622                let mut inner_depth = depth.clone();
6623                if inlined {
6624                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6625                    inner_offset = next_offset;
6626                } else {
6627                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6628                    inner_depth.increment()?;
6629                }
6630                let val_ref = self
6631                    .vendor_ie
6632                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 514>, D));
6633                fidl::decode!(fidl::encoding::Vector<u8, 514>, D, val_ref, decoder, inner_offset, inner_depth)?;
6634                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6635                {
6636                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6637                }
6638                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6639                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6640                }
6641            }
6642
6643            next_offset += envelope_size;
6644
6645            // Decode the remaining unknown envelopes.
6646            while next_offset < end_offset {
6647                _next_ordinal_to_read += 1;
6648                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6649                next_offset += envelope_size;
6650            }
6651
6652            Ok(())
6653        }
6654    }
6655
6656    impl WlanFullmacImplIfcAuthIndRequest {
6657        #[inline(always)]
6658        fn max_ordinal_present(&self) -> u64 {
6659            if let Some(_) = self.auth_type {
6660                return 2;
6661            }
6662            if let Some(_) = self.peer_sta_address {
6663                return 1;
6664            }
6665            0
6666        }
6667    }
6668
6669    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplIfcAuthIndRequest {
6670        type Borrowed<'a> = &'a Self;
6671        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6672            value
6673        }
6674    }
6675
6676    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplIfcAuthIndRequest {
6677        type Owned = Self;
6678
6679        #[inline(always)]
6680        fn inline_align(_context: fidl::encoding::Context) -> usize {
6681            8
6682        }
6683
6684        #[inline(always)]
6685        fn inline_size(_context: fidl::encoding::Context) -> usize {
6686            16
6687        }
6688    }
6689
6690    unsafe impl<D: fidl::encoding::ResourceDialect>
6691        fidl::encoding::Encode<WlanFullmacImplIfcAuthIndRequest, D>
6692        for &WlanFullmacImplIfcAuthIndRequest
6693    {
6694        unsafe fn encode(
6695            self,
6696            encoder: &mut fidl::encoding::Encoder<'_, D>,
6697            offset: usize,
6698            mut depth: fidl::encoding::Depth,
6699        ) -> fidl::Result<()> {
6700            encoder.debug_check_bounds::<WlanFullmacImplIfcAuthIndRequest>(offset);
6701            // Vector header
6702            let max_ordinal: u64 = self.max_ordinal_present();
6703            encoder.write_num(max_ordinal, offset);
6704            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6705            // Calling encoder.out_of_line_offset(0) is not allowed.
6706            if max_ordinal == 0 {
6707                return Ok(());
6708            }
6709            depth.increment()?;
6710            let envelope_size = 8;
6711            let bytes_len = max_ordinal as usize * envelope_size;
6712            #[allow(unused_variables)]
6713            let offset = encoder.out_of_line_offset(bytes_len);
6714            let mut _prev_end_offset: usize = 0;
6715            if 1 > max_ordinal {
6716                return Ok(());
6717            }
6718
6719            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6720            // are envelope_size bytes.
6721            let cur_offset: usize = (1 - 1) * envelope_size;
6722
6723            // Zero reserved fields.
6724            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6725
6726            // Safety:
6727            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6728            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6729            //   envelope_size bytes, there is always sufficient room.
6730            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
6731                self.peer_sta_address
6732                    .as_ref()
6733                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
6734                encoder,
6735                offset + cur_offset,
6736                depth,
6737            )?;
6738
6739            _prev_end_offset = cur_offset + envelope_size;
6740            if 2 > max_ordinal {
6741                return Ok(());
6742            }
6743
6744            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6745            // are envelope_size bytes.
6746            let cur_offset: usize = (2 - 1) * envelope_size;
6747
6748            // Zero reserved fields.
6749            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6750
6751            // Safety:
6752            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6753            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6754            //   envelope_size bytes, there is always sufficient room.
6755            fidl::encoding::encode_in_envelope_optional::<WlanAuthType, D>(
6756                self.auth_type
6757                    .as_ref()
6758                    .map(<WlanAuthType as fidl::encoding::ValueTypeMarker>::borrow),
6759                encoder,
6760                offset + cur_offset,
6761                depth,
6762            )?;
6763
6764            _prev_end_offset = cur_offset + envelope_size;
6765
6766            Ok(())
6767        }
6768    }
6769
6770    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6771        for WlanFullmacImplIfcAuthIndRequest
6772    {
6773        #[inline(always)]
6774        fn new_empty() -> Self {
6775            Self::default()
6776        }
6777
6778        unsafe fn decode(
6779            &mut self,
6780            decoder: &mut fidl::encoding::Decoder<'_, D>,
6781            offset: usize,
6782            mut depth: fidl::encoding::Depth,
6783        ) -> fidl::Result<()> {
6784            decoder.debug_check_bounds::<Self>(offset);
6785            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6786                None => return Err(fidl::Error::NotNullable),
6787                Some(len) => len,
6788            };
6789            // Calling decoder.out_of_line_offset(0) is not allowed.
6790            if len == 0 {
6791                return Ok(());
6792            };
6793            depth.increment()?;
6794            let envelope_size = 8;
6795            let bytes_len = len * envelope_size;
6796            let offset = decoder.out_of_line_offset(bytes_len)?;
6797            // Decode the envelope for each type.
6798            let mut _next_ordinal_to_read = 0;
6799            let mut next_offset = offset;
6800            let end_offset = offset + bytes_len;
6801            _next_ordinal_to_read += 1;
6802            if next_offset >= end_offset {
6803                return Ok(());
6804            }
6805
6806            // Decode unknown envelopes for gaps in ordinals.
6807            while _next_ordinal_to_read < 1 {
6808                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6809                _next_ordinal_to_read += 1;
6810                next_offset += envelope_size;
6811            }
6812
6813            let next_out_of_line = decoder.next_out_of_line();
6814            let handles_before = decoder.remaining_handles();
6815            if let Some((inlined, num_bytes, num_handles)) =
6816                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6817            {
6818                let member_inline_size =
6819                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
6820                        decoder.context,
6821                    );
6822                if inlined != (member_inline_size <= 4) {
6823                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6824                }
6825                let inner_offset;
6826                let mut inner_depth = depth.clone();
6827                if inlined {
6828                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6829                    inner_offset = next_offset;
6830                } else {
6831                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6832                    inner_depth.increment()?;
6833                }
6834                let val_ref = self
6835                    .peer_sta_address
6836                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
6837                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
6838                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6839                {
6840                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6841                }
6842                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6843                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6844                }
6845            }
6846
6847            next_offset += envelope_size;
6848            _next_ordinal_to_read += 1;
6849            if next_offset >= end_offset {
6850                return Ok(());
6851            }
6852
6853            // Decode unknown envelopes for gaps in ordinals.
6854            while _next_ordinal_to_read < 2 {
6855                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6856                _next_ordinal_to_read += 1;
6857                next_offset += envelope_size;
6858            }
6859
6860            let next_out_of_line = decoder.next_out_of_line();
6861            let handles_before = decoder.remaining_handles();
6862            if let Some((inlined, num_bytes, num_handles)) =
6863                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6864            {
6865                let member_inline_size =
6866                    <WlanAuthType as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6867                if inlined != (member_inline_size <= 4) {
6868                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6869                }
6870                let inner_offset;
6871                let mut inner_depth = depth.clone();
6872                if inlined {
6873                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6874                    inner_offset = next_offset;
6875                } else {
6876                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6877                    inner_depth.increment()?;
6878                }
6879                let val_ref =
6880                    self.auth_type.get_or_insert_with(|| fidl::new_empty!(WlanAuthType, D));
6881                fidl::decode!(WlanAuthType, D, val_ref, decoder, inner_offset, inner_depth)?;
6882                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6883                {
6884                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6885                }
6886                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6887                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6888                }
6889            }
6890
6891            next_offset += envelope_size;
6892
6893            // Decode the remaining unknown envelopes.
6894            while next_offset < end_offset {
6895                _next_ordinal_to_read += 1;
6896                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6897                next_offset += envelope_size;
6898            }
6899
6900            Ok(())
6901        }
6902    }
6903
6904    impl WlanFullmacImplIfcConnectConfRequest {
6905        #[inline(always)]
6906        fn max_ordinal_present(&self) -> u64 {
6907            if let Some(_) = self.association_ies {
6908                return 4;
6909            }
6910            if let Some(_) = self.association_id {
6911                return 3;
6912            }
6913            if let Some(_) = self.result_code {
6914                return 2;
6915            }
6916            if let Some(_) = self.peer_sta_address {
6917                return 1;
6918            }
6919            0
6920        }
6921    }
6922
6923    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplIfcConnectConfRequest {
6924        type Borrowed<'a> = &'a Self;
6925        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6926            value
6927        }
6928    }
6929
6930    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplIfcConnectConfRequest {
6931        type Owned = Self;
6932
6933        #[inline(always)]
6934        fn inline_align(_context: fidl::encoding::Context) -> usize {
6935            8
6936        }
6937
6938        #[inline(always)]
6939        fn inline_size(_context: fidl::encoding::Context) -> usize {
6940            16
6941        }
6942    }
6943
6944    unsafe impl<D: fidl::encoding::ResourceDialect>
6945        fidl::encoding::Encode<WlanFullmacImplIfcConnectConfRequest, D>
6946        for &WlanFullmacImplIfcConnectConfRequest
6947    {
6948        unsafe fn encode(
6949            self,
6950            encoder: &mut fidl::encoding::Encoder<'_, D>,
6951            offset: usize,
6952            mut depth: fidl::encoding::Depth,
6953        ) -> fidl::Result<()> {
6954            encoder.debug_check_bounds::<WlanFullmacImplIfcConnectConfRequest>(offset);
6955            // Vector header
6956            let max_ordinal: u64 = self.max_ordinal_present();
6957            encoder.write_num(max_ordinal, offset);
6958            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6959            // Calling encoder.out_of_line_offset(0) is not allowed.
6960            if max_ordinal == 0 {
6961                return Ok(());
6962            }
6963            depth.increment()?;
6964            let envelope_size = 8;
6965            let bytes_len = max_ordinal as usize * envelope_size;
6966            #[allow(unused_variables)]
6967            let offset = encoder.out_of_line_offset(bytes_len);
6968            let mut _prev_end_offset: usize = 0;
6969            if 1 > max_ordinal {
6970                return Ok(());
6971            }
6972
6973            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6974            // are envelope_size bytes.
6975            let cur_offset: usize = (1 - 1) * envelope_size;
6976
6977            // Zero reserved fields.
6978            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6979
6980            // Safety:
6981            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6982            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6983            //   envelope_size bytes, there is always sufficient room.
6984            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
6985                self.peer_sta_address
6986                    .as_ref()
6987                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
6988                encoder,
6989                offset + cur_offset,
6990                depth,
6991            )?;
6992
6993            _prev_end_offset = cur_offset + envelope_size;
6994            if 2 > max_ordinal {
6995                return Ok(());
6996            }
6997
6998            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6999            // are envelope_size bytes.
7000            let cur_offset: usize = (2 - 1) * envelope_size;
7001
7002            // Zero reserved fields.
7003            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7004
7005            // Safety:
7006            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7007            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7008            //   envelope_size bytes, there is always sufficient room.
7009            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_ieee80211__common::StatusCode, D>(
7010            self.result_code.as_ref().map(<fidl_fuchsia_wlan_ieee80211__common::StatusCode as fidl::encoding::ValueTypeMarker>::borrow),
7011            encoder, offset + cur_offset, depth
7012        )?;
7013
7014            _prev_end_offset = cur_offset + envelope_size;
7015            if 3 > max_ordinal {
7016                return Ok(());
7017            }
7018
7019            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7020            // are envelope_size bytes.
7021            let cur_offset: usize = (3 - 1) * envelope_size;
7022
7023            // Zero reserved fields.
7024            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7025
7026            // Safety:
7027            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7028            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7029            //   envelope_size bytes, there is always sufficient room.
7030            fidl::encoding::encode_in_envelope_optional::<u16, D>(
7031                self.association_id.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
7032                encoder,
7033                offset + cur_offset,
7034                depth,
7035            )?;
7036
7037            _prev_end_offset = cur_offset + envelope_size;
7038            if 4 > max_ordinal {
7039                return Ok(());
7040            }
7041
7042            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7043            // are envelope_size bytes.
7044            let cur_offset: usize = (4 - 1) * envelope_size;
7045
7046            // Zero reserved fields.
7047            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7048
7049            // Safety:
7050            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7051            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7052            //   envelope_size bytes, there is always sufficient room.
7053            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<u8>, D>(
7054            self.association_ies.as_ref().map(<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow),
7055            encoder, offset + cur_offset, depth
7056        )?;
7057
7058            _prev_end_offset = cur_offset + envelope_size;
7059
7060            Ok(())
7061        }
7062    }
7063
7064    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7065        for WlanFullmacImplIfcConnectConfRequest
7066    {
7067        #[inline(always)]
7068        fn new_empty() -> Self {
7069            Self::default()
7070        }
7071
7072        unsafe fn decode(
7073            &mut self,
7074            decoder: &mut fidl::encoding::Decoder<'_, D>,
7075            offset: usize,
7076            mut depth: fidl::encoding::Depth,
7077        ) -> fidl::Result<()> {
7078            decoder.debug_check_bounds::<Self>(offset);
7079            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
7080                None => return Err(fidl::Error::NotNullable),
7081                Some(len) => len,
7082            };
7083            // Calling decoder.out_of_line_offset(0) is not allowed.
7084            if len == 0 {
7085                return Ok(());
7086            };
7087            depth.increment()?;
7088            let envelope_size = 8;
7089            let bytes_len = len * envelope_size;
7090            let offset = decoder.out_of_line_offset(bytes_len)?;
7091            // Decode the envelope for each type.
7092            let mut _next_ordinal_to_read = 0;
7093            let mut next_offset = offset;
7094            let end_offset = offset + bytes_len;
7095            _next_ordinal_to_read += 1;
7096            if next_offset >= end_offset {
7097                return Ok(());
7098            }
7099
7100            // Decode unknown envelopes for gaps in ordinals.
7101            while _next_ordinal_to_read < 1 {
7102                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7103                _next_ordinal_to_read += 1;
7104                next_offset += envelope_size;
7105            }
7106
7107            let next_out_of_line = decoder.next_out_of_line();
7108            let handles_before = decoder.remaining_handles();
7109            if let Some((inlined, num_bytes, num_handles)) =
7110                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7111            {
7112                let member_inline_size =
7113                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
7114                        decoder.context,
7115                    );
7116                if inlined != (member_inline_size <= 4) {
7117                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7118                }
7119                let inner_offset;
7120                let mut inner_depth = depth.clone();
7121                if inlined {
7122                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7123                    inner_offset = next_offset;
7124                } else {
7125                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7126                    inner_depth.increment()?;
7127                }
7128                let val_ref = self
7129                    .peer_sta_address
7130                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
7131                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
7132                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7133                {
7134                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7135                }
7136                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7137                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7138                }
7139            }
7140
7141            next_offset += envelope_size;
7142            _next_ordinal_to_read += 1;
7143            if next_offset >= end_offset {
7144                return Ok(());
7145            }
7146
7147            // Decode unknown envelopes for gaps in ordinals.
7148            while _next_ordinal_to_read < 2 {
7149                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7150                _next_ordinal_to_read += 1;
7151                next_offset += envelope_size;
7152            }
7153
7154            let next_out_of_line = decoder.next_out_of_line();
7155            let handles_before = decoder.remaining_handles();
7156            if let Some((inlined, num_bytes, num_handles)) =
7157                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7158            {
7159                let member_inline_size = <fidl_fuchsia_wlan_ieee80211__common::StatusCode as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7160                if inlined != (member_inline_size <= 4) {
7161                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7162                }
7163                let inner_offset;
7164                let mut inner_depth = depth.clone();
7165                if inlined {
7166                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7167                    inner_offset = next_offset;
7168                } else {
7169                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7170                    inner_depth.increment()?;
7171                }
7172                let val_ref = self.result_code.get_or_insert_with(|| {
7173                    fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::StatusCode, D)
7174                });
7175                fidl::decode!(
7176                    fidl_fuchsia_wlan_ieee80211__common::StatusCode,
7177                    D,
7178                    val_ref,
7179                    decoder,
7180                    inner_offset,
7181                    inner_depth
7182                )?;
7183                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7184                {
7185                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7186                }
7187                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7188                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7189                }
7190            }
7191
7192            next_offset += envelope_size;
7193            _next_ordinal_to_read += 1;
7194            if next_offset >= end_offset {
7195                return Ok(());
7196            }
7197
7198            // Decode unknown envelopes for gaps in ordinals.
7199            while _next_ordinal_to_read < 3 {
7200                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7201                _next_ordinal_to_read += 1;
7202                next_offset += envelope_size;
7203            }
7204
7205            let next_out_of_line = decoder.next_out_of_line();
7206            let handles_before = decoder.remaining_handles();
7207            if let Some((inlined, num_bytes, num_handles)) =
7208                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7209            {
7210                let member_inline_size =
7211                    <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7212                if inlined != (member_inline_size <= 4) {
7213                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7214                }
7215                let inner_offset;
7216                let mut inner_depth = depth.clone();
7217                if inlined {
7218                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7219                    inner_offset = next_offset;
7220                } else {
7221                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7222                    inner_depth.increment()?;
7223                }
7224                let val_ref = self.association_id.get_or_insert_with(|| fidl::new_empty!(u16, D));
7225                fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
7226                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7227                {
7228                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7229                }
7230                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7231                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7232                }
7233            }
7234
7235            next_offset += envelope_size;
7236            _next_ordinal_to_read += 1;
7237            if next_offset >= end_offset {
7238                return Ok(());
7239            }
7240
7241            // Decode unknown envelopes for gaps in ordinals.
7242            while _next_ordinal_to_read < 4 {
7243                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7244                _next_ordinal_to_read += 1;
7245                next_offset += envelope_size;
7246            }
7247
7248            let next_out_of_line = decoder.next_out_of_line();
7249            let handles_before = decoder.remaining_handles();
7250            if let Some((inlined, num_bytes, num_handles)) =
7251                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7252            {
7253                let member_inline_size = <fidl::encoding::UnboundedVector<u8> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7254                if inlined != (member_inline_size <= 4) {
7255                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7256                }
7257                let inner_offset;
7258                let mut inner_depth = depth.clone();
7259                if inlined {
7260                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7261                    inner_offset = next_offset;
7262                } else {
7263                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7264                    inner_depth.increment()?;
7265                }
7266                let val_ref = self.association_ies.get_or_insert_with(|| {
7267                    fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D)
7268                });
7269                fidl::decode!(
7270                    fidl::encoding::UnboundedVector<u8>,
7271                    D,
7272                    val_ref,
7273                    decoder,
7274                    inner_offset,
7275                    inner_depth
7276                )?;
7277                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7278                {
7279                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7280                }
7281                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7282                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7283                }
7284            }
7285
7286            next_offset += envelope_size;
7287
7288            // Decode the remaining unknown envelopes.
7289            while next_offset < end_offset {
7290                _next_ordinal_to_read += 1;
7291                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7292                next_offset += envelope_size;
7293            }
7294
7295            Ok(())
7296        }
7297    }
7298
7299    impl WlanFullmacImplIfcDeauthConfRequest {
7300        #[inline(always)]
7301        fn max_ordinal_present(&self) -> u64 {
7302            if let Some(_) = self.peer_sta_address {
7303                return 1;
7304            }
7305            0
7306        }
7307    }
7308
7309    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplIfcDeauthConfRequest {
7310        type Borrowed<'a> = &'a Self;
7311        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7312            value
7313        }
7314    }
7315
7316    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplIfcDeauthConfRequest {
7317        type Owned = Self;
7318
7319        #[inline(always)]
7320        fn inline_align(_context: fidl::encoding::Context) -> usize {
7321            8
7322        }
7323
7324        #[inline(always)]
7325        fn inline_size(_context: fidl::encoding::Context) -> usize {
7326            16
7327        }
7328    }
7329
7330    unsafe impl<D: fidl::encoding::ResourceDialect>
7331        fidl::encoding::Encode<WlanFullmacImplIfcDeauthConfRequest, D>
7332        for &WlanFullmacImplIfcDeauthConfRequest
7333    {
7334        unsafe fn encode(
7335            self,
7336            encoder: &mut fidl::encoding::Encoder<'_, D>,
7337            offset: usize,
7338            mut depth: fidl::encoding::Depth,
7339        ) -> fidl::Result<()> {
7340            encoder.debug_check_bounds::<WlanFullmacImplIfcDeauthConfRequest>(offset);
7341            // Vector header
7342            let max_ordinal: u64 = self.max_ordinal_present();
7343            encoder.write_num(max_ordinal, offset);
7344            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
7345            // Calling encoder.out_of_line_offset(0) is not allowed.
7346            if max_ordinal == 0 {
7347                return Ok(());
7348            }
7349            depth.increment()?;
7350            let envelope_size = 8;
7351            let bytes_len = max_ordinal as usize * envelope_size;
7352            #[allow(unused_variables)]
7353            let offset = encoder.out_of_line_offset(bytes_len);
7354            let mut _prev_end_offset: usize = 0;
7355            if 1 > max_ordinal {
7356                return Ok(());
7357            }
7358
7359            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7360            // are envelope_size bytes.
7361            let cur_offset: usize = (1 - 1) * envelope_size;
7362
7363            // Zero reserved fields.
7364            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7365
7366            // Safety:
7367            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7368            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7369            //   envelope_size bytes, there is always sufficient room.
7370            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
7371                self.peer_sta_address
7372                    .as_ref()
7373                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
7374                encoder,
7375                offset + cur_offset,
7376                depth,
7377            )?;
7378
7379            _prev_end_offset = cur_offset + envelope_size;
7380
7381            Ok(())
7382        }
7383    }
7384
7385    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7386        for WlanFullmacImplIfcDeauthConfRequest
7387    {
7388        #[inline(always)]
7389        fn new_empty() -> Self {
7390            Self::default()
7391        }
7392
7393        unsafe fn decode(
7394            &mut self,
7395            decoder: &mut fidl::encoding::Decoder<'_, D>,
7396            offset: usize,
7397            mut depth: fidl::encoding::Depth,
7398        ) -> fidl::Result<()> {
7399            decoder.debug_check_bounds::<Self>(offset);
7400            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
7401                None => return Err(fidl::Error::NotNullable),
7402                Some(len) => len,
7403            };
7404            // Calling decoder.out_of_line_offset(0) is not allowed.
7405            if len == 0 {
7406                return Ok(());
7407            };
7408            depth.increment()?;
7409            let envelope_size = 8;
7410            let bytes_len = len * envelope_size;
7411            let offset = decoder.out_of_line_offset(bytes_len)?;
7412            // Decode the envelope for each type.
7413            let mut _next_ordinal_to_read = 0;
7414            let mut next_offset = offset;
7415            let end_offset = offset + bytes_len;
7416            _next_ordinal_to_read += 1;
7417            if next_offset >= end_offset {
7418                return Ok(());
7419            }
7420
7421            // Decode unknown envelopes for gaps in ordinals.
7422            while _next_ordinal_to_read < 1 {
7423                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7424                _next_ordinal_to_read += 1;
7425                next_offset += envelope_size;
7426            }
7427
7428            let next_out_of_line = decoder.next_out_of_line();
7429            let handles_before = decoder.remaining_handles();
7430            if let Some((inlined, num_bytes, num_handles)) =
7431                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7432            {
7433                let member_inline_size =
7434                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
7435                        decoder.context,
7436                    );
7437                if inlined != (member_inline_size <= 4) {
7438                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7439                }
7440                let inner_offset;
7441                let mut inner_depth = depth.clone();
7442                if inlined {
7443                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7444                    inner_offset = next_offset;
7445                } else {
7446                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7447                    inner_depth.increment()?;
7448                }
7449                let val_ref = self
7450                    .peer_sta_address
7451                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
7452                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
7453                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7454                {
7455                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7456                }
7457                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7458                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7459                }
7460            }
7461
7462            next_offset += envelope_size;
7463
7464            // Decode the remaining unknown envelopes.
7465            while next_offset < end_offset {
7466                _next_ordinal_to_read += 1;
7467                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7468                next_offset += envelope_size;
7469            }
7470
7471            Ok(())
7472        }
7473    }
7474
7475    impl WlanFullmacImplIfcDeauthIndRequest {
7476        #[inline(always)]
7477        fn max_ordinal_present(&self) -> u64 {
7478            if let Some(_) = self.locally_initiated {
7479                return 3;
7480            }
7481            if let Some(_) = self.reason_code {
7482                return 2;
7483            }
7484            if let Some(_) = self.peer_sta_address {
7485                return 1;
7486            }
7487            0
7488        }
7489    }
7490
7491    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplIfcDeauthIndRequest {
7492        type Borrowed<'a> = &'a Self;
7493        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7494            value
7495        }
7496    }
7497
7498    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplIfcDeauthIndRequest {
7499        type Owned = Self;
7500
7501        #[inline(always)]
7502        fn inline_align(_context: fidl::encoding::Context) -> usize {
7503            8
7504        }
7505
7506        #[inline(always)]
7507        fn inline_size(_context: fidl::encoding::Context) -> usize {
7508            16
7509        }
7510    }
7511
7512    unsafe impl<D: fidl::encoding::ResourceDialect>
7513        fidl::encoding::Encode<WlanFullmacImplIfcDeauthIndRequest, D>
7514        for &WlanFullmacImplIfcDeauthIndRequest
7515    {
7516        unsafe fn encode(
7517            self,
7518            encoder: &mut fidl::encoding::Encoder<'_, D>,
7519            offset: usize,
7520            mut depth: fidl::encoding::Depth,
7521        ) -> fidl::Result<()> {
7522            encoder.debug_check_bounds::<WlanFullmacImplIfcDeauthIndRequest>(offset);
7523            // Vector header
7524            let max_ordinal: u64 = self.max_ordinal_present();
7525            encoder.write_num(max_ordinal, offset);
7526            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
7527            // Calling encoder.out_of_line_offset(0) is not allowed.
7528            if max_ordinal == 0 {
7529                return Ok(());
7530            }
7531            depth.increment()?;
7532            let envelope_size = 8;
7533            let bytes_len = max_ordinal as usize * envelope_size;
7534            #[allow(unused_variables)]
7535            let offset = encoder.out_of_line_offset(bytes_len);
7536            let mut _prev_end_offset: usize = 0;
7537            if 1 > max_ordinal {
7538                return Ok(());
7539            }
7540
7541            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7542            // are envelope_size bytes.
7543            let cur_offset: usize = (1 - 1) * envelope_size;
7544
7545            // Zero reserved fields.
7546            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7547
7548            // Safety:
7549            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7550            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7551            //   envelope_size bytes, there is always sufficient room.
7552            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
7553                self.peer_sta_address
7554                    .as_ref()
7555                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
7556                encoder,
7557                offset + cur_offset,
7558                depth,
7559            )?;
7560
7561            _prev_end_offset = cur_offset + envelope_size;
7562            if 2 > max_ordinal {
7563                return Ok(());
7564            }
7565
7566            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7567            // are envelope_size bytes.
7568            let cur_offset: usize = (2 - 1) * envelope_size;
7569
7570            // Zero reserved fields.
7571            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7572
7573            // Safety:
7574            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7575            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7576            //   envelope_size bytes, there is always sufficient room.
7577            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_ieee80211__common::ReasonCode, D>(
7578            self.reason_code.as_ref().map(<fidl_fuchsia_wlan_ieee80211__common::ReasonCode as fidl::encoding::ValueTypeMarker>::borrow),
7579            encoder, offset + cur_offset, depth
7580        )?;
7581
7582            _prev_end_offset = cur_offset + envelope_size;
7583            if 3 > max_ordinal {
7584                return Ok(());
7585            }
7586
7587            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7588            // are envelope_size bytes.
7589            let cur_offset: usize = (3 - 1) * envelope_size;
7590
7591            // Zero reserved fields.
7592            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7593
7594            // Safety:
7595            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7596            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7597            //   envelope_size bytes, there is always sufficient room.
7598            fidl::encoding::encode_in_envelope_optional::<bool, D>(
7599                self.locally_initiated
7600                    .as_ref()
7601                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
7602                encoder,
7603                offset + cur_offset,
7604                depth,
7605            )?;
7606
7607            _prev_end_offset = cur_offset + envelope_size;
7608
7609            Ok(())
7610        }
7611    }
7612
7613    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7614        for WlanFullmacImplIfcDeauthIndRequest
7615    {
7616        #[inline(always)]
7617        fn new_empty() -> Self {
7618            Self::default()
7619        }
7620
7621        unsafe fn decode(
7622            &mut self,
7623            decoder: &mut fidl::encoding::Decoder<'_, D>,
7624            offset: usize,
7625            mut depth: fidl::encoding::Depth,
7626        ) -> fidl::Result<()> {
7627            decoder.debug_check_bounds::<Self>(offset);
7628            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
7629                None => return Err(fidl::Error::NotNullable),
7630                Some(len) => len,
7631            };
7632            // Calling decoder.out_of_line_offset(0) is not allowed.
7633            if len == 0 {
7634                return Ok(());
7635            };
7636            depth.increment()?;
7637            let envelope_size = 8;
7638            let bytes_len = len * envelope_size;
7639            let offset = decoder.out_of_line_offset(bytes_len)?;
7640            // Decode the envelope for each type.
7641            let mut _next_ordinal_to_read = 0;
7642            let mut next_offset = offset;
7643            let end_offset = offset + bytes_len;
7644            _next_ordinal_to_read += 1;
7645            if next_offset >= end_offset {
7646                return Ok(());
7647            }
7648
7649            // Decode unknown envelopes for gaps in ordinals.
7650            while _next_ordinal_to_read < 1 {
7651                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7652                _next_ordinal_to_read += 1;
7653                next_offset += envelope_size;
7654            }
7655
7656            let next_out_of_line = decoder.next_out_of_line();
7657            let handles_before = decoder.remaining_handles();
7658            if let Some((inlined, num_bytes, num_handles)) =
7659                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7660            {
7661                let member_inline_size =
7662                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
7663                        decoder.context,
7664                    );
7665                if inlined != (member_inline_size <= 4) {
7666                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7667                }
7668                let inner_offset;
7669                let mut inner_depth = depth.clone();
7670                if inlined {
7671                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7672                    inner_offset = next_offset;
7673                } else {
7674                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7675                    inner_depth.increment()?;
7676                }
7677                let val_ref = self
7678                    .peer_sta_address
7679                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
7680                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
7681                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7682                {
7683                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7684                }
7685                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7686                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7687                }
7688            }
7689
7690            next_offset += envelope_size;
7691            _next_ordinal_to_read += 1;
7692            if next_offset >= end_offset {
7693                return Ok(());
7694            }
7695
7696            // Decode unknown envelopes for gaps in ordinals.
7697            while _next_ordinal_to_read < 2 {
7698                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7699                _next_ordinal_to_read += 1;
7700                next_offset += envelope_size;
7701            }
7702
7703            let next_out_of_line = decoder.next_out_of_line();
7704            let handles_before = decoder.remaining_handles();
7705            if let Some((inlined, num_bytes, num_handles)) =
7706                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7707            {
7708                let member_inline_size = <fidl_fuchsia_wlan_ieee80211__common::ReasonCode as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7709                if inlined != (member_inline_size <= 4) {
7710                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7711                }
7712                let inner_offset;
7713                let mut inner_depth = depth.clone();
7714                if inlined {
7715                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7716                    inner_offset = next_offset;
7717                } else {
7718                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7719                    inner_depth.increment()?;
7720                }
7721                let val_ref = self.reason_code.get_or_insert_with(|| {
7722                    fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::ReasonCode, D)
7723                });
7724                fidl::decode!(
7725                    fidl_fuchsia_wlan_ieee80211__common::ReasonCode,
7726                    D,
7727                    val_ref,
7728                    decoder,
7729                    inner_offset,
7730                    inner_depth
7731                )?;
7732                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7733                {
7734                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7735                }
7736                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7737                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7738                }
7739            }
7740
7741            next_offset += envelope_size;
7742            _next_ordinal_to_read += 1;
7743            if next_offset >= end_offset {
7744                return Ok(());
7745            }
7746
7747            // Decode unknown envelopes for gaps in ordinals.
7748            while _next_ordinal_to_read < 3 {
7749                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7750                _next_ordinal_to_read += 1;
7751                next_offset += envelope_size;
7752            }
7753
7754            let next_out_of_line = decoder.next_out_of_line();
7755            let handles_before = decoder.remaining_handles();
7756            if let Some((inlined, num_bytes, num_handles)) =
7757                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7758            {
7759                let member_inline_size =
7760                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7761                if inlined != (member_inline_size <= 4) {
7762                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7763                }
7764                let inner_offset;
7765                let mut inner_depth = depth.clone();
7766                if inlined {
7767                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7768                    inner_offset = next_offset;
7769                } else {
7770                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7771                    inner_depth.increment()?;
7772                }
7773                let val_ref =
7774                    self.locally_initiated.get_or_insert_with(|| fidl::new_empty!(bool, D));
7775                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
7776                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7777                {
7778                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7779                }
7780                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7781                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7782                }
7783            }
7784
7785            next_offset += envelope_size;
7786
7787            // Decode the remaining unknown envelopes.
7788            while next_offset < end_offset {
7789                _next_ordinal_to_read += 1;
7790                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7791                next_offset += envelope_size;
7792            }
7793
7794            Ok(())
7795        }
7796    }
7797
7798    impl WlanFullmacImplIfcDisassocConfRequest {
7799        #[inline(always)]
7800        fn max_ordinal_present(&self) -> u64 {
7801            if let Some(_) = self.status {
7802                return 1;
7803            }
7804            0
7805        }
7806    }
7807
7808    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplIfcDisassocConfRequest {
7809        type Borrowed<'a> = &'a Self;
7810        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7811            value
7812        }
7813    }
7814
7815    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplIfcDisassocConfRequest {
7816        type Owned = Self;
7817
7818        #[inline(always)]
7819        fn inline_align(_context: fidl::encoding::Context) -> usize {
7820            8
7821        }
7822
7823        #[inline(always)]
7824        fn inline_size(_context: fidl::encoding::Context) -> usize {
7825            16
7826        }
7827    }
7828
7829    unsafe impl<D: fidl::encoding::ResourceDialect>
7830        fidl::encoding::Encode<WlanFullmacImplIfcDisassocConfRequest, D>
7831        for &WlanFullmacImplIfcDisassocConfRequest
7832    {
7833        unsafe fn encode(
7834            self,
7835            encoder: &mut fidl::encoding::Encoder<'_, D>,
7836            offset: usize,
7837            mut depth: fidl::encoding::Depth,
7838        ) -> fidl::Result<()> {
7839            encoder.debug_check_bounds::<WlanFullmacImplIfcDisassocConfRequest>(offset);
7840            // Vector header
7841            let max_ordinal: u64 = self.max_ordinal_present();
7842            encoder.write_num(max_ordinal, offset);
7843            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
7844            // Calling encoder.out_of_line_offset(0) is not allowed.
7845            if max_ordinal == 0 {
7846                return Ok(());
7847            }
7848            depth.increment()?;
7849            let envelope_size = 8;
7850            let bytes_len = max_ordinal as usize * envelope_size;
7851            #[allow(unused_variables)]
7852            let offset = encoder.out_of_line_offset(bytes_len);
7853            let mut _prev_end_offset: usize = 0;
7854            if 1 > max_ordinal {
7855                return Ok(());
7856            }
7857
7858            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7859            // are envelope_size bytes.
7860            let cur_offset: usize = (1 - 1) * envelope_size;
7861
7862            // Zero reserved fields.
7863            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7864
7865            // Safety:
7866            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7867            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7868            //   envelope_size bytes, there is always sufficient room.
7869            fidl::encoding::encode_in_envelope_optional::<i32, D>(
7870                self.status.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
7871                encoder,
7872                offset + cur_offset,
7873                depth,
7874            )?;
7875
7876            _prev_end_offset = cur_offset + envelope_size;
7877
7878            Ok(())
7879        }
7880    }
7881
7882    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7883        for WlanFullmacImplIfcDisassocConfRequest
7884    {
7885        #[inline(always)]
7886        fn new_empty() -> Self {
7887            Self::default()
7888        }
7889
7890        unsafe fn decode(
7891            &mut self,
7892            decoder: &mut fidl::encoding::Decoder<'_, D>,
7893            offset: usize,
7894            mut depth: fidl::encoding::Depth,
7895        ) -> fidl::Result<()> {
7896            decoder.debug_check_bounds::<Self>(offset);
7897            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
7898                None => return Err(fidl::Error::NotNullable),
7899                Some(len) => len,
7900            };
7901            // Calling decoder.out_of_line_offset(0) is not allowed.
7902            if len == 0 {
7903                return Ok(());
7904            };
7905            depth.increment()?;
7906            let envelope_size = 8;
7907            let bytes_len = len * envelope_size;
7908            let offset = decoder.out_of_line_offset(bytes_len)?;
7909            // Decode the envelope for each type.
7910            let mut _next_ordinal_to_read = 0;
7911            let mut next_offset = offset;
7912            let end_offset = offset + bytes_len;
7913            _next_ordinal_to_read += 1;
7914            if next_offset >= end_offset {
7915                return Ok(());
7916            }
7917
7918            // Decode unknown envelopes for gaps in ordinals.
7919            while _next_ordinal_to_read < 1 {
7920                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7921                _next_ordinal_to_read += 1;
7922                next_offset += envelope_size;
7923            }
7924
7925            let next_out_of_line = decoder.next_out_of_line();
7926            let handles_before = decoder.remaining_handles();
7927            if let Some((inlined, num_bytes, num_handles)) =
7928                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7929            {
7930                let member_inline_size =
7931                    <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7932                if inlined != (member_inline_size <= 4) {
7933                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7934                }
7935                let inner_offset;
7936                let mut inner_depth = depth.clone();
7937                if inlined {
7938                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7939                    inner_offset = next_offset;
7940                } else {
7941                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7942                    inner_depth.increment()?;
7943                }
7944                let val_ref = self.status.get_or_insert_with(|| fidl::new_empty!(i32, D));
7945                fidl::decode!(i32, D, val_ref, decoder, inner_offset, inner_depth)?;
7946                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7947                {
7948                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7949                }
7950                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7951                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7952                }
7953            }
7954
7955            next_offset += envelope_size;
7956
7957            // Decode the remaining unknown envelopes.
7958            while next_offset < end_offset {
7959                _next_ordinal_to_read += 1;
7960                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7961                next_offset += envelope_size;
7962            }
7963
7964            Ok(())
7965        }
7966    }
7967
7968    impl WlanFullmacImplIfcDisassocIndRequest {
7969        #[inline(always)]
7970        fn max_ordinal_present(&self) -> u64 {
7971            if let Some(_) = self.locally_initiated {
7972                return 3;
7973            }
7974            if let Some(_) = self.reason_code {
7975                return 2;
7976            }
7977            if let Some(_) = self.peer_sta_address {
7978                return 1;
7979            }
7980            0
7981        }
7982    }
7983
7984    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplIfcDisassocIndRequest {
7985        type Borrowed<'a> = &'a Self;
7986        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7987            value
7988        }
7989    }
7990
7991    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplIfcDisassocIndRequest {
7992        type Owned = Self;
7993
7994        #[inline(always)]
7995        fn inline_align(_context: fidl::encoding::Context) -> usize {
7996            8
7997        }
7998
7999        #[inline(always)]
8000        fn inline_size(_context: fidl::encoding::Context) -> usize {
8001            16
8002        }
8003    }
8004
8005    unsafe impl<D: fidl::encoding::ResourceDialect>
8006        fidl::encoding::Encode<WlanFullmacImplIfcDisassocIndRequest, D>
8007        for &WlanFullmacImplIfcDisassocIndRequest
8008    {
8009        unsafe fn encode(
8010            self,
8011            encoder: &mut fidl::encoding::Encoder<'_, D>,
8012            offset: usize,
8013            mut depth: fidl::encoding::Depth,
8014        ) -> fidl::Result<()> {
8015            encoder.debug_check_bounds::<WlanFullmacImplIfcDisassocIndRequest>(offset);
8016            // Vector header
8017            let max_ordinal: u64 = self.max_ordinal_present();
8018            encoder.write_num(max_ordinal, offset);
8019            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
8020            // Calling encoder.out_of_line_offset(0) is not allowed.
8021            if max_ordinal == 0 {
8022                return Ok(());
8023            }
8024            depth.increment()?;
8025            let envelope_size = 8;
8026            let bytes_len = max_ordinal as usize * envelope_size;
8027            #[allow(unused_variables)]
8028            let offset = encoder.out_of_line_offset(bytes_len);
8029            let mut _prev_end_offset: usize = 0;
8030            if 1 > max_ordinal {
8031                return Ok(());
8032            }
8033
8034            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
8035            // are envelope_size bytes.
8036            let cur_offset: usize = (1 - 1) * envelope_size;
8037
8038            // Zero reserved fields.
8039            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
8040
8041            // Safety:
8042            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
8043            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
8044            //   envelope_size bytes, there is always sufficient room.
8045            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
8046                self.peer_sta_address
8047                    .as_ref()
8048                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
8049                encoder,
8050                offset + cur_offset,
8051                depth,
8052            )?;
8053
8054            _prev_end_offset = cur_offset + envelope_size;
8055            if 2 > max_ordinal {
8056                return Ok(());
8057            }
8058
8059            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
8060            // are envelope_size bytes.
8061            let cur_offset: usize = (2 - 1) * envelope_size;
8062
8063            // Zero reserved fields.
8064            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
8065
8066            // Safety:
8067            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
8068            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
8069            //   envelope_size bytes, there is always sufficient room.
8070            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_ieee80211__common::ReasonCode, D>(
8071            self.reason_code.as_ref().map(<fidl_fuchsia_wlan_ieee80211__common::ReasonCode as fidl::encoding::ValueTypeMarker>::borrow),
8072            encoder, offset + cur_offset, depth
8073        )?;
8074
8075            _prev_end_offset = cur_offset + envelope_size;
8076            if 3 > max_ordinal {
8077                return Ok(());
8078            }
8079
8080            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
8081            // are envelope_size bytes.
8082            let cur_offset: usize = (3 - 1) * envelope_size;
8083
8084            // Zero reserved fields.
8085            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
8086
8087            // Safety:
8088            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
8089            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
8090            //   envelope_size bytes, there is always sufficient room.
8091            fidl::encoding::encode_in_envelope_optional::<bool, D>(
8092                self.locally_initiated
8093                    .as_ref()
8094                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
8095                encoder,
8096                offset + cur_offset,
8097                depth,
8098            )?;
8099
8100            _prev_end_offset = cur_offset + envelope_size;
8101
8102            Ok(())
8103        }
8104    }
8105
8106    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8107        for WlanFullmacImplIfcDisassocIndRequest
8108    {
8109        #[inline(always)]
8110        fn new_empty() -> Self {
8111            Self::default()
8112        }
8113
8114        unsafe fn decode(
8115            &mut self,
8116            decoder: &mut fidl::encoding::Decoder<'_, D>,
8117            offset: usize,
8118            mut depth: fidl::encoding::Depth,
8119        ) -> fidl::Result<()> {
8120            decoder.debug_check_bounds::<Self>(offset);
8121            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
8122                None => return Err(fidl::Error::NotNullable),
8123                Some(len) => len,
8124            };
8125            // Calling decoder.out_of_line_offset(0) is not allowed.
8126            if len == 0 {
8127                return Ok(());
8128            };
8129            depth.increment()?;
8130            let envelope_size = 8;
8131            let bytes_len = len * envelope_size;
8132            let offset = decoder.out_of_line_offset(bytes_len)?;
8133            // Decode the envelope for each type.
8134            let mut _next_ordinal_to_read = 0;
8135            let mut next_offset = offset;
8136            let end_offset = offset + bytes_len;
8137            _next_ordinal_to_read += 1;
8138            if next_offset >= end_offset {
8139                return Ok(());
8140            }
8141
8142            // Decode unknown envelopes for gaps in ordinals.
8143            while _next_ordinal_to_read < 1 {
8144                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8145                _next_ordinal_to_read += 1;
8146                next_offset += envelope_size;
8147            }
8148
8149            let next_out_of_line = decoder.next_out_of_line();
8150            let handles_before = decoder.remaining_handles();
8151            if let Some((inlined, num_bytes, num_handles)) =
8152                fidl::encoding::decode_envelope_header(decoder, next_offset)?
8153            {
8154                let member_inline_size =
8155                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
8156                        decoder.context,
8157                    );
8158                if inlined != (member_inline_size <= 4) {
8159                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
8160                }
8161                let inner_offset;
8162                let mut inner_depth = depth.clone();
8163                if inlined {
8164                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
8165                    inner_offset = next_offset;
8166                } else {
8167                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8168                    inner_depth.increment()?;
8169                }
8170                let val_ref = self
8171                    .peer_sta_address
8172                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
8173                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
8174                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
8175                {
8176                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
8177                }
8178                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8179                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8180                }
8181            }
8182
8183            next_offset += envelope_size;
8184            _next_ordinal_to_read += 1;
8185            if next_offset >= end_offset {
8186                return Ok(());
8187            }
8188
8189            // Decode unknown envelopes for gaps in ordinals.
8190            while _next_ordinal_to_read < 2 {
8191                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8192                _next_ordinal_to_read += 1;
8193                next_offset += envelope_size;
8194            }
8195
8196            let next_out_of_line = decoder.next_out_of_line();
8197            let handles_before = decoder.remaining_handles();
8198            if let Some((inlined, num_bytes, num_handles)) =
8199                fidl::encoding::decode_envelope_header(decoder, next_offset)?
8200            {
8201                let member_inline_size = <fidl_fuchsia_wlan_ieee80211__common::ReasonCode as fidl::encoding::TypeMarker>::inline_size(decoder.context);
8202                if inlined != (member_inline_size <= 4) {
8203                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
8204                }
8205                let inner_offset;
8206                let mut inner_depth = depth.clone();
8207                if inlined {
8208                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
8209                    inner_offset = next_offset;
8210                } else {
8211                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8212                    inner_depth.increment()?;
8213                }
8214                let val_ref = self.reason_code.get_or_insert_with(|| {
8215                    fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::ReasonCode, D)
8216                });
8217                fidl::decode!(
8218                    fidl_fuchsia_wlan_ieee80211__common::ReasonCode,
8219                    D,
8220                    val_ref,
8221                    decoder,
8222                    inner_offset,
8223                    inner_depth
8224                )?;
8225                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
8226                {
8227                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
8228                }
8229                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8230                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8231                }
8232            }
8233
8234            next_offset += envelope_size;
8235            _next_ordinal_to_read += 1;
8236            if next_offset >= end_offset {
8237                return Ok(());
8238            }
8239
8240            // Decode unknown envelopes for gaps in ordinals.
8241            while _next_ordinal_to_read < 3 {
8242                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8243                _next_ordinal_to_read += 1;
8244                next_offset += envelope_size;
8245            }
8246
8247            let next_out_of_line = decoder.next_out_of_line();
8248            let handles_before = decoder.remaining_handles();
8249            if let Some((inlined, num_bytes, num_handles)) =
8250                fidl::encoding::decode_envelope_header(decoder, next_offset)?
8251            {
8252                let member_inline_size =
8253                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
8254                if inlined != (member_inline_size <= 4) {
8255                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
8256                }
8257                let inner_offset;
8258                let mut inner_depth = depth.clone();
8259                if inlined {
8260                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
8261                    inner_offset = next_offset;
8262                } else {
8263                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8264                    inner_depth.increment()?;
8265                }
8266                let val_ref =
8267                    self.locally_initiated.get_or_insert_with(|| fidl::new_empty!(bool, D));
8268                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
8269                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
8270                {
8271                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
8272                }
8273                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8274                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8275                }
8276            }
8277
8278            next_offset += envelope_size;
8279
8280            // Decode the remaining unknown envelopes.
8281            while next_offset < end_offset {
8282                _next_ordinal_to_read += 1;
8283                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8284                next_offset += envelope_size;
8285            }
8286
8287            Ok(())
8288        }
8289    }
8290
8291    impl WlanFullmacImplIfcEapolConfRequest {
8292        #[inline(always)]
8293        fn max_ordinal_present(&self) -> u64 {
8294            if let Some(_) = self.dst_addr {
8295                return 2;
8296            }
8297            if let Some(_) = self.result_code {
8298                return 1;
8299            }
8300            0
8301        }
8302    }
8303
8304    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplIfcEapolConfRequest {
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 WlanFullmacImplIfcEapolConfRequest {
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>
8326        fidl::encoding::Encode<WlanFullmacImplIfcEapolConfRequest, D>
8327        for &WlanFullmacImplIfcEapolConfRequest
8328    {
8329        unsafe fn encode(
8330            self,
8331            encoder: &mut fidl::encoding::Encoder<'_, D>,
8332            offset: usize,
8333            mut depth: fidl::encoding::Depth,
8334        ) -> fidl::Result<()> {
8335            encoder.debug_check_bounds::<WlanFullmacImplIfcEapolConfRequest>(offset);
8336            // Vector header
8337            let max_ordinal: u64 = self.max_ordinal_present();
8338            encoder.write_num(max_ordinal, offset);
8339            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
8340            // Calling encoder.out_of_line_offset(0) is not allowed.
8341            if max_ordinal == 0 {
8342                return Ok(());
8343            }
8344            depth.increment()?;
8345            let envelope_size = 8;
8346            let bytes_len = max_ordinal as usize * envelope_size;
8347            #[allow(unused_variables)]
8348            let offset = encoder.out_of_line_offset(bytes_len);
8349            let mut _prev_end_offset: usize = 0;
8350            if 1 > max_ordinal {
8351                return Ok(());
8352            }
8353
8354            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
8355            // are envelope_size bytes.
8356            let cur_offset: usize = (1 - 1) * envelope_size;
8357
8358            // Zero reserved fields.
8359            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
8360
8361            // Safety:
8362            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
8363            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
8364            //   envelope_size bytes, there is always sufficient room.
8365            fidl::encoding::encode_in_envelope_optional::<EapolTxResult, D>(
8366                self.result_code
8367                    .as_ref()
8368                    .map(<EapolTxResult as fidl::encoding::ValueTypeMarker>::borrow),
8369                encoder,
8370                offset + cur_offset,
8371                depth,
8372            )?;
8373
8374            _prev_end_offset = cur_offset + envelope_size;
8375            if 2 > max_ordinal {
8376                return Ok(());
8377            }
8378
8379            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
8380            // are envelope_size bytes.
8381            let cur_offset: usize = (2 - 1) * envelope_size;
8382
8383            // Zero reserved fields.
8384            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
8385
8386            // Safety:
8387            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
8388            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
8389            //   envelope_size bytes, there is always sufficient room.
8390            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
8391                self.dst_addr
8392                    .as_ref()
8393                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
8394                encoder,
8395                offset + cur_offset,
8396                depth,
8397            )?;
8398
8399            _prev_end_offset = cur_offset + envelope_size;
8400
8401            Ok(())
8402        }
8403    }
8404
8405    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8406        for WlanFullmacImplIfcEapolConfRequest
8407    {
8408        #[inline(always)]
8409        fn new_empty() -> Self {
8410            Self::default()
8411        }
8412
8413        unsafe fn decode(
8414            &mut self,
8415            decoder: &mut fidl::encoding::Decoder<'_, D>,
8416            offset: usize,
8417            mut depth: fidl::encoding::Depth,
8418        ) -> fidl::Result<()> {
8419            decoder.debug_check_bounds::<Self>(offset);
8420            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
8421                None => return Err(fidl::Error::NotNullable),
8422                Some(len) => len,
8423            };
8424            // Calling decoder.out_of_line_offset(0) is not allowed.
8425            if len == 0 {
8426                return Ok(());
8427            };
8428            depth.increment()?;
8429            let envelope_size = 8;
8430            let bytes_len = len * envelope_size;
8431            let offset = decoder.out_of_line_offset(bytes_len)?;
8432            // Decode the envelope for each type.
8433            let mut _next_ordinal_to_read = 0;
8434            let mut next_offset = offset;
8435            let end_offset = offset + bytes_len;
8436            _next_ordinal_to_read += 1;
8437            if next_offset >= end_offset {
8438                return Ok(());
8439            }
8440
8441            // Decode unknown envelopes for gaps in ordinals.
8442            while _next_ordinal_to_read < 1 {
8443                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8444                _next_ordinal_to_read += 1;
8445                next_offset += envelope_size;
8446            }
8447
8448            let next_out_of_line = decoder.next_out_of_line();
8449            let handles_before = decoder.remaining_handles();
8450            if let Some((inlined, num_bytes, num_handles)) =
8451                fidl::encoding::decode_envelope_header(decoder, next_offset)?
8452            {
8453                let member_inline_size =
8454                    <EapolTxResult as fidl::encoding::TypeMarker>::inline_size(decoder.context);
8455                if inlined != (member_inline_size <= 4) {
8456                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
8457                }
8458                let inner_offset;
8459                let mut inner_depth = depth.clone();
8460                if inlined {
8461                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
8462                    inner_offset = next_offset;
8463                } else {
8464                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8465                    inner_depth.increment()?;
8466                }
8467                let val_ref =
8468                    self.result_code.get_or_insert_with(|| fidl::new_empty!(EapolTxResult, D));
8469                fidl::decode!(EapolTxResult, D, val_ref, decoder, inner_offset, inner_depth)?;
8470                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
8471                {
8472                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
8473                }
8474                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8475                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8476                }
8477            }
8478
8479            next_offset += envelope_size;
8480            _next_ordinal_to_read += 1;
8481            if next_offset >= end_offset {
8482                return Ok(());
8483            }
8484
8485            // Decode unknown envelopes for gaps in ordinals.
8486            while _next_ordinal_to_read < 2 {
8487                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8488                _next_ordinal_to_read += 1;
8489                next_offset += envelope_size;
8490            }
8491
8492            let next_out_of_line = decoder.next_out_of_line();
8493            let handles_before = decoder.remaining_handles();
8494            if let Some((inlined, num_bytes, num_handles)) =
8495                fidl::encoding::decode_envelope_header(decoder, next_offset)?
8496            {
8497                let member_inline_size =
8498                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
8499                        decoder.context,
8500                    );
8501                if inlined != (member_inline_size <= 4) {
8502                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
8503                }
8504                let inner_offset;
8505                let mut inner_depth = depth.clone();
8506                if inlined {
8507                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
8508                    inner_offset = next_offset;
8509                } else {
8510                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8511                    inner_depth.increment()?;
8512                }
8513                let val_ref = self
8514                    .dst_addr
8515                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
8516                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
8517                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
8518                {
8519                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
8520                }
8521                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8522                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8523                }
8524            }
8525
8526            next_offset += envelope_size;
8527
8528            // Decode the remaining unknown envelopes.
8529            while next_offset < end_offset {
8530                _next_ordinal_to_read += 1;
8531                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8532                next_offset += envelope_size;
8533            }
8534
8535            Ok(())
8536        }
8537    }
8538
8539    impl WlanFullmacImplIfcEapolIndRequest {
8540        #[inline(always)]
8541        fn max_ordinal_present(&self) -> u64 {
8542            if let Some(_) = self.data {
8543                return 3;
8544            }
8545            if let Some(_) = self.dst_addr {
8546                return 2;
8547            }
8548            if let Some(_) = self.src_addr {
8549                return 1;
8550            }
8551            0
8552        }
8553    }
8554
8555    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplIfcEapolIndRequest {
8556        type Borrowed<'a> = &'a Self;
8557        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8558            value
8559        }
8560    }
8561
8562    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplIfcEapolIndRequest {
8563        type Owned = Self;
8564
8565        #[inline(always)]
8566        fn inline_align(_context: fidl::encoding::Context) -> usize {
8567            8
8568        }
8569
8570        #[inline(always)]
8571        fn inline_size(_context: fidl::encoding::Context) -> usize {
8572            16
8573        }
8574    }
8575
8576    unsafe impl<D: fidl::encoding::ResourceDialect>
8577        fidl::encoding::Encode<WlanFullmacImplIfcEapolIndRequest, D>
8578        for &WlanFullmacImplIfcEapolIndRequest
8579    {
8580        unsafe fn encode(
8581            self,
8582            encoder: &mut fidl::encoding::Encoder<'_, D>,
8583            offset: usize,
8584            mut depth: fidl::encoding::Depth,
8585        ) -> fidl::Result<()> {
8586            encoder.debug_check_bounds::<WlanFullmacImplIfcEapolIndRequest>(offset);
8587            // Vector header
8588            let max_ordinal: u64 = self.max_ordinal_present();
8589            encoder.write_num(max_ordinal, offset);
8590            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
8591            // Calling encoder.out_of_line_offset(0) is not allowed.
8592            if max_ordinal == 0 {
8593                return Ok(());
8594            }
8595            depth.increment()?;
8596            let envelope_size = 8;
8597            let bytes_len = max_ordinal as usize * envelope_size;
8598            #[allow(unused_variables)]
8599            let offset = encoder.out_of_line_offset(bytes_len);
8600            let mut _prev_end_offset: usize = 0;
8601            if 1 > max_ordinal {
8602                return Ok(());
8603            }
8604
8605            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
8606            // are envelope_size bytes.
8607            let cur_offset: usize = (1 - 1) * envelope_size;
8608
8609            // Zero reserved fields.
8610            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
8611
8612            // Safety:
8613            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
8614            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
8615            //   envelope_size bytes, there is always sufficient room.
8616            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
8617                self.src_addr
8618                    .as_ref()
8619                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
8620                encoder,
8621                offset + cur_offset,
8622                depth,
8623            )?;
8624
8625            _prev_end_offset = cur_offset + envelope_size;
8626            if 2 > max_ordinal {
8627                return Ok(());
8628            }
8629
8630            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
8631            // are envelope_size bytes.
8632            let cur_offset: usize = (2 - 1) * envelope_size;
8633
8634            // Zero reserved fields.
8635            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
8636
8637            // Safety:
8638            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
8639            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
8640            //   envelope_size bytes, there is always sufficient room.
8641            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
8642                self.dst_addr
8643                    .as_ref()
8644                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
8645                encoder,
8646                offset + cur_offset,
8647                depth,
8648            )?;
8649
8650            _prev_end_offset = cur_offset + envelope_size;
8651            if 3 > max_ordinal {
8652                return Ok(());
8653            }
8654
8655            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
8656            // are envelope_size bytes.
8657            let cur_offset: usize = (3 - 1) * envelope_size;
8658
8659            // Zero reserved fields.
8660            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
8661
8662            // Safety:
8663            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
8664            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
8665            //   envelope_size bytes, there is always sufficient room.
8666            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<u8>, D>(
8667            self.data.as_ref().map(<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow),
8668            encoder, offset + cur_offset, depth
8669        )?;
8670
8671            _prev_end_offset = cur_offset + envelope_size;
8672
8673            Ok(())
8674        }
8675    }
8676
8677    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8678        for WlanFullmacImplIfcEapolIndRequest
8679    {
8680        #[inline(always)]
8681        fn new_empty() -> Self {
8682            Self::default()
8683        }
8684
8685        unsafe fn decode(
8686            &mut self,
8687            decoder: &mut fidl::encoding::Decoder<'_, D>,
8688            offset: usize,
8689            mut depth: fidl::encoding::Depth,
8690        ) -> fidl::Result<()> {
8691            decoder.debug_check_bounds::<Self>(offset);
8692            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
8693                None => return Err(fidl::Error::NotNullable),
8694                Some(len) => len,
8695            };
8696            // Calling decoder.out_of_line_offset(0) is not allowed.
8697            if len == 0 {
8698                return Ok(());
8699            };
8700            depth.increment()?;
8701            let envelope_size = 8;
8702            let bytes_len = len * envelope_size;
8703            let offset = decoder.out_of_line_offset(bytes_len)?;
8704            // Decode the envelope for each type.
8705            let mut _next_ordinal_to_read = 0;
8706            let mut next_offset = offset;
8707            let end_offset = offset + bytes_len;
8708            _next_ordinal_to_read += 1;
8709            if next_offset >= end_offset {
8710                return Ok(());
8711            }
8712
8713            // Decode unknown envelopes for gaps in ordinals.
8714            while _next_ordinal_to_read < 1 {
8715                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8716                _next_ordinal_to_read += 1;
8717                next_offset += envelope_size;
8718            }
8719
8720            let next_out_of_line = decoder.next_out_of_line();
8721            let handles_before = decoder.remaining_handles();
8722            if let Some((inlined, num_bytes, num_handles)) =
8723                fidl::encoding::decode_envelope_header(decoder, next_offset)?
8724            {
8725                let member_inline_size =
8726                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
8727                        decoder.context,
8728                    );
8729                if inlined != (member_inline_size <= 4) {
8730                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
8731                }
8732                let inner_offset;
8733                let mut inner_depth = depth.clone();
8734                if inlined {
8735                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
8736                    inner_offset = next_offset;
8737                } else {
8738                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8739                    inner_depth.increment()?;
8740                }
8741                let val_ref = self
8742                    .src_addr
8743                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
8744                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
8745                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
8746                {
8747                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
8748                }
8749                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8750                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8751                }
8752            }
8753
8754            next_offset += envelope_size;
8755            _next_ordinal_to_read += 1;
8756            if next_offset >= end_offset {
8757                return Ok(());
8758            }
8759
8760            // Decode unknown envelopes for gaps in ordinals.
8761            while _next_ordinal_to_read < 2 {
8762                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8763                _next_ordinal_to_read += 1;
8764                next_offset += envelope_size;
8765            }
8766
8767            let next_out_of_line = decoder.next_out_of_line();
8768            let handles_before = decoder.remaining_handles();
8769            if let Some((inlined, num_bytes, num_handles)) =
8770                fidl::encoding::decode_envelope_header(decoder, next_offset)?
8771            {
8772                let member_inline_size =
8773                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
8774                        decoder.context,
8775                    );
8776                if inlined != (member_inline_size <= 4) {
8777                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
8778                }
8779                let inner_offset;
8780                let mut inner_depth = depth.clone();
8781                if inlined {
8782                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
8783                    inner_offset = next_offset;
8784                } else {
8785                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8786                    inner_depth.increment()?;
8787                }
8788                let val_ref = self
8789                    .dst_addr
8790                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
8791                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
8792                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
8793                {
8794                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
8795                }
8796                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8797                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8798                }
8799            }
8800
8801            next_offset += envelope_size;
8802            _next_ordinal_to_read += 1;
8803            if next_offset >= end_offset {
8804                return Ok(());
8805            }
8806
8807            // Decode unknown envelopes for gaps in ordinals.
8808            while _next_ordinal_to_read < 3 {
8809                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8810                _next_ordinal_to_read += 1;
8811                next_offset += envelope_size;
8812            }
8813
8814            let next_out_of_line = decoder.next_out_of_line();
8815            let handles_before = decoder.remaining_handles();
8816            if let Some((inlined, num_bytes, num_handles)) =
8817                fidl::encoding::decode_envelope_header(decoder, next_offset)?
8818            {
8819                let member_inline_size = <fidl::encoding::UnboundedVector<u8> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
8820                if inlined != (member_inline_size <= 4) {
8821                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
8822                }
8823                let inner_offset;
8824                let mut inner_depth = depth.clone();
8825                if inlined {
8826                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
8827                    inner_offset = next_offset;
8828                } else {
8829                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8830                    inner_depth.increment()?;
8831                }
8832                let val_ref = self.data.get_or_insert_with(|| {
8833                    fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D)
8834                });
8835                fidl::decode!(
8836                    fidl::encoding::UnboundedVector<u8>,
8837                    D,
8838                    val_ref,
8839                    decoder,
8840                    inner_offset,
8841                    inner_depth
8842                )?;
8843                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
8844                {
8845                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
8846                }
8847                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8848                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8849                }
8850            }
8851
8852            next_offset += envelope_size;
8853
8854            // Decode the remaining unknown envelopes.
8855            while next_offset < end_offset {
8856                _next_ordinal_to_read += 1;
8857                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8858                next_offset += envelope_size;
8859            }
8860
8861            Ok(())
8862        }
8863    }
8864
8865    impl WlanFullmacImplIfcOnPmkAvailableRequest {
8866        #[inline(always)]
8867        fn max_ordinal_present(&self) -> u64 {
8868            if let Some(_) = self.pmkid {
8869                return 2;
8870            }
8871            if let Some(_) = self.pmk {
8872                return 1;
8873            }
8874            0
8875        }
8876    }
8877
8878    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplIfcOnPmkAvailableRequest {
8879        type Borrowed<'a> = &'a Self;
8880        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8881            value
8882        }
8883    }
8884
8885    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplIfcOnPmkAvailableRequest {
8886        type Owned = Self;
8887
8888        #[inline(always)]
8889        fn inline_align(_context: fidl::encoding::Context) -> usize {
8890            8
8891        }
8892
8893        #[inline(always)]
8894        fn inline_size(_context: fidl::encoding::Context) -> usize {
8895            16
8896        }
8897    }
8898
8899    unsafe impl<D: fidl::encoding::ResourceDialect>
8900        fidl::encoding::Encode<WlanFullmacImplIfcOnPmkAvailableRequest, D>
8901        for &WlanFullmacImplIfcOnPmkAvailableRequest
8902    {
8903        unsafe fn encode(
8904            self,
8905            encoder: &mut fidl::encoding::Encoder<'_, D>,
8906            offset: usize,
8907            mut depth: fidl::encoding::Depth,
8908        ) -> fidl::Result<()> {
8909            encoder.debug_check_bounds::<WlanFullmacImplIfcOnPmkAvailableRequest>(offset);
8910            // Vector header
8911            let max_ordinal: u64 = self.max_ordinal_present();
8912            encoder.write_num(max_ordinal, offset);
8913            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
8914            // Calling encoder.out_of_line_offset(0) is not allowed.
8915            if max_ordinal == 0 {
8916                return Ok(());
8917            }
8918            depth.increment()?;
8919            let envelope_size = 8;
8920            let bytes_len = max_ordinal as usize * envelope_size;
8921            #[allow(unused_variables)]
8922            let offset = encoder.out_of_line_offset(bytes_len);
8923            let mut _prev_end_offset: usize = 0;
8924            if 1 > max_ordinal {
8925                return Ok(());
8926            }
8927
8928            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
8929            // are envelope_size bytes.
8930            let cur_offset: usize = (1 - 1) * envelope_size;
8931
8932            // Zero reserved fields.
8933            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
8934
8935            // Safety:
8936            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
8937            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
8938            //   envelope_size bytes, there is always sufficient room.
8939            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<u8>, D>(
8940            self.pmk.as_ref().map(<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow),
8941            encoder, offset + cur_offset, depth
8942        )?;
8943
8944            _prev_end_offset = cur_offset + envelope_size;
8945            if 2 > max_ordinal {
8946                return Ok(());
8947            }
8948
8949            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
8950            // are envelope_size bytes.
8951            let cur_offset: usize = (2 - 1) * envelope_size;
8952
8953            // Zero reserved fields.
8954            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
8955
8956            // Safety:
8957            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
8958            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
8959            //   envelope_size bytes, there is always sufficient room.
8960            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<u8>, D>(
8961            self.pmkid.as_ref().map(<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow),
8962            encoder, offset + cur_offset, depth
8963        )?;
8964
8965            _prev_end_offset = cur_offset + envelope_size;
8966
8967            Ok(())
8968        }
8969    }
8970
8971    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8972        for WlanFullmacImplIfcOnPmkAvailableRequest
8973    {
8974        #[inline(always)]
8975        fn new_empty() -> Self {
8976            Self::default()
8977        }
8978
8979        unsafe fn decode(
8980            &mut self,
8981            decoder: &mut fidl::encoding::Decoder<'_, D>,
8982            offset: usize,
8983            mut depth: fidl::encoding::Depth,
8984        ) -> fidl::Result<()> {
8985            decoder.debug_check_bounds::<Self>(offset);
8986            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
8987                None => return Err(fidl::Error::NotNullable),
8988                Some(len) => len,
8989            };
8990            // Calling decoder.out_of_line_offset(0) is not allowed.
8991            if len == 0 {
8992                return Ok(());
8993            };
8994            depth.increment()?;
8995            let envelope_size = 8;
8996            let bytes_len = len * envelope_size;
8997            let offset = decoder.out_of_line_offset(bytes_len)?;
8998            // Decode the envelope for each type.
8999            let mut _next_ordinal_to_read = 0;
9000            let mut next_offset = offset;
9001            let end_offset = offset + bytes_len;
9002            _next_ordinal_to_read += 1;
9003            if next_offset >= end_offset {
9004                return Ok(());
9005            }
9006
9007            // Decode unknown envelopes for gaps in ordinals.
9008            while _next_ordinal_to_read < 1 {
9009                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9010                _next_ordinal_to_read += 1;
9011                next_offset += envelope_size;
9012            }
9013
9014            let next_out_of_line = decoder.next_out_of_line();
9015            let handles_before = decoder.remaining_handles();
9016            if let Some((inlined, num_bytes, num_handles)) =
9017                fidl::encoding::decode_envelope_header(decoder, next_offset)?
9018            {
9019                let member_inline_size = <fidl::encoding::UnboundedVector<u8> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
9020                if inlined != (member_inline_size <= 4) {
9021                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
9022                }
9023                let inner_offset;
9024                let mut inner_depth = depth.clone();
9025                if inlined {
9026                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
9027                    inner_offset = next_offset;
9028                } else {
9029                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
9030                    inner_depth.increment()?;
9031                }
9032                let val_ref = self.pmk.get_or_insert_with(|| {
9033                    fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D)
9034                });
9035                fidl::decode!(
9036                    fidl::encoding::UnboundedVector<u8>,
9037                    D,
9038                    val_ref,
9039                    decoder,
9040                    inner_offset,
9041                    inner_depth
9042                )?;
9043                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
9044                {
9045                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
9046                }
9047                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
9048                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
9049                }
9050            }
9051
9052            next_offset += envelope_size;
9053            _next_ordinal_to_read += 1;
9054            if next_offset >= end_offset {
9055                return Ok(());
9056            }
9057
9058            // Decode unknown envelopes for gaps in ordinals.
9059            while _next_ordinal_to_read < 2 {
9060                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9061                _next_ordinal_to_read += 1;
9062                next_offset += envelope_size;
9063            }
9064
9065            let next_out_of_line = decoder.next_out_of_line();
9066            let handles_before = decoder.remaining_handles();
9067            if let Some((inlined, num_bytes, num_handles)) =
9068                fidl::encoding::decode_envelope_header(decoder, next_offset)?
9069            {
9070                let member_inline_size = <fidl::encoding::UnboundedVector<u8> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
9071                if inlined != (member_inline_size <= 4) {
9072                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
9073                }
9074                let inner_offset;
9075                let mut inner_depth = depth.clone();
9076                if inlined {
9077                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
9078                    inner_offset = next_offset;
9079                } else {
9080                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
9081                    inner_depth.increment()?;
9082                }
9083                let val_ref = self.pmkid.get_or_insert_with(|| {
9084                    fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D)
9085                });
9086                fidl::decode!(
9087                    fidl::encoding::UnboundedVector<u8>,
9088                    D,
9089                    val_ref,
9090                    decoder,
9091                    inner_offset,
9092                    inner_depth
9093                )?;
9094                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
9095                {
9096                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
9097                }
9098                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
9099                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
9100                }
9101            }
9102
9103            next_offset += envelope_size;
9104
9105            // Decode the remaining unknown envelopes.
9106            while next_offset < end_offset {
9107                _next_ordinal_to_read += 1;
9108                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9109                next_offset += envelope_size;
9110            }
9111
9112            Ok(())
9113        }
9114    }
9115
9116    impl WlanFullmacImplIfcOnScanEndRequest {
9117        #[inline(always)]
9118        fn max_ordinal_present(&self) -> u64 {
9119            if let Some(_) = self.code {
9120                return 2;
9121            }
9122            if let Some(_) = self.txn_id {
9123                return 1;
9124            }
9125            0
9126        }
9127    }
9128
9129    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplIfcOnScanEndRequest {
9130        type Borrowed<'a> = &'a Self;
9131        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9132            value
9133        }
9134    }
9135
9136    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplIfcOnScanEndRequest {
9137        type Owned = Self;
9138
9139        #[inline(always)]
9140        fn inline_align(_context: fidl::encoding::Context) -> usize {
9141            8
9142        }
9143
9144        #[inline(always)]
9145        fn inline_size(_context: fidl::encoding::Context) -> usize {
9146            16
9147        }
9148    }
9149
9150    unsafe impl<D: fidl::encoding::ResourceDialect>
9151        fidl::encoding::Encode<WlanFullmacImplIfcOnScanEndRequest, D>
9152        for &WlanFullmacImplIfcOnScanEndRequest
9153    {
9154        unsafe fn encode(
9155            self,
9156            encoder: &mut fidl::encoding::Encoder<'_, D>,
9157            offset: usize,
9158            mut depth: fidl::encoding::Depth,
9159        ) -> fidl::Result<()> {
9160            encoder.debug_check_bounds::<WlanFullmacImplIfcOnScanEndRequest>(offset);
9161            // Vector header
9162            let max_ordinal: u64 = self.max_ordinal_present();
9163            encoder.write_num(max_ordinal, offset);
9164            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
9165            // Calling encoder.out_of_line_offset(0) is not allowed.
9166            if max_ordinal == 0 {
9167                return Ok(());
9168            }
9169            depth.increment()?;
9170            let envelope_size = 8;
9171            let bytes_len = max_ordinal as usize * envelope_size;
9172            #[allow(unused_variables)]
9173            let offset = encoder.out_of_line_offset(bytes_len);
9174            let mut _prev_end_offset: usize = 0;
9175            if 1 > max_ordinal {
9176                return Ok(());
9177            }
9178
9179            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
9180            // are envelope_size bytes.
9181            let cur_offset: usize = (1 - 1) * envelope_size;
9182
9183            // Zero reserved fields.
9184            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
9185
9186            // Safety:
9187            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
9188            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
9189            //   envelope_size bytes, there is always sufficient room.
9190            fidl::encoding::encode_in_envelope_optional::<u64, D>(
9191                self.txn_id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
9192                encoder,
9193                offset + cur_offset,
9194                depth,
9195            )?;
9196
9197            _prev_end_offset = cur_offset + envelope_size;
9198            if 2 > max_ordinal {
9199                return Ok(());
9200            }
9201
9202            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
9203            // are envelope_size bytes.
9204            let cur_offset: usize = (2 - 1) * envelope_size;
9205
9206            // Zero reserved fields.
9207            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
9208
9209            // Safety:
9210            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
9211            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
9212            //   envelope_size bytes, there is always sufficient room.
9213            fidl::encoding::encode_in_envelope_optional::<WlanScanResult, D>(
9214                self.code.as_ref().map(<WlanScanResult as fidl::encoding::ValueTypeMarker>::borrow),
9215                encoder,
9216                offset + cur_offset,
9217                depth,
9218            )?;
9219
9220            _prev_end_offset = cur_offset + envelope_size;
9221
9222            Ok(())
9223        }
9224    }
9225
9226    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9227        for WlanFullmacImplIfcOnScanEndRequest
9228    {
9229        #[inline(always)]
9230        fn new_empty() -> Self {
9231            Self::default()
9232        }
9233
9234        unsafe fn decode(
9235            &mut self,
9236            decoder: &mut fidl::encoding::Decoder<'_, D>,
9237            offset: usize,
9238            mut depth: fidl::encoding::Depth,
9239        ) -> fidl::Result<()> {
9240            decoder.debug_check_bounds::<Self>(offset);
9241            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
9242                None => return Err(fidl::Error::NotNullable),
9243                Some(len) => len,
9244            };
9245            // Calling decoder.out_of_line_offset(0) is not allowed.
9246            if len == 0 {
9247                return Ok(());
9248            };
9249            depth.increment()?;
9250            let envelope_size = 8;
9251            let bytes_len = len * envelope_size;
9252            let offset = decoder.out_of_line_offset(bytes_len)?;
9253            // Decode the envelope for each type.
9254            let mut _next_ordinal_to_read = 0;
9255            let mut next_offset = offset;
9256            let end_offset = offset + bytes_len;
9257            _next_ordinal_to_read += 1;
9258            if next_offset >= end_offset {
9259                return Ok(());
9260            }
9261
9262            // Decode unknown envelopes for gaps in ordinals.
9263            while _next_ordinal_to_read < 1 {
9264                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9265                _next_ordinal_to_read += 1;
9266                next_offset += envelope_size;
9267            }
9268
9269            let next_out_of_line = decoder.next_out_of_line();
9270            let handles_before = decoder.remaining_handles();
9271            if let Some((inlined, num_bytes, num_handles)) =
9272                fidl::encoding::decode_envelope_header(decoder, next_offset)?
9273            {
9274                let member_inline_size =
9275                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
9276                if inlined != (member_inline_size <= 4) {
9277                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
9278                }
9279                let inner_offset;
9280                let mut inner_depth = depth.clone();
9281                if inlined {
9282                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
9283                    inner_offset = next_offset;
9284                } else {
9285                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
9286                    inner_depth.increment()?;
9287                }
9288                let val_ref = self.txn_id.get_or_insert_with(|| fidl::new_empty!(u64, D));
9289                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
9290                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
9291                {
9292                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
9293                }
9294                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
9295                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
9296                }
9297            }
9298
9299            next_offset += envelope_size;
9300            _next_ordinal_to_read += 1;
9301            if next_offset >= end_offset {
9302                return Ok(());
9303            }
9304
9305            // Decode unknown envelopes for gaps in ordinals.
9306            while _next_ordinal_to_read < 2 {
9307                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9308                _next_ordinal_to_read += 1;
9309                next_offset += envelope_size;
9310            }
9311
9312            let next_out_of_line = decoder.next_out_of_line();
9313            let handles_before = decoder.remaining_handles();
9314            if let Some((inlined, num_bytes, num_handles)) =
9315                fidl::encoding::decode_envelope_header(decoder, next_offset)?
9316            {
9317                let member_inline_size =
9318                    <WlanScanResult as fidl::encoding::TypeMarker>::inline_size(decoder.context);
9319                if inlined != (member_inline_size <= 4) {
9320                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
9321                }
9322                let inner_offset;
9323                let mut inner_depth = depth.clone();
9324                if inlined {
9325                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
9326                    inner_offset = next_offset;
9327                } else {
9328                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
9329                    inner_depth.increment()?;
9330                }
9331                let val_ref = self.code.get_or_insert_with(|| fidl::new_empty!(WlanScanResult, D));
9332                fidl::decode!(WlanScanResult, D, val_ref, decoder, inner_offset, inner_depth)?;
9333                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
9334                {
9335                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
9336                }
9337                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
9338                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
9339                }
9340            }
9341
9342            next_offset += envelope_size;
9343
9344            // Decode the remaining unknown envelopes.
9345            while next_offset < end_offset {
9346                _next_ordinal_to_read += 1;
9347                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9348                next_offset += envelope_size;
9349            }
9350
9351            Ok(())
9352        }
9353    }
9354
9355    impl WlanFullmacImplIfcOnScanResultRequest {
9356        #[inline(always)]
9357        fn max_ordinal_present(&self) -> u64 {
9358            if let Some(_) = self.bss {
9359                return 3;
9360            }
9361            if let Some(_) = self.timestamp_nanos {
9362                return 2;
9363            }
9364            if let Some(_) = self.txn_id {
9365                return 1;
9366            }
9367            0
9368        }
9369    }
9370
9371    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplIfcOnScanResultRequest {
9372        type Borrowed<'a> = &'a Self;
9373        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9374            value
9375        }
9376    }
9377
9378    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplIfcOnScanResultRequest {
9379        type Owned = Self;
9380
9381        #[inline(always)]
9382        fn inline_align(_context: fidl::encoding::Context) -> usize {
9383            8
9384        }
9385
9386        #[inline(always)]
9387        fn inline_size(_context: fidl::encoding::Context) -> usize {
9388            16
9389        }
9390    }
9391
9392    unsafe impl<D: fidl::encoding::ResourceDialect>
9393        fidl::encoding::Encode<WlanFullmacImplIfcOnScanResultRequest, D>
9394        for &WlanFullmacImplIfcOnScanResultRequest
9395    {
9396        unsafe fn encode(
9397            self,
9398            encoder: &mut fidl::encoding::Encoder<'_, D>,
9399            offset: usize,
9400            mut depth: fidl::encoding::Depth,
9401        ) -> fidl::Result<()> {
9402            encoder.debug_check_bounds::<WlanFullmacImplIfcOnScanResultRequest>(offset);
9403            // Vector header
9404            let max_ordinal: u64 = self.max_ordinal_present();
9405            encoder.write_num(max_ordinal, offset);
9406            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
9407            // Calling encoder.out_of_line_offset(0) is not allowed.
9408            if max_ordinal == 0 {
9409                return Ok(());
9410            }
9411            depth.increment()?;
9412            let envelope_size = 8;
9413            let bytes_len = max_ordinal as usize * envelope_size;
9414            #[allow(unused_variables)]
9415            let offset = encoder.out_of_line_offset(bytes_len);
9416            let mut _prev_end_offset: usize = 0;
9417            if 1 > max_ordinal {
9418                return Ok(());
9419            }
9420
9421            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
9422            // are envelope_size bytes.
9423            let cur_offset: usize = (1 - 1) * envelope_size;
9424
9425            // Zero reserved fields.
9426            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
9427
9428            // Safety:
9429            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
9430            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
9431            //   envelope_size bytes, there is always sufficient room.
9432            fidl::encoding::encode_in_envelope_optional::<u64, D>(
9433                self.txn_id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
9434                encoder,
9435                offset + cur_offset,
9436                depth,
9437            )?;
9438
9439            _prev_end_offset = cur_offset + envelope_size;
9440            if 2 > max_ordinal {
9441                return Ok(());
9442            }
9443
9444            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
9445            // are envelope_size bytes.
9446            let cur_offset: usize = (2 - 1) * envelope_size;
9447
9448            // Zero reserved fields.
9449            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
9450
9451            // Safety:
9452            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
9453            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
9454            //   envelope_size bytes, there is always sufficient room.
9455            fidl::encoding::encode_in_envelope_optional::<i64, D>(
9456                self.timestamp_nanos.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
9457                encoder,
9458                offset + cur_offset,
9459                depth,
9460            )?;
9461
9462            _prev_end_offset = cur_offset + envelope_size;
9463            if 3 > max_ordinal {
9464                return Ok(());
9465            }
9466
9467            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
9468            // are envelope_size bytes.
9469            let cur_offset: usize = (3 - 1) * envelope_size;
9470
9471            // Zero reserved fields.
9472            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
9473
9474            // Safety:
9475            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
9476            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
9477            //   envelope_size bytes, there is always sufficient room.
9478            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_common__common::BssDescription, D>(
9479            self.bss.as_ref().map(<fidl_fuchsia_wlan_common__common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow),
9480            encoder, offset + cur_offset, depth
9481        )?;
9482
9483            _prev_end_offset = cur_offset + envelope_size;
9484
9485            Ok(())
9486        }
9487    }
9488
9489    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9490        for WlanFullmacImplIfcOnScanResultRequest
9491    {
9492        #[inline(always)]
9493        fn new_empty() -> Self {
9494            Self::default()
9495        }
9496
9497        unsafe fn decode(
9498            &mut self,
9499            decoder: &mut fidl::encoding::Decoder<'_, D>,
9500            offset: usize,
9501            mut depth: fidl::encoding::Depth,
9502        ) -> fidl::Result<()> {
9503            decoder.debug_check_bounds::<Self>(offset);
9504            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
9505                None => return Err(fidl::Error::NotNullable),
9506                Some(len) => len,
9507            };
9508            // Calling decoder.out_of_line_offset(0) is not allowed.
9509            if len == 0 {
9510                return Ok(());
9511            };
9512            depth.increment()?;
9513            let envelope_size = 8;
9514            let bytes_len = len * envelope_size;
9515            let offset = decoder.out_of_line_offset(bytes_len)?;
9516            // Decode the envelope for each type.
9517            let mut _next_ordinal_to_read = 0;
9518            let mut next_offset = offset;
9519            let end_offset = offset + bytes_len;
9520            _next_ordinal_to_read += 1;
9521            if next_offset >= end_offset {
9522                return Ok(());
9523            }
9524
9525            // Decode unknown envelopes for gaps in ordinals.
9526            while _next_ordinal_to_read < 1 {
9527                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9528                _next_ordinal_to_read += 1;
9529                next_offset += envelope_size;
9530            }
9531
9532            let next_out_of_line = decoder.next_out_of_line();
9533            let handles_before = decoder.remaining_handles();
9534            if let Some((inlined, num_bytes, num_handles)) =
9535                fidl::encoding::decode_envelope_header(decoder, next_offset)?
9536            {
9537                let member_inline_size =
9538                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
9539                if inlined != (member_inline_size <= 4) {
9540                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
9541                }
9542                let inner_offset;
9543                let mut inner_depth = depth.clone();
9544                if inlined {
9545                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
9546                    inner_offset = next_offset;
9547                } else {
9548                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
9549                    inner_depth.increment()?;
9550                }
9551                let val_ref = self.txn_id.get_or_insert_with(|| fidl::new_empty!(u64, D));
9552                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
9553                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
9554                {
9555                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
9556                }
9557                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
9558                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
9559                }
9560            }
9561
9562            next_offset += envelope_size;
9563            _next_ordinal_to_read += 1;
9564            if next_offset >= end_offset {
9565                return Ok(());
9566            }
9567
9568            // Decode unknown envelopes for gaps in ordinals.
9569            while _next_ordinal_to_read < 2 {
9570                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9571                _next_ordinal_to_read += 1;
9572                next_offset += envelope_size;
9573            }
9574
9575            let next_out_of_line = decoder.next_out_of_line();
9576            let handles_before = decoder.remaining_handles();
9577            if let Some((inlined, num_bytes, num_handles)) =
9578                fidl::encoding::decode_envelope_header(decoder, next_offset)?
9579            {
9580                let member_inline_size =
9581                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
9582                if inlined != (member_inline_size <= 4) {
9583                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
9584                }
9585                let inner_offset;
9586                let mut inner_depth = depth.clone();
9587                if inlined {
9588                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
9589                    inner_offset = next_offset;
9590                } else {
9591                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
9592                    inner_depth.increment()?;
9593                }
9594                let val_ref = self.timestamp_nanos.get_or_insert_with(|| fidl::new_empty!(i64, D));
9595                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
9596                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
9597                {
9598                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
9599                }
9600                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
9601                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
9602                }
9603            }
9604
9605            next_offset += envelope_size;
9606            _next_ordinal_to_read += 1;
9607            if next_offset >= end_offset {
9608                return Ok(());
9609            }
9610
9611            // Decode unknown envelopes for gaps in ordinals.
9612            while _next_ordinal_to_read < 3 {
9613                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9614                _next_ordinal_to_read += 1;
9615                next_offset += envelope_size;
9616            }
9617
9618            let next_out_of_line = decoder.next_out_of_line();
9619            let handles_before = decoder.remaining_handles();
9620            if let Some((inlined, num_bytes, num_handles)) =
9621                fidl::encoding::decode_envelope_header(decoder, next_offset)?
9622            {
9623                let member_inline_size = <fidl_fuchsia_wlan_common__common::BssDescription as fidl::encoding::TypeMarker>::inline_size(decoder.context);
9624                if inlined != (member_inline_size <= 4) {
9625                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
9626                }
9627                let inner_offset;
9628                let mut inner_depth = depth.clone();
9629                if inlined {
9630                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
9631                    inner_offset = next_offset;
9632                } else {
9633                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
9634                    inner_depth.increment()?;
9635                }
9636                let val_ref = self.bss.get_or_insert_with(|| {
9637                    fidl::new_empty!(fidl_fuchsia_wlan_common__common::BssDescription, D)
9638                });
9639                fidl::decode!(
9640                    fidl_fuchsia_wlan_common__common::BssDescription,
9641                    D,
9642                    val_ref,
9643                    decoder,
9644                    inner_offset,
9645                    inner_depth
9646                )?;
9647                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
9648                {
9649                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
9650                }
9651                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
9652                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
9653                }
9654            }
9655
9656            next_offset += envelope_size;
9657
9658            // Decode the remaining unknown envelopes.
9659            while next_offset < end_offset {
9660                _next_ordinal_to_read += 1;
9661                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9662                next_offset += envelope_size;
9663            }
9664
9665            Ok(())
9666        }
9667    }
9668
9669    impl WlanFullmacImplIfcRoamConfRequest {
9670        #[inline(always)]
9671        fn max_ordinal_present(&self) -> u64 {
9672            if let Some(_) = self.association_ies {
9673                return 6;
9674            }
9675            if let Some(_) = self.association_id {
9676                return 5;
9677            }
9678            if let Some(_) = self.target_bss_authenticated {
9679                return 4;
9680            }
9681            if let Some(_) = self.original_association_maintained {
9682                return 3;
9683            }
9684            if let Some(_) = self.status_code {
9685                return 2;
9686            }
9687            if let Some(_) = self.selected_bssid {
9688                return 1;
9689            }
9690            0
9691        }
9692    }
9693
9694    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplIfcRoamConfRequest {
9695        type Borrowed<'a> = &'a Self;
9696        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9697            value
9698        }
9699    }
9700
9701    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplIfcRoamConfRequest {
9702        type Owned = Self;
9703
9704        #[inline(always)]
9705        fn inline_align(_context: fidl::encoding::Context) -> usize {
9706            8
9707        }
9708
9709        #[inline(always)]
9710        fn inline_size(_context: fidl::encoding::Context) -> usize {
9711            16
9712        }
9713    }
9714
9715    unsafe impl<D: fidl::encoding::ResourceDialect>
9716        fidl::encoding::Encode<WlanFullmacImplIfcRoamConfRequest, D>
9717        for &WlanFullmacImplIfcRoamConfRequest
9718    {
9719        unsafe fn encode(
9720            self,
9721            encoder: &mut fidl::encoding::Encoder<'_, D>,
9722            offset: usize,
9723            mut depth: fidl::encoding::Depth,
9724        ) -> fidl::Result<()> {
9725            encoder.debug_check_bounds::<WlanFullmacImplIfcRoamConfRequest>(offset);
9726            // Vector header
9727            let max_ordinal: u64 = self.max_ordinal_present();
9728            encoder.write_num(max_ordinal, offset);
9729            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
9730            // Calling encoder.out_of_line_offset(0) is not allowed.
9731            if max_ordinal == 0 {
9732                return Ok(());
9733            }
9734            depth.increment()?;
9735            let envelope_size = 8;
9736            let bytes_len = max_ordinal as usize * envelope_size;
9737            #[allow(unused_variables)]
9738            let offset = encoder.out_of_line_offset(bytes_len);
9739            let mut _prev_end_offset: usize = 0;
9740            if 1 > max_ordinal {
9741                return Ok(());
9742            }
9743
9744            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
9745            // are envelope_size bytes.
9746            let cur_offset: usize = (1 - 1) * envelope_size;
9747
9748            // Zero reserved fields.
9749            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
9750
9751            // Safety:
9752            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
9753            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
9754            //   envelope_size bytes, there is always sufficient room.
9755            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
9756                self.selected_bssid
9757                    .as_ref()
9758                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
9759                encoder,
9760                offset + cur_offset,
9761                depth,
9762            )?;
9763
9764            _prev_end_offset = cur_offset + envelope_size;
9765            if 2 > max_ordinal {
9766                return Ok(());
9767            }
9768
9769            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
9770            // are envelope_size bytes.
9771            let cur_offset: usize = (2 - 1) * envelope_size;
9772
9773            // Zero reserved fields.
9774            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
9775
9776            // Safety:
9777            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
9778            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
9779            //   envelope_size bytes, there is always sufficient room.
9780            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_ieee80211__common::StatusCode, D>(
9781            self.status_code.as_ref().map(<fidl_fuchsia_wlan_ieee80211__common::StatusCode as fidl::encoding::ValueTypeMarker>::borrow),
9782            encoder, offset + cur_offset, depth
9783        )?;
9784
9785            _prev_end_offset = cur_offset + envelope_size;
9786            if 3 > max_ordinal {
9787                return Ok(());
9788            }
9789
9790            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
9791            // are envelope_size bytes.
9792            let cur_offset: usize = (3 - 1) * envelope_size;
9793
9794            // Zero reserved fields.
9795            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
9796
9797            // Safety:
9798            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
9799            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
9800            //   envelope_size bytes, there is always sufficient room.
9801            fidl::encoding::encode_in_envelope_optional::<bool, D>(
9802                self.original_association_maintained
9803                    .as_ref()
9804                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
9805                encoder,
9806                offset + cur_offset,
9807                depth,
9808            )?;
9809
9810            _prev_end_offset = cur_offset + envelope_size;
9811            if 4 > max_ordinal {
9812                return Ok(());
9813            }
9814
9815            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
9816            // are envelope_size bytes.
9817            let cur_offset: usize = (4 - 1) * envelope_size;
9818
9819            // Zero reserved fields.
9820            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
9821
9822            // Safety:
9823            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
9824            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
9825            //   envelope_size bytes, there is always sufficient room.
9826            fidl::encoding::encode_in_envelope_optional::<bool, D>(
9827                self.target_bss_authenticated
9828                    .as_ref()
9829                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
9830                encoder,
9831                offset + cur_offset,
9832                depth,
9833            )?;
9834
9835            _prev_end_offset = cur_offset + envelope_size;
9836            if 5 > max_ordinal {
9837                return Ok(());
9838            }
9839
9840            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
9841            // are envelope_size bytes.
9842            let cur_offset: usize = (5 - 1) * envelope_size;
9843
9844            // Zero reserved fields.
9845            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
9846
9847            // Safety:
9848            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
9849            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
9850            //   envelope_size bytes, there is always sufficient room.
9851            fidl::encoding::encode_in_envelope_optional::<u16, D>(
9852                self.association_id.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
9853                encoder,
9854                offset + cur_offset,
9855                depth,
9856            )?;
9857
9858            _prev_end_offset = cur_offset + envelope_size;
9859            if 6 > max_ordinal {
9860                return Ok(());
9861            }
9862
9863            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
9864            // are envelope_size bytes.
9865            let cur_offset: usize = (6 - 1) * envelope_size;
9866
9867            // Zero reserved fields.
9868            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
9869
9870            // Safety:
9871            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
9872            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
9873            //   envelope_size bytes, there is always sufficient room.
9874            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<u8>, D>(
9875            self.association_ies.as_ref().map(<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow),
9876            encoder, offset + cur_offset, depth
9877        )?;
9878
9879            _prev_end_offset = cur_offset + envelope_size;
9880
9881            Ok(())
9882        }
9883    }
9884
9885    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9886        for WlanFullmacImplIfcRoamConfRequest
9887    {
9888        #[inline(always)]
9889        fn new_empty() -> Self {
9890            Self::default()
9891        }
9892
9893        unsafe fn decode(
9894            &mut self,
9895            decoder: &mut fidl::encoding::Decoder<'_, D>,
9896            offset: usize,
9897            mut depth: fidl::encoding::Depth,
9898        ) -> fidl::Result<()> {
9899            decoder.debug_check_bounds::<Self>(offset);
9900            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
9901                None => return Err(fidl::Error::NotNullable),
9902                Some(len) => len,
9903            };
9904            // Calling decoder.out_of_line_offset(0) is not allowed.
9905            if len == 0 {
9906                return Ok(());
9907            };
9908            depth.increment()?;
9909            let envelope_size = 8;
9910            let bytes_len = len * envelope_size;
9911            let offset = decoder.out_of_line_offset(bytes_len)?;
9912            // Decode the envelope for each type.
9913            let mut _next_ordinal_to_read = 0;
9914            let mut next_offset = offset;
9915            let end_offset = offset + bytes_len;
9916            _next_ordinal_to_read += 1;
9917            if next_offset >= end_offset {
9918                return Ok(());
9919            }
9920
9921            // Decode unknown envelopes for gaps in ordinals.
9922            while _next_ordinal_to_read < 1 {
9923                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9924                _next_ordinal_to_read += 1;
9925                next_offset += envelope_size;
9926            }
9927
9928            let next_out_of_line = decoder.next_out_of_line();
9929            let handles_before = decoder.remaining_handles();
9930            if let Some((inlined, num_bytes, num_handles)) =
9931                fidl::encoding::decode_envelope_header(decoder, next_offset)?
9932            {
9933                let member_inline_size =
9934                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
9935                        decoder.context,
9936                    );
9937                if inlined != (member_inline_size <= 4) {
9938                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
9939                }
9940                let inner_offset;
9941                let mut inner_depth = depth.clone();
9942                if inlined {
9943                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
9944                    inner_offset = next_offset;
9945                } else {
9946                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
9947                    inner_depth.increment()?;
9948                }
9949                let val_ref = self
9950                    .selected_bssid
9951                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
9952                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
9953                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
9954                {
9955                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
9956                }
9957                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
9958                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
9959                }
9960            }
9961
9962            next_offset += envelope_size;
9963            _next_ordinal_to_read += 1;
9964            if next_offset >= end_offset {
9965                return Ok(());
9966            }
9967
9968            // Decode unknown envelopes for gaps in ordinals.
9969            while _next_ordinal_to_read < 2 {
9970                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9971                _next_ordinal_to_read += 1;
9972                next_offset += envelope_size;
9973            }
9974
9975            let next_out_of_line = decoder.next_out_of_line();
9976            let handles_before = decoder.remaining_handles();
9977            if let Some((inlined, num_bytes, num_handles)) =
9978                fidl::encoding::decode_envelope_header(decoder, next_offset)?
9979            {
9980                let member_inline_size = <fidl_fuchsia_wlan_ieee80211__common::StatusCode as fidl::encoding::TypeMarker>::inline_size(decoder.context);
9981                if inlined != (member_inline_size <= 4) {
9982                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
9983                }
9984                let inner_offset;
9985                let mut inner_depth = depth.clone();
9986                if inlined {
9987                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
9988                    inner_offset = next_offset;
9989                } else {
9990                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
9991                    inner_depth.increment()?;
9992                }
9993                let val_ref = self.status_code.get_or_insert_with(|| {
9994                    fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::StatusCode, D)
9995                });
9996                fidl::decode!(
9997                    fidl_fuchsia_wlan_ieee80211__common::StatusCode,
9998                    D,
9999                    val_ref,
10000                    decoder,
10001                    inner_offset,
10002                    inner_depth
10003                )?;
10004                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10005                {
10006                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
10007                }
10008                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10009                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10010                }
10011            }
10012
10013            next_offset += envelope_size;
10014            _next_ordinal_to_read += 1;
10015            if next_offset >= end_offset {
10016                return Ok(());
10017            }
10018
10019            // Decode unknown envelopes for gaps in ordinals.
10020            while _next_ordinal_to_read < 3 {
10021                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10022                _next_ordinal_to_read += 1;
10023                next_offset += envelope_size;
10024            }
10025
10026            let next_out_of_line = decoder.next_out_of_line();
10027            let handles_before = decoder.remaining_handles();
10028            if let Some((inlined, num_bytes, num_handles)) =
10029                fidl::encoding::decode_envelope_header(decoder, next_offset)?
10030            {
10031                let member_inline_size =
10032                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
10033                if inlined != (member_inline_size <= 4) {
10034                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
10035                }
10036                let inner_offset;
10037                let mut inner_depth = depth.clone();
10038                if inlined {
10039                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10040                    inner_offset = next_offset;
10041                } else {
10042                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10043                    inner_depth.increment()?;
10044                }
10045                let val_ref = self
10046                    .original_association_maintained
10047                    .get_or_insert_with(|| fidl::new_empty!(bool, D));
10048                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
10049                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10050                {
10051                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
10052                }
10053                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10054                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10055                }
10056            }
10057
10058            next_offset += envelope_size;
10059            _next_ordinal_to_read += 1;
10060            if next_offset >= end_offset {
10061                return Ok(());
10062            }
10063
10064            // Decode unknown envelopes for gaps in ordinals.
10065            while _next_ordinal_to_read < 4 {
10066                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10067                _next_ordinal_to_read += 1;
10068                next_offset += envelope_size;
10069            }
10070
10071            let next_out_of_line = decoder.next_out_of_line();
10072            let handles_before = decoder.remaining_handles();
10073            if let Some((inlined, num_bytes, num_handles)) =
10074                fidl::encoding::decode_envelope_header(decoder, next_offset)?
10075            {
10076                let member_inline_size =
10077                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
10078                if inlined != (member_inline_size <= 4) {
10079                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
10080                }
10081                let inner_offset;
10082                let mut inner_depth = depth.clone();
10083                if inlined {
10084                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10085                    inner_offset = next_offset;
10086                } else {
10087                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10088                    inner_depth.increment()?;
10089                }
10090                let val_ref =
10091                    self.target_bss_authenticated.get_or_insert_with(|| fidl::new_empty!(bool, D));
10092                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
10093                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10094                {
10095                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
10096                }
10097                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10098                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10099                }
10100            }
10101
10102            next_offset += envelope_size;
10103            _next_ordinal_to_read += 1;
10104            if next_offset >= end_offset {
10105                return Ok(());
10106            }
10107
10108            // Decode unknown envelopes for gaps in ordinals.
10109            while _next_ordinal_to_read < 5 {
10110                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10111                _next_ordinal_to_read += 1;
10112                next_offset += envelope_size;
10113            }
10114
10115            let next_out_of_line = decoder.next_out_of_line();
10116            let handles_before = decoder.remaining_handles();
10117            if let Some((inlined, num_bytes, num_handles)) =
10118                fidl::encoding::decode_envelope_header(decoder, next_offset)?
10119            {
10120                let member_inline_size =
10121                    <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
10122                if inlined != (member_inline_size <= 4) {
10123                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
10124                }
10125                let inner_offset;
10126                let mut inner_depth = depth.clone();
10127                if inlined {
10128                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10129                    inner_offset = next_offset;
10130                } else {
10131                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10132                    inner_depth.increment()?;
10133                }
10134                let val_ref = self.association_id.get_or_insert_with(|| fidl::new_empty!(u16, D));
10135                fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
10136                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10137                {
10138                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
10139                }
10140                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10141                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10142                }
10143            }
10144
10145            next_offset += envelope_size;
10146            _next_ordinal_to_read += 1;
10147            if next_offset >= end_offset {
10148                return Ok(());
10149            }
10150
10151            // Decode unknown envelopes for gaps in ordinals.
10152            while _next_ordinal_to_read < 6 {
10153                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10154                _next_ordinal_to_read += 1;
10155                next_offset += envelope_size;
10156            }
10157
10158            let next_out_of_line = decoder.next_out_of_line();
10159            let handles_before = decoder.remaining_handles();
10160            if let Some((inlined, num_bytes, num_handles)) =
10161                fidl::encoding::decode_envelope_header(decoder, next_offset)?
10162            {
10163                let member_inline_size = <fidl::encoding::UnboundedVector<u8> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
10164                if inlined != (member_inline_size <= 4) {
10165                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
10166                }
10167                let inner_offset;
10168                let mut inner_depth = depth.clone();
10169                if inlined {
10170                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10171                    inner_offset = next_offset;
10172                } else {
10173                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10174                    inner_depth.increment()?;
10175                }
10176                let val_ref = self.association_ies.get_or_insert_with(|| {
10177                    fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D)
10178                });
10179                fidl::decode!(
10180                    fidl::encoding::UnboundedVector<u8>,
10181                    D,
10182                    val_ref,
10183                    decoder,
10184                    inner_offset,
10185                    inner_depth
10186                )?;
10187                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10188                {
10189                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
10190                }
10191                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10192                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10193                }
10194            }
10195
10196            next_offset += envelope_size;
10197
10198            // Decode the remaining unknown envelopes.
10199            while next_offset < end_offset {
10200                _next_ordinal_to_read += 1;
10201                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10202                next_offset += envelope_size;
10203            }
10204
10205            Ok(())
10206        }
10207    }
10208
10209    impl WlanFullmacImplIfcRoamResultIndRequest {
10210        #[inline(always)]
10211        fn max_ordinal_present(&self) -> u64 {
10212            if let Some(_) = self.association_ies {
10213                return 6;
10214            }
10215            if let Some(_) = self.association_id {
10216                return 5;
10217            }
10218            if let Some(_) = self.target_bss_authenticated {
10219                return 4;
10220            }
10221            if let Some(_) = self.original_association_maintained {
10222                return 3;
10223            }
10224            if let Some(_) = self.status_code {
10225                return 2;
10226            }
10227            if let Some(_) = self.selected_bssid {
10228                return 1;
10229            }
10230            0
10231        }
10232    }
10233
10234    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplIfcRoamResultIndRequest {
10235        type Borrowed<'a> = &'a Self;
10236        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10237            value
10238        }
10239    }
10240
10241    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplIfcRoamResultIndRequest {
10242        type Owned = Self;
10243
10244        #[inline(always)]
10245        fn inline_align(_context: fidl::encoding::Context) -> usize {
10246            8
10247        }
10248
10249        #[inline(always)]
10250        fn inline_size(_context: fidl::encoding::Context) -> usize {
10251            16
10252        }
10253    }
10254
10255    unsafe impl<D: fidl::encoding::ResourceDialect>
10256        fidl::encoding::Encode<WlanFullmacImplIfcRoamResultIndRequest, D>
10257        for &WlanFullmacImplIfcRoamResultIndRequest
10258    {
10259        unsafe fn encode(
10260            self,
10261            encoder: &mut fidl::encoding::Encoder<'_, D>,
10262            offset: usize,
10263            mut depth: fidl::encoding::Depth,
10264        ) -> fidl::Result<()> {
10265            encoder.debug_check_bounds::<WlanFullmacImplIfcRoamResultIndRequest>(offset);
10266            // Vector header
10267            let max_ordinal: u64 = self.max_ordinal_present();
10268            encoder.write_num(max_ordinal, offset);
10269            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
10270            // Calling encoder.out_of_line_offset(0) is not allowed.
10271            if max_ordinal == 0 {
10272                return Ok(());
10273            }
10274            depth.increment()?;
10275            let envelope_size = 8;
10276            let bytes_len = max_ordinal as usize * envelope_size;
10277            #[allow(unused_variables)]
10278            let offset = encoder.out_of_line_offset(bytes_len);
10279            let mut _prev_end_offset: usize = 0;
10280            if 1 > max_ordinal {
10281                return Ok(());
10282            }
10283
10284            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
10285            // are envelope_size bytes.
10286            let cur_offset: usize = (1 - 1) * envelope_size;
10287
10288            // Zero reserved fields.
10289            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10290
10291            // Safety:
10292            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
10293            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
10294            //   envelope_size bytes, there is always sufficient room.
10295            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
10296                self.selected_bssid
10297                    .as_ref()
10298                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
10299                encoder,
10300                offset + cur_offset,
10301                depth,
10302            )?;
10303
10304            _prev_end_offset = cur_offset + envelope_size;
10305            if 2 > max_ordinal {
10306                return Ok(());
10307            }
10308
10309            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
10310            // are envelope_size bytes.
10311            let cur_offset: usize = (2 - 1) * envelope_size;
10312
10313            // Zero reserved fields.
10314            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10315
10316            // Safety:
10317            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
10318            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
10319            //   envelope_size bytes, there is always sufficient room.
10320            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_ieee80211__common::StatusCode, D>(
10321            self.status_code.as_ref().map(<fidl_fuchsia_wlan_ieee80211__common::StatusCode as fidl::encoding::ValueTypeMarker>::borrow),
10322            encoder, offset + cur_offset, depth
10323        )?;
10324
10325            _prev_end_offset = cur_offset + envelope_size;
10326            if 3 > max_ordinal {
10327                return Ok(());
10328            }
10329
10330            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
10331            // are envelope_size bytes.
10332            let cur_offset: usize = (3 - 1) * envelope_size;
10333
10334            // Zero reserved fields.
10335            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10336
10337            // Safety:
10338            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
10339            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
10340            //   envelope_size bytes, there is always sufficient room.
10341            fidl::encoding::encode_in_envelope_optional::<bool, D>(
10342                self.original_association_maintained
10343                    .as_ref()
10344                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
10345                encoder,
10346                offset + cur_offset,
10347                depth,
10348            )?;
10349
10350            _prev_end_offset = cur_offset + envelope_size;
10351            if 4 > max_ordinal {
10352                return Ok(());
10353            }
10354
10355            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
10356            // are envelope_size bytes.
10357            let cur_offset: usize = (4 - 1) * envelope_size;
10358
10359            // Zero reserved fields.
10360            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10361
10362            // Safety:
10363            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
10364            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
10365            //   envelope_size bytes, there is always sufficient room.
10366            fidl::encoding::encode_in_envelope_optional::<bool, D>(
10367                self.target_bss_authenticated
10368                    .as_ref()
10369                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
10370                encoder,
10371                offset + cur_offset,
10372                depth,
10373            )?;
10374
10375            _prev_end_offset = cur_offset + envelope_size;
10376            if 5 > max_ordinal {
10377                return Ok(());
10378            }
10379
10380            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
10381            // are envelope_size bytes.
10382            let cur_offset: usize = (5 - 1) * envelope_size;
10383
10384            // Zero reserved fields.
10385            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10386
10387            // Safety:
10388            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
10389            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
10390            //   envelope_size bytes, there is always sufficient room.
10391            fidl::encoding::encode_in_envelope_optional::<u16, D>(
10392                self.association_id.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
10393                encoder,
10394                offset + cur_offset,
10395                depth,
10396            )?;
10397
10398            _prev_end_offset = cur_offset + envelope_size;
10399            if 6 > max_ordinal {
10400                return Ok(());
10401            }
10402
10403            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
10404            // are envelope_size bytes.
10405            let cur_offset: usize = (6 - 1) * envelope_size;
10406
10407            // Zero reserved fields.
10408            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10409
10410            // Safety:
10411            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
10412            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
10413            //   envelope_size bytes, there is always sufficient room.
10414            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<u8>, D>(
10415            self.association_ies.as_ref().map(<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow),
10416            encoder, offset + cur_offset, depth
10417        )?;
10418
10419            _prev_end_offset = cur_offset + envelope_size;
10420
10421            Ok(())
10422        }
10423    }
10424
10425    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10426        for WlanFullmacImplIfcRoamResultIndRequest
10427    {
10428        #[inline(always)]
10429        fn new_empty() -> Self {
10430            Self::default()
10431        }
10432
10433        unsafe fn decode(
10434            &mut self,
10435            decoder: &mut fidl::encoding::Decoder<'_, D>,
10436            offset: usize,
10437            mut depth: fidl::encoding::Depth,
10438        ) -> fidl::Result<()> {
10439            decoder.debug_check_bounds::<Self>(offset);
10440            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
10441                None => return Err(fidl::Error::NotNullable),
10442                Some(len) => len,
10443            };
10444            // Calling decoder.out_of_line_offset(0) is not allowed.
10445            if len == 0 {
10446                return Ok(());
10447            };
10448            depth.increment()?;
10449            let envelope_size = 8;
10450            let bytes_len = len * envelope_size;
10451            let offset = decoder.out_of_line_offset(bytes_len)?;
10452            // Decode the envelope for each type.
10453            let mut _next_ordinal_to_read = 0;
10454            let mut next_offset = offset;
10455            let end_offset = offset + bytes_len;
10456            _next_ordinal_to_read += 1;
10457            if next_offset >= end_offset {
10458                return Ok(());
10459            }
10460
10461            // Decode unknown envelopes for gaps in ordinals.
10462            while _next_ordinal_to_read < 1 {
10463                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10464                _next_ordinal_to_read += 1;
10465                next_offset += envelope_size;
10466            }
10467
10468            let next_out_of_line = decoder.next_out_of_line();
10469            let handles_before = decoder.remaining_handles();
10470            if let Some((inlined, num_bytes, num_handles)) =
10471                fidl::encoding::decode_envelope_header(decoder, next_offset)?
10472            {
10473                let member_inline_size =
10474                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
10475                        decoder.context,
10476                    );
10477                if inlined != (member_inline_size <= 4) {
10478                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
10479                }
10480                let inner_offset;
10481                let mut inner_depth = depth.clone();
10482                if inlined {
10483                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10484                    inner_offset = next_offset;
10485                } else {
10486                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10487                    inner_depth.increment()?;
10488                }
10489                let val_ref = self
10490                    .selected_bssid
10491                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
10492                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
10493                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10494                {
10495                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
10496                }
10497                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10498                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10499                }
10500            }
10501
10502            next_offset += envelope_size;
10503            _next_ordinal_to_read += 1;
10504            if next_offset >= end_offset {
10505                return Ok(());
10506            }
10507
10508            // Decode unknown envelopes for gaps in ordinals.
10509            while _next_ordinal_to_read < 2 {
10510                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10511                _next_ordinal_to_read += 1;
10512                next_offset += envelope_size;
10513            }
10514
10515            let next_out_of_line = decoder.next_out_of_line();
10516            let handles_before = decoder.remaining_handles();
10517            if let Some((inlined, num_bytes, num_handles)) =
10518                fidl::encoding::decode_envelope_header(decoder, next_offset)?
10519            {
10520                let member_inline_size = <fidl_fuchsia_wlan_ieee80211__common::StatusCode as fidl::encoding::TypeMarker>::inline_size(decoder.context);
10521                if inlined != (member_inline_size <= 4) {
10522                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
10523                }
10524                let inner_offset;
10525                let mut inner_depth = depth.clone();
10526                if inlined {
10527                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10528                    inner_offset = next_offset;
10529                } else {
10530                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10531                    inner_depth.increment()?;
10532                }
10533                let val_ref = self.status_code.get_or_insert_with(|| {
10534                    fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::StatusCode, D)
10535                });
10536                fidl::decode!(
10537                    fidl_fuchsia_wlan_ieee80211__common::StatusCode,
10538                    D,
10539                    val_ref,
10540                    decoder,
10541                    inner_offset,
10542                    inner_depth
10543                )?;
10544                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10545                {
10546                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
10547                }
10548                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10549                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10550                }
10551            }
10552
10553            next_offset += envelope_size;
10554            _next_ordinal_to_read += 1;
10555            if next_offset >= end_offset {
10556                return Ok(());
10557            }
10558
10559            // Decode unknown envelopes for gaps in ordinals.
10560            while _next_ordinal_to_read < 3 {
10561                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10562                _next_ordinal_to_read += 1;
10563                next_offset += envelope_size;
10564            }
10565
10566            let next_out_of_line = decoder.next_out_of_line();
10567            let handles_before = decoder.remaining_handles();
10568            if let Some((inlined, num_bytes, num_handles)) =
10569                fidl::encoding::decode_envelope_header(decoder, next_offset)?
10570            {
10571                let member_inline_size =
10572                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
10573                if inlined != (member_inline_size <= 4) {
10574                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
10575                }
10576                let inner_offset;
10577                let mut inner_depth = depth.clone();
10578                if inlined {
10579                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10580                    inner_offset = next_offset;
10581                } else {
10582                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10583                    inner_depth.increment()?;
10584                }
10585                let val_ref = self
10586                    .original_association_maintained
10587                    .get_or_insert_with(|| fidl::new_empty!(bool, D));
10588                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
10589                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10590                {
10591                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
10592                }
10593                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10594                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10595                }
10596            }
10597
10598            next_offset += envelope_size;
10599            _next_ordinal_to_read += 1;
10600            if next_offset >= end_offset {
10601                return Ok(());
10602            }
10603
10604            // Decode unknown envelopes for gaps in ordinals.
10605            while _next_ordinal_to_read < 4 {
10606                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10607                _next_ordinal_to_read += 1;
10608                next_offset += envelope_size;
10609            }
10610
10611            let next_out_of_line = decoder.next_out_of_line();
10612            let handles_before = decoder.remaining_handles();
10613            if let Some((inlined, num_bytes, num_handles)) =
10614                fidl::encoding::decode_envelope_header(decoder, next_offset)?
10615            {
10616                let member_inline_size =
10617                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
10618                if inlined != (member_inline_size <= 4) {
10619                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
10620                }
10621                let inner_offset;
10622                let mut inner_depth = depth.clone();
10623                if inlined {
10624                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10625                    inner_offset = next_offset;
10626                } else {
10627                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10628                    inner_depth.increment()?;
10629                }
10630                let val_ref =
10631                    self.target_bss_authenticated.get_or_insert_with(|| fidl::new_empty!(bool, D));
10632                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
10633                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10634                {
10635                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
10636                }
10637                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10638                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10639                }
10640            }
10641
10642            next_offset += envelope_size;
10643            _next_ordinal_to_read += 1;
10644            if next_offset >= end_offset {
10645                return Ok(());
10646            }
10647
10648            // Decode unknown envelopes for gaps in ordinals.
10649            while _next_ordinal_to_read < 5 {
10650                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10651                _next_ordinal_to_read += 1;
10652                next_offset += envelope_size;
10653            }
10654
10655            let next_out_of_line = decoder.next_out_of_line();
10656            let handles_before = decoder.remaining_handles();
10657            if let Some((inlined, num_bytes, num_handles)) =
10658                fidl::encoding::decode_envelope_header(decoder, next_offset)?
10659            {
10660                let member_inline_size =
10661                    <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
10662                if inlined != (member_inline_size <= 4) {
10663                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
10664                }
10665                let inner_offset;
10666                let mut inner_depth = depth.clone();
10667                if inlined {
10668                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10669                    inner_offset = next_offset;
10670                } else {
10671                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10672                    inner_depth.increment()?;
10673                }
10674                let val_ref = self.association_id.get_or_insert_with(|| fidl::new_empty!(u16, D));
10675                fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
10676                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10677                {
10678                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
10679                }
10680                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10681                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10682                }
10683            }
10684
10685            next_offset += envelope_size;
10686            _next_ordinal_to_read += 1;
10687            if next_offset >= end_offset {
10688                return Ok(());
10689            }
10690
10691            // Decode unknown envelopes for gaps in ordinals.
10692            while _next_ordinal_to_read < 6 {
10693                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10694                _next_ordinal_to_read += 1;
10695                next_offset += envelope_size;
10696            }
10697
10698            let next_out_of_line = decoder.next_out_of_line();
10699            let handles_before = decoder.remaining_handles();
10700            if let Some((inlined, num_bytes, num_handles)) =
10701                fidl::encoding::decode_envelope_header(decoder, next_offset)?
10702            {
10703                let member_inline_size = <fidl::encoding::UnboundedVector<u8> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
10704                if inlined != (member_inline_size <= 4) {
10705                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
10706                }
10707                let inner_offset;
10708                let mut inner_depth = depth.clone();
10709                if inlined {
10710                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10711                    inner_offset = next_offset;
10712                } else {
10713                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10714                    inner_depth.increment()?;
10715                }
10716                let val_ref = self.association_ies.get_or_insert_with(|| {
10717                    fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D)
10718                });
10719                fidl::decode!(
10720                    fidl::encoding::UnboundedVector<u8>,
10721                    D,
10722                    val_ref,
10723                    decoder,
10724                    inner_offset,
10725                    inner_depth
10726                )?;
10727                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10728                {
10729                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
10730                }
10731                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10732                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10733                }
10734            }
10735
10736            next_offset += envelope_size;
10737
10738            // Decode the remaining unknown envelopes.
10739            while next_offset < end_offset {
10740                _next_ordinal_to_read += 1;
10741                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10742                next_offset += envelope_size;
10743            }
10744
10745            Ok(())
10746        }
10747    }
10748
10749    impl WlanFullmacImplIfcRoamStartIndRequest {
10750        #[inline(always)]
10751        fn max_ordinal_present(&self) -> u64 {
10752            if let Some(_) = self.original_association_maintained {
10753                return 3;
10754            }
10755            if let Some(_) = self.selected_bss {
10756                return 2;
10757            }
10758            if let Some(_) = self.selected_bssid {
10759                return 1;
10760            }
10761            0
10762        }
10763    }
10764
10765    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplIfcRoamStartIndRequest {
10766        type Borrowed<'a> = &'a Self;
10767        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10768            value
10769        }
10770    }
10771
10772    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplIfcRoamStartIndRequest {
10773        type Owned = Self;
10774
10775        #[inline(always)]
10776        fn inline_align(_context: fidl::encoding::Context) -> usize {
10777            8
10778        }
10779
10780        #[inline(always)]
10781        fn inline_size(_context: fidl::encoding::Context) -> usize {
10782            16
10783        }
10784    }
10785
10786    unsafe impl<D: fidl::encoding::ResourceDialect>
10787        fidl::encoding::Encode<WlanFullmacImplIfcRoamStartIndRequest, D>
10788        for &WlanFullmacImplIfcRoamStartIndRequest
10789    {
10790        unsafe fn encode(
10791            self,
10792            encoder: &mut fidl::encoding::Encoder<'_, D>,
10793            offset: usize,
10794            mut depth: fidl::encoding::Depth,
10795        ) -> fidl::Result<()> {
10796            encoder.debug_check_bounds::<WlanFullmacImplIfcRoamStartIndRequest>(offset);
10797            // Vector header
10798            let max_ordinal: u64 = self.max_ordinal_present();
10799            encoder.write_num(max_ordinal, offset);
10800            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
10801            // Calling encoder.out_of_line_offset(0) is not allowed.
10802            if max_ordinal == 0 {
10803                return Ok(());
10804            }
10805            depth.increment()?;
10806            let envelope_size = 8;
10807            let bytes_len = max_ordinal as usize * envelope_size;
10808            #[allow(unused_variables)]
10809            let offset = encoder.out_of_line_offset(bytes_len);
10810            let mut _prev_end_offset: usize = 0;
10811            if 1 > max_ordinal {
10812                return Ok(());
10813            }
10814
10815            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
10816            // are envelope_size bytes.
10817            let cur_offset: usize = (1 - 1) * envelope_size;
10818
10819            // Zero reserved fields.
10820            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10821
10822            // Safety:
10823            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
10824            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
10825            //   envelope_size bytes, there is always sufficient room.
10826            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
10827                self.selected_bssid
10828                    .as_ref()
10829                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
10830                encoder,
10831                offset + cur_offset,
10832                depth,
10833            )?;
10834
10835            _prev_end_offset = cur_offset + envelope_size;
10836            if 2 > max_ordinal {
10837                return Ok(());
10838            }
10839
10840            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
10841            // are envelope_size bytes.
10842            let cur_offset: usize = (2 - 1) * envelope_size;
10843
10844            // Zero reserved fields.
10845            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10846
10847            // Safety:
10848            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
10849            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
10850            //   envelope_size bytes, there is always sufficient room.
10851            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_common__common::BssDescription, D>(
10852            self.selected_bss.as_ref().map(<fidl_fuchsia_wlan_common__common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow),
10853            encoder, offset + cur_offset, depth
10854        )?;
10855
10856            _prev_end_offset = cur_offset + envelope_size;
10857            if 3 > max_ordinal {
10858                return Ok(());
10859            }
10860
10861            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
10862            // are envelope_size bytes.
10863            let cur_offset: usize = (3 - 1) * envelope_size;
10864
10865            // Zero reserved fields.
10866            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10867
10868            // Safety:
10869            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
10870            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
10871            //   envelope_size bytes, there is always sufficient room.
10872            fidl::encoding::encode_in_envelope_optional::<bool, D>(
10873                self.original_association_maintained
10874                    .as_ref()
10875                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
10876                encoder,
10877                offset + cur_offset,
10878                depth,
10879            )?;
10880
10881            _prev_end_offset = cur_offset + envelope_size;
10882
10883            Ok(())
10884        }
10885    }
10886
10887    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10888        for WlanFullmacImplIfcRoamStartIndRequest
10889    {
10890        #[inline(always)]
10891        fn new_empty() -> Self {
10892            Self::default()
10893        }
10894
10895        unsafe fn decode(
10896            &mut self,
10897            decoder: &mut fidl::encoding::Decoder<'_, D>,
10898            offset: usize,
10899            mut depth: fidl::encoding::Depth,
10900        ) -> fidl::Result<()> {
10901            decoder.debug_check_bounds::<Self>(offset);
10902            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
10903                None => return Err(fidl::Error::NotNullable),
10904                Some(len) => len,
10905            };
10906            // Calling decoder.out_of_line_offset(0) is not allowed.
10907            if len == 0 {
10908                return Ok(());
10909            };
10910            depth.increment()?;
10911            let envelope_size = 8;
10912            let bytes_len = len * envelope_size;
10913            let offset = decoder.out_of_line_offset(bytes_len)?;
10914            // Decode the envelope for each type.
10915            let mut _next_ordinal_to_read = 0;
10916            let mut next_offset = offset;
10917            let end_offset = offset + bytes_len;
10918            _next_ordinal_to_read += 1;
10919            if next_offset >= end_offset {
10920                return Ok(());
10921            }
10922
10923            // Decode unknown envelopes for gaps in ordinals.
10924            while _next_ordinal_to_read < 1 {
10925                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10926                _next_ordinal_to_read += 1;
10927                next_offset += envelope_size;
10928            }
10929
10930            let next_out_of_line = decoder.next_out_of_line();
10931            let handles_before = decoder.remaining_handles();
10932            if let Some((inlined, num_bytes, num_handles)) =
10933                fidl::encoding::decode_envelope_header(decoder, next_offset)?
10934            {
10935                let member_inline_size =
10936                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
10937                        decoder.context,
10938                    );
10939                if inlined != (member_inline_size <= 4) {
10940                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
10941                }
10942                let inner_offset;
10943                let mut inner_depth = depth.clone();
10944                if inlined {
10945                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10946                    inner_offset = next_offset;
10947                } else {
10948                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10949                    inner_depth.increment()?;
10950                }
10951                let val_ref = self
10952                    .selected_bssid
10953                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
10954                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
10955                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10956                {
10957                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
10958                }
10959                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10960                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10961                }
10962            }
10963
10964            next_offset += envelope_size;
10965            _next_ordinal_to_read += 1;
10966            if next_offset >= end_offset {
10967                return Ok(());
10968            }
10969
10970            // Decode unknown envelopes for gaps in ordinals.
10971            while _next_ordinal_to_read < 2 {
10972                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10973                _next_ordinal_to_read += 1;
10974                next_offset += envelope_size;
10975            }
10976
10977            let next_out_of_line = decoder.next_out_of_line();
10978            let handles_before = decoder.remaining_handles();
10979            if let Some((inlined, num_bytes, num_handles)) =
10980                fidl::encoding::decode_envelope_header(decoder, next_offset)?
10981            {
10982                let member_inline_size = <fidl_fuchsia_wlan_common__common::BssDescription as fidl::encoding::TypeMarker>::inline_size(decoder.context);
10983                if inlined != (member_inline_size <= 4) {
10984                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
10985                }
10986                let inner_offset;
10987                let mut inner_depth = depth.clone();
10988                if inlined {
10989                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10990                    inner_offset = next_offset;
10991                } else {
10992                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10993                    inner_depth.increment()?;
10994                }
10995                let val_ref = self.selected_bss.get_or_insert_with(|| {
10996                    fidl::new_empty!(fidl_fuchsia_wlan_common__common::BssDescription, D)
10997                });
10998                fidl::decode!(
10999                    fidl_fuchsia_wlan_common__common::BssDescription,
11000                    D,
11001                    val_ref,
11002                    decoder,
11003                    inner_offset,
11004                    inner_depth
11005                )?;
11006                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11007                {
11008                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11009                }
11010                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11011                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11012                }
11013            }
11014
11015            next_offset += envelope_size;
11016            _next_ordinal_to_read += 1;
11017            if next_offset >= end_offset {
11018                return Ok(());
11019            }
11020
11021            // Decode unknown envelopes for gaps in ordinals.
11022            while _next_ordinal_to_read < 3 {
11023                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11024                _next_ordinal_to_read += 1;
11025                next_offset += envelope_size;
11026            }
11027
11028            let next_out_of_line = decoder.next_out_of_line();
11029            let handles_before = decoder.remaining_handles();
11030            if let Some((inlined, num_bytes, num_handles)) =
11031                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11032            {
11033                let member_inline_size =
11034                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11035                if inlined != (member_inline_size <= 4) {
11036                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11037                }
11038                let inner_offset;
11039                let mut inner_depth = depth.clone();
11040                if inlined {
11041                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11042                    inner_offset = next_offset;
11043                } else {
11044                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11045                    inner_depth.increment()?;
11046                }
11047                let val_ref = self
11048                    .original_association_maintained
11049                    .get_or_insert_with(|| fidl::new_empty!(bool, D));
11050                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
11051                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11052                {
11053                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11054                }
11055                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11056                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11057                }
11058            }
11059
11060            next_offset += envelope_size;
11061
11062            // Decode the remaining unknown envelopes.
11063            while next_offset < end_offset {
11064                _next_ordinal_to_read += 1;
11065                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11066                next_offset += envelope_size;
11067            }
11068
11069            Ok(())
11070        }
11071    }
11072
11073    impl WlanFullmacImplIfcSaeHandshakeIndRequest {
11074        #[inline(always)]
11075        fn max_ordinal_present(&self) -> u64 {
11076            if let Some(_) = self.peer_sta_address {
11077                return 1;
11078            }
11079            0
11080        }
11081    }
11082
11083    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplIfcSaeHandshakeIndRequest {
11084        type Borrowed<'a> = &'a Self;
11085        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11086            value
11087        }
11088    }
11089
11090    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplIfcSaeHandshakeIndRequest {
11091        type Owned = Self;
11092
11093        #[inline(always)]
11094        fn inline_align(_context: fidl::encoding::Context) -> usize {
11095            8
11096        }
11097
11098        #[inline(always)]
11099        fn inline_size(_context: fidl::encoding::Context) -> usize {
11100            16
11101        }
11102    }
11103
11104    unsafe impl<D: fidl::encoding::ResourceDialect>
11105        fidl::encoding::Encode<WlanFullmacImplIfcSaeHandshakeIndRequest, D>
11106        for &WlanFullmacImplIfcSaeHandshakeIndRequest
11107    {
11108        unsafe fn encode(
11109            self,
11110            encoder: &mut fidl::encoding::Encoder<'_, D>,
11111            offset: usize,
11112            mut depth: fidl::encoding::Depth,
11113        ) -> fidl::Result<()> {
11114            encoder.debug_check_bounds::<WlanFullmacImplIfcSaeHandshakeIndRequest>(offset);
11115            // Vector header
11116            let max_ordinal: u64 = self.max_ordinal_present();
11117            encoder.write_num(max_ordinal, offset);
11118            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11119            // Calling encoder.out_of_line_offset(0) is not allowed.
11120            if max_ordinal == 0 {
11121                return Ok(());
11122            }
11123            depth.increment()?;
11124            let envelope_size = 8;
11125            let bytes_len = max_ordinal as usize * envelope_size;
11126            #[allow(unused_variables)]
11127            let offset = encoder.out_of_line_offset(bytes_len);
11128            let mut _prev_end_offset: usize = 0;
11129            if 1 > max_ordinal {
11130                return Ok(());
11131            }
11132
11133            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11134            // are envelope_size bytes.
11135            let cur_offset: usize = (1 - 1) * envelope_size;
11136
11137            // Zero reserved fields.
11138            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11139
11140            // Safety:
11141            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11142            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11143            //   envelope_size bytes, there is always sufficient room.
11144            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
11145                self.peer_sta_address
11146                    .as_ref()
11147                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
11148                encoder,
11149                offset + cur_offset,
11150                depth,
11151            )?;
11152
11153            _prev_end_offset = cur_offset + envelope_size;
11154
11155            Ok(())
11156        }
11157    }
11158
11159    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11160        for WlanFullmacImplIfcSaeHandshakeIndRequest
11161    {
11162        #[inline(always)]
11163        fn new_empty() -> Self {
11164            Self::default()
11165        }
11166
11167        unsafe fn decode(
11168            &mut self,
11169            decoder: &mut fidl::encoding::Decoder<'_, D>,
11170            offset: usize,
11171            mut depth: fidl::encoding::Depth,
11172        ) -> fidl::Result<()> {
11173            decoder.debug_check_bounds::<Self>(offset);
11174            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11175                None => return Err(fidl::Error::NotNullable),
11176                Some(len) => len,
11177            };
11178            // Calling decoder.out_of_line_offset(0) is not allowed.
11179            if len == 0 {
11180                return Ok(());
11181            };
11182            depth.increment()?;
11183            let envelope_size = 8;
11184            let bytes_len = len * envelope_size;
11185            let offset = decoder.out_of_line_offset(bytes_len)?;
11186            // Decode the envelope for each type.
11187            let mut _next_ordinal_to_read = 0;
11188            let mut next_offset = offset;
11189            let end_offset = offset + bytes_len;
11190            _next_ordinal_to_read += 1;
11191            if next_offset >= end_offset {
11192                return Ok(());
11193            }
11194
11195            // Decode unknown envelopes for gaps in ordinals.
11196            while _next_ordinal_to_read < 1 {
11197                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11198                _next_ordinal_to_read += 1;
11199                next_offset += envelope_size;
11200            }
11201
11202            let next_out_of_line = decoder.next_out_of_line();
11203            let handles_before = decoder.remaining_handles();
11204            if let Some((inlined, num_bytes, num_handles)) =
11205                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11206            {
11207                let member_inline_size =
11208                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
11209                        decoder.context,
11210                    );
11211                if inlined != (member_inline_size <= 4) {
11212                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11213                }
11214                let inner_offset;
11215                let mut inner_depth = depth.clone();
11216                if inlined {
11217                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11218                    inner_offset = next_offset;
11219                } else {
11220                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11221                    inner_depth.increment()?;
11222                }
11223                let val_ref = self
11224                    .peer_sta_address
11225                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
11226                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
11227                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11228                {
11229                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11230                }
11231                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11232                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11233                }
11234            }
11235
11236            next_offset += envelope_size;
11237
11238            // Decode the remaining unknown envelopes.
11239            while next_offset < end_offset {
11240                _next_ordinal_to_read += 1;
11241                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11242                next_offset += envelope_size;
11243            }
11244
11245            Ok(())
11246        }
11247    }
11248
11249    impl WlanFullmacImplIfcStartConfRequest {
11250        #[inline(always)]
11251        fn max_ordinal_present(&self) -> u64 {
11252            if let Some(_) = self.result_code {
11253                return 1;
11254            }
11255            0
11256        }
11257    }
11258
11259    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplIfcStartConfRequest {
11260        type Borrowed<'a> = &'a Self;
11261        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11262            value
11263        }
11264    }
11265
11266    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplIfcStartConfRequest {
11267        type Owned = Self;
11268
11269        #[inline(always)]
11270        fn inline_align(_context: fidl::encoding::Context) -> usize {
11271            8
11272        }
11273
11274        #[inline(always)]
11275        fn inline_size(_context: fidl::encoding::Context) -> usize {
11276            16
11277        }
11278    }
11279
11280    unsafe impl<D: fidl::encoding::ResourceDialect>
11281        fidl::encoding::Encode<WlanFullmacImplIfcStartConfRequest, D>
11282        for &WlanFullmacImplIfcStartConfRequest
11283    {
11284        unsafe fn encode(
11285            self,
11286            encoder: &mut fidl::encoding::Encoder<'_, D>,
11287            offset: usize,
11288            mut depth: fidl::encoding::Depth,
11289        ) -> fidl::Result<()> {
11290            encoder.debug_check_bounds::<WlanFullmacImplIfcStartConfRequest>(offset);
11291            // Vector header
11292            let max_ordinal: u64 = self.max_ordinal_present();
11293            encoder.write_num(max_ordinal, offset);
11294            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11295            // Calling encoder.out_of_line_offset(0) is not allowed.
11296            if max_ordinal == 0 {
11297                return Ok(());
11298            }
11299            depth.increment()?;
11300            let envelope_size = 8;
11301            let bytes_len = max_ordinal as usize * envelope_size;
11302            #[allow(unused_variables)]
11303            let offset = encoder.out_of_line_offset(bytes_len);
11304            let mut _prev_end_offset: usize = 0;
11305            if 1 > max_ordinal {
11306                return Ok(());
11307            }
11308
11309            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11310            // are envelope_size bytes.
11311            let cur_offset: usize = (1 - 1) * envelope_size;
11312
11313            // Zero reserved fields.
11314            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11315
11316            // Safety:
11317            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11318            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11319            //   envelope_size bytes, there is always sufficient room.
11320            fidl::encoding::encode_in_envelope_optional::<StartResult, D>(
11321                self.result_code
11322                    .as_ref()
11323                    .map(<StartResult as fidl::encoding::ValueTypeMarker>::borrow),
11324                encoder,
11325                offset + cur_offset,
11326                depth,
11327            )?;
11328
11329            _prev_end_offset = cur_offset + envelope_size;
11330
11331            Ok(())
11332        }
11333    }
11334
11335    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11336        for WlanFullmacImplIfcStartConfRequest
11337    {
11338        #[inline(always)]
11339        fn new_empty() -> Self {
11340            Self::default()
11341        }
11342
11343        unsafe fn decode(
11344            &mut self,
11345            decoder: &mut fidl::encoding::Decoder<'_, D>,
11346            offset: usize,
11347            mut depth: fidl::encoding::Depth,
11348        ) -> fidl::Result<()> {
11349            decoder.debug_check_bounds::<Self>(offset);
11350            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11351                None => return Err(fidl::Error::NotNullable),
11352                Some(len) => len,
11353            };
11354            // Calling decoder.out_of_line_offset(0) is not allowed.
11355            if len == 0 {
11356                return Ok(());
11357            };
11358            depth.increment()?;
11359            let envelope_size = 8;
11360            let bytes_len = len * envelope_size;
11361            let offset = decoder.out_of_line_offset(bytes_len)?;
11362            // Decode the envelope for each type.
11363            let mut _next_ordinal_to_read = 0;
11364            let mut next_offset = offset;
11365            let end_offset = offset + bytes_len;
11366            _next_ordinal_to_read += 1;
11367            if next_offset >= end_offset {
11368                return Ok(());
11369            }
11370
11371            // Decode unknown envelopes for gaps in ordinals.
11372            while _next_ordinal_to_read < 1 {
11373                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11374                _next_ordinal_to_read += 1;
11375                next_offset += envelope_size;
11376            }
11377
11378            let next_out_of_line = decoder.next_out_of_line();
11379            let handles_before = decoder.remaining_handles();
11380            if let Some((inlined, num_bytes, num_handles)) =
11381                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11382            {
11383                let member_inline_size =
11384                    <StartResult as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11385                if inlined != (member_inline_size <= 4) {
11386                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11387                }
11388                let inner_offset;
11389                let mut inner_depth = depth.clone();
11390                if inlined {
11391                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11392                    inner_offset = next_offset;
11393                } else {
11394                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11395                    inner_depth.increment()?;
11396                }
11397                let val_ref =
11398                    self.result_code.get_or_insert_with(|| fidl::new_empty!(StartResult, D));
11399                fidl::decode!(StartResult, D, val_ref, decoder, inner_offset, inner_depth)?;
11400                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11401                {
11402                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11403                }
11404                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11405                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11406                }
11407            }
11408
11409            next_offset += envelope_size;
11410
11411            // Decode the remaining unknown envelopes.
11412            while next_offset < end_offset {
11413                _next_ordinal_to_read += 1;
11414                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11415                next_offset += envelope_size;
11416            }
11417
11418            Ok(())
11419        }
11420    }
11421
11422    impl WlanFullmacImplIfcStopConfRequest {
11423        #[inline(always)]
11424        fn max_ordinal_present(&self) -> u64 {
11425            if let Some(_) = self.result_code {
11426                return 1;
11427            }
11428            0
11429        }
11430    }
11431
11432    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplIfcStopConfRequest {
11433        type Borrowed<'a> = &'a Self;
11434        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11435            value
11436        }
11437    }
11438
11439    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplIfcStopConfRequest {
11440        type Owned = Self;
11441
11442        #[inline(always)]
11443        fn inline_align(_context: fidl::encoding::Context) -> usize {
11444            8
11445        }
11446
11447        #[inline(always)]
11448        fn inline_size(_context: fidl::encoding::Context) -> usize {
11449            16
11450        }
11451    }
11452
11453    unsafe impl<D: fidl::encoding::ResourceDialect>
11454        fidl::encoding::Encode<WlanFullmacImplIfcStopConfRequest, D>
11455        for &WlanFullmacImplIfcStopConfRequest
11456    {
11457        unsafe fn encode(
11458            self,
11459            encoder: &mut fidl::encoding::Encoder<'_, D>,
11460            offset: usize,
11461            mut depth: fidl::encoding::Depth,
11462        ) -> fidl::Result<()> {
11463            encoder.debug_check_bounds::<WlanFullmacImplIfcStopConfRequest>(offset);
11464            // Vector header
11465            let max_ordinal: u64 = self.max_ordinal_present();
11466            encoder.write_num(max_ordinal, offset);
11467            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11468            // Calling encoder.out_of_line_offset(0) is not allowed.
11469            if max_ordinal == 0 {
11470                return Ok(());
11471            }
11472            depth.increment()?;
11473            let envelope_size = 8;
11474            let bytes_len = max_ordinal as usize * envelope_size;
11475            #[allow(unused_variables)]
11476            let offset = encoder.out_of_line_offset(bytes_len);
11477            let mut _prev_end_offset: usize = 0;
11478            if 1 > max_ordinal {
11479                return Ok(());
11480            }
11481
11482            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11483            // are envelope_size bytes.
11484            let cur_offset: usize = (1 - 1) * envelope_size;
11485
11486            // Zero reserved fields.
11487            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11488
11489            // Safety:
11490            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11491            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11492            //   envelope_size bytes, there is always sufficient room.
11493            fidl::encoding::encode_in_envelope_optional::<StopResult, D>(
11494                self.result_code
11495                    .as_ref()
11496                    .map(<StopResult as fidl::encoding::ValueTypeMarker>::borrow),
11497                encoder,
11498                offset + cur_offset,
11499                depth,
11500            )?;
11501
11502            _prev_end_offset = cur_offset + envelope_size;
11503
11504            Ok(())
11505        }
11506    }
11507
11508    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11509        for WlanFullmacImplIfcStopConfRequest
11510    {
11511        #[inline(always)]
11512        fn new_empty() -> Self {
11513            Self::default()
11514        }
11515
11516        unsafe fn decode(
11517            &mut self,
11518            decoder: &mut fidl::encoding::Decoder<'_, D>,
11519            offset: usize,
11520            mut depth: fidl::encoding::Depth,
11521        ) -> fidl::Result<()> {
11522            decoder.debug_check_bounds::<Self>(offset);
11523            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11524                None => return Err(fidl::Error::NotNullable),
11525                Some(len) => len,
11526            };
11527            // Calling decoder.out_of_line_offset(0) is not allowed.
11528            if len == 0 {
11529                return Ok(());
11530            };
11531            depth.increment()?;
11532            let envelope_size = 8;
11533            let bytes_len = len * envelope_size;
11534            let offset = decoder.out_of_line_offset(bytes_len)?;
11535            // Decode the envelope for each type.
11536            let mut _next_ordinal_to_read = 0;
11537            let mut next_offset = offset;
11538            let end_offset = offset + bytes_len;
11539            _next_ordinal_to_read += 1;
11540            if next_offset >= end_offset {
11541                return Ok(());
11542            }
11543
11544            // Decode unknown envelopes for gaps in ordinals.
11545            while _next_ordinal_to_read < 1 {
11546                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11547                _next_ordinal_to_read += 1;
11548                next_offset += envelope_size;
11549            }
11550
11551            let next_out_of_line = decoder.next_out_of_line();
11552            let handles_before = decoder.remaining_handles();
11553            if let Some((inlined, num_bytes, num_handles)) =
11554                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11555            {
11556                let member_inline_size =
11557                    <StopResult as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11558                if inlined != (member_inline_size <= 4) {
11559                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11560                }
11561                let inner_offset;
11562                let mut inner_depth = depth.clone();
11563                if inlined {
11564                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11565                    inner_offset = next_offset;
11566                } else {
11567                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11568                    inner_depth.increment()?;
11569                }
11570                let val_ref =
11571                    self.result_code.get_or_insert_with(|| fidl::new_empty!(StopResult, D));
11572                fidl::decode!(StopResult, D, val_ref, decoder, inner_offset, inner_depth)?;
11573                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11574                {
11575                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11576                }
11577                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11578                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11579                }
11580            }
11581
11582            next_offset += envelope_size;
11583
11584            // Decode the remaining unknown envelopes.
11585            while next_offset < end_offset {
11586                _next_ordinal_to_read += 1;
11587                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11588                next_offset += envelope_size;
11589            }
11590
11591            Ok(())
11592        }
11593    }
11594
11595    impl WlanFullmacImplOnLinkStateChangedRequest {
11596        #[inline(always)]
11597        fn max_ordinal_present(&self) -> u64 {
11598            if let Some(_) = self.online {
11599                return 1;
11600            }
11601            0
11602        }
11603    }
11604
11605    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplOnLinkStateChangedRequest {
11606        type Borrowed<'a> = &'a Self;
11607        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11608            value
11609        }
11610    }
11611
11612    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplOnLinkStateChangedRequest {
11613        type Owned = Self;
11614
11615        #[inline(always)]
11616        fn inline_align(_context: fidl::encoding::Context) -> usize {
11617            8
11618        }
11619
11620        #[inline(always)]
11621        fn inline_size(_context: fidl::encoding::Context) -> usize {
11622            16
11623        }
11624    }
11625
11626    unsafe impl<D: fidl::encoding::ResourceDialect>
11627        fidl::encoding::Encode<WlanFullmacImplOnLinkStateChangedRequest, D>
11628        for &WlanFullmacImplOnLinkStateChangedRequest
11629    {
11630        unsafe fn encode(
11631            self,
11632            encoder: &mut fidl::encoding::Encoder<'_, D>,
11633            offset: usize,
11634            mut depth: fidl::encoding::Depth,
11635        ) -> fidl::Result<()> {
11636            encoder.debug_check_bounds::<WlanFullmacImplOnLinkStateChangedRequest>(offset);
11637            // Vector header
11638            let max_ordinal: u64 = self.max_ordinal_present();
11639            encoder.write_num(max_ordinal, offset);
11640            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11641            // Calling encoder.out_of_line_offset(0) is not allowed.
11642            if max_ordinal == 0 {
11643                return Ok(());
11644            }
11645            depth.increment()?;
11646            let envelope_size = 8;
11647            let bytes_len = max_ordinal as usize * envelope_size;
11648            #[allow(unused_variables)]
11649            let offset = encoder.out_of_line_offset(bytes_len);
11650            let mut _prev_end_offset: usize = 0;
11651            if 1 > max_ordinal {
11652                return Ok(());
11653            }
11654
11655            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11656            // are envelope_size bytes.
11657            let cur_offset: usize = (1 - 1) * envelope_size;
11658
11659            // Zero reserved fields.
11660            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11661
11662            // Safety:
11663            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11664            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11665            //   envelope_size bytes, there is always sufficient room.
11666            fidl::encoding::encode_in_envelope_optional::<bool, D>(
11667                self.online.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
11668                encoder,
11669                offset + cur_offset,
11670                depth,
11671            )?;
11672
11673            _prev_end_offset = cur_offset + envelope_size;
11674
11675            Ok(())
11676        }
11677    }
11678
11679    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11680        for WlanFullmacImplOnLinkStateChangedRequest
11681    {
11682        #[inline(always)]
11683        fn new_empty() -> Self {
11684            Self::default()
11685        }
11686
11687        unsafe fn decode(
11688            &mut self,
11689            decoder: &mut fidl::encoding::Decoder<'_, D>,
11690            offset: usize,
11691            mut depth: fidl::encoding::Depth,
11692        ) -> fidl::Result<()> {
11693            decoder.debug_check_bounds::<Self>(offset);
11694            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11695                None => return Err(fidl::Error::NotNullable),
11696                Some(len) => len,
11697            };
11698            // Calling decoder.out_of_line_offset(0) is not allowed.
11699            if len == 0 {
11700                return Ok(());
11701            };
11702            depth.increment()?;
11703            let envelope_size = 8;
11704            let bytes_len = len * envelope_size;
11705            let offset = decoder.out_of_line_offset(bytes_len)?;
11706            // Decode the envelope for each type.
11707            let mut _next_ordinal_to_read = 0;
11708            let mut next_offset = offset;
11709            let end_offset = offset + bytes_len;
11710            _next_ordinal_to_read += 1;
11711            if next_offset >= end_offset {
11712                return Ok(());
11713            }
11714
11715            // Decode unknown envelopes for gaps in ordinals.
11716            while _next_ordinal_to_read < 1 {
11717                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11718                _next_ordinal_to_read += 1;
11719                next_offset += envelope_size;
11720            }
11721
11722            let next_out_of_line = decoder.next_out_of_line();
11723            let handles_before = decoder.remaining_handles();
11724            if let Some((inlined, num_bytes, num_handles)) =
11725                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11726            {
11727                let member_inline_size =
11728                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11729                if inlined != (member_inline_size <= 4) {
11730                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11731                }
11732                let inner_offset;
11733                let mut inner_depth = depth.clone();
11734                if inlined {
11735                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11736                    inner_offset = next_offset;
11737                } else {
11738                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11739                    inner_depth.increment()?;
11740                }
11741                let val_ref = self.online.get_or_insert_with(|| fidl::new_empty!(bool, D));
11742                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
11743                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11744                {
11745                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11746                }
11747                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11748                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11749                }
11750            }
11751
11752            next_offset += envelope_size;
11753
11754            // Decode the remaining unknown envelopes.
11755            while next_offset < end_offset {
11756                _next_ordinal_to_read += 1;
11757                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11758                next_offset += envelope_size;
11759            }
11760
11761            Ok(())
11762        }
11763    }
11764
11765    impl WlanFullmacImplReconnectRequest {
11766        #[inline(always)]
11767        fn max_ordinal_present(&self) -> u64 {
11768            if let Some(_) = self.peer_sta_address {
11769                return 1;
11770            }
11771            0
11772        }
11773    }
11774
11775    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplReconnectRequest {
11776        type Borrowed<'a> = &'a Self;
11777        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11778            value
11779        }
11780    }
11781
11782    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplReconnectRequest {
11783        type Owned = Self;
11784
11785        #[inline(always)]
11786        fn inline_align(_context: fidl::encoding::Context) -> usize {
11787            8
11788        }
11789
11790        #[inline(always)]
11791        fn inline_size(_context: fidl::encoding::Context) -> usize {
11792            16
11793        }
11794    }
11795
11796    unsafe impl<D: fidl::encoding::ResourceDialect>
11797        fidl::encoding::Encode<WlanFullmacImplReconnectRequest, D>
11798        for &WlanFullmacImplReconnectRequest
11799    {
11800        unsafe fn encode(
11801            self,
11802            encoder: &mut fidl::encoding::Encoder<'_, D>,
11803            offset: usize,
11804            mut depth: fidl::encoding::Depth,
11805        ) -> fidl::Result<()> {
11806            encoder.debug_check_bounds::<WlanFullmacImplReconnectRequest>(offset);
11807            // Vector header
11808            let max_ordinal: u64 = self.max_ordinal_present();
11809            encoder.write_num(max_ordinal, offset);
11810            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11811            // Calling encoder.out_of_line_offset(0) is not allowed.
11812            if max_ordinal == 0 {
11813                return Ok(());
11814            }
11815            depth.increment()?;
11816            let envelope_size = 8;
11817            let bytes_len = max_ordinal as usize * envelope_size;
11818            #[allow(unused_variables)]
11819            let offset = encoder.out_of_line_offset(bytes_len);
11820            let mut _prev_end_offset: usize = 0;
11821            if 1 > max_ordinal {
11822                return Ok(());
11823            }
11824
11825            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
11826            // are envelope_size bytes.
11827            let cur_offset: usize = (1 - 1) * envelope_size;
11828
11829            // Zero reserved fields.
11830            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11831
11832            // Safety:
11833            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
11834            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
11835            //   envelope_size bytes, there is always sufficient room.
11836            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
11837                self.peer_sta_address
11838                    .as_ref()
11839                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
11840                encoder,
11841                offset + cur_offset,
11842                depth,
11843            )?;
11844
11845            _prev_end_offset = cur_offset + envelope_size;
11846
11847            Ok(())
11848        }
11849    }
11850
11851    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11852        for WlanFullmacImplReconnectRequest
11853    {
11854        #[inline(always)]
11855        fn new_empty() -> Self {
11856            Self::default()
11857        }
11858
11859        unsafe fn decode(
11860            &mut self,
11861            decoder: &mut fidl::encoding::Decoder<'_, D>,
11862            offset: usize,
11863            mut depth: fidl::encoding::Depth,
11864        ) -> fidl::Result<()> {
11865            decoder.debug_check_bounds::<Self>(offset);
11866            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11867                None => return Err(fidl::Error::NotNullable),
11868                Some(len) => len,
11869            };
11870            // Calling decoder.out_of_line_offset(0) is not allowed.
11871            if len == 0 {
11872                return Ok(());
11873            };
11874            depth.increment()?;
11875            let envelope_size = 8;
11876            let bytes_len = len * envelope_size;
11877            let offset = decoder.out_of_line_offset(bytes_len)?;
11878            // Decode the envelope for each type.
11879            let mut _next_ordinal_to_read = 0;
11880            let mut next_offset = offset;
11881            let end_offset = offset + bytes_len;
11882            _next_ordinal_to_read += 1;
11883            if next_offset >= end_offset {
11884                return Ok(());
11885            }
11886
11887            // Decode unknown envelopes for gaps in ordinals.
11888            while _next_ordinal_to_read < 1 {
11889                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11890                _next_ordinal_to_read += 1;
11891                next_offset += envelope_size;
11892            }
11893
11894            let next_out_of_line = decoder.next_out_of_line();
11895            let handles_before = decoder.remaining_handles();
11896            if let Some((inlined, num_bytes, num_handles)) =
11897                fidl::encoding::decode_envelope_header(decoder, next_offset)?
11898            {
11899                let member_inline_size =
11900                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
11901                        decoder.context,
11902                    );
11903                if inlined != (member_inline_size <= 4) {
11904                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
11905                }
11906                let inner_offset;
11907                let mut inner_depth = depth.clone();
11908                if inlined {
11909                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11910                    inner_offset = next_offset;
11911                } else {
11912                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11913                    inner_depth.increment()?;
11914                }
11915                let val_ref = self
11916                    .peer_sta_address
11917                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
11918                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
11919                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11920                {
11921                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
11922                }
11923                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11924                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11925                }
11926            }
11927
11928            next_offset += envelope_size;
11929
11930            // Decode the remaining unknown envelopes.
11931            while next_offset < end_offset {
11932                _next_ordinal_to_read += 1;
11933                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11934                next_offset += envelope_size;
11935            }
11936
11937            Ok(())
11938        }
11939    }
11940
11941    impl WlanFullmacImplRoamRequest {
11942        #[inline(always)]
11943        fn max_ordinal_present(&self) -> u64 {
11944            if let Some(_) = self.selected_bss {
11945                return 1;
11946            }
11947            0
11948        }
11949    }
11950
11951    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplRoamRequest {
11952        type Borrowed<'a> = &'a Self;
11953        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11954            value
11955        }
11956    }
11957
11958    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplRoamRequest {
11959        type Owned = Self;
11960
11961        #[inline(always)]
11962        fn inline_align(_context: fidl::encoding::Context) -> usize {
11963            8
11964        }
11965
11966        #[inline(always)]
11967        fn inline_size(_context: fidl::encoding::Context) -> usize {
11968            16
11969        }
11970    }
11971
11972    unsafe impl<D: fidl::encoding::ResourceDialect>
11973        fidl::encoding::Encode<WlanFullmacImplRoamRequest, D> for &WlanFullmacImplRoamRequest
11974    {
11975        unsafe fn encode(
11976            self,
11977            encoder: &mut fidl::encoding::Encoder<'_, D>,
11978            offset: usize,
11979            mut depth: fidl::encoding::Depth,
11980        ) -> fidl::Result<()> {
11981            encoder.debug_check_bounds::<WlanFullmacImplRoamRequest>(offset);
11982            // Vector header
11983            let max_ordinal: u64 = self.max_ordinal_present();
11984            encoder.write_num(max_ordinal, offset);
11985            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11986            // Calling encoder.out_of_line_offset(0) is not allowed.
11987            if max_ordinal == 0 {
11988                return Ok(());
11989            }
11990            depth.increment()?;
11991            let envelope_size = 8;
11992            let bytes_len = max_ordinal as usize * envelope_size;
11993            #[allow(unused_variables)]
11994            let offset = encoder.out_of_line_offset(bytes_len);
11995            let mut _prev_end_offset: usize = 0;
11996            if 1 > max_ordinal {
11997                return Ok(());
11998            }
11999
12000            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12001            // are envelope_size bytes.
12002            let cur_offset: usize = (1 - 1) * envelope_size;
12003
12004            // Zero reserved fields.
12005            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12006
12007            // Safety:
12008            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12009            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12010            //   envelope_size bytes, there is always sufficient room.
12011            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_common__common::BssDescription, D>(
12012            self.selected_bss.as_ref().map(<fidl_fuchsia_wlan_common__common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow),
12013            encoder, offset + cur_offset, depth
12014        )?;
12015
12016            _prev_end_offset = cur_offset + envelope_size;
12017
12018            Ok(())
12019        }
12020    }
12021
12022    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12023        for WlanFullmacImplRoamRequest
12024    {
12025        #[inline(always)]
12026        fn new_empty() -> Self {
12027            Self::default()
12028        }
12029
12030        unsafe fn decode(
12031            &mut self,
12032            decoder: &mut fidl::encoding::Decoder<'_, D>,
12033            offset: usize,
12034            mut depth: fidl::encoding::Depth,
12035        ) -> fidl::Result<()> {
12036            decoder.debug_check_bounds::<Self>(offset);
12037            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12038                None => return Err(fidl::Error::NotNullable),
12039                Some(len) => len,
12040            };
12041            // Calling decoder.out_of_line_offset(0) is not allowed.
12042            if len == 0 {
12043                return Ok(());
12044            };
12045            depth.increment()?;
12046            let envelope_size = 8;
12047            let bytes_len = len * envelope_size;
12048            let offset = decoder.out_of_line_offset(bytes_len)?;
12049            // Decode the envelope for each type.
12050            let mut _next_ordinal_to_read = 0;
12051            let mut next_offset = offset;
12052            let end_offset = offset + bytes_len;
12053            _next_ordinal_to_read += 1;
12054            if next_offset >= end_offset {
12055                return Ok(());
12056            }
12057
12058            // Decode unknown envelopes for gaps in ordinals.
12059            while _next_ordinal_to_read < 1 {
12060                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12061                _next_ordinal_to_read += 1;
12062                next_offset += envelope_size;
12063            }
12064
12065            let next_out_of_line = decoder.next_out_of_line();
12066            let handles_before = decoder.remaining_handles();
12067            if let Some((inlined, num_bytes, num_handles)) =
12068                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12069            {
12070                let member_inline_size = <fidl_fuchsia_wlan_common__common::BssDescription as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12071                if inlined != (member_inline_size <= 4) {
12072                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12073                }
12074                let inner_offset;
12075                let mut inner_depth = depth.clone();
12076                if inlined {
12077                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12078                    inner_offset = next_offset;
12079                } else {
12080                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12081                    inner_depth.increment()?;
12082                }
12083                let val_ref = self.selected_bss.get_or_insert_with(|| {
12084                    fidl::new_empty!(fidl_fuchsia_wlan_common__common::BssDescription, D)
12085                });
12086                fidl::decode!(
12087                    fidl_fuchsia_wlan_common__common::BssDescription,
12088                    D,
12089                    val_ref,
12090                    decoder,
12091                    inner_offset,
12092                    inner_depth
12093                )?;
12094                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12095                {
12096                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12097                }
12098                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12099                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12100                }
12101            }
12102
12103            next_offset += envelope_size;
12104
12105            // Decode the remaining unknown envelopes.
12106            while next_offset < end_offset {
12107                _next_ordinal_to_read += 1;
12108                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12109                next_offset += envelope_size;
12110            }
12111
12112            Ok(())
12113        }
12114    }
12115
12116    impl WlanFullmacImplSaeHandshakeRespRequest {
12117        #[inline(always)]
12118        fn max_ordinal_present(&self) -> u64 {
12119            if let Some(_) = self.status_code {
12120                return 2;
12121            }
12122            if let Some(_) = self.peer_sta_address {
12123                return 1;
12124            }
12125            0
12126        }
12127    }
12128
12129    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplSaeHandshakeRespRequest {
12130        type Borrowed<'a> = &'a Self;
12131        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12132            value
12133        }
12134    }
12135
12136    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplSaeHandshakeRespRequest {
12137        type Owned = Self;
12138
12139        #[inline(always)]
12140        fn inline_align(_context: fidl::encoding::Context) -> usize {
12141            8
12142        }
12143
12144        #[inline(always)]
12145        fn inline_size(_context: fidl::encoding::Context) -> usize {
12146            16
12147        }
12148    }
12149
12150    unsafe impl<D: fidl::encoding::ResourceDialect>
12151        fidl::encoding::Encode<WlanFullmacImplSaeHandshakeRespRequest, D>
12152        for &WlanFullmacImplSaeHandshakeRespRequest
12153    {
12154        unsafe fn encode(
12155            self,
12156            encoder: &mut fidl::encoding::Encoder<'_, D>,
12157            offset: usize,
12158            mut depth: fidl::encoding::Depth,
12159        ) -> fidl::Result<()> {
12160            encoder.debug_check_bounds::<WlanFullmacImplSaeHandshakeRespRequest>(offset);
12161            // Vector header
12162            let max_ordinal: u64 = self.max_ordinal_present();
12163            encoder.write_num(max_ordinal, offset);
12164            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12165            // Calling encoder.out_of_line_offset(0) is not allowed.
12166            if max_ordinal == 0 {
12167                return Ok(());
12168            }
12169            depth.increment()?;
12170            let envelope_size = 8;
12171            let bytes_len = max_ordinal as usize * envelope_size;
12172            #[allow(unused_variables)]
12173            let offset = encoder.out_of_line_offset(bytes_len);
12174            let mut _prev_end_offset: usize = 0;
12175            if 1 > max_ordinal {
12176                return Ok(());
12177            }
12178
12179            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12180            // are envelope_size bytes.
12181            let cur_offset: usize = (1 - 1) * envelope_size;
12182
12183            // Zero reserved fields.
12184            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12185
12186            // Safety:
12187            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12188            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12189            //   envelope_size bytes, there is always sufficient room.
12190            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
12191                self.peer_sta_address
12192                    .as_ref()
12193                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
12194                encoder,
12195                offset + cur_offset,
12196                depth,
12197            )?;
12198
12199            _prev_end_offset = cur_offset + envelope_size;
12200            if 2 > max_ordinal {
12201                return Ok(());
12202            }
12203
12204            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12205            // are envelope_size bytes.
12206            let cur_offset: usize = (2 - 1) * envelope_size;
12207
12208            // Zero reserved fields.
12209            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12210
12211            // Safety:
12212            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12213            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12214            //   envelope_size bytes, there is always sufficient room.
12215            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_ieee80211__common::StatusCode, D>(
12216            self.status_code.as_ref().map(<fidl_fuchsia_wlan_ieee80211__common::StatusCode as fidl::encoding::ValueTypeMarker>::borrow),
12217            encoder, offset + cur_offset, depth
12218        )?;
12219
12220            _prev_end_offset = cur_offset + envelope_size;
12221
12222            Ok(())
12223        }
12224    }
12225
12226    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12227        for WlanFullmacImplSaeHandshakeRespRequest
12228    {
12229        #[inline(always)]
12230        fn new_empty() -> Self {
12231            Self::default()
12232        }
12233
12234        unsafe fn decode(
12235            &mut self,
12236            decoder: &mut fidl::encoding::Decoder<'_, D>,
12237            offset: usize,
12238            mut depth: fidl::encoding::Depth,
12239        ) -> fidl::Result<()> {
12240            decoder.debug_check_bounds::<Self>(offset);
12241            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12242                None => return Err(fidl::Error::NotNullable),
12243                Some(len) => len,
12244            };
12245            // Calling decoder.out_of_line_offset(0) is not allowed.
12246            if len == 0 {
12247                return Ok(());
12248            };
12249            depth.increment()?;
12250            let envelope_size = 8;
12251            let bytes_len = len * envelope_size;
12252            let offset = decoder.out_of_line_offset(bytes_len)?;
12253            // Decode the envelope for each type.
12254            let mut _next_ordinal_to_read = 0;
12255            let mut next_offset = offset;
12256            let end_offset = offset + bytes_len;
12257            _next_ordinal_to_read += 1;
12258            if next_offset >= end_offset {
12259                return Ok(());
12260            }
12261
12262            // Decode unknown envelopes for gaps in ordinals.
12263            while _next_ordinal_to_read < 1 {
12264                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12265                _next_ordinal_to_read += 1;
12266                next_offset += envelope_size;
12267            }
12268
12269            let next_out_of_line = decoder.next_out_of_line();
12270            let handles_before = decoder.remaining_handles();
12271            if let Some((inlined, num_bytes, num_handles)) =
12272                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12273            {
12274                let member_inline_size =
12275                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
12276                        decoder.context,
12277                    );
12278                if inlined != (member_inline_size <= 4) {
12279                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12280                }
12281                let inner_offset;
12282                let mut inner_depth = depth.clone();
12283                if inlined {
12284                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12285                    inner_offset = next_offset;
12286                } else {
12287                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12288                    inner_depth.increment()?;
12289                }
12290                let val_ref = self
12291                    .peer_sta_address
12292                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
12293                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
12294                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12295                {
12296                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12297                }
12298                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12299                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12300                }
12301            }
12302
12303            next_offset += envelope_size;
12304            _next_ordinal_to_read += 1;
12305            if next_offset >= end_offset {
12306                return Ok(());
12307            }
12308
12309            // Decode unknown envelopes for gaps in ordinals.
12310            while _next_ordinal_to_read < 2 {
12311                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12312                _next_ordinal_to_read += 1;
12313                next_offset += envelope_size;
12314            }
12315
12316            let next_out_of_line = decoder.next_out_of_line();
12317            let handles_before = decoder.remaining_handles();
12318            if let Some((inlined, num_bytes, num_handles)) =
12319                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12320            {
12321                let member_inline_size = <fidl_fuchsia_wlan_ieee80211__common::StatusCode as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12322                if inlined != (member_inline_size <= 4) {
12323                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12324                }
12325                let inner_offset;
12326                let mut inner_depth = depth.clone();
12327                if inlined {
12328                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12329                    inner_offset = next_offset;
12330                } else {
12331                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12332                    inner_depth.increment()?;
12333                }
12334                let val_ref = self.status_code.get_or_insert_with(|| {
12335                    fidl::new_empty!(fidl_fuchsia_wlan_ieee80211__common::StatusCode, D)
12336                });
12337                fidl::decode!(
12338                    fidl_fuchsia_wlan_ieee80211__common::StatusCode,
12339                    D,
12340                    val_ref,
12341                    decoder,
12342                    inner_offset,
12343                    inner_depth
12344                )?;
12345                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12346                {
12347                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12348                }
12349                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12350                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12351                }
12352            }
12353
12354            next_offset += envelope_size;
12355
12356            // Decode the remaining unknown envelopes.
12357            while next_offset < end_offset {
12358                _next_ordinal_to_read += 1;
12359                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12360                next_offset += envelope_size;
12361            }
12362
12363            Ok(())
12364        }
12365    }
12366
12367    impl WlanFullmacImplSetKeysRequest {
12368        #[inline(always)]
12369        fn max_ordinal_present(&self) -> u64 {
12370            if let Some(_) = self.key_descriptors {
12371                return 2;
12372            }
12373            if let Some(_) = self.keylist {
12374                return 1;
12375            }
12376            0
12377        }
12378    }
12379
12380    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplSetKeysRequest {
12381        type Borrowed<'a> = &'a Self;
12382        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12383            value
12384        }
12385    }
12386
12387    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplSetKeysRequest {
12388        type Owned = Self;
12389
12390        #[inline(always)]
12391        fn inline_align(_context: fidl::encoding::Context) -> usize {
12392            8
12393        }
12394
12395        #[inline(always)]
12396        fn inline_size(_context: fidl::encoding::Context) -> usize {
12397            16
12398        }
12399    }
12400
12401    unsafe impl<D: fidl::encoding::ResourceDialect>
12402        fidl::encoding::Encode<WlanFullmacImplSetKeysRequest, D>
12403        for &WlanFullmacImplSetKeysRequest
12404    {
12405        unsafe fn encode(
12406            self,
12407            encoder: &mut fidl::encoding::Encoder<'_, D>,
12408            offset: usize,
12409            mut depth: fidl::encoding::Depth,
12410        ) -> fidl::Result<()> {
12411            encoder.debug_check_bounds::<WlanFullmacImplSetKeysRequest>(offset);
12412            // Vector header
12413            let max_ordinal: u64 = self.max_ordinal_present();
12414            encoder.write_num(max_ordinal, offset);
12415            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12416            // Calling encoder.out_of_line_offset(0) is not allowed.
12417            if max_ordinal == 0 {
12418                return Ok(());
12419            }
12420            depth.increment()?;
12421            let envelope_size = 8;
12422            let bytes_len = max_ordinal as usize * envelope_size;
12423            #[allow(unused_variables)]
12424            let offset = encoder.out_of_line_offset(bytes_len);
12425            let mut _prev_end_offset: usize = 0;
12426            if 1 > max_ordinal {
12427                return Ok(());
12428            }
12429
12430            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12431            // are envelope_size bytes.
12432            let cur_offset: usize = (1 - 1) * envelope_size;
12433
12434            // Zero reserved fields.
12435            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12436
12437            // Safety:
12438            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12439            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12440            //   envelope_size bytes, there is always sufficient room.
12441            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<fidl_fuchsia_wlan_common__common::WlanKeyConfig, 4>, D>(
12442            self.keylist.as_ref().map(<fidl::encoding::Vector<fidl_fuchsia_wlan_common__common::WlanKeyConfig, 4> as fidl::encoding::ValueTypeMarker>::borrow),
12443            encoder, offset + cur_offset, depth
12444        )?;
12445
12446            _prev_end_offset = cur_offset + envelope_size;
12447            if 2 > max_ordinal {
12448                return Ok(());
12449            }
12450
12451            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12452            // are envelope_size bytes.
12453            let cur_offset: usize = (2 - 1) * envelope_size;
12454
12455            // Zero reserved fields.
12456            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12457
12458            // Safety:
12459            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12460            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12461            //   envelope_size bytes, there is always sufficient room.
12462            fidl::encoding::encode_in_envelope_optional::<
12463                fidl::encoding::Vector<fidl_fuchsia_wlan_ieee80211__common::SetKeyDescriptor, 4>,
12464                D,
12465            >(
12466                self.key_descriptors.as_ref().map(
12467                    <fidl::encoding::Vector<
12468                        fidl_fuchsia_wlan_ieee80211__common::SetKeyDescriptor,
12469                        4,
12470                    > as fidl::encoding::ValueTypeMarker>::borrow,
12471                ),
12472                encoder,
12473                offset + cur_offset,
12474                depth,
12475            )?;
12476
12477            _prev_end_offset = cur_offset + envelope_size;
12478
12479            Ok(())
12480        }
12481    }
12482
12483    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12484        for WlanFullmacImplSetKeysRequest
12485    {
12486        #[inline(always)]
12487        fn new_empty() -> Self {
12488            Self::default()
12489        }
12490
12491        unsafe fn decode(
12492            &mut self,
12493            decoder: &mut fidl::encoding::Decoder<'_, D>,
12494            offset: usize,
12495            mut depth: fidl::encoding::Depth,
12496        ) -> fidl::Result<()> {
12497            decoder.debug_check_bounds::<Self>(offset);
12498            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12499                None => return Err(fidl::Error::NotNullable),
12500                Some(len) => len,
12501            };
12502            // Calling decoder.out_of_line_offset(0) is not allowed.
12503            if len == 0 {
12504                return Ok(());
12505            };
12506            depth.increment()?;
12507            let envelope_size = 8;
12508            let bytes_len = len * envelope_size;
12509            let offset = decoder.out_of_line_offset(bytes_len)?;
12510            // Decode the envelope for each type.
12511            let mut _next_ordinal_to_read = 0;
12512            let mut next_offset = offset;
12513            let end_offset = offset + bytes_len;
12514            _next_ordinal_to_read += 1;
12515            if next_offset >= end_offset {
12516                return Ok(());
12517            }
12518
12519            // Decode unknown envelopes for gaps in ordinals.
12520            while _next_ordinal_to_read < 1 {
12521                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12522                _next_ordinal_to_read += 1;
12523                next_offset += envelope_size;
12524            }
12525
12526            let next_out_of_line = decoder.next_out_of_line();
12527            let handles_before = decoder.remaining_handles();
12528            if let Some((inlined, num_bytes, num_handles)) =
12529                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12530            {
12531                let member_inline_size = <fidl::encoding::Vector<
12532                    fidl_fuchsia_wlan_common__common::WlanKeyConfig,
12533                    4,
12534                > as fidl::encoding::TypeMarker>::inline_size(
12535                    decoder.context
12536                );
12537                if inlined != (member_inline_size <= 4) {
12538                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12539                }
12540                let inner_offset;
12541                let mut inner_depth = depth.clone();
12542                if inlined {
12543                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12544                    inner_offset = next_offset;
12545                } else {
12546                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12547                    inner_depth.increment()?;
12548                }
12549                let val_ref =
12550                self.keylist.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_wlan_common__common::WlanKeyConfig, 4>, D));
12551                fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_wlan_common__common::WlanKeyConfig, 4>, D, val_ref, decoder, inner_offset, inner_depth)?;
12552                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12553                {
12554                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12555                }
12556                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12557                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12558                }
12559            }
12560
12561            next_offset += envelope_size;
12562            _next_ordinal_to_read += 1;
12563            if next_offset >= end_offset {
12564                return Ok(());
12565            }
12566
12567            // Decode unknown envelopes for gaps in ordinals.
12568            while _next_ordinal_to_read < 2 {
12569                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12570                _next_ordinal_to_read += 1;
12571                next_offset += envelope_size;
12572            }
12573
12574            let next_out_of_line = decoder.next_out_of_line();
12575            let handles_before = decoder.remaining_handles();
12576            if let Some((inlined, num_bytes, num_handles)) =
12577                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12578            {
12579                let member_inline_size = <fidl::encoding::Vector<
12580                    fidl_fuchsia_wlan_ieee80211__common::SetKeyDescriptor,
12581                    4,
12582                > as fidl::encoding::TypeMarker>::inline_size(
12583                    decoder.context
12584                );
12585                if inlined != (member_inline_size <= 4) {
12586                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12587                }
12588                let inner_offset;
12589                let mut inner_depth = depth.clone();
12590                if inlined {
12591                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12592                    inner_offset = next_offset;
12593                } else {
12594                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12595                    inner_depth.increment()?;
12596                }
12597                let val_ref =
12598                self.key_descriptors.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_wlan_ieee80211__common::SetKeyDescriptor, 4>, D));
12599                fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_wlan_ieee80211__common::SetKeyDescriptor, 4>, D, val_ref, decoder, inner_offset, inner_depth)?;
12600                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12601                {
12602                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12603                }
12604                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12605                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12606                }
12607            }
12608
12609            next_offset += envelope_size;
12610
12611            // Decode the remaining unknown envelopes.
12612            while next_offset < end_offset {
12613                _next_ordinal_to_read += 1;
12614                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12615                next_offset += envelope_size;
12616            }
12617
12618            Ok(())
12619        }
12620    }
12621
12622    impl WlanFullmacImplStartBssRequest {
12623        #[inline(always)]
12624        fn max_ordinal_present(&self) -> u64 {
12625            if let Some(_) = self.vendor_ie {
12626                return 7;
12627            }
12628            if let Some(_) = self.rsne {
12629                return 6;
12630            }
12631            if let Some(_) = self.channel {
12632                return 5;
12633            }
12634            if let Some(_) = self.dtim_period {
12635                return 4;
12636            }
12637            if let Some(_) = self.beacon_period {
12638                return 3;
12639            }
12640            if let Some(_) = self.bss_type {
12641                return 2;
12642            }
12643            if let Some(_) = self.ssid {
12644                return 1;
12645            }
12646            0
12647        }
12648    }
12649
12650    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplStartBssRequest {
12651        type Borrowed<'a> = &'a Self;
12652        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12653            value
12654        }
12655    }
12656
12657    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplStartBssRequest {
12658        type Owned = Self;
12659
12660        #[inline(always)]
12661        fn inline_align(_context: fidl::encoding::Context) -> usize {
12662            8
12663        }
12664
12665        #[inline(always)]
12666        fn inline_size(_context: fidl::encoding::Context) -> usize {
12667            16
12668        }
12669    }
12670
12671    unsafe impl<D: fidl::encoding::ResourceDialect>
12672        fidl::encoding::Encode<WlanFullmacImplStartBssRequest, D>
12673        for &WlanFullmacImplStartBssRequest
12674    {
12675        unsafe fn encode(
12676            self,
12677            encoder: &mut fidl::encoding::Encoder<'_, D>,
12678            offset: usize,
12679            mut depth: fidl::encoding::Depth,
12680        ) -> fidl::Result<()> {
12681            encoder.debug_check_bounds::<WlanFullmacImplStartBssRequest>(offset);
12682            // Vector header
12683            let max_ordinal: u64 = self.max_ordinal_present();
12684            encoder.write_num(max_ordinal, offset);
12685            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12686            // Calling encoder.out_of_line_offset(0) is not allowed.
12687            if max_ordinal == 0 {
12688                return Ok(());
12689            }
12690            depth.increment()?;
12691            let envelope_size = 8;
12692            let bytes_len = max_ordinal as usize * envelope_size;
12693            #[allow(unused_variables)]
12694            let offset = encoder.out_of_line_offset(bytes_len);
12695            let mut _prev_end_offset: usize = 0;
12696            if 1 > max_ordinal {
12697                return Ok(());
12698            }
12699
12700            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12701            // are envelope_size bytes.
12702            let cur_offset: usize = (1 - 1) * envelope_size;
12703
12704            // Zero reserved fields.
12705            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12706
12707            // Safety:
12708            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12709            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12710            //   envelope_size bytes, there is always sufficient room.
12711            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 32>, D>(
12712                self.ssid.as_ref().map(
12713                    <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow,
12714                ),
12715                encoder,
12716                offset + cur_offset,
12717                depth,
12718            )?;
12719
12720            _prev_end_offset = cur_offset + envelope_size;
12721            if 2 > max_ordinal {
12722                return Ok(());
12723            }
12724
12725            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12726            // are envelope_size bytes.
12727            let cur_offset: usize = (2 - 1) * envelope_size;
12728
12729            // Zero reserved fields.
12730            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12731
12732            // Safety:
12733            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12734            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12735            //   envelope_size bytes, there is always sufficient room.
12736            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_common__common::BssType, D>(
12737            self.bss_type.as_ref().map(<fidl_fuchsia_wlan_common__common::BssType as fidl::encoding::ValueTypeMarker>::borrow),
12738            encoder, offset + cur_offset, depth
12739        )?;
12740
12741            _prev_end_offset = cur_offset + envelope_size;
12742            if 3 > max_ordinal {
12743                return Ok(());
12744            }
12745
12746            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12747            // are envelope_size bytes.
12748            let cur_offset: usize = (3 - 1) * envelope_size;
12749
12750            // Zero reserved fields.
12751            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12752
12753            // Safety:
12754            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12755            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12756            //   envelope_size bytes, there is always sufficient room.
12757            fidl::encoding::encode_in_envelope_optional::<u32, D>(
12758                self.beacon_period.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
12759                encoder,
12760                offset + cur_offset,
12761                depth,
12762            )?;
12763
12764            _prev_end_offset = cur_offset + envelope_size;
12765            if 4 > max_ordinal {
12766                return Ok(());
12767            }
12768
12769            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12770            // are envelope_size bytes.
12771            let cur_offset: usize = (4 - 1) * envelope_size;
12772
12773            // Zero reserved fields.
12774            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12775
12776            // Safety:
12777            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12778            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12779            //   envelope_size bytes, there is always sufficient room.
12780            fidl::encoding::encode_in_envelope_optional::<u32, D>(
12781                self.dtim_period.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
12782                encoder,
12783                offset + cur_offset,
12784                depth,
12785            )?;
12786
12787            _prev_end_offset = cur_offset + envelope_size;
12788            if 5 > max_ordinal {
12789                return Ok(());
12790            }
12791
12792            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12793            // are envelope_size bytes.
12794            let cur_offset: usize = (5 - 1) * envelope_size;
12795
12796            // Zero reserved fields.
12797            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12798
12799            // Safety:
12800            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12801            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12802            //   envelope_size bytes, there is always sufficient room.
12803            fidl::encoding::encode_in_envelope_optional::<u8, D>(
12804                self.channel.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
12805                encoder,
12806                offset + cur_offset,
12807                depth,
12808            )?;
12809
12810            _prev_end_offset = cur_offset + envelope_size;
12811            if 6 > max_ordinal {
12812                return Ok(());
12813            }
12814
12815            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12816            // are envelope_size bytes.
12817            let cur_offset: usize = (6 - 1) * envelope_size;
12818
12819            // Zero reserved fields.
12820            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12821
12822            // Safety:
12823            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12824            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12825            //   envelope_size bytes, there is always sufficient room.
12826            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 257>, D>(
12827                self.rsne.as_ref().map(
12828                    <fidl::encoding::Vector<u8, 257> as fidl::encoding::ValueTypeMarker>::borrow,
12829                ),
12830                encoder,
12831                offset + cur_offset,
12832                depth,
12833            )?;
12834
12835            _prev_end_offset = cur_offset + envelope_size;
12836            if 7 > max_ordinal {
12837                return Ok(());
12838            }
12839
12840            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
12841            // are envelope_size bytes.
12842            let cur_offset: usize = (7 - 1) * envelope_size;
12843
12844            // Zero reserved fields.
12845            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12846
12847            // Safety:
12848            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
12849            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
12850            //   envelope_size bytes, there is always sufficient room.
12851            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 514>, D>(
12852                self.vendor_ie.as_ref().map(
12853                    <fidl::encoding::Vector<u8, 514> as fidl::encoding::ValueTypeMarker>::borrow,
12854                ),
12855                encoder,
12856                offset + cur_offset,
12857                depth,
12858            )?;
12859
12860            _prev_end_offset = cur_offset + envelope_size;
12861
12862            Ok(())
12863        }
12864    }
12865
12866    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12867        for WlanFullmacImplStartBssRequest
12868    {
12869        #[inline(always)]
12870        fn new_empty() -> Self {
12871            Self::default()
12872        }
12873
12874        unsafe fn decode(
12875            &mut self,
12876            decoder: &mut fidl::encoding::Decoder<'_, D>,
12877            offset: usize,
12878            mut depth: fidl::encoding::Depth,
12879        ) -> fidl::Result<()> {
12880            decoder.debug_check_bounds::<Self>(offset);
12881            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12882                None => return Err(fidl::Error::NotNullable),
12883                Some(len) => len,
12884            };
12885            // Calling decoder.out_of_line_offset(0) is not allowed.
12886            if len == 0 {
12887                return Ok(());
12888            };
12889            depth.increment()?;
12890            let envelope_size = 8;
12891            let bytes_len = len * envelope_size;
12892            let offset = decoder.out_of_line_offset(bytes_len)?;
12893            // Decode the envelope for each type.
12894            let mut _next_ordinal_to_read = 0;
12895            let mut next_offset = offset;
12896            let end_offset = offset + bytes_len;
12897            _next_ordinal_to_read += 1;
12898            if next_offset >= end_offset {
12899                return Ok(());
12900            }
12901
12902            // Decode unknown envelopes for gaps in ordinals.
12903            while _next_ordinal_to_read < 1 {
12904                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12905                _next_ordinal_to_read += 1;
12906                next_offset += envelope_size;
12907            }
12908
12909            let next_out_of_line = decoder.next_out_of_line();
12910            let handles_before = decoder.remaining_handles();
12911            if let Some((inlined, num_bytes, num_handles)) =
12912                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12913            {
12914                let member_inline_size =
12915                    <fidl::encoding::Vector<u8, 32> as fidl::encoding::TypeMarker>::inline_size(
12916                        decoder.context,
12917                    );
12918                if inlined != (member_inline_size <= 4) {
12919                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12920                }
12921                let inner_offset;
12922                let mut inner_depth = depth.clone();
12923                if inlined {
12924                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12925                    inner_offset = next_offset;
12926                } else {
12927                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12928                    inner_depth.increment()?;
12929                }
12930                let val_ref = self
12931                    .ssid
12932                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D));
12933                fidl::decode!(fidl::encoding::Vector<u8, 32>, D, val_ref, decoder, inner_offset, inner_depth)?;
12934                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12935                {
12936                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12937                }
12938                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12939                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12940                }
12941            }
12942
12943            next_offset += envelope_size;
12944            _next_ordinal_to_read += 1;
12945            if next_offset >= end_offset {
12946                return Ok(());
12947            }
12948
12949            // Decode unknown envelopes for gaps in ordinals.
12950            while _next_ordinal_to_read < 2 {
12951                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12952                _next_ordinal_to_read += 1;
12953                next_offset += envelope_size;
12954            }
12955
12956            let next_out_of_line = decoder.next_out_of_line();
12957            let handles_before = decoder.remaining_handles();
12958            if let Some((inlined, num_bytes, num_handles)) =
12959                fidl::encoding::decode_envelope_header(decoder, next_offset)?
12960            {
12961                let member_inline_size = <fidl_fuchsia_wlan_common__common::BssType as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12962                if inlined != (member_inline_size <= 4) {
12963                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
12964                }
12965                let inner_offset;
12966                let mut inner_depth = depth.clone();
12967                if inlined {
12968                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12969                    inner_offset = next_offset;
12970                } else {
12971                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12972                    inner_depth.increment()?;
12973                }
12974                let val_ref = self.bss_type.get_or_insert_with(|| {
12975                    fidl::new_empty!(fidl_fuchsia_wlan_common__common::BssType, D)
12976                });
12977                fidl::decode!(
12978                    fidl_fuchsia_wlan_common__common::BssType,
12979                    D,
12980                    val_ref,
12981                    decoder,
12982                    inner_offset,
12983                    inner_depth
12984                )?;
12985                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12986                {
12987                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
12988                }
12989                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12990                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12991                }
12992            }
12993
12994            next_offset += envelope_size;
12995            _next_ordinal_to_read += 1;
12996            if next_offset >= end_offset {
12997                return Ok(());
12998            }
12999
13000            // Decode unknown envelopes for gaps in ordinals.
13001            while _next_ordinal_to_read < 3 {
13002                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13003                _next_ordinal_to_read += 1;
13004                next_offset += envelope_size;
13005            }
13006
13007            let next_out_of_line = decoder.next_out_of_line();
13008            let handles_before = decoder.remaining_handles();
13009            if let Some((inlined, num_bytes, num_handles)) =
13010                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13011            {
13012                let member_inline_size =
13013                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13014                if inlined != (member_inline_size <= 4) {
13015                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13016                }
13017                let inner_offset;
13018                let mut inner_depth = depth.clone();
13019                if inlined {
13020                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13021                    inner_offset = next_offset;
13022                } else {
13023                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13024                    inner_depth.increment()?;
13025                }
13026                let val_ref = self.beacon_period.get_or_insert_with(|| fidl::new_empty!(u32, D));
13027                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
13028                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13029                {
13030                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13031                }
13032                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13033                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13034                }
13035            }
13036
13037            next_offset += envelope_size;
13038            _next_ordinal_to_read += 1;
13039            if next_offset >= end_offset {
13040                return Ok(());
13041            }
13042
13043            // Decode unknown envelopes for gaps in ordinals.
13044            while _next_ordinal_to_read < 4 {
13045                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13046                _next_ordinal_to_read += 1;
13047                next_offset += envelope_size;
13048            }
13049
13050            let next_out_of_line = decoder.next_out_of_line();
13051            let handles_before = decoder.remaining_handles();
13052            if let Some((inlined, num_bytes, num_handles)) =
13053                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13054            {
13055                let member_inline_size =
13056                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13057                if inlined != (member_inline_size <= 4) {
13058                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13059                }
13060                let inner_offset;
13061                let mut inner_depth = depth.clone();
13062                if inlined {
13063                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13064                    inner_offset = next_offset;
13065                } else {
13066                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13067                    inner_depth.increment()?;
13068                }
13069                let val_ref = self.dtim_period.get_or_insert_with(|| fidl::new_empty!(u32, D));
13070                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
13071                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13072                {
13073                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13074                }
13075                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13076                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13077                }
13078            }
13079
13080            next_offset += envelope_size;
13081            _next_ordinal_to_read += 1;
13082            if next_offset >= end_offset {
13083                return Ok(());
13084            }
13085
13086            // Decode unknown envelopes for gaps in ordinals.
13087            while _next_ordinal_to_read < 5 {
13088                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13089                _next_ordinal_to_read += 1;
13090                next_offset += envelope_size;
13091            }
13092
13093            let next_out_of_line = decoder.next_out_of_line();
13094            let handles_before = decoder.remaining_handles();
13095            if let Some((inlined, num_bytes, num_handles)) =
13096                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13097            {
13098                let member_inline_size =
13099                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13100                if inlined != (member_inline_size <= 4) {
13101                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13102                }
13103                let inner_offset;
13104                let mut inner_depth = depth.clone();
13105                if inlined {
13106                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13107                    inner_offset = next_offset;
13108                } else {
13109                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13110                    inner_depth.increment()?;
13111                }
13112                let val_ref = self.channel.get_or_insert_with(|| fidl::new_empty!(u8, D));
13113                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
13114                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13115                {
13116                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13117                }
13118                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13119                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13120                }
13121            }
13122
13123            next_offset += envelope_size;
13124            _next_ordinal_to_read += 1;
13125            if next_offset >= end_offset {
13126                return Ok(());
13127            }
13128
13129            // Decode unknown envelopes for gaps in ordinals.
13130            while _next_ordinal_to_read < 6 {
13131                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13132                _next_ordinal_to_read += 1;
13133                next_offset += envelope_size;
13134            }
13135
13136            let next_out_of_line = decoder.next_out_of_line();
13137            let handles_before = decoder.remaining_handles();
13138            if let Some((inlined, num_bytes, num_handles)) =
13139                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13140            {
13141                let member_inline_size =
13142                    <fidl::encoding::Vector<u8, 257> as fidl::encoding::TypeMarker>::inline_size(
13143                        decoder.context,
13144                    );
13145                if inlined != (member_inline_size <= 4) {
13146                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13147                }
13148                let inner_offset;
13149                let mut inner_depth = depth.clone();
13150                if inlined {
13151                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13152                    inner_offset = next_offset;
13153                } else {
13154                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13155                    inner_depth.increment()?;
13156                }
13157                let val_ref = self
13158                    .rsne
13159                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 257>, D));
13160                fidl::decode!(fidl::encoding::Vector<u8, 257>, D, val_ref, decoder, inner_offset, inner_depth)?;
13161                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13162                {
13163                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13164                }
13165                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13166                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13167                }
13168            }
13169
13170            next_offset += envelope_size;
13171            _next_ordinal_to_read += 1;
13172            if next_offset >= end_offset {
13173                return Ok(());
13174            }
13175
13176            // Decode unknown envelopes for gaps in ordinals.
13177            while _next_ordinal_to_read < 7 {
13178                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13179                _next_ordinal_to_read += 1;
13180                next_offset += envelope_size;
13181            }
13182
13183            let next_out_of_line = decoder.next_out_of_line();
13184            let handles_before = decoder.remaining_handles();
13185            if let Some((inlined, num_bytes, num_handles)) =
13186                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13187            {
13188                let member_inline_size =
13189                    <fidl::encoding::Vector<u8, 514> as fidl::encoding::TypeMarker>::inline_size(
13190                        decoder.context,
13191                    );
13192                if inlined != (member_inline_size <= 4) {
13193                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13194                }
13195                let inner_offset;
13196                let mut inner_depth = depth.clone();
13197                if inlined {
13198                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13199                    inner_offset = next_offset;
13200                } else {
13201                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13202                    inner_depth.increment()?;
13203                }
13204                let val_ref = self
13205                    .vendor_ie
13206                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 514>, D));
13207                fidl::decode!(fidl::encoding::Vector<u8, 514>, D, val_ref, decoder, inner_offset, inner_depth)?;
13208                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13209                {
13210                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13211                }
13212                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13213                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13214                }
13215            }
13216
13217            next_offset += envelope_size;
13218
13219            // Decode the remaining unknown envelopes.
13220            while next_offset < end_offset {
13221                _next_ordinal_to_read += 1;
13222                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13223                next_offset += envelope_size;
13224            }
13225
13226            Ok(())
13227        }
13228    }
13229
13230    impl WlanFullmacImplStartScanRequest {
13231        #[inline(always)]
13232        fn max_ordinal_present(&self) -> u64 {
13233            if let Some(_) = self.max_channel_time {
13234                return 6;
13235            }
13236            if let Some(_) = self.min_channel_time {
13237                return 5;
13238            }
13239            if let Some(_) = self.ssids {
13240                return 4;
13241            }
13242            if let Some(_) = self.channels {
13243                return 3;
13244            }
13245            if let Some(_) = self.scan_type {
13246                return 2;
13247            }
13248            if let Some(_) = self.txn_id {
13249                return 1;
13250            }
13251            0
13252        }
13253    }
13254
13255    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplStartScanRequest {
13256        type Borrowed<'a> = &'a Self;
13257        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13258            value
13259        }
13260    }
13261
13262    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplStartScanRequest {
13263        type Owned = Self;
13264
13265        #[inline(always)]
13266        fn inline_align(_context: fidl::encoding::Context) -> usize {
13267            8
13268        }
13269
13270        #[inline(always)]
13271        fn inline_size(_context: fidl::encoding::Context) -> usize {
13272            16
13273        }
13274    }
13275
13276    unsafe impl<D: fidl::encoding::ResourceDialect>
13277        fidl::encoding::Encode<WlanFullmacImplStartScanRequest, D>
13278        for &WlanFullmacImplStartScanRequest
13279    {
13280        unsafe fn encode(
13281            self,
13282            encoder: &mut fidl::encoding::Encoder<'_, D>,
13283            offset: usize,
13284            mut depth: fidl::encoding::Depth,
13285        ) -> fidl::Result<()> {
13286            encoder.debug_check_bounds::<WlanFullmacImplStartScanRequest>(offset);
13287            // Vector header
13288            let max_ordinal: u64 = self.max_ordinal_present();
13289            encoder.write_num(max_ordinal, offset);
13290            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
13291            // Calling encoder.out_of_line_offset(0) is not allowed.
13292            if max_ordinal == 0 {
13293                return Ok(());
13294            }
13295            depth.increment()?;
13296            let envelope_size = 8;
13297            let bytes_len = max_ordinal as usize * envelope_size;
13298            #[allow(unused_variables)]
13299            let offset = encoder.out_of_line_offset(bytes_len);
13300            let mut _prev_end_offset: usize = 0;
13301            if 1 > max_ordinal {
13302                return Ok(());
13303            }
13304
13305            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
13306            // are envelope_size bytes.
13307            let cur_offset: usize = (1 - 1) * envelope_size;
13308
13309            // Zero reserved fields.
13310            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13311
13312            // Safety:
13313            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
13314            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
13315            //   envelope_size bytes, there is always sufficient room.
13316            fidl::encoding::encode_in_envelope_optional::<u64, D>(
13317                self.txn_id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
13318                encoder,
13319                offset + cur_offset,
13320                depth,
13321            )?;
13322
13323            _prev_end_offset = cur_offset + envelope_size;
13324            if 2 > max_ordinal {
13325                return Ok(());
13326            }
13327
13328            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
13329            // are envelope_size bytes.
13330            let cur_offset: usize = (2 - 1) * envelope_size;
13331
13332            // Zero reserved fields.
13333            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13334
13335            // Safety:
13336            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
13337            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
13338            //   envelope_size bytes, there is always sufficient room.
13339            fidl::encoding::encode_in_envelope_optional::<WlanScanType, D>(
13340                self.scan_type
13341                    .as_ref()
13342                    .map(<WlanScanType as fidl::encoding::ValueTypeMarker>::borrow),
13343                encoder,
13344                offset + cur_offset,
13345                depth,
13346            )?;
13347
13348            _prev_end_offset = cur_offset + envelope_size;
13349            if 3 > max_ordinal {
13350                return Ok(());
13351            }
13352
13353            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
13354            // are envelope_size bytes.
13355            let cur_offset: usize = (3 - 1) * envelope_size;
13356
13357            // Zero reserved fields.
13358            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13359
13360            // Safety:
13361            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
13362            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
13363            //   envelope_size bytes, there is always sufficient room.
13364            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 256>, D>(
13365                self.channels.as_ref().map(
13366                    <fidl::encoding::Vector<u8, 256> as fidl::encoding::ValueTypeMarker>::borrow,
13367                ),
13368                encoder,
13369                offset + cur_offset,
13370                depth,
13371            )?;
13372
13373            _prev_end_offset = cur_offset + envelope_size;
13374            if 4 > max_ordinal {
13375                return Ok(());
13376            }
13377
13378            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
13379            // are envelope_size bytes.
13380            let cur_offset: usize = (4 - 1) * envelope_size;
13381
13382            // Zero reserved fields.
13383            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13384
13385            // Safety:
13386            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
13387            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
13388            //   envelope_size bytes, there is always sufficient room.
13389            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>, D>(
13390            self.ssids.as_ref().map(<fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>> as fidl::encoding::ValueTypeMarker>::borrow),
13391            encoder, offset + cur_offset, depth
13392        )?;
13393
13394            _prev_end_offset = cur_offset + envelope_size;
13395            if 5 > max_ordinal {
13396                return Ok(());
13397            }
13398
13399            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
13400            // are envelope_size bytes.
13401            let cur_offset: usize = (5 - 1) * envelope_size;
13402
13403            // Zero reserved fields.
13404            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13405
13406            // Safety:
13407            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
13408            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
13409            //   envelope_size bytes, there is always sufficient room.
13410            fidl::encoding::encode_in_envelope_optional::<u32, D>(
13411                self.min_channel_time
13412                    .as_ref()
13413                    .map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
13414                encoder,
13415                offset + cur_offset,
13416                depth,
13417            )?;
13418
13419            _prev_end_offset = cur_offset + envelope_size;
13420            if 6 > max_ordinal {
13421                return Ok(());
13422            }
13423
13424            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
13425            // are envelope_size bytes.
13426            let cur_offset: usize = (6 - 1) * envelope_size;
13427
13428            // Zero reserved fields.
13429            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13430
13431            // Safety:
13432            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
13433            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
13434            //   envelope_size bytes, there is always sufficient room.
13435            fidl::encoding::encode_in_envelope_optional::<u32, D>(
13436                self.max_channel_time
13437                    .as_ref()
13438                    .map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
13439                encoder,
13440                offset + cur_offset,
13441                depth,
13442            )?;
13443
13444            _prev_end_offset = cur_offset + envelope_size;
13445
13446            Ok(())
13447        }
13448    }
13449
13450    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13451        for WlanFullmacImplStartScanRequest
13452    {
13453        #[inline(always)]
13454        fn new_empty() -> Self {
13455            Self::default()
13456        }
13457
13458        unsafe fn decode(
13459            &mut self,
13460            decoder: &mut fidl::encoding::Decoder<'_, D>,
13461            offset: usize,
13462            mut depth: fidl::encoding::Depth,
13463        ) -> fidl::Result<()> {
13464            decoder.debug_check_bounds::<Self>(offset);
13465            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
13466                None => return Err(fidl::Error::NotNullable),
13467                Some(len) => len,
13468            };
13469            // Calling decoder.out_of_line_offset(0) is not allowed.
13470            if len == 0 {
13471                return Ok(());
13472            };
13473            depth.increment()?;
13474            let envelope_size = 8;
13475            let bytes_len = len * envelope_size;
13476            let offset = decoder.out_of_line_offset(bytes_len)?;
13477            // Decode the envelope for each type.
13478            let mut _next_ordinal_to_read = 0;
13479            let mut next_offset = offset;
13480            let end_offset = offset + bytes_len;
13481            _next_ordinal_to_read += 1;
13482            if next_offset >= end_offset {
13483                return Ok(());
13484            }
13485
13486            // Decode unknown envelopes for gaps in ordinals.
13487            while _next_ordinal_to_read < 1 {
13488                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13489                _next_ordinal_to_read += 1;
13490                next_offset += envelope_size;
13491            }
13492
13493            let next_out_of_line = decoder.next_out_of_line();
13494            let handles_before = decoder.remaining_handles();
13495            if let Some((inlined, num_bytes, num_handles)) =
13496                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13497            {
13498                let member_inline_size =
13499                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13500                if inlined != (member_inline_size <= 4) {
13501                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13502                }
13503                let inner_offset;
13504                let mut inner_depth = depth.clone();
13505                if inlined {
13506                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13507                    inner_offset = next_offset;
13508                } else {
13509                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13510                    inner_depth.increment()?;
13511                }
13512                let val_ref = self.txn_id.get_or_insert_with(|| fidl::new_empty!(u64, D));
13513                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
13514                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13515                {
13516                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13517                }
13518                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13519                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13520                }
13521            }
13522
13523            next_offset += envelope_size;
13524            _next_ordinal_to_read += 1;
13525            if next_offset >= end_offset {
13526                return Ok(());
13527            }
13528
13529            // Decode unknown envelopes for gaps in ordinals.
13530            while _next_ordinal_to_read < 2 {
13531                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13532                _next_ordinal_to_read += 1;
13533                next_offset += envelope_size;
13534            }
13535
13536            let next_out_of_line = decoder.next_out_of_line();
13537            let handles_before = decoder.remaining_handles();
13538            if let Some((inlined, num_bytes, num_handles)) =
13539                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13540            {
13541                let member_inline_size =
13542                    <WlanScanType as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13543                if inlined != (member_inline_size <= 4) {
13544                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13545                }
13546                let inner_offset;
13547                let mut inner_depth = depth.clone();
13548                if inlined {
13549                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13550                    inner_offset = next_offset;
13551                } else {
13552                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13553                    inner_depth.increment()?;
13554                }
13555                let val_ref =
13556                    self.scan_type.get_or_insert_with(|| fidl::new_empty!(WlanScanType, D));
13557                fidl::decode!(WlanScanType, D, val_ref, decoder, inner_offset, inner_depth)?;
13558                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13559                {
13560                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13561                }
13562                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13563                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13564                }
13565            }
13566
13567            next_offset += envelope_size;
13568            _next_ordinal_to_read += 1;
13569            if next_offset >= end_offset {
13570                return Ok(());
13571            }
13572
13573            // Decode unknown envelopes for gaps in ordinals.
13574            while _next_ordinal_to_read < 3 {
13575                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13576                _next_ordinal_to_read += 1;
13577                next_offset += envelope_size;
13578            }
13579
13580            let next_out_of_line = decoder.next_out_of_line();
13581            let handles_before = decoder.remaining_handles();
13582            if let Some((inlined, num_bytes, num_handles)) =
13583                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13584            {
13585                let member_inline_size =
13586                    <fidl::encoding::Vector<u8, 256> as fidl::encoding::TypeMarker>::inline_size(
13587                        decoder.context,
13588                    );
13589                if inlined != (member_inline_size <= 4) {
13590                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13591                }
13592                let inner_offset;
13593                let mut inner_depth = depth.clone();
13594                if inlined {
13595                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13596                    inner_offset = next_offset;
13597                } else {
13598                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13599                    inner_depth.increment()?;
13600                }
13601                let val_ref = self
13602                    .channels
13603                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 256>, D));
13604                fidl::decode!(fidl::encoding::Vector<u8, 256>, D, val_ref, decoder, inner_offset, inner_depth)?;
13605                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13606                {
13607                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13608                }
13609                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13610                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13611                }
13612            }
13613
13614            next_offset += envelope_size;
13615            _next_ordinal_to_read += 1;
13616            if next_offset >= end_offset {
13617                return Ok(());
13618            }
13619
13620            // Decode unknown envelopes for gaps in ordinals.
13621            while _next_ordinal_to_read < 4 {
13622                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13623                _next_ordinal_to_read += 1;
13624                next_offset += envelope_size;
13625            }
13626
13627            let next_out_of_line = decoder.next_out_of_line();
13628            let handles_before = decoder.remaining_handles();
13629            if let Some((inlined, num_bytes, num_handles)) =
13630                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13631            {
13632                let member_inline_size = <fidl::encoding::UnboundedVector<
13633                    fidl::encoding::Vector<u8, 32>,
13634                > as fidl::encoding::TypeMarker>::inline_size(
13635                    decoder.context
13636                );
13637                if inlined != (member_inline_size <= 4) {
13638                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13639                }
13640                let inner_offset;
13641                let mut inner_depth = depth.clone();
13642                if inlined {
13643                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13644                    inner_offset = next_offset;
13645                } else {
13646                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13647                    inner_depth.increment()?;
13648                }
13649                let val_ref = self.ssids.get_or_insert_with(|| {
13650                    fidl::new_empty!(
13651                        fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>,
13652                        D
13653                    )
13654                });
13655                fidl::decode!(
13656                    fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>,
13657                    D,
13658                    val_ref,
13659                    decoder,
13660                    inner_offset,
13661                    inner_depth
13662                )?;
13663                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13664                {
13665                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13666                }
13667                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13668                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13669                }
13670            }
13671
13672            next_offset += envelope_size;
13673            _next_ordinal_to_read += 1;
13674            if next_offset >= end_offset {
13675                return Ok(());
13676            }
13677
13678            // Decode unknown envelopes for gaps in ordinals.
13679            while _next_ordinal_to_read < 5 {
13680                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13681                _next_ordinal_to_read += 1;
13682                next_offset += envelope_size;
13683            }
13684
13685            let next_out_of_line = decoder.next_out_of_line();
13686            let handles_before = decoder.remaining_handles();
13687            if let Some((inlined, num_bytes, num_handles)) =
13688                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13689            {
13690                let member_inline_size =
13691                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13692                if inlined != (member_inline_size <= 4) {
13693                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13694                }
13695                let inner_offset;
13696                let mut inner_depth = depth.clone();
13697                if inlined {
13698                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13699                    inner_offset = next_offset;
13700                } else {
13701                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13702                    inner_depth.increment()?;
13703                }
13704                let val_ref = self.min_channel_time.get_or_insert_with(|| fidl::new_empty!(u32, D));
13705                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
13706                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13707                {
13708                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13709                }
13710                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13711                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13712                }
13713            }
13714
13715            next_offset += envelope_size;
13716            _next_ordinal_to_read += 1;
13717            if next_offset >= end_offset {
13718                return Ok(());
13719            }
13720
13721            // Decode unknown envelopes for gaps in ordinals.
13722            while _next_ordinal_to_read < 6 {
13723                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13724                _next_ordinal_to_read += 1;
13725                next_offset += envelope_size;
13726            }
13727
13728            let next_out_of_line = decoder.next_out_of_line();
13729            let handles_before = decoder.remaining_handles();
13730            if let Some((inlined, num_bytes, num_handles)) =
13731                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13732            {
13733                let member_inline_size =
13734                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13735                if inlined != (member_inline_size <= 4) {
13736                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13737                }
13738                let inner_offset;
13739                let mut inner_depth = depth.clone();
13740                if inlined {
13741                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13742                    inner_offset = next_offset;
13743                } else {
13744                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13745                    inner_depth.increment()?;
13746                }
13747                let val_ref = self.max_channel_time.get_or_insert_with(|| fidl::new_empty!(u32, D));
13748                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
13749                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13750                {
13751                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13752                }
13753                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13754                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13755                }
13756            }
13757
13758            next_offset += envelope_size;
13759
13760            // Decode the remaining unknown envelopes.
13761            while next_offset < end_offset {
13762                _next_ordinal_to_read += 1;
13763                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13764                next_offset += envelope_size;
13765            }
13766
13767            Ok(())
13768        }
13769    }
13770
13771    impl WlanFullmacImplStopBssRequest {
13772        #[inline(always)]
13773        fn max_ordinal_present(&self) -> u64 {
13774            if let Some(_) = self.ssid {
13775                return 1;
13776            }
13777            0
13778        }
13779    }
13780
13781    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplStopBssRequest {
13782        type Borrowed<'a> = &'a Self;
13783        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13784            value
13785        }
13786    }
13787
13788    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplStopBssRequest {
13789        type Owned = Self;
13790
13791        #[inline(always)]
13792        fn inline_align(_context: fidl::encoding::Context) -> usize {
13793            8
13794        }
13795
13796        #[inline(always)]
13797        fn inline_size(_context: fidl::encoding::Context) -> usize {
13798            16
13799        }
13800    }
13801
13802    unsafe impl<D: fidl::encoding::ResourceDialect>
13803        fidl::encoding::Encode<WlanFullmacImplStopBssRequest, D>
13804        for &WlanFullmacImplStopBssRequest
13805    {
13806        unsafe fn encode(
13807            self,
13808            encoder: &mut fidl::encoding::Encoder<'_, D>,
13809            offset: usize,
13810            mut depth: fidl::encoding::Depth,
13811        ) -> fidl::Result<()> {
13812            encoder.debug_check_bounds::<WlanFullmacImplStopBssRequest>(offset);
13813            // Vector header
13814            let max_ordinal: u64 = self.max_ordinal_present();
13815            encoder.write_num(max_ordinal, offset);
13816            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
13817            // Calling encoder.out_of_line_offset(0) is not allowed.
13818            if max_ordinal == 0 {
13819                return Ok(());
13820            }
13821            depth.increment()?;
13822            let envelope_size = 8;
13823            let bytes_len = max_ordinal as usize * envelope_size;
13824            #[allow(unused_variables)]
13825            let offset = encoder.out_of_line_offset(bytes_len);
13826            let mut _prev_end_offset: usize = 0;
13827            if 1 > max_ordinal {
13828                return Ok(());
13829            }
13830
13831            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
13832            // are envelope_size bytes.
13833            let cur_offset: usize = (1 - 1) * envelope_size;
13834
13835            // Zero reserved fields.
13836            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13837
13838            // Safety:
13839            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
13840            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
13841            //   envelope_size bytes, there is always sufficient room.
13842            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 32>, D>(
13843                self.ssid.as_ref().map(
13844                    <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow,
13845                ),
13846                encoder,
13847                offset + cur_offset,
13848                depth,
13849            )?;
13850
13851            _prev_end_offset = cur_offset + envelope_size;
13852
13853            Ok(())
13854        }
13855    }
13856
13857    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13858        for WlanFullmacImplStopBssRequest
13859    {
13860        #[inline(always)]
13861        fn new_empty() -> Self {
13862            Self::default()
13863        }
13864
13865        unsafe fn decode(
13866            &mut self,
13867            decoder: &mut fidl::encoding::Decoder<'_, D>,
13868            offset: usize,
13869            mut depth: fidl::encoding::Depth,
13870        ) -> fidl::Result<()> {
13871            decoder.debug_check_bounds::<Self>(offset);
13872            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
13873                None => return Err(fidl::Error::NotNullable),
13874                Some(len) => len,
13875            };
13876            // Calling decoder.out_of_line_offset(0) is not allowed.
13877            if len == 0 {
13878                return Ok(());
13879            };
13880            depth.increment()?;
13881            let envelope_size = 8;
13882            let bytes_len = len * envelope_size;
13883            let offset = decoder.out_of_line_offset(bytes_len)?;
13884            // Decode the envelope for each type.
13885            let mut _next_ordinal_to_read = 0;
13886            let mut next_offset = offset;
13887            let end_offset = offset + bytes_len;
13888            _next_ordinal_to_read += 1;
13889            if next_offset >= end_offset {
13890                return Ok(());
13891            }
13892
13893            // Decode unknown envelopes for gaps in ordinals.
13894            while _next_ordinal_to_read < 1 {
13895                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13896                _next_ordinal_to_read += 1;
13897                next_offset += envelope_size;
13898            }
13899
13900            let next_out_of_line = decoder.next_out_of_line();
13901            let handles_before = decoder.remaining_handles();
13902            if let Some((inlined, num_bytes, num_handles)) =
13903                fidl::encoding::decode_envelope_header(decoder, next_offset)?
13904            {
13905                let member_inline_size =
13906                    <fidl::encoding::Vector<u8, 32> as fidl::encoding::TypeMarker>::inline_size(
13907                        decoder.context,
13908                    );
13909                if inlined != (member_inline_size <= 4) {
13910                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
13911                }
13912                let inner_offset;
13913                let mut inner_depth = depth.clone();
13914                if inlined {
13915                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13916                    inner_offset = next_offset;
13917                } else {
13918                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13919                    inner_depth.increment()?;
13920                }
13921                let val_ref = self
13922                    .ssid
13923                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D));
13924                fidl::decode!(fidl::encoding::Vector<u8, 32>, D, val_ref, decoder, inner_offset, inner_depth)?;
13925                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13926                {
13927                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
13928                }
13929                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13930                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13931                }
13932            }
13933
13934            next_offset += envelope_size;
13935
13936            // Decode the remaining unknown envelopes.
13937            while next_offset < end_offset {
13938                _next_ordinal_to_read += 1;
13939                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13940                next_offset += envelope_size;
13941            }
13942
13943            Ok(())
13944        }
13945    }
13946
13947    impl WlanFullmacImplQueryResponse {
13948        #[inline(always)]
13949        fn max_ordinal_present(&self) -> u64 {
13950            if let Some(_) = self.band_caps {
13951                return 3;
13952            }
13953            if let Some(_) = self.role {
13954                return 2;
13955            }
13956            if let Some(_) = self.sta_addr {
13957                return 1;
13958            }
13959            0
13960        }
13961    }
13962
13963    impl fidl::encoding::ValueTypeMarker for WlanFullmacImplQueryResponse {
13964        type Borrowed<'a> = &'a Self;
13965        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13966            value
13967        }
13968    }
13969
13970    unsafe impl fidl::encoding::TypeMarker for WlanFullmacImplQueryResponse {
13971        type Owned = Self;
13972
13973        #[inline(always)]
13974        fn inline_align(_context: fidl::encoding::Context) -> usize {
13975            8
13976        }
13977
13978        #[inline(always)]
13979        fn inline_size(_context: fidl::encoding::Context) -> usize {
13980            16
13981        }
13982    }
13983
13984    unsafe impl<D: fidl::encoding::ResourceDialect>
13985        fidl::encoding::Encode<WlanFullmacImplQueryResponse, D> for &WlanFullmacImplQueryResponse
13986    {
13987        unsafe fn encode(
13988            self,
13989            encoder: &mut fidl::encoding::Encoder<'_, D>,
13990            offset: usize,
13991            mut depth: fidl::encoding::Depth,
13992        ) -> fidl::Result<()> {
13993            encoder.debug_check_bounds::<WlanFullmacImplQueryResponse>(offset);
13994            // Vector header
13995            let max_ordinal: u64 = self.max_ordinal_present();
13996            encoder.write_num(max_ordinal, offset);
13997            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
13998            // Calling encoder.out_of_line_offset(0) is not allowed.
13999            if max_ordinal == 0 {
14000                return Ok(());
14001            }
14002            depth.increment()?;
14003            let envelope_size = 8;
14004            let bytes_len = max_ordinal as usize * envelope_size;
14005            #[allow(unused_variables)]
14006            let offset = encoder.out_of_line_offset(bytes_len);
14007            let mut _prev_end_offset: usize = 0;
14008            if 1 > max_ordinal {
14009                return Ok(());
14010            }
14011
14012            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
14013            // are envelope_size bytes.
14014            let cur_offset: usize = (1 - 1) * envelope_size;
14015
14016            // Zero reserved fields.
14017            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14018
14019            // Safety:
14020            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
14021            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
14022            //   envelope_size bytes, there is always sufficient room.
14023            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
14024                self.sta_addr
14025                    .as_ref()
14026                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
14027                encoder,
14028                offset + cur_offset,
14029                depth,
14030            )?;
14031
14032            _prev_end_offset = cur_offset + envelope_size;
14033            if 2 > max_ordinal {
14034                return Ok(());
14035            }
14036
14037            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
14038            // are envelope_size bytes.
14039            let cur_offset: usize = (2 - 1) * envelope_size;
14040
14041            // Zero reserved fields.
14042            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14043
14044            // Safety:
14045            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
14046            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
14047            //   envelope_size bytes, there is always sufficient room.
14048            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_common__common::WlanMacRole, D>(
14049            self.role.as_ref().map(<fidl_fuchsia_wlan_common__common::WlanMacRole as fidl::encoding::ValueTypeMarker>::borrow),
14050            encoder, offset + cur_offset, depth
14051        )?;
14052
14053            _prev_end_offset = cur_offset + envelope_size;
14054            if 3 > max_ordinal {
14055                return Ok(());
14056            }
14057
14058            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
14059            // are envelope_size bytes.
14060            let cur_offset: usize = (3 - 1) * envelope_size;
14061
14062            // Zero reserved fields.
14063            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14064
14065            // Safety:
14066            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
14067            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
14068            //   envelope_size bytes, there is always sufficient room.
14069            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<BandCapability, 16>, D>(
14070            self.band_caps.as_ref().map(<fidl::encoding::Vector<BandCapability, 16> as fidl::encoding::ValueTypeMarker>::borrow),
14071            encoder, offset + cur_offset, depth
14072        )?;
14073
14074            _prev_end_offset = cur_offset + envelope_size;
14075
14076            Ok(())
14077        }
14078    }
14079
14080    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14081        for WlanFullmacImplQueryResponse
14082    {
14083        #[inline(always)]
14084        fn new_empty() -> Self {
14085            Self::default()
14086        }
14087
14088        unsafe fn decode(
14089            &mut self,
14090            decoder: &mut fidl::encoding::Decoder<'_, D>,
14091            offset: usize,
14092            mut depth: fidl::encoding::Depth,
14093        ) -> fidl::Result<()> {
14094            decoder.debug_check_bounds::<Self>(offset);
14095            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
14096                None => return Err(fidl::Error::NotNullable),
14097                Some(len) => len,
14098            };
14099            // Calling decoder.out_of_line_offset(0) is not allowed.
14100            if len == 0 {
14101                return Ok(());
14102            };
14103            depth.increment()?;
14104            let envelope_size = 8;
14105            let bytes_len = len * envelope_size;
14106            let offset = decoder.out_of_line_offset(bytes_len)?;
14107            // Decode the envelope for each type.
14108            let mut _next_ordinal_to_read = 0;
14109            let mut next_offset = offset;
14110            let end_offset = offset + bytes_len;
14111            _next_ordinal_to_read += 1;
14112            if next_offset >= end_offset {
14113                return Ok(());
14114            }
14115
14116            // Decode unknown envelopes for gaps in ordinals.
14117            while _next_ordinal_to_read < 1 {
14118                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14119                _next_ordinal_to_read += 1;
14120                next_offset += envelope_size;
14121            }
14122
14123            let next_out_of_line = decoder.next_out_of_line();
14124            let handles_before = decoder.remaining_handles();
14125            if let Some((inlined, num_bytes, num_handles)) =
14126                fidl::encoding::decode_envelope_header(decoder, next_offset)?
14127            {
14128                let member_inline_size =
14129                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
14130                        decoder.context,
14131                    );
14132                if inlined != (member_inline_size <= 4) {
14133                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
14134                }
14135                let inner_offset;
14136                let mut inner_depth = depth.clone();
14137                if inlined {
14138                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14139                    inner_offset = next_offset;
14140                } else {
14141                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14142                    inner_depth.increment()?;
14143                }
14144                let val_ref = self
14145                    .sta_addr
14146                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
14147                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
14148                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14149                {
14150                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
14151                }
14152                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14153                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14154                }
14155            }
14156
14157            next_offset += envelope_size;
14158            _next_ordinal_to_read += 1;
14159            if next_offset >= end_offset {
14160                return Ok(());
14161            }
14162
14163            // Decode unknown envelopes for gaps in ordinals.
14164            while _next_ordinal_to_read < 2 {
14165                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14166                _next_ordinal_to_read += 1;
14167                next_offset += envelope_size;
14168            }
14169
14170            let next_out_of_line = decoder.next_out_of_line();
14171            let handles_before = decoder.remaining_handles();
14172            if let Some((inlined, num_bytes, num_handles)) =
14173                fidl::encoding::decode_envelope_header(decoder, next_offset)?
14174            {
14175                let member_inline_size = <fidl_fuchsia_wlan_common__common::WlanMacRole as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14176                if inlined != (member_inline_size <= 4) {
14177                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
14178                }
14179                let inner_offset;
14180                let mut inner_depth = depth.clone();
14181                if inlined {
14182                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14183                    inner_offset = next_offset;
14184                } else {
14185                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14186                    inner_depth.increment()?;
14187                }
14188                let val_ref = self.role.get_or_insert_with(|| {
14189                    fidl::new_empty!(fidl_fuchsia_wlan_common__common::WlanMacRole, D)
14190                });
14191                fidl::decode!(
14192                    fidl_fuchsia_wlan_common__common::WlanMacRole,
14193                    D,
14194                    val_ref,
14195                    decoder,
14196                    inner_offset,
14197                    inner_depth
14198                )?;
14199                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14200                {
14201                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
14202                }
14203                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14204                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14205                }
14206            }
14207
14208            next_offset += envelope_size;
14209            _next_ordinal_to_read += 1;
14210            if next_offset >= end_offset {
14211                return Ok(());
14212            }
14213
14214            // Decode unknown envelopes for gaps in ordinals.
14215            while _next_ordinal_to_read < 3 {
14216                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14217                _next_ordinal_to_read += 1;
14218                next_offset += envelope_size;
14219            }
14220
14221            let next_out_of_line = decoder.next_out_of_line();
14222            let handles_before = decoder.remaining_handles();
14223            if let Some((inlined, num_bytes, num_handles)) =
14224                fidl::encoding::decode_envelope_header(decoder, next_offset)?
14225            {
14226                let member_inline_size = <fidl::encoding::Vector<BandCapability, 16> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14227                if inlined != (member_inline_size <= 4) {
14228                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
14229                }
14230                let inner_offset;
14231                let mut inner_depth = depth.clone();
14232                if inlined {
14233                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14234                    inner_offset = next_offset;
14235                } else {
14236                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14237                    inner_depth.increment()?;
14238                }
14239                let val_ref = self.band_caps.get_or_insert_with(
14240                    || fidl::new_empty!(fidl::encoding::Vector<BandCapability, 16>, D),
14241                );
14242                fidl::decode!(fidl::encoding::Vector<BandCapability, 16>, D, val_ref, decoder, inner_offset, inner_depth)?;
14243                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14244                {
14245                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
14246                }
14247                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14248                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14249                }
14250            }
14251
14252            next_offset += envelope_size;
14253
14254            // Decode the remaining unknown envelopes.
14255            while next_offset < end_offset {
14256                _next_ordinal_to_read += 1;
14257                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14258                next_offset += envelope_size;
14259            }
14260
14261            Ok(())
14262        }
14263    }
14264}